/* ==========================================================================
   Templates de sites FWSport · socle commun (charte France Web Studio)
   Les règles de design sont dans ../DESIGN.md : couleurs, police, rayon unique,
   icônes, mouvement, ton. Toute couleur passe par une variable ci-dessous.
   ========================================================================== */

@font-face {
  font-family: "Figtree";
  src: url("Figtree-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --bleu: #1d6fe0;
  --bleu-hover: #175bbc;
  --bleu-texte: #175bbc;
  --bleu-doux: #eaf2fe;
  --bleu-clair: #6ea8f5;
  --vert: #0a7d52;
  --vert-texte: #086943;
  --vert-doux: #e6f4ee;
  --vert-clair: #3fd39a;
  /* sur fond encre : texte secondaire, légende, trait */
  --sur-sombre: rgba(255, 255, 255, .78);
  --sur-sombre-2: rgba(255, 255, 255, .62);
  --trait-sombre: rgba(255, 255, 255, .24);
  --blanc: #ffffff;
  --fond: #f5f8fa;
  --surface: #edf1f5;
  --texte: #0b0f14;
  --texte-2: #4c5762;
  --texte-3: #5d6873;
  --ligne: #e4e9ee;
  --gris-decor: #b4bcc5; /* décor seulement (jamais pour un texte à lire) */
  --carte: var(--blanc);
  --rayon: 12px;
  --ombre: 0 24px 48px -24px rgba(11, 15, 20, .28);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --max: 1160px;
  /* bouton principal : bleu par défaut, encre sur Studio */
  --btn: var(--bleu);
  --btn-survol: var(--bleu-hover);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--texte);
  background: var(--fond);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.035em; line-height: 1.06; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.conteneur { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
@media (min-width: 640px) { .conteneur { padding: 0 32px; } }

.bleu { color: var(--bleu-texte); }
.vert { color: var(--vert-texte); }
.muet { color: var(--texte-2); }

/* Icônes Lucide du sprite commun/icones.svg */
.ico { width: 20px; height: 20px; flex: none; }
.ico.petite { width: 16px; height: 16px; }
.ico.grande { width: 24px; height: 24px; }

/* Boutons : un style principal, un style secondaire */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 22px; border-radius: var(--rayon); border: 1px solid transparent;
  font-weight: 600; font-size: 15px; cursor: pointer; white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s;
}
.btn .ico { width: 18px; height: 18px; }
.btn-plein { background: var(--btn); color: var(--blanc); }
.btn-plein:hover { background: var(--btn-survol); }
.btn-plein:active { transform: translateY(1px); }
.btn-contour { background: transparent; border-color: var(--ligne); color: var(--texte); }
.btn-contour:hover { border-color: var(--texte); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--bleu); outline-offset: 3px;
}

/* Bandeau de démonstration : retour à la galerie des formules */
.bandeau-template {
  position: fixed; left: 50%; bottom: 16px; z-index: 90; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100% - 32px);
  padding: 8px 8px 8px 16px; border-radius: var(--rayon);
  background: var(--texte); color: var(--blanc); font-size: 13px;
  box-shadow: var(--ombre);
}
.bandeau-template b { font-weight: 700; }
.bandeau-template > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 479px) { .bandeau-template .bt-marque { display: none; } }
.bandeau-template a { flex: none; padding: 6px 12px; border-radius: var(--rayon); border: 1px solid var(--trait-sombre); font-weight: 600; }
.bandeau-template a:hover { border-color: var(--blanc); }

/* Pied de page : crédit et liens légaux communs */
.credit { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: currentColor; }
.liens-legaux { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.liens-legaux a:hover, .credit:hover { color: var(--texte); }

/* Téléphone (dessine un objet réel : rayon propre à l'appareil, voir DESIGN.md) */
.tel {
  position: relative; width: 270px; aspect-ratio: 9 / 19.2; flex: none;
  border-radius: 44px; background: var(--texte); padding: 10px;
  box-shadow: var(--ombre), inset 0 0 0 1.5px rgba(255, 255, 255, .12);
}
.tel::before {
  content: ""; position: absolute; top: 18px; left: 50%; z-index: 3; width: 84px; height: 24px;
  transform: translateX(-50%); border-radius: 20px; background: var(--texte);
}
.tel-ecran {
  position: relative; height: 100%; overflow: hidden; border-radius: 35px; background: var(--fond); color: var(--texte);
  font-size: 11px; line-height: 1.35;
}
/* Écrans de l'app FWSport : ils reproduisent l'app telle qu'elle est */
.ecran { position: absolute; inset: 0; padding: 50px 14px 14px; display: flex; flex-direction: column; gap: 9px; }
.e-top { display: flex; align-items: center; justify-content: space-between; }
.e-top b { font-size: 15px; letter-spacing: -.03em; }
.e-avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--bleu-doux); color: var(--bleu-texte); font-weight: 700; font-size: 10px; }
.e-carte { background: var(--blanc); border: 1px solid var(--ligne); border-radius: 14px; padding: 10px; }
.e-titre { font-weight: 700; font-size: 12px; letter-spacing: -.02em; }
.e-petit { font-size: 9.5px; color: var(--texte-3); }
.e-barre { height: 6px; border-radius: 6px; background: var(--surface); overflow: hidden; }
.e-barre i { display: block; height: 100%; border-radius: inherit; background: var(--vert); }
.e-ligne { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.e-pill { display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px; border-radius: 999px; font-size: 9px; font-weight: 700; background: var(--vert-doux); color: var(--vert-texte); }
.e-btn { margin-top: auto; height: 34px; border-radius: 999px; display: grid; place-items: center; background: var(--bleu); color: var(--blanc); font-weight: 700; font-size: 11px; }
.e-bulle { max-width: 78%; padding: 7px 10px; border-radius: 14px; background: var(--blanc); border: 1px solid var(--ligne); }
.e-bulle.moi { align-self: flex-end; background: var(--bleu); color: var(--blanc); border-color: var(--bleu); }
.e-ico { width: 11px; height: 11px; flex: none; }
.e-coche { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--ligne); display: grid; place-items: center; color: var(--blanc); }
.e-coche.ok { background: var(--vert); border-color: var(--vert); }
.e-coche .e-ico { width: 10px; height: 10px; }

.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

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

/* Titres animés : une ligne par <span> enfant, même avant le chargement des scripts. */
[data-lignes] > span, [data-lignes-auto] > span { display: block; }
