/* themeartefact : socle commun. Une échelle, une grammaire de mouvement, un cadre fixe.
   Transposé de la construction de raw-collectif.com (note 23), sans en reprendre le thème. */
@font-face { font-family: "Rosario"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("/polices/rosario-latin-wght-normal.woff2") format("woff2"); 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: "Rosario"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("/polices/rosario-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@view-transition { navigation: auto; }
:root {
  --noir: #18161A; --nuit: #1A191D; --carte: #242229; --orange: #FF8200; --lecture: #A84E00;
  --orange-texte: #D96A00; --blanc: #FFFFFF; --pierre: #CFC9C4; --gris: #6B655F; --pale: #F4F2EF;
  --t: "Rosario", "Gill Sans", "Trebuchet MS", sans-serif;
  --s: "Source Serif 4", Georgia, serif;
  /* espacements au pas de 4 px */
  --e1: 0.25rem; --e2: 0.5rem; --e3: 0.75rem; --e4: 1rem; --e5: 1.5rem; --e6: 2rem; --e7: 3rem; --e8: 4rem;
  --bord: clamp(1rem, 3vh, 2rem);                 /* distance au bord de tout ce qui est fixe */
  --section: clamp(4.5rem, 12vh, 9rem);           /* respiration entre sections */
  --cadre: min(84rem, 86vw);                      /* largeur du contenu */
  --gout: clamp(1rem, 2.2vw, 2rem);               /* gouttière de la grille de 12 */
  /* titres : rapport de 0,7 par cran */
  --h1: clamp(2.6rem, 5.6vw + 0.25rem, 5.75rem);
  --h2: clamp(2.1rem, 3.9vw + 0.25rem, 4rem);
  --h3: clamp(1.6rem, 2.4vw + 0.25rem, 2.6rem);
  --h4: clamp(1.25rem, 1.5vw + 0.25rem, 1.7rem);
  --rayon: 0.5rem; --rayon-g: 1.25rem;
  /* mouvement */
  --duree: 0.35s; --lent: 0.75s; --courbe: cubic-bezier(0.645, 0.045, 0.355, 1); --montee: 2rem;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 6rem; }
body { margin: 0; background: var(--blanc); color: var(--noir); font-family: var(--t); font-size: 1.0625rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
::selection { background: var(--orange); color: var(--noir); }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
picture { display: block; width: 100%; height: 100%; }
a { color: inherit; }
em { font-style: normal; color: var(--orange-texte); }
.sombre em { color: var(--orange); }
:focus-visible { outline: 2px solid var(--lecture); outline-offset: 4px; }
.sombre :focus-visible, .tete-site.sur-sombre :focus-visible { outline-color: var(--orange); }
h1, h2, h3, h4 { font-weight: 400; margin: 0; text-wrap: balance; }
p { text-wrap: pretty; }
h1 { font-size: var(--h1); line-height: 1; letter-spacing: -0.035em; }
h2 { font-size: var(--h2); line-height: 1.04; letter-spacing: -0.03em; }
h3 { font-size: var(--h3); line-height: 1.1; letter-spacing: -0.025em; }
h4 { font-size: var(--h4); line-height: 1.2; letter-spacing: -0.015em; }
p { margin: 0 0 var(--e4); }
.cadre { width: var(--cadre); margin-inline: auto; }
.g12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gout); }
.sombre { background: var(--nuit); color: #fff; }
.sur-titre { display: flex; align-items: center; gap: var(--e3); font-size: 0.95rem; font-weight: 500; color: var(--gris); margin-bottom: var(--e5); }
.sombre .sur-titre { color: rgba(255,255,255,0.6); }
.sur-titre::before { content: ""; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--orange); flex: none; }
.picto { width: 3rem; height: 3rem; color: currentColor; flex: none; }

/* Boutons et liens */
.bouton { display: inline-flex; align-items: center; gap: var(--e3); min-height: 3.25rem; padding: 0 1.6rem; border-radius: 999px; background: var(--orange); color: var(--noir); font-weight: 700; text-decoration: none; border: 2px solid var(--orange); }
.bouton:hover { background: transparent; color: var(--lecture); border-color: var(--lecture); }
.sombre .bouton:hover, .tete-site.sur-sombre .bouton:hover { color: var(--orange); border-color: var(--orange); }
.bouton.creux { background: transparent; color: inherit; border-color: currentColor; }
.bouton.creux:hover { background: var(--orange); border-color: var(--orange); color: var(--noir); }
.fleche::after { content: ""; width: 0.5em; height: 0.5em; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); }
.lien { display: inline-flex; align-items: center; gap: 0.7em; font-weight: 500; text-decoration: none; padding-bottom: 0.2rem;
  background: linear-gradient(var(--orange), var(--orange)) left bottom / 100% 2px no-repeat; }
