/* Bandeau de choix des cookies (inc/mesure-audience.php, assets/consentement/consentement.js).
   Non modal : il ne bloque ni la page ni la navigation. Ordinateur : carte en bas à droite (la bulle de Sophie
   est en bas à gauche). Téléphone : panneau en bas sur toute la largeur ; la bulle remonte au-dessus (le script
   ajoute #cfa-choix à CFA_ASSISTANT.eviter, que sophie.js évite). Jetons du thème (tokens.css). */
.cfa-choix {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 94; /* sous Sophie (96) et son halo (95) : la bulle ouverte reste au-dessus */
  width: min(440px, calc(100% - 48px));
  max-height: calc(100dvh - var(--header-h, 72px) - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-m) var(--space-m) var(--space-s);
  background: var(--bg-raised);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-3);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: var(--leading-body);
}
.cfa-choix[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .cfa-choix:not([hidden]) { animation: cfa-choix-entree var(--dur-slow) var(--ease-out) both; }
}
/* Glissement seul, sans fondu : la bulle de Sophie mesure le bandeau dès son arrivée et ignore un élément transparent. */
@keyframes cfa-choix-entree {
  from { transform: translateY(16px); }
}

.cfa-choix__titre {
  margin: 0 0 var(--space-2xs);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-2);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-display);
}
.cfa-choix__titre:focus { outline: none; }
.cfa-choix__titre:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.cfa-choix__texte { margin: 0 0 var(--space-s); color: var(--ink-soft); }

.cfa-choix__detail { display: grid; gap: var(--space-xs); margin: 0 0 var(--space-s); }
.cfa-choix__detail[hidden] { display: none; }
.cfa-choix__categorie {
  padding: var(--space-xs) var(--space-s);
  background: var(--bg-sunken);
  border-radius: var(--radius-m);
}
.cfa-choix__nom { margin: 0; font-weight: 700; color: var(--ink); }
.cfa-choix__etat { font-weight: 500; color: var(--ink-soft); }
.cfa-choix__etat::before { content: '· '; }
.cfa-choix__aide { margin: 0.2rem 0 0; font-size: var(--step--1); color: var(--ink-soft); }
.cfa-choix__case { display: flex; align-items: center; gap: 0.7rem; min-height: 44px; cursor: pointer; }
.cfa-choix__case input {
  width: 1.35rem;
  height: 1.35rem;
  margin: 0;
  flex: none;
  accent-color: var(--navy);
  cursor: pointer;
}

/* Refuser et accepter : même taille, même couleur, côte à côte. Personnaliser : en dessous, sur toute la ligne. */
.cfa-choix__actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2xs); }
.cfa-choix__bouton { width: 100%; min-height: 44px; white-space: normal; text-align: center; }
.cfa-choix__bouton--detail { grid-column: 1 / -1; }
.cfa-choix__bouton[hidden] { display: none; }
.cfa-choix__plus { margin: var(--space-xs) 0 0; font-size: var(--step--1); }
.cfa-choix__plus a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: underline;
}
.cfa-choix__plus a:hover { text-decoration-thickness: 2px; }

@media (max-width: 640px) {
  .cfa-choix {
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: calc(100dvh - var(--header-h, 64px) - 8px);
    padding: var(--space-s) 16px calc(var(--space-xs) + env(safe-area-inset-bottom));
    border-width: 1px 0 0;
    border-radius: var(--radius-l) var(--radius-l) 0 0;
  }
  .cfa-choix__titre { font-size: var(--step-1); }
  .cfa-choix__texte { font-size: var(--step--1); margin-bottom: var(--space-xs); }
  .cfa-choix__plus { margin-top: 0.1rem; }
}

/* Lien « Gérer mes cookies » du pied de page : un bouton qui ressemble aux liens voisins. */
.site-footer__cookies {
  padding: 0;
  border: 0;
  background: none;
  color: rgb(255 255 255 / 0.75);
  font: inherit;
  text-decoration: underline;
  text-decoration-color: rgb(255 255 255 / 0.35);
  text-underline-offset: 0.18em;
  cursor: pointer;
}
.site-footer__cookies:hover { text-decoration-color: var(--yellow); }
.site-footer__cookies[hidden] { display: none; }
@media (max-width: 1060px), (pointer: coarse) {
  .site-footer__cookies { display: inline-flex; align-items: center; min-height: 44px; }
}

@media print {
  .cfa-choix { display: none !important; }
}
