@import url("tokens.css");

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--creme);
  color: var(--espresso);
  font-family: var(--font-texte);
  font-size: var(--taille-texte);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ocre); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, .titre {
  font-family: var(--font-titre);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--taille-display); }
h2 { font-size: var(--taille-h2); }
h3 { font-size: var(--taille-h3); font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
p { margin: 0; text-wrap: pretty; }

.conteneur { width: 100%; max-width: var(--conteneur); margin: 0 auto; padding: 0 var(--gouttiere); }
.section { padding: var(--e-9) 0; }
.section + .section { border-top: 1px solid var(--ligne); }
.section-tete { display: grid; gap: var(--e-4); max-width: 46rem; margin-bottom: var(--e-7); }
.chapo { font-size: 1.2rem; color: var(--espresso-doux); max-width: var(--mesure); }
.secondaire { color: var(--espresso-doux); }

.surtitre {
  font-family: var(--font-titre);
  font-weight: 700;
  font-size: var(--taille-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tomette);
  display: inline-flex;
  align-items: center;
  gap: var(--e-2);
}
.surtitre::before { content: ""; width: 18px; height: 2px; background: currentColor; }

.surligne {
  background: linear-gradient(transparent 62%, var(--ocre) 62%, var(--ocre) 92%, transparent 92%);
  padding: 0 0.08em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Boutons */
.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--e-2);
  min-height: 48px;
  padding: 0 var(--e-5);
  border-radius: var(--rayon-pill);
  border: 2px solid transparent;
  font-family: var(--font-texte);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, color .15s, transform .15s;
}
.bouton:active { transform: translateY(1px); }
.bouton-principal { background: var(--tomette); color: var(--creme-clair); }
.bouton-principal:hover { background: var(--tomette-fonce); }
.bouton-secondaire { border-color: var(--espresso); color: var(--espresso); background: transparent; }
.bouton-secondaire:hover { background: var(--espresso); color: var(--creme-clair); }
.bouton-clair { background: var(--ocre); color: var(--espresso); }
.bouton-clair:hover { background: var(--ocre-pale); }
.lien-fleche { font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--tomette-vive); }
.lien-fleche::after { content: " →"; }

/* Étiquettes d'état */
.etiquette {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--rayon-pill);
  font-size: var(--taille-label);
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1.5px solid currentColor;
}
.etiquette::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.etat-ouverte { color: var(--tomette); }
.etat-bientot { color: var(--espresso); background: var(--ocre-pale); border-color: var(--ocre); }
.etat-complet { color: var(--creme-clair); background: var(--espresso); border-color: var(--espresso); }
.etat-termine { color: var(--espresso-doux); border-style: dashed; }

/* Carte et encart */
.carte {
  background: var(--creme-clair);
  border: 1px solid var(--ligne);
  border-radius: var(--rayon-l);
  padding: var(--e-6);
}
.encart {
  border: 2px dashed var(--ligne-forte);
  border-radius: var(--rayon-m);
  padding: var(--e-5);
  display: grid;
  gap: var(--e-2);
  max-width: var(--mesure);
}
.encart h3 { font-size: 1.05rem; }
.encart p { font-size: 0.975rem; color: var(--espresso-doux); }

/* Icônes au trait */
.pastille-icone {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ocre-pale);
  color: var(--tomette);
  flex: none;
}
.pastille-icone svg { width: 28px; height: 28px; }

/* Ticket de bilan */
.ticket {
  position: relative;
  max-width: 420px;
  background: var(--creme-clair);
  padding: var(--e-6) var(--e-5) var(--e-5);
  display: grid;
  gap: var(--e-4);
  font-variant-numeric: tabular-nums;
  margin-bottom: 12px;
}
.ticket::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -12px;
  height: 12px;
  background:
    linear-gradient(135deg, var(--creme-clair) 6px, transparent 0) 0 0 / 12px 12px repeat-x,
    linear-gradient(-135deg, var(--creme-clair) 6px, transparent 0) 0 0 / 12px 12px repeat-x;
}
.ticket-tete { text-align: center; display: grid; gap: 2px; padding-bottom: var(--e-4); border-bottom: 2px dashed var(--ligne-forte); }
.ticket-tete .titre { font-size: 1.15rem; }
.ticket-tete span { font-size: var(--taille-petit); color: var(--espresso-doux); }
.ticket-bloc { display: grid; gap: 6px; font-size: 0.95rem; }
.ticket-bloc h4 { margin: 0 0 2px; font-family: var(--font-titre); font-weight: 700; font-size: var(--taille-label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--tomette); }
.ticket-ligne { display: flex; align-items: baseline; gap: var(--e-2); }
.ticket-ligne::after { content: ""; order: 1; flex: 1; border-bottom: 2px dotted var(--ligne-forte); }
.ticket-ligne span:last-child { order: 2; }
.ticket-ligne.moins span:last-child { color: var(--tomette); }
.ticket-total { display: flex; justify-content: space-between; gap: var(--e-3); padding-top: var(--e-3); border-top: 2px solid var(--espresso); font-family: var(--font-titre); font-weight: 800; font-size: 1.1rem; }
.ticket-note { font-size: var(--taille-label); color: var(--espresso-doux); line-height: 1.5; }

