/* Styles communs des pages publiques et jury (pas de framework, pas de CDN). */
:root {
  --bleu: #0056b3;          /* bleu jeunesses foncé : contraste AA sur blanc */
  --bleu-vif: #007bff;
  --bleu-pale: #e8f1ff;
  --orange: #e67e22;
  --orange-fonce: #a84f00;  /* texte orange lisible sur blanc */
  --orange-pale: #fff4e5;
  --vert: #1e7e34;
  --vert-pale: #e3f4e8;
  --rouge: #b02a37;
  --rouge-pale: #fdecee;
  --gris: #495057;
  --gris-clair: #dee2e6;
  --fond: #f4f6f9;
  --texte: #1a1d21;
  --rayon: 12px;
  --police: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

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

[hidden] { display: none !important; }

h1, h2 { line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.35rem; }

a { color: var(--bleu); }

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

.entete {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 14px 16px;
  background: #fff;
  border-bottom: 4px solid var(--bleu);
}
.entete__logo { max-height: 56px; max-width: 120px; }
.entete__titre { font-size: 1.25rem; font-weight: 700; color: var(--bleu); }

.contenu { padding: 20px 14px 40px; }

.carte {
  max-width: 760px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--rayon);
  padding: 28px 22px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .08);
}
.carte--etroite { max-width: 480px; text-align: center; }

.aide { color: var(--gris); font-size: .95rem; }
.aide--centre { text-align: center; }

/* Formulaires */
.formulaire { text-align: left; margin-top: 18px; }
.groupe { margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
.etiquette { display: block; font-weight: 700; margin-bottom: 6px; }
.etiquette-grande { display: block; font-weight: 700; font-size: 1.25rem; margin-bottom: 8px; text-align: center; }
.sous-titre { margin-top: 24px; font-size: 1.15rem; color: var(--bleu); }

.champ {
  width: 100%;
  font: inherit;
  font-size: 1.1rem;
  padding: 12px 14px;
  min-height: 48px;
  border: 2px solid #8a939c;
  border-radius: 10px;
  background: #fff;
  color: var(--texte);
}
.champ:focus { border-color: var(--bleu); outline: none; box-shadow: 0 0 0 3px rgba(0, 86, 179, .25); }
.champ--erreur { border-color: var(--rouge); background: var(--rouge-pale); }
.champ--pin { font-size: 2rem; letter-spacing: .4em; text-align: center; }

.grille-2, .grille-rue, .grille-npa { display: grid; gap: 0 14px; }
@media (min-width: 560px) {
  .grille-2 { grid-template-columns: 1fr 1fr; }
  .grille-rue { grid-template-columns: 1fr 110px; }
  .grille-npa { grid-template-columns: 120px 1fr; }
}

.choix-categorie { display: flex; gap: 12px; flex-wrap: wrap; }
.choix {
  flex: 1 1 140px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 2px solid var(--gris-clair);
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}
.choix input { width: 22px; height: 22px; }
.choix--jeunesse { border-color: var(--bleu-vif); background: var(--bleu-pale); color: var(--bleu); }
.choix--anciens { border-color: var(--orange); background: var(--orange-pale); color: var(--orange-fonce); }

.piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.case-a-cocher { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; font-size: 1rem; cursor: pointer; }
.case-a-cocher input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--bleu); }
.mention { font-size: .9rem; color: var(--gris); border-left: 4px solid var(--gris-clair); padding-left: 10px; }

/* Boutons */
.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  min-height: 48px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  touch-action: manipulation;
}
.bouton:disabled { opacity: .45; cursor: not-allowed; }
.bouton--principal { background: var(--bleu); color: #fff; }
.bouton--principal:hover:not(:disabled) { background: #00408a; }
.bouton--secondaire { background: #fff; color: var(--bleu); border-color: var(--bleu); }
.bouton--valider { background: var(--vert); color: #fff; }
.bouton--discret { background: transparent; color: var(--gris); text-decoration: underline; font-weight: 400; }
.bouton--large { width: 100%; min-height: 58px; font-size: 1.2rem; }

/* Messages */
.message { border-radius: 10px; padding: 10px 14px; margin: 10px 0; text-align: left; }
.message--erreur { background: var(--rouge-pale); color: var(--rouge); border: 1px solid var(--rouge); }
.message--info { background: var(--vert-pale); color: var(--vert); border: 1px solid var(--vert); }
.titre-succes { color: var(--vert); }
