/* Plateforme des testeurs. Une seule feuille, servie par le même process :
   il n'y a pas d'étape de compilation, on édite et on recharge. */
:root {
  color-scheme: light dark;
  --fond: #faf8f3;
  --surface: #fff;
  --surface-2: #f2efe6;
  --texte: #1c1b17;
  --doux: #5f5b50;
  --bord: #e2ddd0;
  --accent: #6b5b17;
  --accent-clair: #f0ebd6;
  --ok: #2f6b3a;
  --attention: #8a5a12;
  --rayon: 14px;
  --mesure: 36rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fond: #16150f;
    --surface: #1f1e17;
    --surface-2: #272519;
    --texte: #f2efe6;
    --doux: #b3ad9b;
    --bord: #38352a;
    --accent: #d8c266;
    --accent-clair: #2b2719;
    --ok: #8fd09b;
    --attention: #e0b36a;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.enveloppe { max-width: 62rem; margin: 0 auto; padding: 0 16px; }
a { color: var(--accent); }
h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); line-height: 1.15; margin: 0 0 .5rem; }
h2 { font-size: 1.3rem; margin: 2rem 0 .6rem; }
h3 { font-size: 1.05rem; margin: 1.4rem 0 .4rem; }
p { max-width: var(--mesure); }
small, .doux { color: var(--doux); }

.entete { border-bottom: 1px solid var(--bord); background: var(--surface); }
.entete .enveloppe { display: flex; align-items: center; gap: 1rem; min-height: 60px; flex-wrap: wrap; }
.entete a { color: var(--texte); text-decoration: none; font-weight: 600; }
.entete nav { margin-left: auto; display: flex; gap: 1.1rem; font-size: .95rem; }
.entete nav a { font-weight: 400; color: var(--doux); }

main { padding: 2rem 0 4rem; }
.chapeau { font-size: 1.15rem; color: var(--doux); max-width: var(--mesure); }

.cartes { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); margin: 2rem 0 0; padding: 0; list-style: none; }
.carte {
  display: flex; flex-direction: column; gap: .55rem;
  background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon);
  padding: 1rem; text-decoration: none; color: inherit; height: 100%;
}
.carte:hover { border-color: var(--accent); }
/* ⚠️ Les vignettes sont des CAPTURES, souvent en portrait. Deux pièges s'y
   sont succédé : sans max-width l'image sortait de la carte ; puis — mesuré au
   navigateur — ni « max-height: 100% » ni « height: 100% » ne se résolvaient
   dans une rangée de grille (562 px de haut dans une boîte de 176). On donne
   donc à l'image la MÊME hauteur absolue qu'à sa boîte, et object-fit la loge. */
.carte__vignette {
  height: 11rem; border-radius: 10px; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.carte__vignette img { height: 11rem; width: 100%; object-fit: contain; border-radius: 4px; }
.carte__logo { width: 76px; height: 76px; border-radius: 18px; overflow: hidden; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; flex: none; }
.carte__logo img { width: 76px; height: 76px; object-fit: contain; }
.titre-app { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; margin-bottom: .4rem; }
.titre-app h1 { margin: 0; }
.logo-app { width: 64px; height: 64px; border-radius: 14px; object-fit: contain; flex: none; background: var(--surface-2); }
.carte__nom { font-weight: 700; font-size: 1.1rem; }
.carte__slogan { color: var(--doux); font-size: .95rem; }
.carte__pied { margin-top: auto; padding-top: .5rem; font-size: .88rem; color: var(--doux); }

.etiquette { display: inline-block; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .18rem .5rem; border-radius: 999px; border: 1px solid; }
.etiquette--places { color: var(--ok); border-color: var(--ok); }
.etiquette--plein { color: var(--attention); border-color: var(--attention); }
.etiquette--inscrit { color: var(--accent); border-color: var(--accent); background: var(--accent-clair); }

.bouton {
  display: inline-block; background: var(--accent); color: #fff; border: 0;
  padding: .75rem 1.3rem; border-radius: 10px; font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
@media (prefers-color-scheme: dark) { .bouton { color: #16150f; } }
.bouton--secondaire { background: transparent; color: var(--accent); border: 1px solid var(--bord); }
.bouton[disabled], .bouton--gris { background: var(--surface-2); color: var(--doux); cursor: not-allowed; border: 1px solid var(--bord); }
.boutons { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; margin: 1.3rem 0; }

.ecrans { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); margin: 1.5rem 0; }
.ecran { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: .7rem; }
.ecran img { width: 100%; height: auto; border-radius: 8px; display: block; }
.ecran figcaption { font-size: .85rem; color: var(--doux); margin-top: .5rem; }

.encadre { background: var(--surface); border: 1px solid var(--bord); border-left: 4px solid var(--accent); border-radius: 0 var(--rayon) var(--rayon) 0; padding: .9rem 1.1rem; margin: 1.5rem 0; max-width: var(--mesure); }
.encadre p { margin: .3rem 0; }
.encadre__titre { font-weight: 700; margin: 0 0 .3rem; }

form { max-width: var(--mesure); }
.champ { margin-bottom: 1.1rem; }
.champ label { display: block; font-weight: 600; margin-bottom: .3rem; }
.champ .aide { display: block; font-weight: 400; color: var(--doux); font-size: .9rem; margin-bottom: .35rem; }
input[type=text], input[type=email], textarea, select, input[type=file] {
  width: 100%; font: inherit; color: var(--texte); background: var(--surface);
  border: 1px solid var(--bord); border-radius: 9px; padding: .65rem .75rem;
}
textarea { min-height: 8rem; resize: vertical; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.code-saisie { font-size: 2rem; letter-spacing: .5em; text-align: center; font-weight: 700; }
.choix { display: flex; flex-wrap: wrap; gap: .5rem; }
.choix label { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--bord); border-radius: 999px; padding: .4rem .8rem; background: var(--surface); cursor: pointer; font-weight: 400; }
.choix input { accent-color: var(--accent); }

.erreur { background: var(--surface); border: 1px solid var(--attention); border-left: 4px solid var(--attention); border-radius: 0 var(--rayon) var(--rayon) 0; padding: .8rem 1rem; margin: 1rem 0; max-width: var(--mesure); }
.succes { border-color: var(--ok); border-left-color: var(--ok); }

table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.tableau { overflow-x: auto; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--bord); vertical-align: top; }
th { font-weight: 600; }
tbody tr:hover { background: var(--surface-2); }

.pied { border-top: 1px solid var(--bord); color: var(--doux); font-size: .9rem; padding: 1.5rem 0 3rem; }
.liste-nue { list-style: none; padding: 0; }
.liste-nue li { margin-bottom: .4rem; }
