/* ==========================================================================
   EKILIBRUM — Bandeau de consentement aux cookies (css/cookie-consent.css)
   Réutilise l'identité du site : fond sombre, cyan #2EE6E0, glow, Rajdhani/Inter.
   Les valeurs de repli permettent de l'utiliser même sur les pages sans :root.
   ========================================================================== */

body.ekc-lock{ overflow: hidden; }

.ekc-banner{
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  width: min(880px, calc(100% - 32px)); z-index: 9000;
  display: flex; align-items: center; justify-content: space-between; gap: 22px;
  padding: 20px 24px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(46,230,224,0.05), transparent), rgba(8,12,14,0.97);
  border: 1px solid var(--panel-border, rgba(46,230,224,0.28));
  box-shadow: 0 0 26px rgba(46,230,224,0.16), 0 18px 40px rgba(0,0,0,0.55);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-family: 'Inter', sans-serif; color: var(--white, #f3f7f8);
  animation: ekcIn .4s cubic-bezier(.16,1,.3,1) both;
}
@keyframes ekcIn{ from{ opacity: 0; transform: translate(-50%, 16px); } to{ opacity: 1; transform: translate(-50%, 0); } }

.ekc-text{ flex: 1; min-width: 0; }
.ekc-title{
  margin: 0 0 6px; font-family: 'Rajdhani', sans-serif; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; font-size: 1.15rem; color: var(--cyan, #2ee6e0);
  text-shadow: 0 0 10px rgba(46,230,224,0.45);
}
.ekc-desc{ margin: 0; font-size: 0.86rem; line-height: 1.55; color: var(--muted, #9aa7ac); }
.ekc-link{ color: var(--cyan, #2ee6e0); text-decoration: underline; text-underline-offset: 3px; }
.ekc-link:hover{ text-shadow: 0 0 10px rgba(46,230,224,0.5); }

.ekc-actions{ display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.ekc-btn{
  font-family: 'Rajdhani', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  font-size: 0.86rem; padding: 11px 18px; border-radius: 8px; cursor: pointer; white-space: nowrap;
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease, transform .2s ease;
}
.ekc-btn-ghost{ background: transparent; color: var(--white, #f3f7f8); border: 1.5px solid var(--cyan-soft, rgba(46,230,224,0.55)); }
.ekc-btn-ghost:hover{ background: rgba(46,230,224,0.08); border-color: var(--cyan, #2ee6e0); box-shadow: 0 0 16px rgba(46,230,224,0.35); }
.ekc-btn-main{ background: var(--cyan, #2ee6e0); color: #06090b; border: 1.5px solid var(--cyan, #2ee6e0); box-shadow: 0 0 18px rgba(46,230,224,0.4); }
.ekc-btn-main:hover{ box-shadow: 0 0 28px rgba(46,230,224,0.6); transform: translateY(-1px); }
.ekc-btn:focus-visible, .ekc-close:focus-visible, .ekc-link:focus-visible{ outline: 2px solid var(--white, #f3f7f8); outline-offset: 2px; }

/* Panneau « Gérer mes cookies » */
.ekc-overlay{
  position: fixed; inset: 0; z-index: 9500; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(3,6,8,0.78); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.ekc-dialog{
  width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 24px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(46,230,224,0.05), transparent), #0a0f12;
  border: 1px solid var(--panel-border, rgba(46,230,224,0.28));
  box-shadow: 0 0 30px rgba(46,230,224,0.2), 0 24px 50px rgba(0,0,0,0.6);
  font-family: 'Inter', sans-serif; color: var(--white, #f3f7f8);
  scrollbar-width: thin; scrollbar-color: rgba(46,230,224,0.4) transparent;
}
.ekc-dlg-head{ display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.ekc-dlg-head .ekc-title{ margin: 0; font-size: 1.3rem; }
.ekc-close{
  flex-shrink: 0; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  color: var(--muted, #9aa7ac); background: transparent; border: 1px solid rgba(46,230,224,0.22); border-radius: 10px;
  transition: color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.ekc-close svg{ width: 16px; height: 16px; }
.ekc-close:hover{ color: var(--cyan, #2ee6e0); border-color: var(--cyan, #2ee6e0); box-shadow: 0 0 12px rgba(46,230,224,0.3); }

.ekc-list{ display: flex; flex-direction: column; gap: 10px; margin: 18px 0 20px; }
.ekc-row{
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px;
  border: 1px solid rgba(46,230,224,0.22); background: rgba(46,230,224,0.04);
}
.ekc-row-text{ flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ekc-row-title{ font-family: 'Rajdhani', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; font-size: 0.98rem; }
.ekc-row-desc{ font-size: 0.8rem; line-height: 1.45; color: var(--muted-2, #7c8a8f); }
.ekc-always{ font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--cyan, #2ee6e0); white-space: nowrap; }

.ekc-switch{ position: relative; flex-shrink: 0; width: 46px; height: 26px; cursor: pointer; }
.ekc-switch input{ position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ekc-switch input:disabled{ cursor: not-allowed; }
.ekc-track{
  position: absolute; inset: 0; border-radius: 999px; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(46,230,224,0.3); transition: background .25s ease, box-shadow .25s ease; pointer-events: none;
}
.ekc-track::after{
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--muted, #9aa7ac); transition: transform .25s ease, background .25s ease;
}
.ekc-switch input:checked + .ekc-track{ background: rgba(46,230,224,0.25); box-shadow: 0 0 12px rgba(46,230,224,0.35); }
.ekc-switch input:checked + .ekc-track::after{ transform: translateX(20px); background: var(--cyan, #2ee6e0); }
.ekc-switch input:disabled + .ekc-track{ opacity: 0.65; }
.ekc-switch input:focus-visible + .ekc-track{ outline: 2px solid var(--white, #f3f7f8); outline-offset: 2px; }

.ekc-actions-dlg{ justify-content: flex-end; flex-wrap: wrap; }

/* Tablette (561–980 px) : bandeau plus étroit, centré, en colonne ; boutons de même largeur */
@media (max-width: 980px){
  .ekc-banner{ width: min(620px, calc(100% - 48px)); flex-direction: column; align-items: stretch; gap: 16px; }
  .ekc-actions{ justify-content: stretch; }
  .ekc-actions .ekc-btn{ flex: 1; }
}

/* Mobile : boutons empilés pleine largeur, bandeau collé en bas */
@media (max-width: 560px){
  .ekc-banner{ bottom: 10px; width: calc(100% - 20px); padding: 16px; border-radius: 16px; }
  .ekc-title{ font-size: 1.05rem; }
  .ekc-actions{ flex-direction: column-reverse; align-items: stretch; }
  .ekc-btn{ width: 100%; text-align: center; padding: 12px 14px; }
  /* Panneau « Gérer mes cookies » compact sur mobile */
  .ekc-overlay{ padding: 12px; }
  .ekc-dialog{ padding: 14px; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); border-radius: 16px; }
  .ekc-dlg-head{ margin-bottom: 6px; }
  .ekc-dlg-head .ekc-title{ font-size: 1.05rem; }
  .ekc-close{ width: 32px; height: 32px; }
  .ekc-dialog > .ekc-desc{ font-size: 0.76rem; line-height: 1.4; }
  .ekc-list{ gap: 7px; margin: 12px 0 14px; }
  .ekc-row{ padding: 9px 11px; gap: 10px; border-radius: 10px; }
  .ekc-row-title{ font-size: 0.86rem; }
  .ekc-row-desc{ font-size: 0.7rem; line-height: 1.3; }
  .ekc-always{ display: none; }
  .ekc-switch{ width: 40px; height: 22px; }
  .ekc-track::after{ top: 2px; left: 2px; width: 16px; height: 16px; }
  .ekc-switch input:checked + .ekc-track::after{ transform: translateX(18px); }
  .ekc-actions-dlg{ display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .ekc-actions-dlg .ekc-btn{ padding: 10px 8px; font-size: 0.76rem; }
  .ekc-actions-dlg .ekc-btn-main{ grid-column: 1 / -1; grid-row: 1; }
}

@media (prefers-reduced-motion: reduce){
  .ekc-banner{ animation: none; transform: translateX(-50%); }
  .ekc-track, .ekc-track::after, .ekc-btn{ transition: none; }
}
