/* Coquille des pages simples (accueil index.html, Classe classe.html) : fond, colonne, titres,
   blocs repliables, message de réussite. Le propre de chaque page : css/accueil.css, css/classe.css. */

body.page {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--ardoise);
  color: var(--texte);
  font-family: 'Fredoka', system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.45;
  padding: max(0.75rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1.5rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}

.colonne-page {
  max-width: 44rem;
  margin: 0 auto;
  display: grid;
  gap: 1.3rem;
}

.colonne-large { max-width: 56rem; }

.page-titre {
  margin: 0.2rem 0 0;
  font-size: clamp(1.7rem, 5vw, 2.3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.petit-titre {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--texte-doux);
}

.chapeau,
.explication {
  margin: 0;
  color: var(--texte-doux);
}

.explication { font-size: 0.98rem; }

.ligne-boutons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.btn-grand {
  width: 100%;
  min-height: 64px;
  padding: 0.8rem 1.1rem;
  font-size: 1.15rem;
  text-align: left;
  justify-content: flex-start;
  gap: 0.8rem;
}

a.btn-grand { box-sizing: border-box; }

.repere {
  display: inline-block;
  padding: 0 0.45rem;
  border-radius: 6px;
  background: var(--jaune);
  color: var(--encre);
  font-weight: 700;
  letter-spacing: 0.12em;
}

/* ---------- Blocs repliables (guide, options) ---------- */

.guide,
.bloc {
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  background: var(--surface);
}

.guide > summary,
.bloc > summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: var(--cible);
  padding: 0.6rem 1rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.guide > summary::-webkit-details-marker,
.bloc > summary::-webkit-details-marker { display: none; }

/* Chevron qui tourne à l'ouverture. */
.guide > summary::before,
.bloc > summary::before {
  content: '';
  width: 0.55rem;
  height: 0.55rem;
  margin: 0 0.2rem 0 0.1rem;
  border-right: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.15s;
  flex: none;
}

.guide[open] > summary::before,
.bloc[open] > summary::before { transform: rotate(45deg); }

.guide-corps,
.bloc-corps {
  display: grid;
  gap: 0.9rem;
  padding: 0.2rem 1.1rem 1.2rem;
}

.guide-corps p,
.bloc-corps p { margin: 0; }

/* ---------- Guide « première fois » ---------- */

.etapes {
  margin: 0;
  padding-left: 1.5rem;
  display: grid;
  gap: 0.75rem;
}

.etapes li::marker { font-weight: 700; color: var(--jaune); }
.etapes a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }

.etape-voir {
  display: block;
  margin-top: 0.15rem;
  color: var(--texte-doux);
  font-size: 0.95rem;
}

.qr-adresse {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.qr-adresse canvas {
  border-radius: var(--rayon-petit);
  background: #fff;
}

.qr-adresse p { flex: 1 1 14rem; display: grid; gap: 0.4rem; }

.qr-adresse code {
  justify-self: start;
  padding: 0.25rem 0.55rem;
  border-radius: var(--rayon-petit);
  background: var(--ardoise-foncee);
  font-size: 1rem;
  word-break: break-all;
}

.pourquoi { color: var(--texte-doux); }

/* ---------- Réussite d'une opération (Classe) ---------- */

.succes {
  display: grid;
  gap: 0.35rem;
  padding: 0.9rem 1rem 1rem 1.1rem;
  border-radius: var(--rayon);
  background: var(--papier);
  color: var(--encre);
  box-shadow: inset 6px 0 0 var(--juste), var(--ombre);
}

.succes p { margin: 0; }
.succes strong { font-size: 1.1rem; }
.succes .ligne-boutons { margin-top: 0.5rem; }
