@font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap; src: url("polices/figtree.woff2") format("woff2"); }
@font-face { font-family: "Young Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("polices/young-serif.woff2") format("woff2"); }
img { max-width: 100%; }

/* Mise en page : une ouverture claire couleur crème avec le logo, des sections sur fond blanc chaud, une bande vert forêt pour le contact. Couleurs tirées du logo (terre cuite, blé, sauge, vert forêt, anthracite). */
:root {
  --sol: #FCFAF6;         /* fond blanc chaud */
  --surface: #FFFFFF;
  --creme: #F5EEE3;       /* bande d'ouverture */
  --encre: #2F3433;       /* anthracite du logo, texte */
  --doux: #5F6562;        /* texte secondaire */
  --terre: #A9583A;       /* terre cuite des mains : liens, chiffres */
  --ble: #DDA65A;         /* blé du pain : boutons */
  --feuillage: #2F5A3A;   /* vert forêt : chiffre local */
  --sauge: #8FA57C;       /* vert sauge : puces, petites touches */
  --ligne: #ECE4D8;
  --barre: #DDD4C6;
  --bande: #2F5A3A;       /* bande de contact et carte mise en avant */
  --sur-bande: #F6F3EC;
  --sur-bande-doux: #C5D3BD;
  --fond-logo: #FFFFFF;   /* le logo est sur fond blanc, dans les deux thèmes */
  --fond-video: #FAFBF6;  /* fond exact de l'animation du logo */
  --police-titre: "Young Serif", Georgia, "Times New Roman", serif;
  --police-texte: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sol: #161413; --surface: #1F1C1A; --creme: #221E1B; --encre: #EEE9E2; --doux: #B4ACA2;
    --terre: #E29270; --ble: #E6B46C; --feuillage: #9DC39F; --sauge: #A9BC97; --ligne: #332E2A; --barre: #403A35;
    --bande: #1E3A26; --sur-bande: #F1EEE6; --sur-bande-doux: #B9C9B0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --sol: #161413; --surface: #1F1C1A; --creme: #221E1B; --encre: #EEE9E2; --doux: #B4ACA2;
  --terre: #E29270; --ble: #E6B46C; --feuillage: #9DC39F; --sauge: #A9BC97; --ligne: #332E2A; --barre: #403A35;
  --bande: #1E3A26; --sur-bande: #F1EEE6; --sur-bande-doux: #B9C9B0;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--sol);
  color: var(--encre);
  font-family: var(--police-texte);
  font-size: 1.0625rem;
  line-height: 1.6;
}
a { color: var(--terre); }
:focus-visible { outline: 3px solid var(--ble); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--police-titre); font-weight: 400; line-height: 1.15; text-wrap: balance; margin: 0; }
h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
h3 { font-size: 1.35rem; }
p { margin: 0; }

.cadre { max-width: 72rem; margin-inline: auto; padding-inline: 20px; }
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section + .section { border-top: 1px solid var(--ligne); }
.surtitre {
  font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--terre); margin-bottom: .9rem;
}
.chapeau { max-width: 40rem; color: var(--doux); font-size: 1.125rem; margin-top: 1rem; }
.entete-section { margin-bottom: 2.75rem; }

/* Navigation */
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  background: var(--surface); color: var(--encre);
  border-bottom: 1px solid var(--ligne);
}
.nav .cadre { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .8rem; flex-wrap: wrap; }
.marque { display: flex; align-items: center; gap: .7rem; color: inherit; text-decoration: none; font: 800 1.02rem var(--police-texte); letter-spacing: .05em; text-transform: uppercase; }
.logo-symbole { background-color: var(--fond-logo); background-image: url("logo.webp"); background-repeat: no-repeat; }
.logo-symbole { width: 60px; height: 38px; flex: none; border-radius: 8px; background-size: 64px 64px; background-position: -0.7px -5.7px; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.4rem; flex-wrap: wrap; font-size: .95rem; }
.nav ul a { color: var(--doux); text-decoration: none; }
.nav ul a:hover { color: var(--terre); }
@media (max-width: 760px) { .nav ul { display: none; } }

