/* ===================================================================
   RBK BÂTIMENT — Bandeau de consentement cookies (RGPD / CNIL)
   Kernel, 06/08/2026
   Reprend les tokens de main.css : --bg, --fg, --dim, --gold, --gold2,
   --line, --radius (0px, design anguleux), --ease.
   z-index : sous le curseur custom (#cur = 9999).
   =================================================================== */

/* ── BANDEAU ─────────────────────────────────────────────────────── */
.ck-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 9000;
  background: var(--bg);
  border-top: 1px solid rgba(200, 168, 76, .35);
  box-shadow: 0 -24px 60px rgba(0, 0, 0, .55);
  padding: 2rem 0 1.9rem;
  transform: translateY(102%);
  transition: transform .55s var(--ease);
}
.ck-banner[hidden] { display: none; }
.ck-banner.is-open { transform: translateY(0); }

/* Liseré or en haut, rappel de la DA */
.ck-banner::before {
  content: '';
  position: absolute; top: -1px; left: 0;
  width: 120px; height: 2px;
  background: var(--gold);
}

.ck-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
}

.ck-txt { flex: 1 1 auto; min-width: 0; }

.ck-title {
  font-family: 'Syne', sans-serif;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 .65rem;
}

.ck-desc {
  font-family: 'Outfit', sans-serif;
  font-size: .93rem;
  line-height: 1.65;
  color: var(--dim);
  margin: 0;
  max-width: 68ch;
}
.ck-desc a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.ck-desc a:hover { color: var(--gold); }

/* ── ACTIONS ─────────────────────────────────────────────────────── */
.ck-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: .8rem;
}

/* Les deux boutons de choix ont EXACTEMENT les mêmes dimensions :
   exigence CNIL — refuser doit être aussi simple qu'accepter. */
.ck-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  padding: 1rem 2rem;
  min-width: 168px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: none;
  transition: transform .25s var(--ease), background .3s, color .3s, border-color .3s;
}
.ck-btn-accept { background: var(--gold); color: var(--bg); }
.ck-btn-accept:hover { background: var(--gold2); transform: scale(1.03); }
.ck-btn-refuse {
  background: transparent;
  color: var(--gold);
  border-color: rgba(200, 168, 76, .35);
}
.ck-btn-refuse:hover { background: rgba(200, 168, 76, .06); border-color: var(--gold); transform: scale(1.03); }

/* Personnaliser : 3e niveau, volontairement discret mais lisible (AA) */
.ck-link {
  font-family: 'Outfit', sans-serif;
  font-size: .82rem;
  color: var(--dim);
  background: none;
  border: none;
  padding: .5rem .2rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: none;
  transition: color .3s;
}
.ck-link:hover { color: var(--gold); }

/* ── PANNEAU DE PRÉFÉRENCES ──────────────────────────────────────── */
.ck-modal {
  position: fixed;
  inset: 0;
  z-index: 9100;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.ck-modal[hidden] { display: none; }
.ck-modal.is-open { opacity: 1; }
.ck-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(8, 8, 10, .82);
  backdrop-filter: blur(3px);
}
.ck-modal-box {
  position: relative;
  width: min(620px, 100%);
  max-height: min(82vh, 720px);
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  transform: translateY(14px);
  transition: transform .45s var(--ease);
}
.ck-modal.is-open .ck-modal-box { transform: translateY(0); }

.ck-modal-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--fg);
  margin: 0 0 .5rem;
}
.ck-modal-sub {
  font-family: 'Outfit', sans-serif;
  font-size: .9rem;
  line-height: 1.65;
  color: var(--dim);
  margin: 0 0 1.75rem;
}

/* ── CATÉGORIES ──────────────────────────────────────────────────── */
.ck-cat {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
}
.ck-cat-txt { flex: 1 1 auto; }
.ck-cat-name {
  font-family: 'Syne', sans-serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--fg);
  margin: 0 0 .45rem;
}
.ck-cat-desc {
  font-family: 'Outfit', sans-serif;
  font-size: .86rem;
  line-height: 1.6;
  color: var(--dim);
  margin: 0;
}
.ck-cat-always {
  font-family: 'Outfit', sans-serif;
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
  padding-top: .15rem;
}

