/* Module de consentement RGPD — présentation
   ------------------------------------------------------------------
   Rendu neutre par défaut, commun à tous les sites. Pour l'adapter à la
   charte d'un site, redéfinir les variables dans le CSS de ce site, par
   exemple dans <site>/template.css :

       :root{ --rgpd-fond:#1b1510; --rgpd-accent:#fecc00; }

   Ne pas surcharger les sélecteurs eux-mêmes : les variables suffisent et
   survivront aux mises à jour du module. */

:root{
  --rgpd-fond:#14181d;
  --rgpd-texte:#eef1f4;
  --rgpd-attenue:#b6bdc6;
  --rgpd-accent:#ffffff;
  --rgpd-accent-texte:#14181d;
  --rgpd-bord:rgba(255,255,255,.22);
  --rgpd-ombre:0 -2px 24px rgba(0,0,0,.35);
  --rgpd-rayon:0;
  --rgpd-z:2147483000;   /* au-dessus des sliders et lightboxes du CMS */
}

.rgpd{
  position:fixed; left:0; right:0; bottom:0; z-index:var(--rgpd-z);
  background:var(--rgpd-fond); color:var(--rgpd-texte);
  box-shadow:var(--rgpd-ombre); border-radius:var(--rgpd-rayon);
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  font-size:14px; line-height:1.5;
}
.rgpd[hidden]{ display:none !important; }

.rgpd__boite{
  max-width:1200px; margin:0 auto; padding:16px 20px;
  display:flex; align-items:center; gap:20px; flex-wrap:wrap;
}
.rgpd__texte{ flex:1 1 320px; min-width:0; }
.rgpd__texte p{ margin:0; color:var(--rgpd-attenue); }
.rgpd__titre{ font-weight:600; color:var(--rgpd-texte); margin:0 0 4px !important; font-size:15px; }
.rgpd__lien{ color:var(--rgpd-texte); text-decoration:underline; }

.rgpd__boutons{ display:flex; gap:10px; flex:0 0 auto; }

/* Les deux boutons ont le même poids : refuser doit être aussi simple
   qu'accepter. Seule la couleur les distingue, pas la taille. */
.rgpd__bouton{
  font:inherit; font-weight:600; cursor:pointer;
  padding:10px 22px; min-width:120px;
  border:1px solid var(--rgpd-bord); border-radius:var(--rgpd-rayon);
  background:transparent; color:var(--rgpd-texte);
  transition:opacity .15s ease;
}
.rgpd__bouton:hover{ opacity:.8; }
.rgpd__bouton--oui{
  background:var(--rgpd-accent); color:var(--rgpd-accent-texte);
  border-color:var(--rgpd-accent);
}
.rgpd__bouton:focus-visible{ outline:2px solid var(--rgpd-accent); outline-offset:2px; }

/* Rappel discret permettant de revenir sur son choix. */
.rgpd__rouvrir{
  position:fixed; left:12px; bottom:12px; z-index:calc(var(--rgpd-z) - 1);
  font:inherit; font-size:12px; cursor:pointer;
  padding:6px 12px; border-radius:var(--rgpd-rayon);
  border:1px solid var(--rgpd-bord);
  background:var(--rgpd-fond); color:var(--rgpd-attenue);
  opacity:.65; transition:opacity .15s ease;
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
}
.rgpd__rouvrir:hover{ opacity:1; }
.rgpd__rouvrir[hidden]{ display:none !important; }

/* Substitut affiché à la place d'un contenu externe non consenti.
   Reprend les proportions de l'élément d'origine pour ne pas casser la mise
   en page ; le clic vaut consentement pour ce seul contenu. */
.rgpd__substitut{
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:8px; padding:20px; text-align:center; cursor:pointer;
  background:#0f1216; color:#c9d1d9; border:1px dashed rgba(255,255,255,.25);
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  font-size:13px; line-height:1.4; width:100%; min-height:160px;
  box-sizing:border-box;
}
.rgpd__substitut:hover{ border-color:rgba(255,255,255,.5); color:#eef1f4; }
.rgpd__substitut strong{ font-size:14px; }

@media (max-width:640px){
  .rgpd__boite{ padding:14px 16px; gap:14px; }
  .rgpd__boutons{ width:100%; }
  .rgpd__bouton{ flex:1 1 0; min-width:0; padding:12px 10px; }
}
