/* =========================================================================
   Comité d'Animation — identité visuelle « carnet à souches »
   Référence : les carnets de billets de tombola et les affiches sérigraphiées
   des fêtes de village. Deux encres, du papier kraft, des perforations.
   ========================================================================= */

:root {
  --encre:        #1b2b34;
  --encre-douce:  #55666f;
  --papier:       #e9e2d2;
  --papier-clair: #f7f3e9;
  --vermillon:    #c8352b;
  --buvette:      #2e6b4f;
  --fanion:       #e4b23c;
  --trait:        rgba(27, 43, 52, 0.22);

  --affiche: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
             Georgia, "Times New Roman", serif;
  --courant: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --chiffres: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;

  --marge: clamp(1.25rem, 5vw, 4rem);
  --rayon: 3px;
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--courant);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--encre);
  background-color: var(--papier);
  /* Grain de papier : deux dégradés très légers, aucune image à charger. */
  background-image:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.55), transparent 42%),
    radial-gradient(circle at 82% 78%, rgba(200, 53, 43, 0.05), transparent 46%);
  background-attachment: fixed;
}

img { max-width: 100%; display: block; }

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

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

h1, h2, h3 {
  font-family: var(--affiche);
  font-weight: 700;
  line-height: 1.08;
  margin: 0 0 0.5em;
}

.enveloppe {
  width: min(1080px, 100%);
  margin-inline: auto;
  padding-inline: var(--marge);
}

.oeil {                       /* sur-titre d'une section */
  font-family: var(--chiffres);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--vermillon);
  margin: 0 0 0.75rem;
}

.discret { color: var(--encre-douce); }
.rien { display: none !important; }
.invisible-sauf-lecteur {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Guirlande de fanions : le motif signature du site ---------- */

.guirlande {
  display: block;
  width: 100%;
  height: 34px;
  background-repeat: repeat-x;
  background-size: 44px 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='34'%3E%3Cpath d='M0 3h44' stroke='%231b2b34' stroke-width='2' fill='none'/%3E%3Cpath d='M0 4h22l-11 22z' fill='%23c8352b'/%3E%3Cpath d='M22 4h22l-11 22z' fill='%232e6b4f'/%3E%3C/svg%3E");
}
.guirlande--jaune {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='34'%3E%3Cpath d='M0 3h44' stroke='%231b2b34' stroke-width='2' fill='none'/%3E%3Cpath d='M0 4h22l-11 22z' fill='%23e4b23c'/%3E%3Cpath d='M22 4h22l-11 22z' fill='%231b2b34'/%3E%3C/svg%3E");
}

/* ---------- En-tête ---------- */

.entete {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--papier-clair);
  border-bottom: 2px solid var(--encre);
}

.entete__barre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.7rem;
}

.marque {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
}

.marque__sceau {
  width: 40px; height: 40px;
  flex: none;
  border: 2px solid var(--encre);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--affiche);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  background: var(--fanion);
}

.marque__nom {
  font-family: var(--affiche);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
}
.marque__lieu {
  font-family: var(--chiffres);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--encre-douce);
}

.nav { display: flex; align-items: center; gap: 1.4rem; }
.nav a {
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--encre);
  border-bottom: 2px solid transparent;
  padding-block: 2px;
}
.nav a:hover, .nav a:focus-visible { border-bottom-color: var(--vermillon); }

@media (max-width: 620px) {
  .nav a.nav--secondaire { display: none; }
}

/* ---------- Affiche d'ouverture ---------- */

.affiche {
  padding-block: clamp(2.5rem, 8vw, 5rem) clamp(2rem, 6vw, 3.5rem);
  text-align: center;
}

.affiche__saison {
  font-family: var(--chiffres);
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--encre-douce);
  margin: 0 0 1.4rem;
}

.affiche__titre {
  font-size: clamp(2.9rem, 11vw, 6.5rem);
  text-transform: uppercase;
  letter-spacing: -0.015em;
  margin: 0;
}
.affiche__titre em {
  display: block;
  font-style: normal;
  color: var(--vermillon);
}

.affiche__filet {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 30rem;
  margin: 1.6rem auto;
  color: var(--encre-douce);
  font-family: var(--chiffres);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.affiche__filet::before, .affiche__filet::after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--encre);
}

.affiche__phrase {
  max-width: 34rem;
  margin: 0 auto 2rem;
  font-size: 1.15rem;
}

