/* ===========================================================
   COOKIE CONSENT BANNER + PREFERENCES MODAL
   Conforme RGPD/CNIL : refus aussi simple que l'acceptation,
   pas de dépôt avant consentement, durée 13 mois.
   =========================================================== */

/* Banner */
.lcf-cb {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-cookie-banner, 9100);  /* 9100 — au-dessus du grain, sous skip-link */
  background: #0a0a0a;
  border-top: 1px solid #3B82F6;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.6),
              0 -2px 0 rgba(59, 130, 246, 0.25);
  color: #eeeae0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  transform: translateY(100%);
  opacity: 0;
  visibility: hidden;
  transition: transform .55s cubic-bezier(.16, 1, .3, 1),
              opacity .35s ease,
              visibility 0s linear .55s;
}
.lcf-cb.is-on {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  transition: transform .55s cubic-bezier(.16, 1, .3, 1),
              opacity .35s ease,
              visibility 0s linear 0s;
}
.lcf-cb__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 22px;
  align-items: center;
}
.lcf-cb__body { max-width: 760px; }
.lcf-cb__title {
  font-family: "Courier Prime", "Courier New", monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #60A5FA;
  margin: 0 0 8px;
}
.lcf-cb__text {
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
  color: #d4d0c6;
}
.lcf-cb__text a {
  color: #60A5FA;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.lcf-cb__text a:hover { color: #eeeae0; }

.lcf-cb__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.lcf-cb-btn {
  /* All three buttons share the SAME size + neutral background by default.
     CNIL: refuser doit être aussi évident qu'accepter. */
  font-family: "Inter", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 11px 18px;
  min-width: 130px;
  border-radius: 4px;
  border: 1px solid rgba(238, 234, 224, 0.25);
  background: transparent;
  color: #eeeae0;
  cursor: pointer;
  transition: background .18s, border-color .18s, color .18s;
}
.lcf-cb-btn:hover {
  background: rgba(238, 234, 224, 0.06);
  border-color: rgba(238, 234, 224, 0.45);
}
.lcf-cb-btn:focus-visible {
  outline: 2px solid #60A5FA;
  outline-offset: 2px;
}
/* "Tout accepter" — accent variant. To stay CNIL-compliant the refuse
   button is also bold/visible (border + same size) — only the fill changes. */
.lcf-cb-btn--accent {
  background: #3B82F6;
  border-color: #3B82F6;
  color: #fff;
}
.lcf-cb-btn--accent:hover {
  background: #60A5FA;
  border-color: #60A5FA;
}

/* Modal */
.lcf-cm {
  position: fixed;
  inset: 0;
  z-index: var(--z-cookie-banner, 9100);  /* idem bandeau, modale au même niveau */
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: #eeeae0;
  animation: lcfFadeIn .3s ease both;
}
.lcf-cm.is-on { display: flex; }
@keyframes lcfFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.lcf-cm__panel {
  width: min(100%, 640px);
  max-height: calc(100vh - 48px);
  background: #131316;
  border: 1px solid rgba(238, 234, 224, 0.18);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: lcfPanelIn .35s cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes lcfPanelIn {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.lcf-cm__head {
  padding: 24px 28px 18px;
  border-bottom: 1px solid rgba(238, 234, 224, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.lcf-cm__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.005em;
}
.lcf-cm__tag {
  font-family: "Courier Prime", "Courier New", monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #8b887f;
  margin: 0 0 6px;
}
.lcf-cm__close {
  background: transparent;
  border: 1px solid rgba(238, 234, 224, 0.18);
  color: #c4c1b8;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: color .18s, border-color .18s, background .18s;
  flex-shrink: 0;
}
.lcf-cm__close:hover { color: #fff; border-color: rgba(238, 234, 224, 0.4); }
.lcf-cm__close:focus-visible { outline: 2px solid #60A5FA; outline-offset: 2px; }

.lcf-cm__body {
  padding: 22px 28px;
  overflow-y: auto;
  flex: 1;
}
.lcf-cm__intro {
  font-size: 14px;
  line-height: 1.6;
  color: #c4c1b8;
  margin: 0 0 22px;
}

/* Category cards */
.lcf-cat {
  border: 1px solid rgba(238, 234, 224, 0.1);
  border-radius: 6px;
  padding: 16px 18px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 18px;
  align-items: start;
}
.lcf-cat__title {
  font-size: 14.5px;
  font-weight: 600;
  margin: 0 0 4px;
  color: #fff;
}
.lcf-cat__desc {
  font-size: 13px;
  line-height: 1.55;
  color: #c4c1b8;
  margin: 0;
}
.lcf-cat__lock {
  font-family: "Courier Prime", "Courier New", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #60A5FA;
  align-self: center;
}

/* Toggle switch */
.lcf-tog {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  align-self: center;
}
.lcf-tog input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.lcf-tog__slider {
  position: absolute;
  inset: 0;
  background: rgba(238, 234, 224, 0.15);
  border: 1px solid rgba(238, 234, 224, 0.25);
  border-radius: 999px;
  cursor: pointer;
  transition: background .22s, border-color .22s;
}
.lcf-tog__slider::before {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #eeeae0;
  transition: transform .22s cubic-bezier(.4, 0, .2, 1);
}
.lcf-tog input:checked + .lcf-tog__slider {
  background: #3B82F6;
  border-color: #3B82F6;
}
.lcf-tog input:checked + .lcf-tog__slider::before {
  transform: translateX(20px);
}
.lcf-tog input:focus-visible + .lcf-tog__slider {
  outline: 2px solid #60A5FA;
  outline-offset: 2px;
}
.lcf-tog input:disabled + .lcf-tog__slider {
  background: rgba(96, 165, 250, 0.4);
  border-color: rgba(96, 165, 250, 0.4);
  cursor: not-allowed;
}

.lcf-cm__foot {
  padding: 18px 28px 24px;
  border-top: 1px solid rgba(238, 234, 224, 0.1);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}
.lcf-cm__foot-l { display: flex; gap: 8px; flex-wrap: wrap; }
.lcf-cm__foot-r { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* Mobile */
@media (max-width: 720px) {
  .lcf-cb__inner {
    grid-template-columns: 1fr;
    padding: 18px 18px 20px;
    gap: 14px;
  }
  .lcf-cb__actions { justify-content: stretch; }
  .lcf-cb-btn { flex: 1; min-width: 0; }
  .lcf-cm { padding: 0; align-items: flex-end; }
  .lcf-cm__panel {
    max-height: 92vh;
    border-radius: 12px 12px 0 0;
    border-bottom: 0;
  }
  .lcf-cm__head, .lcf-cm__body, .lcf-cm__foot { padding-left: 20px; padding-right: 20px; }
  .lcf-cm__foot { flex-direction: column; align-items: stretch; }
  .lcf-cm__foot-l, .lcf-cm__foot-r { width: 100%; }
  .lcf-cm__foot-r .lcf-cb-btn { flex: 1; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .lcf-cb, .lcf-cm, .lcf-cm__panel { animation: none; transition: opacity .01s, visibility .01s; }
}
