/* ==================================================================
   Consentement cookies / contenus externes — bandeau + facades.
   Couleurs lues sur les variables communes a tous les themes (--noir,
   --blanc-pur, --rose-fonce, --gris) avec repli. Aucune ressource
   distante (RGPD). Logique : _js/consentement.js.
   ================================================================== */

/* --- Bandeau (non bloquant, bas de page) --- */
.ecs-consent {
  position:fixed; left:16px; bottom:16px; z-index:98;
  width:min(520px, calc(100vw - 32px)); max-height:calc(100vh - 32px); overflow:auto;
  background:var(--blanc-pur, #fff); color:var(--noir, #26262e);
  border:1px solid rgba(0,0,0,.12); border-radius:12px;
  box-shadow:0 18px 48px rgba(0,0,0,.22);
  padding:22px 22px 18px; font-size:15px; line-height:1.5;
}
.ecs-consent[hidden] { display:none; }
.ecs-consent:focus { outline:none; }
.ecs-consent:focus-visible { outline:3px solid var(--rose-fonce, #c2185b); outline-offset:2px; }
.ecs-consent-titre { margin:0 0 8px; font-size:18px; line-height:1.3; }
.ecs-consent p { margin:0 0 10px; }
.ecs-consent a { color:inherit; text-decoration:underline; }

/* Panneau « Personnaliser » : une case par categorie. */
.ecs-consent-choix[hidden] { display:none; }
.ecs-consent-choix { margin:4px 0 14px; padding:14px 0 0; border-top:1px solid rgba(0,0,0,.12); }
.ecs-consent fieldset { margin:0 0 12px; padding:0; border:0; }
.ecs-consent legend { padding:0; margin:0 0 8px; font-weight:700; }
.ecs-consent-cat {
  display:grid; grid-template-columns:auto 1fr; column-gap:10px; align-items:start;
  padding:10px 0; border-bottom:1px solid rgba(0,0,0,.08);
}
.ecs-consent-cat input { width:20px; height:20px; margin:1px 0 0; accent-color:var(--rose-fonce, #c2185b); }
.ecs-consent-cat label { font-weight:700; cursor:pointer; }
.ecs-consent-cat input:disabled + label { cursor:default; }
.ecs-consent-cat p { grid-column:2; margin:4px 0 0; font-size:14px; color:var(--gris, #5a5a5a); }
.ecs-consent-toujours { font-weight:400; font-size:14px; }
.ecs-consent-choix .ecs-consent-btn { width:100%; }

/* « Tout refuser » et « Tout accepter » : MEME poids visuel (exigence CNIL). */
.ecs-consent-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:4px; }
.ecs-consent-actions .ecs-consent-btn-sec { grid-column:1 / -1; }
.ecs-consent-btn {
  padding:12px 14px; border-radius:6px; cursor:pointer;
  font:inherit; font-weight:700; line-height:1.2;
  background:var(--noir, #26262e); color:var(--blanc-pur, #fff);
  border:2px solid var(--noir, #26262e);
}
.ecs-consent-btn:hover { background:var(--rose-fonce, #c2185b); border-color:var(--rose-fonce, #c2185b); }
/* « Personnaliser » : secondaire (contour), entre les deux choix de meme poids. */
.ecs-consent-btn-sec { background:var(--blanc-pur, #fff); color:var(--noir, #26262e); }
.ecs-consent-btn-sec:hover { color:#fff; }
.ecs-consent-btn:focus-visible { outline:3px solid var(--rose-fonce, #c2185b); outline-offset:2px; }

/* --- Facade d'un contenu externe (video, iframe) tant qu'il n'est pas autorise --- */
.ecs-ext-ask {
  position:absolute; inset:0; z-index:2;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px;
  padding:16px; text-align:center; overflow:auto;
  background:rgba(20,20,26,.88); color:#fff; font-size:15px; line-height:1.45;
}
.ecs-ext-ask p { margin:0; max-width:46ch; }
.ecs-ext-go {
  padding:10px 20px; border-radius:6px; cursor:pointer; font:inherit; font-weight:700;
  background:#fff; color:var(--noir, #26262e); border:2px solid #fff;
}
.ecs-ext-go:hover { background:var(--rose-fonce, #c2185b); border-color:var(--rose-fonce, #c2185b); color:#fff; }
.ecs-ext-always {
  padding:4px 6px; cursor:pointer; font:inherit; font-size:14px;
  background:none; border:0; color:#fff; text-decoration:underline;
}
.ecs-ext-go:focus-visible, .ecs-ext-always:focus-visible { outline:3px solid #fff; outline-offset:2px; }
/* Cadre iframe encore vide : hauteur minimale pour que le message tienne. */
.if-cadre[data-ext-src] { min-height:180px; }

@media print { .ecs-consent { display:none; } }