/* ---------- Boutons ---------- */

.bouton {
  display: inline-block;
  font-family: var(--courant);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.6rem;
  border: 2px solid var(--encre);
  border-radius: var(--rayon);
  background: var(--vermillon);
  color: var(--papier-clair);
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--encre);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.bouton:hover:not(:disabled) {
  color: var(--papier-clair);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--encre);
}
.bouton:active:not(:disabled) {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 var(--encre);
}
.bouton:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: 4px 4px 0 var(--encre); }

.bouton--sobre { background: transparent; color: var(--encre); }
.bouton--sobre:hover:not(:disabled) { color: var(--encre); background: var(--fanion); }
.bouton--large { width: 100%; }

/* ---------- Sections ---------- */

.section { padding-block: clamp(2.5rem, 7vw, 4.5rem); }
.section--claire { background: var(--papier-clair); border-block: 2px solid var(--encre); }
.section__titre { font-size: clamp(1.9rem, 5vw, 2.9rem); }

.deux-colonnes {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: 1fr;
}
@media (min-width: 860px) {
  .deux-colonnes { grid-template-columns: 1.15fr 0.85fr; align-items: start; }
}

.encadre {
  border: 2px solid var(--encre);
  border-radius: var(--rayon);
  background: var(--papier);
  padding: 1.4rem 1.5rem;
}
.encadre h3 { font-size: 1.2rem; }
.encadre dl { margin: 0; display: grid; gap: 0.6rem; }
.encadre dt {
  font-family: var(--chiffres);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--encre-douce);
}
.encadre dd { margin: 0 0 0.4rem; }

/* ---------- Le billet : élément signature ---------- */

.billetterie { display: grid; gap: 1.6rem; }

.billet {
  display: grid;
  grid-template-columns: 1fr;
  border: 2px solid var(--encre);
  border-radius: var(--rayon);
  background: var(--papier-clair);
  box-shadow: 6px 6px 0 rgba(27, 43, 52, 0.12);
  overflow: hidden;
}

@media (min-width: 720px) {
  .billet { grid-template-columns: 1fr 172px; }
}

.billet__corps { padding: 1.5rem clamp(1.25rem, 3vw, 2rem); }

.billet__date {
  font-family: var(--chiffres);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--vermillon);
  margin: 0 0 0.5rem;
}

.billet__titre { font-size: clamp(1.5rem, 3.5vw, 2.05rem); margin-bottom: 0.35rem; }

.billet__lieu {
  font-size: 0.95rem;
  color: var(--encre-douce);
  margin: 0 0 0.9rem;
}

.billet__texte { margin: 0 0 1.2rem; white-space: pre-line; }

.billet__pied {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 2px dotted var(--trait);
}

.billet__prix {
  font-family: var(--affiche);
  font-size: 1.75rem;
  line-height: 1;
}
.billet__prix span {
  font-family: var(--courant);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--encre-douce);
  display: block;
}

/* La souche : perforation verticale + compteur de places */
.billet__souche {
  position: relative;
  display: grid;
  place-content: center;
  gap: 0.2rem;
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--papier);
  border-top: 2px dashed var(--trait);
}
@media (min-width: 720px) {
  .billet__souche { border-top: 0; border-left: 2px dashed var(--trait); }
}
/* Encoches de déchirure, comme sur un vrai carnet */
.billet__souche::before, .billet__souche::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  background: var(--papier);
  border: 2px solid var(--encre);
  border-radius: 50%;
}
@media (min-width: 720px) {
  .billet__souche::before { top: -11px; left: -11px; clip-path: inset(11px 0 0 11px); }
  .billet__souche::after { bottom: -11px; left: -11px; clip-path: inset(0 0 11px 11px); }
}
@media (max-width: 719px) {
  .billet__souche::before { top: -11px; left: -11px; clip-path: inset(11px 0 0 11px); }
  .billet__souche::after { top: -11px; right: -11px; clip-path: inset(11px 11px 0 0); }
}

.souche__nombre {
  font-family: var(--affiche);
  font-size: 2.6rem;
  line-height: 1;
}
.souche__mot {
  font-family: var(--chiffres);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--encre-douce);
}

.souche--complet .souche__nombre { color: var(--vermillon); }

