/* ============================================================
   AGEGATE — Famille Espérandieu
   Aligné sur le thème principal (theme.css)
   ============================================================ */

.agegate-container {
  position: fixed !important;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  width: 100%;
  height: 100%;
  background-color: #1a1208;
  background-size: cover;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  overflow: auto;
  font-family: 'Jost', sans-serif;
  color: #1a1208;
}

/* Voile sombre par-dessus le bg pour la lisibilité */
.agegate-container::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 1;
}
.agegate-container > * { position: relative; z-index: 2; }

/* Carte centrale (fond blanc / cream) */
.agegate-container > div {
  background-color: #faf6ef;
  border: 1px solid rgba(193,154,74,.3);
  padding: 56px 48px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(0,0,0,.35);
}

/* Logo */
.agegate-container .logo {
  width: 140px !important;
  height: auto !important;
  margin-bottom: 8px;
}

/* Trait décoratif sous le logo */
.agegate-container > div::before {
  content: '';
  display: block;
  width: 48px; height: 1px;
  background: #c19a4a;
  opacity: .55;
  order: 1;
}

/* Titre / question */
.agegate-title {
  margin: 0;
  text-align: center;
}
.agegate-title label {
  display: block;
  margin: 0;
  padding: 0 8px;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  line-height: 1.35;
  color: #1a1208;
  max-width: 380px;
}

/* Eyebrow style "Sélectionnez votre langue" */
.agegate-container .footer-language {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 8px 0 4px;
}
.agegate-container .footer-language .label,
.agegate-container .footer-language label {
  font-family: 'Jost', sans-serif;
  font-size: .58rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: #8b3a2c;
  opacity: .75;
  margin: 0;
}
.agegate-container .footer-language i { display: none; }

/* Select stylé */
.agegate-container .filters-select,
.agegate-container .uk-select,
.agegate-container select {
  appearance: none;
  -webkit-appearance: none;
  background-color: transparent !important;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='none' stroke='%236b5540' stroke-width='1.4' d='M1 1l4 4 4-4'/></svg>") !important;
  background-repeat: no-repeat;
  background-position: right 14px center;
  border: 1px solid rgba(107,85,64,.35) !important;
  color: #1a1208 !important;
  font-family: 'Jost', sans-serif;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 12px 40px 12px 18px;
  min-width: 220px;
  cursor: pointer;
  transition: border-color .3s, color .3s;
}
.agegate-container .filters-select:hover,
.agegate-container .uk-select:hover,
.agegate-container select:hover {
  border-color: #8b3a2c !important;
}
.agegate-container select option {
  background: #faf6ef;
  color: #1a1208;
}

/* Forms */
.agegate-container > div form {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  margin: 0;
}

/* Groupe de boutons Oui / Non */
.agegate-container .buttons-group {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* Boutons */
.agegate-container .form-submit,
.agegate-container .btn,
.agegate-container button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 140px;
  padding: 16px 32px;
  font-family: 'Jost', sans-serif;
  font-size: .68rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: #1a1208;
  background: transparent;
  border: 1px solid rgba(26,18,8,.45);
  cursor: pointer;
  text-decoration: none;
  transition: border-color .3s, color .3s, background .3s, gap .3s;
}
.agegate-container .form-submit:hover,
.agegate-container .btn:hover,
.agegate-container button[type="submit"]:hover {
  border-color: #8b3a2c;
  color: #8b3a2c;
  background: rgba(139,58,44,.04);
  gap: 16px;
}

/* Variante "Oui" en remplissage terracotta */
.agegate-container button[value="yes"] {
  background: #1a1208;
  color: #f4ede0;
  border-color: #1a1208;
}
.agegate-container button[value="yes"]:hover {
  background: #8b3a2c;
  color: #f4ede0;
  border-color: #8b3a2c;
}
.agegate-container button[value="yes"] svg {
  width: 10px; height: 10px;
}

/* Bouton "Non" plus discret */
.agegate-container button[value="no"] {
  border-color: rgba(26,18,8,.25);
  color: rgba(26,18,8,.6);
}
.agegate-container button[value="no"]:hover {
  border-color: rgba(26,18,8,.55);
  color: #1a1208;
  background: rgba(26,18,8,.03);
}

/* Message d'erreur */
.age-gate-wrong { display: none; }
.agegate-container .error.age-gate-wrong {
  font-family: 'Libre Baskerville', serif;
  font-style: italic;
  font-size: .82rem;
  color: #8b3a2c;
  margin: 12px 0 0;
  text-align: center;
}

/* Bouton "Forget me" (admin debug — reset agegate) */
.agegate-container .agegate-forget-me {
  display: none;
  margin-top: 24px;
  padding: 10px 22px;
  font-family: 'Jost', sans-serif;
  font-size: .58rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: rgba(26,18,8,.5);
  background: transparent;
  border: 1px dashed rgba(26,18,8,.25);
  cursor: pointer;
  transition: border-color .3s, color .3s, background .3s;
  position: relative;
}
.agegate-container .agegate-forget-me::before {
  content: '⚙ ';
  margin-right: 6px;
  opacity: .6;
}
.agegate-container .agegate-forget-me:hover {
  border-color: #8b3a2c;
  border-style: solid;
  color: #8b3a2c;
  background: rgba(139,58,44,.04);
}

/* Responsive */
@media (max-width: 600px) {
  .agegate-container { padding: 20px; }
  .agegate-container > div { padding: 40px 24px 32px; gap: 20px; }
  .agegate-container .logo { width: 110px !important; }
  .agegate-container .buttons-group { width: 100%; }
  .agegate-container .form-submit,
  .agegate-container .btn,
  .agegate-container button[type="submit"] { flex: 1; min-width: 0; padding: 14px 20px; }
}
