/* ==========================================================================
   REFONTE 2026-10 — « cahier d'école joyeux, haut de gamme »
   Charte fiche 11 : titres Baloo Bhaijaan 2, Étoile = accent unique, un seul dégradé signature
   par page (le bloc franchise), griffonnages légers en Azur et Étoile, photos à bord blanc.
   Chargée après site.css : elle prime sur les règles d'origine.
   ========================================================================== */
@font-face {
  font-family: "Baloo Bhaijaan 2"; src: url("/polices/baloo-bhaijaan-2-latin.woff2") format("woff2");
  font-weight: 600 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Baloo Bhaijaan 2"; src: url("/polices/baloo-bhaijaan-2-latin-ext.woff2") format("woff2");
  font-weight: 600 800; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Baloo Bhaijaan 2"; src: url("/polices/baloo-bhaijaan-2-arabe.woff2") format("woff2");
  font-weight: 600 800; font-style: normal; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

:root {
  --f-titre: "Baloo Bhaijaan 2", "Familjen Grotesk", "Segoe UI", system-ui, sans-serif;
  --ombre: 0 1px 2px rgba(11, 36, 107, .05), 0 12px 32px -8px rgba(11, 36, 107, .16);
  --ombre-forte: 0 2px 4px rgba(11, 36, 107, .06), 0 24px 48px -12px rgba(11, 36, 107, .28);
  --sortie: cubic-bezier(.22, 1, .36, 1);
  --cahier: linear-gradient(rgba(59, 123, 202, .07) 1px, transparent 1px) 0 0 / 28px 28px,
            linear-gradient(90deg, rgba(59, 123, 202, .07) 1px, transparent 1px) 0 0 / 28px 28px;
  --degrade-signature: linear-gradient(125deg, #3A3F9E 0%, #454CB5 30%, #2A5FA8 75%, #2F6DBE 100%);
}
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
/* Grain très léger : casse la planéité du numérique, comme le papier d'un cahier. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* ---------- Titres ---------- */
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -.015em; }
h1 { font-size: clamp(2.5rem, 1.5rem + 4.4vw, 4.6rem); line-height: 1.02; }
h2 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.1rem); line-height: 1.05; }
h3 { font-size: 1.35rem; line-height: 1.2; font-weight: 700; }
p, .chapo { text-wrap: pretty; }
.chapo { max-width: 58ch; }
.surtitre, .signature { letter-spacing: .14em; }
/* Le mot souligné à la main (griffonnage Étoile) */
.souligne {
  /* Calé depuis le haut des lettres : la boîte de Baloo est bien plus haute que l'interligne (1,8 em
     pour 1,02), un trait posé « en bas » retombait sur la ligne suivante. Répété sur chaque ligne. */
  text-decoration: none;
  background: url("/img/griffonnages/soulignement.svg") left 0 top 1.02em / 100% .26em no-repeat;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* ---------- En-tête : vitré et collant ---------- */
.entete {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid rgba(11, 36, 107, .08);
}
.entete__logo img { width: 128px; }
.nav__liste a { transition: color .2s var(--sortie); }

/* ---------- Boutons : retour physique ---------- */
.bouton { font-weight: 800; padding-top: .78em;
  transition: transform .2s var(--sortie), box-shadow .2s var(--sortie), background-color .2s ease, color .2s ease; }
.bouton:hover { transform: translateY(-2px); }
.bouton:active { transform: translateY(0) scale(.97); transition-duration: .08s; }
.bouton--etoile { box-shadow: 0 6px 18px -6px rgba(209, 160, 8, .7); }
.bouton--etoile:hover { box-shadow: 0 10px 24px -8px rgba(209, 160, 8, .85); }
.bouton--marine { box-shadow: 0 6px 18px -8px rgba(11, 36, 107, .6); }
.bouton svg { transition: transform .25s var(--sortie); }
.bouton:hover svg { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) {
  .bouton, .bouton:hover, .bouton:active, .bouton svg, .bouton:hover svg { transform: none; transition: none; }
}

/* ---------- Héros : papier quadrillé, plus de bloc Marine ---------- */
.heros.sombre { background: var(--cahier), linear-gradient(180deg, #FFFFFF 0%, var(--papier) 100%); color: var(--encre); }
.heros.sombre h1, .heros.sombre h2 { color: var(--marine); }
.heros.sombre .signature, .heros.sombre .surtitre { color: var(--azur-profond); }
.heros.sombre .chapo { color: var(--ardoise); }
.heros.sombre a:not(.bouton):not(.porte) { color: var(--azur-profond); }
.heros.sombre .bouton--contour { color: var(--marine); }
.heros.sombre .bouton--contour:hover { background: var(--brume); }
.heros.sombre :focus-visible { outline-color: var(--azur-profond); }
.heros.sombre .coches li::before {
  background-color: var(--brume);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232A5FA8' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.heros__devise { color: var(--marine); }
.heros__devise span { color: var(--azur); }
.heros { padding-block: clamp(3rem, 2rem + 5vw, 6.5rem) clamp(4rem, 3rem + 5vw, 7.5rem); }
.heros__photo { rotate: 1.6deg; }
.heros__photo img { border-width: 8px; border-radius: 28px; box-shadow: var(--ombre-forte); }
.heros__photo figcaption { left: auto; right: 18px; bottom: -16px; z-index: 2; }
.heros__photo figcaption .pilule { box-shadow: var(--ombre); }
.heros__photo::before {
  content: ""; position: absolute; width: 190px; height: 104px; top: -78px; left: -40px;
  background: url("/img/griffonnages/avion.svg") center / contain no-repeat; transform: rotate(-4deg);
}
.heros__rond {
  position: absolute; left: -38px; bottom: -48px; width: clamp(110px, 12vw, 158px); aspect-ratio: 1; margin: 0;
  border-radius: 50%; overflow: hidden; border: 6px solid var(--blanc); outline: 3px solid var(--azur);
  box-shadow: var(--ombre-forte); transform: rotate(-4deg);
}
.heros__photo .heros__rond img { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; border: 0; border-radius: 0; box-shadow: none; }
.heros h1 { position: relative; }
.heros h1::after {
  content: ""; position: absolute; width: 44px; height: 44px; top: -30px; left: -38px;
  background: url("/img/griffonnages/eclats.svg") center / contain no-repeat; transform: rotate(-20deg);
}
@media (max-width: 860px) {
  .heros__photo { max-width: 560px; margin: 2.5rem auto 0; }
  .heros__photo::before { width: 130px; height: 72px; top: -56px; left: auto; right: 4px; }
  .heros__rond { left: -6px; }
  .heros h1::after { display: none; }
}

/* Deux portes */
.portes { gap: 16px; margin-top: 32px; }
.heros.sombre .porte, .porte { background: var(--blanc); color: var(--marine); border: 1px solid rgba(11, 36, 107, .1); box-shadow: var(--ombre);
  border-radius: 20px; padding: 20px 22px; transition: transform .25s var(--sortie), box-shadow .25s var(--sortie), background-color .2s; }
.porte:hover { background: var(--blanc); transform: translateY(-3px); box-shadow: var(--ombre-forte); }
.porte:active { transform: scale(.98); }
.porte__public { color: var(--azur-profond); opacity: 1; }
.porte__detail { color: var(--ardoise); opacity: 1; }
.heros.sombre .porte--etoile, .porte--etoile { background: var(--etoile); border-color: transparent; color: var(--marine); }
.porte--etoile:hover { background: #F4D04B; }
.porte--etoile .porte__public { color: var(--marine); opacity: .8; }
.porte--etoile .porte__detail { color: var(--encre); }
.porte svg { transition: transform .25s var(--sortie); }
.porte:hover svg { transform: translateX(4px); }
.porte:focus-visible { outline: 3px solid var(--azur-profond); }
@media (prefers-reduced-motion: reduce) { .porte, .porte:hover, .porte:active, .porte svg, .porte:hover svg { transform: none; } }

/* ---------- Le réseau en chiffres : ruban qui chevauche le héros ---------- */
.ruban-chiffres { background: transparent; padding: 0; margin-top: -3rem; position: relative; z-index: 2; }
.chiffres { background: var(--blanc); border-radius: 26px; box-shadow: var(--ombre-forte); gap: 0; padding: 8px; }
.chiffre { background: none; box-shadow: none; padding: 22px 24px; border-radius: 0; }
.chiffre + .chiffre { border-left: 2px dashed rgba(59, 123, 202, .28); }
.chiffre b { font-weight: 800; color: var(--azur-profond); font-variant-numeric: tabular-nums; font-size: clamp(2rem, 1.4rem + 2vw, 2.9rem); }
.chiffre:first-child b { color: var(--marine); }
@media (max-width: 900px) {
  .chiffre + .chiffre { border-left: 0; }
  .chiffre:nth-child(2n) { border-left: 2px dashed rgba(59, 123, 202, .28); }
  .chiffre:nth-child(n+3) { border-top: 2px dashed rgba(59, 123, 202, .28); }
  .chiffre { padding: 18px; }
}

/* ---------- Cartes : moins de gabarit, plus de matière ---------- */
.carte { border: 0; border-radius: 22px; box-shadow: var(--ombre); transition: box-shadow .3s var(--sortie); }
.section--blanche .carte { background: var(--papier); box-shadow: inset 0 0 0 1px rgba(11, 36, 107, .06); }
.pastille { border-radius: 16px; background: linear-gradient(140deg, var(--indigo), var(--azur-profond)); box-shadow: 0 8px 18px -8px rgba(42, 95, 168, .8); }
/* L'offre en mosaïque : la première carte (soutien scolaire) mène la danse. */
.mosaique { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mosaique .carte:first-child { grid-column: span 2; grid-row: span 2; display: grid; grid-template-columns: auto 1fr; gap: 0 1.25rem; align-content: center;
  background: var(--cahier), var(--brume); padding: 2rem; box-shadow: none; }
.mosaique .carte:first-child .pastille { grid-row: span 2; width: 64px; height: 64px; margin: 0; }
.mosaique .carte:first-child h3 { font-size: 1.75rem; }
.mosaique .carte:first-child p { font-size: 1.08rem; max-width: 46ch; }
@media (max-width: 960px) { .mosaique { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mosaique .carte:first-child { grid-row: auto; } }
@media (max-width: 640px) {
  .mosaique { grid-template-columns: 1fr; }
  .mosaique .carte:first-child { grid-column: auto; grid-row: auto; grid-template-columns: 1fr; }
  .mosaique .carte:first-child .pastille { grid-row: auto; margin-bottom: 1rem; }
}

/* ---------- Sections claires : cahier sur Brume ---------- */
.section--brume { background: var(--cahier), var(--brume); }

/* ---------- Bloc franchise : le dégradé signature, moment fort de la page ---------- */
.franchise-bloc { background: var(--degrade-signature); position: relative; overflow: hidden; isolation: isolate; }
.franchise-bloc::before {
  content: ""; position: absolute; z-index: -1; width: 620px; height: 620px; right: -180px; top: -220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(89, 173, 254, .45), transparent 65%);
}
.franchise-bloc::after {
  content: ""; position: absolute; z-index: -1; width: 240px; height: 130px; right: 6%; top: 48px; opacity: .55;
  background: url("/img/griffonnages/avion.svg") center / contain no-repeat; filter: brightness(2.4);
}
.franchise-bloc .section__tete { max-width: 820px; }
.franchise-bloc .chapo { color: #EAF2FD; }
.conditions { gap: 14px; }
.condition { border-radius: 20px; padding: 22px; }
.condition b { font-weight: 800; font-size: clamp(1.5rem, 1.2rem + 1vw, 1.9rem); font-variant-numeric: tabular-nums; }
.condition--clair { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .22);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.franchise-bloc .grille .carte { background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.franchise-bloc .carte h3 { font-size: 1.3rem; }
@media (max-width: 760px) { .franchise-bloc::after { display: none; } }

/* ---------- Bandeau final : Marine, pas de second dégradé ---------- */
.bandeau { background: var(--marine); border-radius: 32px; position: relative; overflow: hidden; isolation: isolate; }
.bandeau::after {
  content: ""; position: absolute; z-index: -1; right: 30%; top: 22px; width: 150px; height: 76px; opacity: .5;
  background: url("/img/griffonnages/boucle.svg") center / contain no-repeat; filter: brightness(2.2);
}

/* ---------- Centres : photo à bord blanc, cerclée d'Azur ---------- */
.centre { border: 0; border-radius: 26px; box-shadow: var(--ombre); transition: transform .3s var(--sortie), box-shadow .3s var(--sortie); }
.centre:hover { transform: translateY(-3px); box-shadow: var(--ombre-forte); }
.centre__visuel { border-radius: 18px; box-shadow: inset 0 0 0 3px var(--azur); }
.centre__visuel img { border-radius: 18px; }
.centre__visuel--bientot { background: var(--cahier), var(--indigo); box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .centre:hover { transform: none; } }

/* ---------- Étapes : numéros en pastille Étoile ---------- */
.etapes li { border: 0; border-radius: 22px; box-shadow: var(--ombre); }
.etapes li::before { border-radius: 14px; background: var(--etoile); color: var(--marine); font-weight: 800; transform: rotate(-4deg); }

/* ---------- Tableau des conditions et FAQ ---------- */
.tarifs { border-radius: 24px; }
.tarifs tbody tr { transition: background-color .2s ease; }
.tarifs tbody tr:hover { background: #F4F8FE; }
.tarifs td:first-child { font-family: var(--f-titre); font-weight: 700; color: var(--marine); font-size: 1.05rem; }
.faq details { border-radius: 18px; transition: box-shadow .25s var(--sortie); }
.faq details[open] { box-shadow: var(--ombre-forte); }
.faq summary { list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; font-size: 1.08rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  background: var(--brume); color: var(--marine); font: 800 1.3rem/1 var(--f-titre); transition: transform .25s var(--sortie), background-color .2s; }
.faq details[open] summary::after { transform: rotate(45deg); background: var(--etoile); }

/* ---------- Formulaire ---------- */
.formulaire { border: 0; border-radius: 28px; box-shadow: var(--ombre-forte); }
.champ input, .champ textarea { border-radius: 14px; border-color: #A9B8D2; transition: border-color .2s, box-shadow .2s, background-color .2s; }
.champ input:hover, .champ textarea:hover { border-color: var(--azur); }
.champ input:focus-visible, .champ textarea:focus-visible { outline: 0; box-shadow: 0 0 0 4px rgba(59, 123, 202, .28); }

/* ---------- Pied de page ---------- */
.pied { background: var(--cahier), var(--marine); }

/* ---------- Apparitions (site.js pose .revele puis .vu ; .entree au chargement du héros) ---------- */
.js .revele { opacity: 0; transform: translateY(18px); }
.js .revele.vu { opacity: 1; transform: none; transition: opacity .7s var(--sortie), transform .7s var(--sortie); transition-delay: calc(var(--rang, 0) * 70ms); }
.js .heros .entree { opacity: 0; transform: translateY(14px); animation: entree .8s var(--sortie) forwards; animation-delay: calc(var(--rang, 0) * 90ms + 60ms); }
@keyframes entree { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .js .revele, .js .revele.vu, .js .heros .entree { opacity: 1; transform: none; transition: none; animation: none; }
}

/* Carte claire posée sur le dégradé (le modèle) : texte Encre, coches Azur — la règle .sombre la passait en blanc. */
.franchise-bloc .carte:not(.carte--marine) { color: var(--encre); background: var(--blanc); }
.franchise-bloc .carte:not(.carte--marine) h3 { color: var(--marine); }
.franchise-bloc .carte:not(.carte--marine) .coches li::before {
  background-color: var(--brume);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232A5FA8' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.franchise-bloc .grille .carte { background: rgba(255, 255, 255, .07); color: var(--sur-sombre); }
.franchise-bloc .grille .carte h3 { color: var(--blanc); }
/* Surtitre et signature sur le dégradé : presque blanc (le Ciel n'atteint pas 4,5:1 sur l'Indigo). */
.franchise-bloc .surtitre, .franchise-bloc .signature { color: #DCEBFF; }
