/* =========================================================
   Rêve Binaire — consentement aux cookies
   Feuille commune au site et aux sites de démonstration.
   ========================================================= */

/* ---------- Emplacement d'un plan d'accès ----------
   Le cadre Google n'est inséré qu'après accord : tant qu'il n'y en a pas,
   c'est le bloc d'attente qui occupe exactement la même place. */
.carte {
  position: relative;
  overflow: hidden;
}
.carte iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
/* Un élément masqué doit le rester, même visé par une règle d'affichage. */
.carte [hidden] {
  display: none !important;
}

.carte-attente {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem 1.3rem;
  text-align: center;
  /* currentColor : le bloc s'accorde de lui-même aux six thèmes de démonstration. */
  background: rgba(127, 127, 127, 0.1);
  background: color-mix(in srgb, currentColor 8%, transparent);
  border: 1px solid rgba(127, 127, 127, 0.22);
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
}
.carte-attente-t {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.carte-attente-d {
  margin: 0;
  max-width: 42ch;
  font-size: 0.88rem;
  line-height: 1.55;
  opacity: 0.78;
}
.carte-attente-b {
  font: inherit;
  font-size: 0.87rem;
  font-weight: 600;
  color: inherit;
  background: transparent;
  border: 1.5px solid currentColor;
  border-radius: var(--rb-rayon, 100px);
  padding: 0.6rem 1.3rem;
  cursor: pointer;
  transition: background-color 0.18s, color 0.18s;
}
/* Un fond translucide plutôt qu'un aplat : le texte reste lisible sur les six
   thèmes sans qu'on ait à connaître la couleur de fond de chacun. */
.carte-attente-b:hover {
  background: rgba(127, 127, 127, 0.2);
  background: color-mix(in srgb, currentColor 16%, transparent);
}

/* ---------- Bandeau de choix ----------
   Une seule ligne, sans habillage propre : le bandeau reprend le fond, la
   couleur, la typographie et le rayon des boutons de la page qui l'accueille.
   Sur chacune des six démonstrations il passe donc pour un élément du site.
   --rb-rayon est relevé sur un bouton de la page par cookies.js. */
.rb-cookies {
  position: fixed;
  z-index: 10000; /* au-dessus du bandeau « démo », posé à 9999 */
  left: 0;
  right: 0;
  bottom: 0;
  background-color: inherit;
  color: inherit;
  font-family: inherit;
  border-top: 1px solid rgba(127, 127, 127, 0.24);
  border-top-color: color-mix(in srgb, currentColor 16%, transparent);
  box-shadow: 0 -14px 34px -26px rgba(0, 0, 0, 0.55);
  padding: 0.78rem 1.15rem;
  padding-bottom: calc(0.78rem + env(safe-area-inset-bottom, 0px));
}
.rb-cookies-in {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1.5rem;
}
.rb-cookies-txt {
  flex: 1 1 320px;
  margin: 0;
  font-size: 0.83rem;
  font-weight: 400;
  line-height: 1.5;
}
.rb-cookies-txt b {
  font-weight: 700;
}
.rb-cookies-txt a {
  color: inherit;
  text-underline-offset: 3px;
}
.rb-cookies-etat {
  white-space: nowrap;
}
.rb-cookies-act {
  flex: 0 0 auto;
  display: flex;
  gap: 0.5rem;
}
/* Accepter et refuser ont exactement le même poids visuel : ni couleur,
   ni taille, ni position ne pousse vers l'un des deux. */
.rb-cookies-act button {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: inherit;
  background: transparent;
  border: 1px solid rgba(127, 127, 127, 0.5);
  border-color: color-mix(in srgb, currentColor 38%, transparent);
  border-radius: var(--rb-rayon, 100px);
  padding: 0.5rem 1.1rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.18s, border-color 0.18s;
}
.rb-cookies-act button:hover {
  background: rgba(127, 127, 127, 0.16);
  background: color-mix(in srgb, currentColor 12%, transparent);
  border-color: color-mix(in srgb, currentColor 62%, transparent);
}
.rb-cookies-act button:focus-visible,
.carte-attente-b:focus-visible,
.lien-cookies:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
@media (max-width: 560px) {
  .rb-cookies-act {
    width: 100%;
  }
  .rb-cookies-act button {
    flex: 1 1 0;
    padding-inline: 0.6rem;
  }
}

/* Le bandeau « démo » se poserait par-dessus : on l'efface le temps du choix. */
body.rb-cookies-ouvert .lrb-bar {
  display: none;
}

/* ---------- Lien de réglage, dans les pieds de page ---------- */
.lien-cookies {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 0.86;
}
.lien-cookies:hover {
  opacity: 1;
}
/* Dans la colonne de liens du pied de page, il doit passer pour un lien
   comme les autres : même teinte, même absence de soulignement. */
.footer ul .lien-cookies {
  color: var(--muted);
  font-weight: 300;
  text-decoration: none;
  opacity: 1;
  transition: color 0.2s;
}
.footer ul .lien-cookies:hover {
  color: var(--text);
}