/* Interrupteur — anguleux pour rester dans la DA */
.ck-switch { position: relative; flex: 0 0 auto; width: 52px; height: 28px; }
.ck-switch input {
  position: absolute; inset: 0;
  opacity: 0; margin: 0;
  width: 100%; height: 100%;
  cursor: none;
}
.ck-switch-ui {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, .45);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: var(--radius);
  transition: background .3s, border-color .3s;
  pointer-events: none;
}
/* Marque « I / O » : sans elle, un interrupteur anguleux et gris se lit
   comme une case cochable désactivée. */
.ck-switch-ui::before {
  content: '';
  position: absolute;
  top: 50%; right: 11px;
  width: 9px; height: 9px;
  margin-top: -4.5px;
  border: 1.5px solid rgba(255, 255, 255, .3);
  border-radius: 50%;
  transition: opacity .3s;
}
.ck-switch-ui::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  background: var(--fg);
  border-radius: var(--radius);
  transition: transform .3s var(--ease), background .3s;
}
.ck-switch input:checked + .ck-switch-ui::before {
  right: auto; left: 13px;
  width: 2px; height: 11px;
  margin-top: -5.5px;
  border: none;
  background: rgba(17, 17, 19, .55);
  border-radius: 0;
}
/* Actif : c'est la PISTE qui passe en or, le curseur reste clair.
   Un curseur or sur piste or se confondrait avec la bordure. */
.ck-switch input:checked + .ck-switch-ui {
  background: var(--gold);
  border-color: var(--gold);
}
.ck-switch input:checked + .ck-switch-ui::after {
  transform: translateX(24px);
  background: var(--bg);
}

.ck-modal-actions {
  display: flex;
  gap: .8rem;
  margin-top: 1.9rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}
.ck-modal-actions .ck-btn { flex: 1 1 0; min-width: 0; padding: 1rem 1rem; }

/* ── ACCESSIBILITÉ ───────────────────────────────────────────────── */
/* main.css ne définit aucun style de focus : on en pose un ici,
   limité au composant, pour la navigation clavier. */
.ck-banner :focus-visible,
.ck-modal :focus-visible,
.ck-manage:focus-visible {
  outline: 2px solid var(--gold2);
  outline-offset: 3px;
}
.ck-sr {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Lien « Gérer les cookies » du pied de page : hérite du style des
   autres liens de la colonne, donc pas de mise en forme imposée ici. */
/* `font: inherit` ne transmet ni letter-spacing ni text-transform :
   on les hérite explicitement pour coller aux autres liens du footer. */
.ck-manage {
  background: none; border: none; padding: 0;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-decoration: none;
  cursor: none;
  transition: color .3s;
}
.ck-manage:hover { color: var(--gold); }

/* ── RESPONSIVE ──────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .ck-inner { flex-direction: column; align-items: stretch; gap: 1.5rem; }
  .ck-actions { flex-wrap: wrap; }
  .ck-btn { flex: 1 1 200px; min-width: 0; }
  .ck-link { flex: 1 1 100%; text-align: center; }
}
@media (max-width: 520px) {
  .ck-banner { padding: 1.5rem 0 1.4rem; }
  .ck-desc { font-size: .88rem; }
  .ck-modal-actions { flex-direction: column; }
}

/* Le curseur natif revient sur tactile, comme dans main.css */
@media (hover: none) and (pointer: coarse) {
  .ck-btn, .ck-link, .ck-switch input, .ck-manage { cursor: pointer !important; }
}

@media (prefers-reduced-motion: reduce) {
  .ck-banner, .ck-modal, .ck-modal-box, .ck-btn, .ck-switch-ui::after { transition: none; }
}