/* Billet d'événement */
.billet {
  display: grid;
  grid-template-columns: 132px 1fr;
  background: var(--creme-clair);
  border: 1px solid var(--ligne);
  border-radius: var(--rayon-l);
  overflow: hidden;
}
.billet-date {
  background: var(--espresso);
  color: var(--creme-clair);
  display: grid;
  place-content: center;
  text-align: center;
  padding: var(--e-5) var(--e-3);
  border-right: 3px dotted var(--creme);
}
.billet-jour { font-family: var(--font-titre); font-weight: 800; font-size: 3.2rem; line-height: 1; color: var(--ocre); }
.billet-mois { font-family: var(--font-titre); font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; font-size: var(--taille-petit); }
.billet-corps { padding: var(--e-5) var(--e-6); display: grid; gap: var(--e-3); }
.billet-infos { display: flex; flex-wrap: wrap; gap: var(--e-2) var(--e-5); font-size: var(--taille-petit); color: var(--espresso-doux); margin: 0; padding: 0; list-style: none; }
.billet-actions { display: flex; flex-wrap: wrap; gap: var(--e-3); margin-top: var(--e-2); }
@media (max-width: 560px) {
  .billet { grid-template-columns: 1fr; }
  .billet-date { border-right: 0; border-bottom: 3px dotted var(--creme); grid-auto-flow: column; gap: var(--e-3); align-items: baseline; justify-content: start; padding: var(--e-4) var(--e-5); }
  .billet-jour { font-size: 2.2rem; }
  .billet-corps { padding: var(--e-5); }
}

/* Formulaire */
.champ { display: grid; gap: 6px; }
.champ label { font-weight: 600; font-size: var(--taille-petit); }
.champ .aide { font-weight: 400; color: var(--espresso-doux); }
.champ input, .champ select, .champ textarea {
  font: inherit;
  color: var(--espresso);
  background: var(--creme-clair);
  border: 1.5px solid var(--ligne-forte);
  border-radius: var(--rayon-s);
  padding: 12px 14px;
  min-height: 48px;
  width: 100%;
}
.champ textarea { min-height: 140px; resize: vertical; }
.champ input:focus, .champ select:focus, .champ textarea:focus { outline: none; border-color: var(--tomette); box-shadow: 0 0 0 3px var(--ocre-pale); }

/* Tampon animé */
.tampon { width: 100%; height: auto; }
@media (prefers-reduced-motion: no-preference) {
  .tampon-tourne .texte-tampon { animation: tourne 40s linear infinite; transform-origin: 80px 80px; }
}
@keyframes tourne { to { transform: rotate(360deg); } }

/* Logo horizontal */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--espresso); }
.logo svg { width: 40px; height: 40px; flex: none; }
.logo-nom { display: grid; line-height: 1; }
.logo-nom strong { font-family: var(--font-titre); font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; }
.logo-nom span { font-family: var(--font-titre); font-weight: 600; font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--tomette); margin-top: 4px; }

/* Pages de texte (mentions légales, confidentialité) */
.entete-simple { border-bottom: 1px solid var(--ligne); }
.entete-simple .logo-nom strong { white-space: nowrap; }
@media (max-width: 420px) { .entete-simple .logo-nom span { display: none; } }
.entete-simple .conteneur { display: flex; align-items: center; justify-content: space-between; gap: var(--e-4); min-height: 72px; }
.texte-legal { max-width: 46rem; padding-block: var(--e-8) var(--e-9); display: grid; gap: var(--e-6); }
.texte-legal h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.texte-legal section { display: grid; gap: var(--e-3); }
.texte-legal h2 { font-size: 1.5rem; letter-spacing: -0.015em; }
.texte-legal ul { margin: 0; padding-left: 1.2em; display: grid; gap: var(--e-1); }
.texte-legal dl { margin: 0; display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); gap: var(--e-2) var(--e-5); }
.texte-legal dt { font-weight: 600; }
.texte-legal dd { margin: 0; color: var(--espresso-doux); overflow-wrap: anywhere; }
.texte-legal .maj { font-size: var(--taille-petit); color: var(--espresso-doux); }
@media (max-width: 560px) { .texte-legal dl { grid-template-columns: 1fr; gap: 2px; } .texte-legal dd { margin-bottom: var(--e-3); } }
.pied { padding: var(--e-7) 0; font-size: var(--taille-petit); }
.pied .conteneur { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--e-4); }
.pied-liens { display: flex; gap: var(--e-5); }

/* Utilitaires */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.grille-3 { display: grid; gap: var(--e-5); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.sombre { background: var(--espresso); color: var(--creme-clair); }
.sombre .secondaire, .sombre .chapo { color: rgba(251, 246, 238, 0.78); }
.sombre .surtitre { color: var(--ocre); }
.sombre .carte { background: rgba(251, 246, 238, 0.06); border-color: var(--ligne-claire); }
.sombre .champ input, .sombre .champ select, .sombre .champ textarea { background: var(--creme-clair); }