.lien::after { content: ""; width: 0.45em; height: 0.45em; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); }
.lien:hover { background-size: 0% 2px; background-position: right bottom; }
.lien:hover::after { transform: translateX(0.3em) rotate(45deg); }

/* En-tête */
.tete-site { position: fixed; z-index: 40; inset: 0 0 auto 0; height: clamp(4.5rem, 11vh, 6.5rem); display: flex; align-items: center; color: var(--noir); }
.tete-site .cadre { display: flex; align-items: center; gap: var(--e6); }
.tete-site.sur-sombre { color: #fff; }
.tete-site.pleine { background: color-mix(in srgb, var(--blanc) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); height: 4.25rem; }
.tete-site.pleine.sur-sombre { background: color-mix(in srgb, var(--nuit) 82%, transparent); }
.tete-site.cachee { transform: translateY(-100%); }
.logo { font-size: 1.5rem; letter-spacing: -0.02em; text-decoration: none; line-height: 1; display: inline-flex; align-items: baseline; }
.logo b { font-weight: 300; }
.logo i { font-style: normal; font-weight: 500; }
.logo::after { content: ""; width: 0.42rem; height: 0.42rem; border-radius: 50%; background: var(--orange); margin-left: 0.18rem; }
.menu { display: flex; gap: clamp(1rem, 2.2vw, 2.2rem); margin-left: auto; font-weight: 500; font-size: 1rem; }
.menu a { text-decoration: none; }
.menu:hover a:not(:hover) { opacity: 0.5; }
.menu a[aria-current] { box-shadow: inset 0 -2px 0 var(--orange); }
.tete-site .bouton { min-height: 2.75rem; padding: 0 1.25rem; font-size: 0.98rem; }

/* Lien d'évitement et menu de petit écran (fonctionne sans script) */
.evitement { position: absolute; left: -999px; top: 0; z-index: 200; background: var(--orange); color: var(--noir); padding: var(--e3) var(--e4); font-weight: 700; }
.evitement:focus { left: var(--e3); top: var(--e3); }
.menu-m { display: none; }
.menu-m summary { list-style: none; width: 2.9rem; height: 2.9rem; border-radius: 50%; border: 1.5px solid currentColor; display: grid; place-items: center; cursor: pointer; }
.menu-m summary::-webkit-details-marker { display: none; }
.menu-m summary span, .menu-m summary span::before { display: block; width: 1.1rem; height: 1.5px; background: currentColor; }
.menu-m summary span::before { content: ""; transform: translateY(6px); }
.menu-m[open] summary span { transform: translateY(3px) rotate(45deg); } .menu-m[open] summary span::before { transform: rotate(-90deg); }
.menu-m[open] summary { position: relative; z-index: 2; color: #fff; }
.menu-m nav { display: none; }
.tete-site:has(.menu-m[open]) { inset: 0; height: 100dvh; align-items: flex-start; padding-top: 1.1rem; background: var(--nuit); color: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; transform: none !important; overflow-y: auto; z-index: 60; }
.tete-site:has(.menu-m[open]) .cadre { flex-wrap: wrap; }
.menu-m[open] nav { display: flex; flex-direction: column; gap: var(--e2); position: absolute; left: 7vw; right: 7vw; top: 6.5rem; padding-bottom: 3rem; }
.menu-m nav a:not(.bouton) { font-size: clamp(1.7rem, 7vw, 2.4rem); line-height: 1.15; text-decoration: none; letter-spacing: -0.02em; padding: var(--e3) 0; border-bottom: 1px solid rgba(255,255,255,0.14); }
html:has(.menu-m[open]) { overflow: hidden; }
body:has(.menu-m[open]) .rond { display: none; }
.menu-m nav .bouton { align-self: flex-start; margin-top: var(--e5); }
.lien, .appel-lignes a, .pied a { min-height: 2.75rem; }
.pied a { display: flex; align-items: center; margin-bottom: 0; }

/* Cadre fixe : réglet de défilement à gauche, contact à droite, langue en bas */
/* Le réglet et le rail sont en blanc, mélangés en différence : lisibles sur tout fond, photo comprise. */
.reglet-fixe { position: fixed; z-index: 30; left: var(--bord); top: 50%; width: 12px; height: 34vh; transform: translateY(-50%); color: #fff; mix-blend-mode: difference; pointer-events: none;
  background: repeating-linear-gradient(to bottom, currentColor 0 1px, transparent 1px 9px) left / 6px 100% no-repeat, repeating-linear-gradient(to bottom, currentColor 0 1px, transparent 1px 45px) left / 12px 100% no-repeat; opacity: 0.7; }
.jauge-fixe { position: fixed; z-index: 31; left: calc(var(--bord) + 16px); top: 50%; width: 2px; height: 34vh; transform: translateY(-50%); pointer-events: none; }
.jauge-fixe i { display: block; width: 100%; height: 100%; background: var(--orange); transform-origin: top; transform: scaleY(0); }
.rail { position: fixed; z-index: 30; right: var(--bord); top: 50%; transform: translateY(-50%) rotate(180deg); writing-mode: vertical-rl; font-size: 0.9rem; font-weight: 500; text-decoration: none; color: #fff; mix-blend-mode: difference; display: flex; align-items: center; gap: var(--e3); padding: var(--e3) var(--e2); }
.rail::before { content: ""; width: 1px; height: 2.5rem; background: currentColor; }
.rail:hover { text-decoration: underline; text-underline-offset: 0.3em; }
.langue { position: fixed; z-index: 30; left: var(--bord); bottom: var(--bord); width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center; background: var(--pale); color: var(--noir); text-decoration: none; font-weight: 700; font-size: 0.85rem; }
.langue:hover { background: var(--orange); }
.langue.sur-sombre { background: rgba(255,255,255,0.12); color: #fff; }

/* Curseur */
.curseur, .curseur-anneau { position: fixed; z-index: 100; left: 0; top: 0; pointer-events: none; border-radius: 50%; display: none; }
.curseur { width: 8px; height: 8px; margin: -4px 0 0 -4px; background: var(--orange); }
.curseur-anneau { width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 1px solid var(--orange); display: none; place-items: center; font-size: 0.72rem; font-weight: 700; color: var(--noir); }
.a-curseur .curseur { display: block; }
.a-curseur .curseur-anneau { display: grid; }
.curseur-anneau.lien-actif { transform-origin: center; background: color-mix(in srgb, var(--orange) 18%, transparent); }
.curseur-anneau.carte-active { width: 76px; height: 76px; margin: -38px 0 0 -38px; background: var(--orange); }
.curseur-anneau.carte-active::after { content: "Voir"; }

/* Pied */
.pied { background: var(--nuit); color: var(--pierre); padding: var(--section) 0 var(--e6); overflow: hidden; }
.pied-haut { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gout); row-gap: var(--e6); }
.pied-haut > div:nth-child(1) { grid-column: 1 / span 5; }
.pied-haut > div:nth-child(2) { grid-column: 7 / span 3; }
.pied-haut > div:nth-child(3) { grid-column: 10 / span 3; }
.pied .pied-t { font-size: 1rem; font-weight: 500; color: #fff; margin-bottom: var(--e4); letter-spacing: 0; }
.pied a { text-decoration: none; }
.pied a:hover { color: var(--orange); }
.pied .devise { font-size: var(--h4); color: #fff; max-width: 22ch; line-height: 1.25; }
.geant { font-weight: 300; font-size: clamp(3.4rem, 15.4vw, 17rem); line-height: 0.86; letter-spacing: -0.05em; color: rgba(255,255,255,0.07); margin: var(--e8) 0 var(--e5); white-space: nowrap; }
.geant b { font-weight: 500; }
.pied-bas { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--e3) var(--e6); font-size: 0.9rem; border-top: 1px solid rgba(255,255,255,0.12); padding-top: var(--e5); }
.pied-bas p { margin: 0; }

/* Bandeau d'appel, répété en bas de chaque page */
.appel { padding: var(--section) 0; }
.appel h2 { grid-column: 1 / span 7; }
.appel .appel-bouton { grid-column: 9 / span 4; align-self: end; justify-self: end; }
.appel-lignes { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gout); margin-top: var(--e8); border-top: 1px solid rgba(255,255,255,0.16); padding-top: var(--e6); }
.appel-lignes p { margin: 0 0 var(--e2); color: rgba(255,255,255,0.6); font-size: 0.98rem; }
.appel-lignes a { font-size: var(--h4); text-decoration: none; }
.appel-lignes a:hover { color: var(--orange); }

/* Mot fantôme et trame de points */
.fantome { position: absolute; pointer-events: none; user-select: none; font-size: 17vw; font-weight: 500; line-height: 0.8; letter-spacing: -0.05em; white-space: nowrap; color: currentColor; opacity: 0.045; }
.trame { background-image: radial-gradient(currentColor 1px, transparent 1.2px); background-size: 20px 20px; opacity: 0.16; }

/* Révélation : sans script, tout est visible */
.js [data-revele] { opacity: 0; transform: translateY(var(--montee)); }
.js [data-revele].vu { opacity: 1; transform: none; transition: opacity var(--lent) var(--courbe), transform var(--lent) var(--courbe); transition-delay: calc(var(--rang, 0) * 60ms); }

@media (max-width: 1180px) {
  .reglet-fixe, .jauge-fixe, .rail, .langue { display: none; }
}
@media (max-width: 900px) {
  .menu, .tete-site .cadre > .bouton { display: none; }
  .menu-m { display: block; }
  .tete-site .cadre { justify-content: space-between; }
  .pied-haut > div { grid-column: 1 / -1 !important; }
  .appel h2, .appel .appel-bouton { grid-column: 1 / -1; justify-self: start; }
  .appel .appel-bouton { margin-top: var(--e6); }
  .appel-lignes { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  .bouton, .menu a, .rail, .langue, .pied a, .appel-lignes a { transition: color var(--duree) var(--courbe), background-color var(--duree) var(--courbe), border-color var(--duree) var(--courbe), opacity var(--duree) var(--courbe); }
  .lien { transition: background-size 0.4s var(--courbe); }
  .lien::after { transition: transform var(--duree) var(--courbe); }
  .tete-site { transition: transform var(--duree) var(--courbe), background-color var(--duree) var(--courbe), height var(--duree) var(--courbe), color 0.2s; }
  .reglet-fixe, .rail, .langue { transition: color 0.2s, background-color 0.2s; }
  .curseur-anneau { transition: width var(--duree) var(--courbe), height var(--duree) var(--courbe), margin var(--duree) var(--courbe), background-color var(--duree) var(--courbe); }
}
@media (prefers-reduced-motion: reduce) {
  .js [data-revele] { opacity: 1; transform: none; }
  @view-transition { navigation: none; }
}

/* Bouton rond tournant, en bas à droite : l'entrée du formulaire */
.rond { position: fixed; z-index: 35; right: var(--bord); bottom: var(--bord); width: 7.25rem; height: 7.25rem; border-radius: 50%; display: grid; place-items: center; background: var(--orange); color: var(--noir); text-decoration: none; box-shadow: 0 0 0 0 rgba(255,130,0,0.45); }
.rond svg.tour { position: absolute; inset: 0; width: 100%; height: 100%; }
.rond svg.tour text { font-family: var(--t); font-size: 11.4px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; fill: currentColor; }
.rond .coeur { width: 3.1rem; height: 3.1rem; border-radius: 50%; background: var(--noir); color: var(--orange); display: grid; place-items: center; }
.rond .coeur::after { content: ""; width: 0.7rem; height: 0.7rem; border-top: 2.5px solid currentColor; border-right: 2.5px solid currentColor; transform: translate(-2px, 2px) rotate(-45deg) translate(1px, -1px); }
.rond:hover { background: #fff; }
@media (max-width: 900px) {
  .rond { width: 5rem; height: 5rem; right: 0.9rem; bottom: 0.9rem; }
  .rond svg.tour text { font-size: 12.4px; letter-spacing: 0.12em; } .rond .coeur { width: 2rem; height: 2rem; } .rond .coeur::after { width: 0.5rem; height: 0.5rem; }
  .js .rond { opacity: 0; pointer-events: none; transform: translateY(1rem); }
  .js .rond.present { opacity: 1; pointer-events: auto; transform: none; transition: opacity 0.3s, transform 0.3s; }
}
@media (prefers-reduced-motion: no-preference) {
  .rond svg.tour { animation: tourne 16s linear infinite; }
  .rond { animation: halo 3.2s ease-out infinite; transition: background-color var(--duree) var(--courbe), transform var(--duree) var(--courbe); }
  .rond:hover { transform: scale(1.06); } .rond:hover svg.tour { animation-duration: 5s; }
  .rond .coeur { transition: transform var(--duree) var(--courbe); } .rond:hover .coeur { transform: rotate(45deg); }
  @keyframes tourne { to { transform: rotate(360deg); } }
  @keyframes halo { 0% { box-shadow: 0 0 0 0 rgba(255,130,0,0.45); } 70%, 100% { box-shadow: 0 0 0 1.4rem rgba(255,130,0,0); } }
}

/* Formulaire de projet */
.projet { display: grid; gap: var(--e7); }
.projet fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.projet legend { font-size: var(--h4); letter-spacing: -0.015em; padding: 0; margin-bottom: var(--e4); }
.projet legend small { color: var(--gris); font-size: 0.9rem; letter-spacing: 0; margin-left: var(--e2); }
.choix { display: flex; flex-wrap: wrap; gap: var(--e2); }
.choix label { position: relative; cursor: pointer; }
.choix input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choix span { display: inline-flex; align-items: center; min-height: 2.9rem; padding: 0 1.15rem; border: 1.5px solid var(--pierre); border-radius: 999px; font-size: 1.02rem; background: #fff; }
.choix label:hover span { border-color: var(--noir); }
.choix input:checked + span { background: var(--noir); border-color: var(--noir); color: #fff; }
.choix input:focus-visible + span { outline: 2px solid var(--lecture); outline-offset: 3px; }
.champs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--e5) var(--gout); }
.champ { display: grid; gap: var(--e2); }
.champ.large { grid-column: 1 / -1; }
.champ label { font-size: 0.95rem; color: var(--gris); }
.champ input, .champ textarea { font: inherit; color: var(--noir); background: transparent; border: 0; border-bottom: 1.5px solid var(--pierre); padding: var(--e3) 0; border-radius: 0; width: 100%; }
.champ textarea { min-height: 9rem; resize: vertical; border: 1.5px solid var(--pierre); border-radius: var(--rayon); padding: var(--e4); }
.champ input:focus, .champ textarea:focus { outline: 0; border-color: var(--noir); box-shadow: 0 1.5px 0 var(--orange); }
.champ [aria-invalid="true"] { border-color: #B3261E; }
.erreur { color: #B3261E; font-size: 0.92rem; min-height: 1.2em; margin: 0; }
.dictee { justify-self: start; display: inline-flex; align-items: center; gap: var(--e2); font: inherit; font-size: 0.95rem; background: var(--pale); border: 0; border-radius: 999px; padding: 0.55rem 1rem; cursor: pointer; color: var(--noir); }
.dictee::before { content: ""; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--gris); }
.dictee[aria-pressed="true"] { background: var(--noir); color: #fff; } .dictee[aria-pressed="true"]::before { background: var(--orange); }
.avance { position: relative; height: 14px; margin-bottom: var(--e6); border-top: 2px solid var(--noir); background: repeating-linear-gradient(to right, var(--noir) 0 1px, transparent 1px 12px) top / 100% 8px no-repeat, var(--blanc); }
.avance i { position: absolute; left: 0; top: -5px; height: 8px; width: 100%; background: var(--orange); transform-origin: left; transform: scaleX(0); }
.envoi { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e4) var(--e6); }
.envoi p { margin: 0; color: var(--gris); font-size: 0.95rem; max-width: 30rem; }
.projet button.bouton { font: inherit; font-weight: 700; cursor: pointer; }
.apercu-message { margin-top: var(--e6); background: var(--pale); border-radius: var(--rayon-g); padding: var(--e6); }
.apercu-message pre { white-space: pre-wrap; font-family: var(--t); font-size: 1rem; margin: 0 0 var(--e5); }
@media (max-width: 700px) { .champs { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: no-preference) { .choix span, .champ input, .champ textarea { transition: border-color var(--duree) var(--courbe), background-color var(--duree) var(--courbe), color var(--duree) var(--courbe); } .avance i { transition: transform 0.45s var(--courbe); } }
.pied-rang { margin-top: var(--e6); padding-top: var(--e5); border-top: 1px solid rgba(255,255,255,0.12); }
.pied-rang p:last-child { display: flex; flex-wrap: wrap; gap: var(--e2) var(--e5); margin: 0; font-size: 0.98rem; }
.pied-bas a { margin-left: var(--e4); text-decoration: underline; text-underline-offset: 0.2em; }