/* Ouverture */
.ouverture { background: var(--creme); color: var(--encre); }
.ouverture .cadre { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; padding-block: clamp(3rem, 7vw, 5.5rem); }
.ouverture h1 { font-size: clamp(2.6rem, 6.5vw, 4.6rem); letter-spacing: -.01em; }
.ouverture h1 em { font-style: normal; color: var(--terre); }
.ouverture .accroche { margin-top: 1.4rem; max-width: 34rem; font-size: 1.15rem; color: var(--doux); }
.actions { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .8rem; margin-top: 2rem; justify-self: start; }
@media (max-width: 440px) { .actions { display: grid; grid-auto-flow: row; width: 100%; } }
.bouton {
  display: inline-flex; align-items: center; gap: .5rem; padding: .8rem 1.35rem; border-radius: 999px;
  font: 600 1rem/1.25 var(--police-texte); text-decoration: none; cursor: pointer; border: 1.5px solid transparent;
  justify-content: center; text-align: center; white-space: nowrap;
  transition: transform .15s ease, background-color .15s ease;
}
.bouton:hover { transform: translateY(-1px); }
.bouton-plein { background: var(--ble); color: #3A2608; }
.bouton-plein:hover { background: color-mix(in srgb, var(--ble) 85%, white); }
.bouton-contour { border-color: color-mix(in srgb, var(--encre) 30%, transparent); color: var(--encre); }
.bouton-contour:hover { border-color: var(--encre); }
.contact .bouton-contour { border-color: color-mix(in srgb, var(--sur-bande) 40%, transparent); color: var(--sur-bande); }
.contact .bouton-contour:hover { border-color: var(--sur-bande); }
.logo-complet { display: block; width: 100%; max-width: 380px; height: auto; aspect-ratio: 1; justify-self: center; object-fit: contain; background: var(--fond-logo); border-radius: 28px; border: 1px solid var(--ligne); }
video.logo-complet { object-fit: cover; background: var(--fond-video); }
@media (max-width: 820px) {
  .ouverture .cadre { grid-template-columns: 1fr; }
  .logo-complet { max-width: 280px; order: -1; }
}

/* Le constat */
.chiffres { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--ligne); border: 1px solid var(--ligne); border-radius: 14px; overflow: hidden; }
.chiffre { background: var(--surface); padding: 1.6rem 1.4rem; display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.chiffre .valeur { font-family: var(--police-titre); font-size: clamp(2.3rem, 4vw, 3rem); line-height: 1; color: var(--terre); font-variant-numeric: tabular-nums; }
.chiffre .valeur small { font-size: .45em; margin-left: .15em; }
.chiffre p { font-size: .98rem; }
.chiffre .source { font-size: .8rem; color: var(--doux); margin-top: auto; padding-top: .4rem; }
@media (max-width: 900px) { .chiffres { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .chiffres { grid-template-columns: 1fr; } }

.duo { display: grid; grid-template-columns: 1fr 1.2fr; gap: 1.5rem; margin-top: 1.5rem; }
@media (max-width: 900px) { .duo { grid-template-columns: 1fr; } }
.invitation-jeu { display: grid; grid-template-columns: auto 1fr auto; gap: 1.2rem; align-items: center; margin-top: 1.5rem; padding: 1.3rem 1.6rem; border-radius: 14px; background: var(--creme); border: 1px solid var(--ligne); color: var(--encre); text-decoration: none; transition: border-color .2s ease, transform .2s ease; }
.invitation-jeu:hover { border-color: var(--terre); transform: translateY(-2px); }
.invitation-pictos { font-size: 1.8rem; letter-spacing: .1em; white-space: nowrap; }
.invitation-texte { color: var(--doux); min-width: 0; }
.invitation-texte strong { display: block; color: var(--encre); font-family: var(--police-titre); font-weight: 400; font-size: 1.25rem; margin-bottom: .2rem; }
.invitation-fleche { font-size: 1.6rem; color: var(--terre); }
@media (max-width: 560px) { .invitation-jeu { grid-template-columns: 1fr; } .invitation-fleche { display: none; } }
.panneau { background: var(--surface); border: 1px solid var(--ligne); border-radius: 14px; padding: 1.8rem; min-width: 0; }
.panneau h3 { margin-bottom: .6rem; }
.panneau .source { font-size: .8rem; color: var(--doux); margin-top: 1.2rem; }

.local-tete { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; }
.local-tete .valeur { font-family: var(--police-titre); font-size: 3.4rem; line-height: 1; color: var(--feuillage); }
.silhouettes { display: flex; gap: .5rem; margin: 1.4rem 0 1rem; }
.silhouettes svg { width: 40px; height: 64px; }
.silhouettes .p { fill: var(--barre); }
.silhouettes .p.marque-p { fill: var(--feuillage); }

.barres { display: grid; gap: .85rem; margin-top: 1.3rem; }
.barre-ligne { display: grid; grid-template-columns: 11rem 1fr 3rem; gap: .8rem; align-items: center; font-size: .95rem; }
.barre-piste {
  position: relative; height: 22px; border-radius: 4px;
  background-image: linear-gradient(to right, var(--ligne) 1px, transparent 1px);
  background-size: 25% 100%;
}
.barre-remplie { height: 100%; border-radius: 4px; background: var(--barre); }
.barre-ligne.vise .barre-remplie { background: var(--terre); }
.barre-ligne.vise .barre-nom { font-weight: 600; }
.barre-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.echelle { display: grid; grid-template-columns: 11rem 1fr 3rem; gap: .8rem; font-size: .75rem; color: var(--doux); }
.echelle div { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) {
  .barre-ligne, .echelle { grid-template-columns: 1fr 2.6rem; }
  .barre-nom { grid-column: 1 / -1; }
  .echelle > span:first-child { display: none; }
}
.legende { display: flex; gap: 1.2rem; flex-wrap: wrap; font-size: .82rem; color: var(--doux); margin-top: 1rem; }
.legende span { display: inline-flex; align-items: center; gap: .4rem; }
.legende i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* Ce que nous faisons */
.etapes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; counter-reset: etape; }
.etapes li { counter-increment: etape; display: grid; gap: .6rem; align-content: start; }
.etapes li::before {
  content: counter(etape); font-family: var(--police-titre); font-size: 1.1rem;
  width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--ble) 22%, transparent); color: var(--terre);
}
.etapes p { color: var(--doux); }
@media (max-width: 820px) { .etapes { grid-template-columns: 1fr; gap: 1.8rem; } }