.tampon {
  font-family: var(--affiche);
  font-size: 1.15rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--vermillon);
  border: 3px solid var(--vermillon);
  border-radius: var(--rayon);
  padding: 0.3rem 0.7rem;
  transform: rotate(-8deg);
  opacity: 0.85;
}

.billet--complet { opacity: 0.78; }

/* ---------- Formulaire ---------- */

.champ { display: grid; gap: 0.35rem; margin-bottom: 1rem; }
.champ label {
  font-family: var(--chiffres);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--encre-douce);
}
.champ input {
  font: inherit;
  color: var(--encre);
  padding: 0.7rem 0.8rem;
  border: 2px solid var(--encre);
  border-radius: var(--rayon);
  background: var(--papier-clair);
  width: 100%;
}
.champ input:focus { outline: 3px solid var(--vermillon); outline-offset: 1px; }
.champ--pot { position: absolute; left: -9999px; }

.total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.9rem 0;
  margin-bottom: 1rem;
  border-top: 2px dotted var(--trait);
  border-bottom: 2px dotted var(--trait);
  font-family: var(--chiffres);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
}
.total strong { font-family: var(--affiche); font-size: 1.6rem; letter-spacing: 0; }

/* ---------- Fenêtre de réservation ---------- */

dialog.guichet {
  width: min(30rem, calc(100vw - 2rem));
  padding: 0;
  border: 2px solid var(--encre);
  border-radius: var(--rayon);
  background: var(--papier);
  color: var(--encre);
  box-shadow: 10px 10px 0 rgba(27, 43, 52, 0.25);
}
dialog.guichet::backdrop { background: rgba(27, 43, 52, 0.55); }

.guichet__entete {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.2rem 1.4rem 0.8rem;
  border-bottom: 2px solid var(--encre);
}
.guichet__entete h2 { font-size: 1.35rem; margin: 0; }
.guichet__corps { padding: 1.3rem 1.4rem 1.5rem; }

.fermer {
  font-family: var(--affiche);
  font-size: 1.3rem;
  line-height: 1;
  background: none;
  border: 0;
  color: var(--encre);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
}
.fermer:hover { color: var(--vermillon); }

/* ---------- Messages ---------- */

.message {
  border: 2px solid var(--encre);
  border-left-width: 8px;
  border-radius: var(--rayon);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  background: var(--papier-clair);
}
.message--erreur { border-left-color: var(--vermillon); }
.message--ok { border-left-color: var(--buvette); }
.message--info { border-left-color: var(--fanion); }

/* ---------- Reçu (page de confirmation) ---------- */

.recu {
  border: 2px solid var(--encre);
  border-radius: var(--rayon);
  background: var(--papier-clair);
  padding: clamp(1.5rem, 5vw, 2.5rem);
  box-shadow: 8px 8px 0 rgba(27, 43, 52, 0.15);
}
.recu__reference {
  font-family: var(--chiffres);
  font-size: 1.1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--vermillon);
}
.recu dl {
  display: grid;
  gap: 0.1rem 1.5rem;
  margin: 1.5rem 0 0;
  padding-top: 1.2rem;
  border-top: 2px dotted var(--trait);
}
@media (min-width: 520px) {
  .recu dl { grid-template-columns: max-content 1fr; }
}
.recu dt {
  font-family: var(--chiffres);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--encre-douce);
  padding-top: 0.45rem;
}
.recu dd { margin: 0 0 0.6rem; font-size: 1.05rem; }

/* ---------- Pied de page ---------- */

.pied {
  background: var(--encre);
  color: var(--papier);
  padding-block: 2.5rem 2rem;
  margin-top: clamp(2.5rem, 7vw, 4.5rem);
}
.pied a { color: var(--fanion); }
.pied a:hover { color: var(--papier-clair); }
.pied__grille {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .pied__grille { grid-template-columns: 1.4fr 1fr 1fr; }
}
.pied h3 {
  font-size: 0.78rem;
  font-family: var(--chiffres);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fanion);
}
.pied p, .pied li { font-size: 0.92rem; color: rgba(233, 226, 210, 0.85); }
.pied ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.pied__mention {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(233, 226, 210, 0.25);
  font-size: 0.8rem;
  color: rgba(233, 226, 210, 0.65);
}

/* ---------- Attente ---------- */

.attente {
  text-align: center;
  padding: 3rem 1rem;
  font-family: var(--chiffres);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--encre-douce);
}
