/* Lupus et Corvus — style du site.
   Pensé d'abord pour le téléphone, puis élargi pour les grands écrans.
   Une seule couleur vive (--vif) : elle est réservée aux boutons. */

:root {
  --fond: #0b1020;          /* bleu nuit presque noir */
  --fond-carte: #121a2e;
  --bord: #26304a;
  --texte: #f1e8d6;         /* crème */
  --texte-doux: #c9c0ae;
  --or: #d6ab6e;            /* ruban doré du logo */
  --or-sombre: #8a6a3c;
  --vif: #ff8a1f;           /* orange vif du bord du logo — boutons seulement */
  --vif-survol: #ffa04a;
  --sur-vif: #1b1003;
  --desactive: #3a4052;
  --sur-desactive: #a8adba;
  --erreur: #f2b8a8;
  --rayon: 12px;
  --police: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --police-titre: Georgia, "Times New Roman", "DejaVu Serif", serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: var(--police);
  font-size: 1.0625rem;
  line-height: 1.6;
}

a { color: var(--or); text-underline-offset: 3px; }
a:hover { color: var(--texte); }

:focus-visible { outline: 3px solid var(--or); outline-offset: 3px; }

h1, h2 { font-family: var(--police-titre); color: var(--or); line-height: 1.2; font-weight: normal; }
h2 {
  font-size: 1.6rem;
  margin: 0 0 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--or-sombre);
}

/* --- Choix de la langue (visible seulement s'il y a plusieurs langues) --- */
.langues {
  display: flex; justify-content: flex-end; gap: .75rem;
  padding: .75rem 16px 0;
  max-width: 46rem; margin: 0 auto;
  font-size: .95rem;
}
.langues span { color: var(--or); font-weight: bold; }

/* --- En-tête : titre et sous-titre sur le logo en transparence --- */
.entete {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: calc(min(92vw, 34rem) + 2rem);
  padding: 2rem 16px;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
.entete::before {
  content: "";
  position: absolute; z-index: -1;
  inset: 50% auto auto 50%;
  width: min(92vw, 34rem); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: url("/statique/logo.webp") center / contain no-repeat;
  opacity: .28;
}
.entete h1 {
  margin: 0;
  font-size: clamp(2.4rem, 11vw, 4.2rem);
  letter-spacing: .02em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .9);
}
.sous-titre {
  margin: 1rem auto 0;
  max-width: 30rem;
  font-size: clamp(1.1rem, 4.6vw, 1.4rem);
  color: var(--texte);
  text-shadow: 0 1px 12px rgba(0, 0, 0, .95);
}

/* --- Blocs --- */
main { display: block; }
.bloc {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2rem 16px;
}
.quatrieme p { margin: 0 0 1rem; }
.quatrieme { font-style: italic; color: var(--texte); }

.achat { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: 1.5rem; }
.bientot { color: var(--texte-doux); font-size: .95rem; }

/* --- Boutons : la seule couleur vive de la page --- */
.bouton {
  display: inline-block;
  min-height: 48px;
  padding: .75rem 1.25rem;
  border: 0; border-radius: var(--rayon);
  background: var(--vif); color: var(--sur-vif);
  font: inherit; font-weight: bold; text-align: center; text-decoration: none;
  cursor: pointer;
}
.bouton:hover { background: var(--vif-survol); color: var(--sur-vif); }
.bouton:disabled, .bouton[aria-disabled="true"] {
  background: var(--desactive); color: var(--sur-desactive); cursor: not-allowed;
}
.bouton-grand { font-size: 1.15rem; padding: 1rem 1.5rem; }
.bouton-second {
  background: transparent; color: var(--vif);
  box-shadow: inset 0 0 0 2px var(--vif);
}
.bouton-second:hover { background: rgba(255, 138, 31, .12); color: var(--vif-survol); }

/* --- Étapes --- */
.etapes { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1rem; }
.etape {
  background: var(--fond-carte);
  border: 1px solid var(--bord);
  border-left: 3px solid var(--or-sombre);
  border-radius: var(--rayon);
  padding: 1rem;
}
.etape-tete { display: flex; flex-direction: column; gap: .15rem; margin-bottom: .75rem; }
.etape-num { color: var(--or); font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; }
.etape-titre { font-weight: bold; }

.etape-question { margin-top: 1rem; display: grid; gap: .5rem; }
.question-texte { margin: 0; font-weight: bold; }
.champ { font-size: .95rem; color: var(--texte-doux); }
.etape-question input {
  width: 100%; min-height: 48px;
  padding: .6rem .8rem;
  border: 1px solid var(--or-sombre); border-radius: var(--rayon);
  background: var(--fond); color: var(--texte);
  font: inherit; font-size: 1.1rem;
}
.retour { margin: .5rem 0 0; min-height: 1px; color: var(--texte-doux); }
.retour.erreur { color: var(--erreur); }
.retour:empty { margin: 0; }

.etape-message { margin-top: 1rem; }
.message {
  margin: 0;
  max-height: 22rem; overflow: auto;
  padding: 1rem;
  background: var(--fond);
  border: 1px solid var(--or-sombre); border-radius: var(--rayon);
  color: var(--texte);
  font-family: ui-monospace, "Cascadia Mono", Consolas, "DejaVu Sans Mono", monospace;
  font-size: .95rem; line-height: 1.5;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.actions { display: grid; gap: .75rem; margin-top: .75rem; }

/* --- Pied de page --- */
.pied {
  margin-top: 2rem;
  padding: 2rem 16px 3rem;
  border-top: 1px solid var(--or-sombre);
  text-align: center;
  color: var(--texte-doux);
  font-size: .95rem;
}
.avertissement { color: var(--texte); max-width: 40rem; margin: 0 auto 1rem; }

/* --- Mentions légales --- */
.texte-legal h1 { font-size: 2rem; }
.texte-legal h2 { font-size: 1.3rem; margin-top: 2rem; }
.texte-legal .note {
  border-left: 3px solid var(--or); padding-left: .75rem; color: var(--texte-doux); font-size: .95rem;
}

/* --- Écrans plus larges --- */
@media (min-width: 40rem) {
  .actions { grid-template-columns: auto auto; justify-content: start; }
  .etape-tete { flex-direction: row; align-items: baseline; gap: .75rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .bouton { transition: background-color .15s ease; }
}

[hidden] { display: none !important; }

.message::selection, .message *::selection { background: var(--or); color: var(--fond); }
