/* Prospection The Elsassisch : styles repris de la maquette v9 (fiche 1024, jalon A). */

[hidden] { display: none !important; }

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

html, body {
  margin: 0;
  background: #FAF7F2;
  color: #1C1B19;
  font-family: 'Atkinson Hyperlegible', system-ui, sans-serif;
  /* Rien sous 20 px : le texte sans taille (encadré Rappel…) restait à 16 px. */
  font-size: 21px;
  line-height: 1.35;
  overflow-x: hidden;
}

a { color: #B3261E; }
a:hover { color: #8C1D17; }
button, input { font-family: inherit; }
button { margin: 0; }
p, h1, h2, label { margin: 0; overflow-wrap: anywhere; }
:focus-visible { outline: 4px solid #B3261E; outline-offset: 2px; }
button:disabled { opacity: 0.6; cursor: wait; }

/* Mise en page : une colonne, 480 px au plus, sans défilement horizontal sur téléphone. */
.ecran {
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  position: relative;
}
.haut {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 18px 0;
  flex-shrink: 0;
}
.titre {
  flex-grow: 1;
  min-width: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
}
.corps {
  flex-grow: 1;
  min-width: 0;
  padding: 14px 18px 24px;
}
.corps > section { min-width: 0; }
.pile {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.ressort { flex-grow: 1; }
.grille2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

/* Boutons carrés (?, Réglages), Retour */
.carre {
  appearance: none;
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 3px solid #1C1B19;
  border-radius: 14px;
  background: #FFFFFF;
  color: #1C1B19;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 700;
  cursor: pointer;
}
.carre.rouge {
  background: #B3261E;
  border-color: #B3261E;
  color: #FFFFFF;
}
.retour {
  appearance: none;
  flex-shrink: 0;
  border: 3px solid #1C1B19;
  background: #FFFFFF;
  color: #1C1B19;
  border-radius: 14px;
  font-family: 'Atkinson Hyperlegible', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 700;
  height: 60px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

/* Textes */
.grand { font-size: 30px; font-weight: 700; line-height: 1.25; }
.petit { font-size: 21px; line-height: 1.35; color: #55524C; }
.fort { font-size: 24px; font-weight: 700; line-height: 1.3; }
.question { display: block; font-size: 24px; font-weight: 700; line-height: 1.3; }
.erreur { color: #B3261E; font-size: 22px; font-weight: 700; line-height: 1.3; }
.ok { color: #1B5E20; font-size: 22px; font-weight: 700; line-height: 1.3; }

/* Gros boutons et champs */
.gros {
  appearance: none;
  border: none;
  border-radius: 18px;
  font-family: 'Atkinson Hyperlegible', system-ui, sans-serif;
  font-size: 28px;
  font-weight: 700;
  min-height: 84px;
  width: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  text-decoration: none;
}
.gros.rouge { background: #B3261E; color: #FFFFFF; }
.gros.blanc { background: #FFFFFF; color: #1C1B19; border: 3px solid #1C1B19; }

.champ {
  font-family: 'Atkinson Hyperlegible', system-ui, sans-serif;
  font-size: 26px;
  padding: 18px 16px;
  border: 3px solid #1C1B19;
  border-radius: 14px;
  width: 100%;
  background: #FFFFFF;
  color: #1C1B19;
  min-width: 0;
}
.champ:focus { outline: 4px solid #B3261E; outline-offset: 2px; }

/* Tuiles */
.tuile {
  appearance: none;
  border: 3px solid #1C1B19;
  background: #FFFFFF;
  color: #1C1B19;
  border-radius: 20px;
  font-family: 'Atkinson Hyperlegible', system-ui, sans-serif;
  font-size: 26px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  min-width: 0;
  cursor: pointer;
  text-align: center;
  line-height: 1.15;
  text-decoration: none;
}
.tuile:active { background: #F1ECE4; }
.tuile svg { flex-shrink: 0; }
.tuile.haute { height: 170px; }
.tuile.moyenne { height: 160px; }
.tuile.basse {
  height: 96px;
  flex-direction: row;
  gap: 16px;
  padding: 14px 18px;
  text-align: left;
}
.tuile.choix { min-height: 84px; font-size: 24px; }
.tuile.choix.actif {
  background: #B3261E;
  border-color: #B3261E;
  color: #FFFFFF;
}

/* Couleurs rouge et blanc, pour les tuiles et les boutons carrés */
.rouge { background: #B3261E; border-color: #B3261E; color: #FFFFFF; }
.blanc { background: #FFFFFF; color: #1C1B19; }
.tuile.rouge:active { background: #8C1D17; }

/* Cartes et encadrés */
.carte {
  background: #FFFFFF;
  border: 3px solid #1C1B19;
  border-radius: 18px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.info {
  background: #FFF1C2;
  color: #3D2E00;
  border-radius: 18px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Aide : calque plein écran au-dessus de tout */
.aide {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: #FAF7F2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px 18px;
  overflow-y: auto;
}
.aide > * {
  width: 100%;
  max-width: 444px;
  flex-shrink: 0;
}
.aide > .ressort { flex-grow: 1; }
.aide-haut {
  display: flex;
  align-items: center;
  gap: 12px;
}
.aide-haut .titre { font-size: 30px; }
.etapes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.etapes li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 23px;
  line-height: 1.3;
}
.etapes .num {
  width: 36px;
  height: 36px;
  border-radius: 18px;
  background: #1C1B19;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Petits écrans : tout reste lisible à 360 px */
@media (max-width: 380px) {
  .haut { gap: 8px; padding: 14px 14px 0; }
  .corps { padding: 12px 14px 20px; }
  .carre { width: 56px; height: 56px; font-size: 30px; }
  .retour { padding: 0 12px; font-size: 20px; }
  .titre { font-size: 22px; }
}
