/* ==========================================================================
   Consentement cookies (bandeau, panneau de choix, encarts Maps / YouTube)
   Logique : js/app/consentement.js
   ========================================================================== */

.consentement {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2147483000;
  display: flex;
  justify-content: center;
  padding: 0 1rem calc(1rem + var(--safe-bottom, 0px));
  pointer-events: none;
}

.consentement__boite {
  position: relative;
  width: 100%;
  max-width: 760px;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 1.5rem 1.5rem 1.25rem;
  background: var(--c-bg-2, #12121f);
  color: var(--c-text, #f2f2f7);
  border: 1px solid var(--c-border, #2a2a40);
  border-radius: 22px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .7);
  font-family: var(--font-body, system-ui, sans-serif);
  pointer-events: auto;
}

.consentement__fermer {
  position: absolute;
  top: .75rem;
  right: 1rem;
  padding: .25rem;
  border: 0;
  background: none;
  color: var(--c-text-soft, #a7a7bd);
  font: inherit;
  font-size: .85rem;
  text-decoration: underline;
  cursor: pointer;
}
.consentement__fermer:hover { color: var(--c-text, #fff); }

.consentement__titre {
  margin: 0 0 .5rem;
  padding-right: 12rem;
  font-family: var(--font-display, sans-serif);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  line-height: 1.1;
}

.consentement__texte {
  margin: 0 0 1rem;
  font-size: .95rem;
  line-height: 1.5;
  color: var(--c-text-soft, #a7a7bd);
}
.consentement__texte a { color: var(--c-text, #fff); text-decoration: underline; }

.consentement__details {
  display: grid;
  gap: .6rem;
  margin: 0 0 1.1rem;
}
.consentement__details[hidden] { display: none; }

.consentement__ligne {
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  padding: .75rem .9rem;
  border: 1px solid var(--c-border, #2a2a40);
  border-radius: 14px;
  background: var(--c-bg-3, #1b1b2e);
  cursor: pointer;
}
.consentement__ligne input {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: .15rem;
  accent-color: var(--c-primary, #7b2ff7);
}
.consentement__ligne input[type="checkbox"] {
  border-radius: 6px !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: 80% !important;
}
.consentement__ligne input[type="checkbox"]:checked {
  border-color: var(--c-primary, #7b2ff7) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}
.consentement__ligne input:disabled { opacity: .6; cursor: default; }
.consentement__ligne-texte { display: grid; gap: .15rem; font-size: .9rem; line-height: 1.4; }
.consentement__ligne-texte span { color: var(--c-text-soft, #a7a7bd); }

/* « Tout accepter » et « Tout refuser » ont exactement le même aspect (CNIL). */
.consentement__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .6rem;
}
.consentement__btn { justify-content: center; min-width: 11rem; }

@media (max-width: 640px) {
  .consentement { padding: 0 .5rem calc(.5rem + var(--safe-bottom, 0px)); }
  .consentement__boite { padding: 2.5rem 1.1rem 1rem; border-radius: 18px; }
  .consentement__titre { padding-right: 0; font-size: 1.35rem; }
  .consentement__actions { flex-direction: column-reverse; }
  .consentement__btn { width: 100%; }
}

/* Encart affiché à la place d'une carte Google Maps / d'une vidéo YouTube
   tant que les contenus externes ne sont pas acceptés. */
.consentement-bloc {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  height: 100%;
  min-height: 320px;
  padding: 1.5rem;
  text-align: center;
  background: var(--c-bg-3, #1b1b2e);
  color: var(--c-text, #f2f2f7);
  font-family: var(--font-body, system-ui, sans-serif);
}
.consentement-bloc p { margin: 0; max-width: 32rem; color: var(--c-text-soft, #a7a7bd); }
.video-wrap .consentement-bloc { position: absolute; inset: 0; min-height: 0; }
