:root {
  --noir: #000;
  --fond: #121110;
  --carte: #1b1917;
  --carte-2: #24211e;
  --bord: #3b3224;
  --or: #c9a24d;
  --or-clair: #e8c876;
  --or-fonce: #8a6d2c;
  --creme: #efe7d6;
  --gris: #a99a7c;
  --rouge: #e06a5f;
  --vert: #3fa66b;
  --titre: 'Oswald', 'Arial Narrow', Arial, sans-serif;
  --texte: 'Montserrat', Arial, Helvetica, sans-serif;
  --sortie: cubic-bezier(.22, 1, .36, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--fond) radial-gradient(120% 60% at 50% 0%, #241f17 0%, var(--fond) 60%) no-repeat;
  color: var(--creme);
  font: 400 15px/1.5 var(--texte);
}
a { color: var(--or-clair); }
button { font: inherit; }

/* En-tête */
.haut {
  background: var(--noir);
  border-bottom: 1px solid var(--or-fonce);
  display: flex;
  justify-content: center;
  padding: calc(6px + env(safe-area-inset-top, 0px)) 16px 10px;
  border-radius: 0 0 50% 50% / 0 0 14px 14px;
  box-shadow: 0 6px 24px #0008;
}
.haut img { width: auto; height: 92px; display: block; }

/* Boutons */
.btn {
  appearance: none;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--or-clair), var(--or) 55%, #b48b3a);
  color: #17140f;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  font: 700 17px/1 var(--titre);
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 6px 18px #c9a24d33, inset 0 1px 0 #fff6;
  transition: transform .12s var(--sortie), filter .12s;
}
.btn:active { transform: scale(.98); filter: brightness(.95); }
.btn:focus-visible, .lien-btn:focus-visible { outline: 3px solid var(--creme); outline-offset: 3px; }
.btn[aria-busy='true'] { opacity: .7; pointer-events: none; }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn--sombre { background: var(--carte-2); color: var(--creme); border: 1.5px solid var(--or-fonce); box-shadow: none; }
.btn--off { background: #2a2724; color: #8d8473; border: 1.5px solid #3a3530; box-shadow: none; cursor: default; }
.lien-btn {
  appearance: none; border: 0; background: none; color: var(--gris); cursor: pointer;
  width: 100%; min-height: 46px; margin-top: 4px; font: 700 15px/1 var(--titre); letter-spacing: .06em;
}

/* Titres */
.surtitre { color: var(--or); font: 700 14px/1.2 var(--titre); letter-spacing: .2em; text-transform: uppercase; margin: 0; }
.trait { display: block; width: 120px; height: 10px; margin: 10px auto 0; }

/* Fenêtres */
.modale {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  padding: 16px;
  background: #000b;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  overflow-y: auto;
  animation: apparition .2s ease both;
}
.carte {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: var(--carte);
  border: 1px solid var(--or-fonce);
  border-radius: 18px;
  box-shadow: 0 24px 60px #000c;
  text-align: center;
  overflow: hidden;
  animation: monte .28s var(--sortie) both;
}
.carte:focus { outline: none; }
.carte__tete {
  background: var(--noir) linear-gradient(180deg, #1a1712, #000);
  border-bottom: 1px solid var(--or-fonce);
  padding: 18px 20px 16px;
}
.carte__tete h2 { margin: 0; color: var(--or-clair); font: 700 24px/1.15 var(--titre); letter-spacing: .04em; text-transform: uppercase; }
.carte__corps { padding: 20px 20px 18px; }
.carte__corps p { margin: 0; }
.carte__corps .btn { margin-top: 18px; }
.carte.secoue { animation: secousse .45s ease both; }

@keyframes apparition { from { opacity: 0; } }
@keyframes monte { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes secousse {
  20% { transform: translateX(-8px); } 40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); } 80% { transform: translateX(3px); }
}

/* Message flottant */
.toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 80;
  transform: translateX(-50%);
  width: max-content; max-width: calc(100% - 32px);
  background: var(--carte-2); color: var(--creme);
  border: 1px solid var(--or-fonce); border-radius: 12px;
  padding: 12px 16px; font-size: 14px; text-align: center;
  box-shadow: 0 10px 30px #000a;
}

.pied { color: #6f6656; font-size: 12px; text-align: center; padding: 26px 16px calc(20px + env(safe-area-inset-bottom, 0px)); }
.pied a { color: var(--gris); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