.projets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 3rem; margin-top: 3.5rem; }
.projet { display: grid; grid-template-columns: 2.6rem 1fr; gap: 1rem; padding-block: 1.4rem; border-top: 1px solid var(--ligne); }
.projet svg { width: 2.6rem; height: 2.6rem; color: var(--terre); }
.projet h3 { font-size: 1.2rem; margin-bottom: .35rem; }
.projet p { color: var(--doux); font-size: 1rem; }
@media (max-width: 760px) { .projets { grid-template-columns: 1fr; } }
.etiquette { display: inline-block; margin-bottom: .45rem; padding: .15rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 600; letter-spacing: .04em; background: color-mix(in srgb, var(--ble) 22%, transparent); color: var(--encre); border: 1px solid color-mix(in srgb, var(--ble) 55%, transparent); }

/* Partenaires */
.partenaires { background: var(--surface); }
.profils { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.profil { border: 1px solid var(--ligne); border-radius: 14px; padding: 1.6rem; display: flex; flex-direction: column; gap: .8rem; background: var(--sol); min-width: 0; }
.profil .pour { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--doux); }
.profil ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .45rem; font-size: .98rem; }
.profil ul li::marker { color: var(--sauge); }
.profil.mis-en-avant { background: var(--bande); color: var(--sur-bande); border-color: var(--bande); }
.profil.mis-en-avant .pour { color: var(--sur-bande-doux); }
.profil.mis-en-avant strong { color: var(--ble); }
@media (max-width: 900px) { .profils { grid-template-columns: 1fr; } }

.appui { display: grid; grid-template-columns: .9fr 1.1fr; gap: 3rem; margin-top: 3rem; padding: clamp(1.6rem, 4vw, 2.6rem); border-radius: 14px; background: color-mix(in srgb, var(--terre) 7%, var(--sol)); border: 1px solid var(--ligne); }
.appui-tete { display: grid; gap: .9rem; align-content: start; min-width: 0; }
.appui-tete .surtitre { margin-bottom: 0; }
.appui-tete h3 { font-size: clamp(1.4rem, 2.6vw, 1.75rem); }
.appui-tete p:last-child { color: var(--doux); }
.appui-liste { display: grid; gap: 1.6rem; min-width: 0; }
.appui-point { display: grid; grid-template-columns: 2.4rem 1fr; gap: 1rem; }
.appui-point svg { width: 2.4rem; height: 2.4rem; color: var(--terre); }
.appui-point h4 { font: 600 1.05rem/1.3 var(--police-texte); margin: 0 0 .3rem; }
.appui-point p { color: var(--doux); font-size: .98rem; }
@media (max-width: 860px) { .appui { grid-template-columns: 1fr; gap: 2rem; } }
.garanties { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--ligne); }
.garanties div { display: grid; gap: .3rem; }
.garanties strong { font-size: 1rem; }
.garanties span { color: var(--doux); font-size: .93rem; }
@media (max-width: 900px) { .garanties { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .garanties { grid-template-columns: 1fr; } }

/* Contact */
.contact { background: var(--bande); color: var(--sur-bande); }
.contact .cadre { display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem; align-items: center; }
.contact .surtitre { color: var(--ble); }
.contact .chapeau { color: var(--sur-bande-doux); }
.carte-mail { background: color-mix(in srgb, var(--sur-bande) 8%, transparent); border: 1px solid color-mix(in srgb, var(--sur-bande) 18%, transparent); border-radius: 14px; padding: 1.6rem; display: grid; gap: 1rem; min-width: 0; }
.carte-mail .adresse { font-size: 1.25rem; font-weight: 600; word-break: break-all; user-select: all; }
.carte-mail .note { font-size: .85rem; color: var(--sur-bande-doux); }
.carte-mail .actions { margin-top: 0; }
@media (max-width: 820px) { .contact .cadre { grid-template-columns: 1fr; } }

/* Pied de page */
footer { padding-block: 2.5rem; font-size: .88rem; color: var(--doux); }
footer .cadre { display: grid; gap: 1.2rem; }
footer .ligne-pied { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
footer ol { margin: 0; padding-left: 1.2rem; display: grid; gap: .25rem; }

/* Menu qui suit la lecture (pas un mouvement : actif même si le visiteur réduit les animations) */
.nav ul a { padding-block: .25rem; border-bottom: 2px solid transparent; transition: color .2s ease, border-color .2s ease; }
.nav ul a.actif { color: var(--terre); border-bottom-color: var(--terre); }

/* Animations : seulement si le visiteur n'a pas demandé à réduire les mouvements.
   Tout est visible au repos ; une animation ne démarre qu'au moment où l'élément entre à l'écran. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes apparition { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
  @keyframes remplissage { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  @keyframes silhouette { from { opacity: 0; transform: translateY(10px) scale(.85); } to { opacity: 1; transform: none; } }
  @keyframes coloration { from { fill: var(--barre); } to { fill: var(--feuillage); } }

  .apparait { animation: apparition .7s cubic-bezier(.2,.7,.2,1) backwards; }

  .barre-remplie { transform-origin: left center; }
  .barres.joue .barre-remplie { animation: remplissage 1.1s cubic-bezier(.25,.8,.25,1) both; }
  .barres.joue .barre-ligne:nth-child(2) .barre-remplie { animation-delay: .1s; }
  .barres.joue .barre-ligne:nth-child(3) .barre-remplie { animation-delay: .2s; }
  .barres.joue .barre-ligne:nth-child(4) .barre-remplie { animation-delay: .3s; }
  .barres.joue .barre-ligne:nth-child(5) .barre-remplie { animation-delay: .4s; }

  .silhouettes.joue svg { animation: silhouette .45s ease-out both; }
  .silhouettes.joue svg:nth-child(2) { animation-delay: .12s; }
  .silhouettes.joue svg:nth-child(3) { animation-delay: .24s; }
  .silhouettes.joue svg:nth-child(4) { animation-delay: .36s; }
  .silhouettes.joue svg:nth-child(5) { animation-delay: .48s; }
  .silhouettes.joue svg:nth-child(6) { animation-delay: .6s; }
  .silhouettes.joue .marque-p { animation: coloration .6s ease 1.15s both; }

  @media (hover: hover) {
    .profil, .chiffre, .appui-point svg, .projet svg { transition: transform .25s ease, box-shadow .25s ease, color .25s ease; }
    .profil:hover { transform: translateY(-4px); box-shadow: 0 14px 30px -18px color-mix(in srgb, var(--encre) 45%, transparent); }
    .chiffre:hover { transform: translateY(-2px); }
    .projet:hover svg, .appui-point:hover svg { color: var(--ble); transform: rotate(-6deg) scale(1.08); }
  }
}
