/* =========================================================
   Portfolio Lucas Marrec
   Deux faces : « com » (interrupteur éteint) et « scene » (allumé).
   ========================================================= */

:root {
  /* Couleurs : ton vert et du blanc. L'interrupteur les inverse. */
  --vert: #446A4C;
  --blanc: #FFFFFF;

  /* Police : remplace 'ff-providence-sans-web-pro' par le nom donné par Adobe Fonts si besoin */
  --police: 'ff-providence-sans-web-pro', 'Providence Sans Pro', 'Comic Sans MS', cursive;   /* ta police, envoyée par Adobe Fonts (voir index.html) ; la version installée sur le Mac sert de secours hors connexion */

  --fond: var(--blanc);
  --encre: var(--vert);
  --texte: #2F4A35;                 /* paragraphes, un cran plus sombre pour la lecture */
  --teinte: #EEF3EF;                /* fonds des emplacements photo */
  --filet: rgba(68, 106, 76, .55);

  --marge: clamp(20px, 5vw, 64px);
}

html[data-mode="scene"] {
  --fond: var(--vert);
  --encre: var(--blanc);
  --texte: rgba(255, 255, 255, .9);
  --teinte: color-mix(in srgb, var(--vert) 91%, var(--blanc));   /* opaque : le sentier passe derrière les photos */
  --filet: rgba(255, 255, 255, .55);
}

/* Pendant que le contenu (contenu/site.js) se pose : la page reste invisible un instant */
html.chargement main, html.chargement .pied { visibility: hidden; }

/* Une face visible à la fois */
html[data-mode="com"] .face-scene,
html[data-mode="scene"] .face-com { display: none !important; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
:root { color-scheme: only light; }   /* pas d'assombrissement automatique par le navigateur (voir la balise color-scheme de index.html) */
body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: var(--police);
  font-size: 20px;
  line-height: 1.7;
  letter-spacing: .03em;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-weight: 700; letter-spacing: .07em; line-height: 1.05; margin: 0; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

.caps {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .32em;
  text-transform: uppercase;
  line-height: 1.6;
}

.evitement { position: absolute; left: -9999px; }
.evitement:focus { left: 16px; top: 16px; z-index: 50; background: var(--fond); padding: 8px 12px; }

/* ---------- Barre du haut ---------- */
.barre {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: 84px; padding: 0 var(--marge);
  background: var(--fond);
}
.marque { display: flex; align-items: center; gap: 14px; text-decoration: none; white-space: nowrap; }
.logo {
  /* Le monogramme est intégré ici (copie de img/logo-lm.png) pour s'afficher même quand on ouvre index.html d'un double-clic.
     Pour changer de logo : remplace img/logo-lm.png et demande à régénérer cette ligne. */
  --logo: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAM8AAADECAYAAAA4RnWcAAAHAElEQVR4nO3dbchfZR3A8e+mbYt0az5Qam7kQzUiAys0bIIiStIQH5C0FyWGhhlSSUsofNhSUwsR3RZjrqXOB8Kid73rhQ4jwZSBSQgi9LaoFNbU/ePEZQz93/+H3znnf13nnO8HbsbunYeL+76/u8/zAUmSJEmSJEmSJPXVi8CoxsdpNdZ9bc117yS/LbkHoLkdB/x+2kTL51+u5vRt4Ircg9DMjgAeB9ZNm9B42rcM2AWcmnsgmslPgAtmmdB4FmM18BSwMvdANNGlwGZmZDyLcybws9yD0JI+CexhDsazWO7/lOko4DfA0fPMZDyL5/5PeXYDG+adyXjy7P886f5PMW6Obg0YTx6fA+7LPQhxHnB3dGbjyedG4PLcgxiwj6UtgOq8Tojx5N//OSX3IAZoBfBr4Pg6CzGevNak//2qb6YW5wHgrLoLMZ78Pg/ck3sQA3INcH0TCzKeMtwEXJJ7EAM5Ub2tqYUZT1nnGqZejKiwY4GngVU0xHjKsRZ4Ajgy90B6aDmwF1jf9EJVji8Cd+YeRA9tAS6cc57qfrCJjKfMM95fzj2IHrkEuKWNBRtPmff//Ao4KfdAemBd+lpWX9PGGU+5twHvrXP2W/9zb7qWsBXGU65zge/nHkSHrQYua3MFxlO2K3MPoMM+0/aRS+Mp20dyD6DDjm57BcZTNr8/cVMPNdflN0cKMh4pyHikIOORgoxHCjIeKch4pCDjUV+N2l6B8UjjeT+P1BbjkYKMRwoyHinIeKQg45GCjKfflnf8bW1nU7Auf3E13b4Ov0TrwfRc6WIZT7+dUeflTRldBXy9zSffNMF4hvEQ+Qvojo8DO7rw81n04NSI6oF/vwSOoXxHAo+X/hvnXcYzDNXTR39B+e5o4qVTDfHaNv1f9cbnb1Cu84HNlOPQtAmMZ3ivE6z2KUp8vPAjXft57NRg1ciDAB8p8BnYDwMnNrxM7+dR485p65UbQTcCm+gg4xmmW4EvFHIe6j46yniGqTok/CjwoYxj+GB6jWRXr4AwngH7BPDzjOu/H9hAhxnPsF2XaX/j8rTuknmeR1PtWvCrTE4GdtIDxqPj06HiRTgCeAxYSw8YjyoXAzcsYD0/AjbSE8ajd1WHjD/V4vI3Aj+mR4xHhx86rjapPtDCstemQ+OlXdlQi/HocGemK5ubthNYR88Yj97rBw3vl1yXDk33jvFo3M9EdfHomgaWtSGdDO0iz/MoZD3wUM1lrEyX31T7Ur1kPFrK14Cv1jx6dwY9ZjyaZHu6ImBem9KtBjl5P4+y+jCwJz1EZFYnLvCKhayMR9OcB9w858GG4xgA49EstgKfnWG6zelBHoNgPJrFinT1waoJ05zV0gnWYhmPZvVp4KdL/NtqYG+6Q7UvPM+jRn0HuGiJo3KnMDDGo3lUR912A8ce9rnqgexXZxxTNsajeZ1w2J2gp6dXgQyS8SjiUuBb6aHs1UuoBqlPO3harO0MnL95pCDjkYKMRxrP8zxSW4xHCjIe9dWo7RUYjxRkPFKQ8UhBxiMFGY80nud5pLYYjxRkPFKQ8UhBxiON5wED1fKvGvP+G9hPdx2aNoHxaNIPT/Ustv8E578FuIceMx5N8hfgtsB8zwDb6Dnj0TT3As/PMf0B4JuLuKo5N+PRNO8A1wAHZ5z+duAVBsB4NIv96WHv07yQXmpVAu/nUTHuBv484d/fBq5Nfw6C8WhWb6XNt7cn7Bu9wIAYj+ZR/ea5a8znX+nh60U8SarGbX3Pyc9ROrpWHWUbFOPRvA6mzbd30t+3pfM6g2M8ing+HVV7HfghA+WD3hV1G/Bb4A0Gyt88ijoAPMeAGY8UZDxSkPFI43meR2qL8UhBxiMFGY8UZDzqq1HbKzAeKch4pCDjkYKbfV4Y2r7vASuD877Z8FjUIONp3+7cA1A73GyTgoxHCjIeKch4pCDjkYKMRxrP+3mkthiPFGQ8UpDxSEHGo74atb0C45GCjEcK6vtV1R8FNtJd/wReyj2IgRoNPZ6vpI+uehb4Uu5BaDw326Qg45GCjEcKMh5pPC8MldpiPFKQ8UhBxiMFGY8UZDxSkPFIQcajvhq1vQLjkYKMRxrPKwyktpR+P8/LwA6G69XcA1B349mXPqTiuNkmBRmPFGQ8UpDxSEHGIwUZjxRkPFKQ8UhBxiMFGY8UZDzqq1HbKzAeKch4pPG8n0fKeUvCsprr+C7w95rLGKq/Dfx+ps7HU3fH64aa8w/Zn4ynXG62SUHGIwUZjxRkPFKQ8UhBxiMFGY8UZDxSkPFIQcYjBRmP+mrU9gqMRwoyHmk87+dRp43o+C0JfwBeW8BY9H5/rTn/H4GVwXkPUd9B4B9Toli2xJ8HgN/VWPf+9H6jU2ssQ5IkSZIkSZIkSfTPfwH+LdX58o6g+QAAAABJRU5ErkJggg==);
  width: 40px; height: 38px; background: currentColor;
  -webkit-mask: var(--logo) center / contain no-repeat;
          mask: var(--logo) center / contain no-repeat;
}
.menu { margin-left: auto; }
.menu span { display: flex; gap: 28px; }
.menu a { text-decoration: none; font-weight: 700; font-size: 13px; letter-spacing: .3em; text-transform: uppercase; white-space: nowrap; }
.menu a:hover { text-decoration: underline; text-underline-offset: 6px; }
.menu a { padding-block: 4px; margin-block: -4px; }   /* zone de clic agrandie (30 px), même place à l'écran */
/* ---------- Interrupteur ---------- */
.interrupteur {
  --l: 66px; --h: 34px;
  position: relative; flex: none;
  width: var(--l); height: var(--h);
  border: 2px solid currentColor; border-radius: 99px;
  background: transparent; color: inherit; cursor: pointer; padding: 0;
}
.interrupteur i {
  --x: 0px; --sens: 1;
  position: absolute; top: 4px; left: 4px;
  width: calc(var(--h) - 12px); height: calc(var(--h) - 12px);
  border-radius: 50%; background: currentColor;
  transform: translateX(var(--x));
  transition: transform .45s cubic-bezier(.65, 0, .35, 1);
}
.interrupteur[aria-checked="true"] i { --x: calc(var(--l) - var(--h)); --sens: -1; }
/* Petit signe si personne n'a cliqué : le rond glisse un peu vers l'autre côté et revient (js/main.js) */
.interrupteur.coucou i { animation: coucou 1.2s cubic-bezier(.45, 0, .2, 1); }
@keyframes coucou {
  35%, 50% { transform: translateX(calc(var(--x) + var(--sens) * (var(--l) - var(--h)) * .5)); }
  72% { transform: translateX(calc(var(--x) - var(--sens) * 2px)); }
}

/* ---------- Accueil ---------- */
.accueil { position: relative; min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 110px var(--marge) calc(clamp(120px, 18svh, 170px) + 40px); }
.accueil-texte { display: grid; justify-items: center; gap: 4px; }
.accueil h1 { font-size: clamp(54px, 8vw, 116px); margin: 18px 0 14px; }
.bascule { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 44px; }
.pivot { position: relative; display: block; line-height: 0; }
.bascule .caps { font-size: 12px; }
/* l'espacement des lettres laisse un blanc après la dernière : on le compense pour centrer à l'œil */
.libelle-com, .libelle-scene { margin-right: -.32em; }
.accueil h1 { padding-left: .07em; }
.accueil-texte > .caps { padding-left: .32em; }
html[data-mode="com"] .libelle-scene,
html[data-mode="scene"] .libelle-com { opacity: .9; }   /* .9 minimum : en dessous, le texte n'est plus assez contrasté (4,5:1) ; la position de l'interrupteur montre la face active */

.trait { display: block; width: 100%; height: 140px; overflow: visible; }
.trait path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.accueil .trait { height: clamp(120px, 18svh, 170px); }
.accueil .trait { position: absolute; left: 0; bottom: 0; }

/* ---------- Sections ---------- */
.bloc { padding: 140px var(--marge) 0; }
.entete { display: grid; justify-items: center; gap: 12px; text-align: center; margin-bottom: 64px; }
.entete h2, .texte h2, .centre h2 { font-size: clamp(38px, 4.4vw, 60px); }

.deux-colonnes { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 7vw, 96px); align-items: center; max-width: 1160px; margin: 0 auto; }
.texte { display: grid; gap: 22px; }
.texte > p:not(.caps) { color: var(--texte); max-width: 46ch; }
.outils { font-size: 12px; opacity: .9; }

.photo { background: var(--teinte); display: flex; align-items: flex-end; padding: 16px; }
.photo .caps { font-size: 11px; opacity: .9; }
.portrait { aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; }   /* coins arrondis, comme les autres photos */
.carre { aspect-ratio: 1; }

.bouton {
  justify-self: start; display: inline-flex; align-items: center; gap: 10px;
  border: 1.5px solid currentColor; border-radius: 99px; padding: 10px 24px;
  text-decoration: none; font-size: 18px; letter-spacing: .05em;
  transition: background .25s, color .25s;
}
@media (hover: hover) { .bouton:hover { background: var(--encre); color: var(--fond); } }
.bouton.copie, .liens a.copie { animation: apparaitre .35s cubic-bezier(.2, .7, .2, 1); }
.bouton.copie { justify-content: center; }
@keyframes apparaitre { from { opacity: .15; } }
.pour-lecteurs { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Projets : un « programme », l'image suit la souris ---------- */
#projets .entete { margin-bottom: 40px; }
.programme-projets { list-style: none; margin: 0 auto; padding: 0; max-width: 1000px; border-bottom: 1px solid var(--filet); }
.programme-projets li { border-top: 1px solid var(--filet); }
/* « Voir les N projets » / « Revenir à la sélection », sous la liste */
.voir-tout { display: flex; justify-content: center; margin-top: 44px; }
.voir-tout[hidden] { display: none; }
.voir-tout .bouton { background: none; color: inherit; font-family: inherit; cursor: pointer; }
.voir-tout .bouton:focus-visible { outline: none; background: var(--encre); color: var(--fond); }

/* Filtres par rubrique : des mots, celui qui est choisi est souligné d'un trait à la main */
.filtres { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 28px; max-width: 1100px; margin: 0 auto 40px; }
.filtre {
  position: relative; display: inline-flex; align-items: flex-start; gap: 3px; padding: 4px 2px 12px;
  background: none; border: 0; color: inherit; font: inherit; font-size: 20px; letter-spacing: .04em; white-space: nowrap; cursor: pointer;
  opacity: .9; transition: opacity .25s;   /* le filtre choisi se distingue par le gras et le trait dessous */
}
.filtre span { display: inline-flex; flex-direction: column; text-align: center; }
.filtre span::after { content: attr(data-texte); height: 0; overflow: hidden; visibility: hidden; font-weight: 700; } /* réserve la largeur du gras : rien ne bouge au clic */
.filtre sup { font-size: 11px; font-weight: 700; letter-spacing: .05em; line-height: 1; margin-top: 3px; }
.filtre:hover, .filtre[aria-pressed="true"] { opacity: 1; }
.filtre[aria-pressed="true"] span { font-weight: 700; }
.filtre:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 6px; }
.filtre .souligne {
  position: absolute; left: -3px; bottom: 0; width: calc(100% - 7px); height: 10px; overflow: visible;   /* le trait suit la largeur du mot (un SVG ignore left + right : sans largeur, il restait à 100 px) */
  clip-path: inset(0 100% 0 0); transition: clip-path .5s cubic-bezier(.65, 0, .35, 1), opacity .25s;
}
.filtre .souligne path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.filtre[aria-pressed="true"] .souligne { clip-path: inset(0 0 0 0); }
/* Au survol (souris) ou au clavier : le trait se dessine en léger sous la rubrique, comme un avant-goût du clic */
@media (hover: hover) and (pointer: fine) {
  .filtre:not([aria-pressed="true"]):hover .souligne { clip-path: inset(0 0 0 0); opacity: .35; }
}
.filtre:not([aria-pressed="true"]):focus-visible .souligne { clip-path: inset(0 0 0 0); opacity: .35; }
.ligne {
  display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: 24px;
  width: 100%; padding: 26px 8px; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.ligne .num { text-align: center; }
.ligne .num small { display: block; font-weight: 700; font-size: 11px; letter-spacing: .3em; }
.ligne .num b { font-size: 30px; letter-spacing: .08em; line-height: 1; }
.ligne .titre-projet { font-weight: 700; font-size: clamp(26px, 3.4vw, 46px); letter-spacing: .06em; line-height: 1.1; transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.ligne .cat { font-size: 11px; text-align: right; max-width: 22ch; }
.ligne:hover .titre-projet, .ligne:focus-visible .titre-projet { transform: translateX(16px); }
.ligne .mini { display: none; background: var(--teinte); }   /* vert très clair tant que la photo charge (au lieu d'une case vide) */
@media (hover: none) {
  .ligne { grid-template-columns: 64px minmax(0, 1fr); }
  .ligne .cat { grid-column: 2; text-align: left; margin-top: -14px; }
  .ligne .mini { display: block; grid-column: 1 / -1; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: center; border: 1px solid var(--filet); }
}
/* Cadrage « Image entière » (logos ronds, presque carrés) : l'image tient en entier sur fond blanc, sans être rognée */
.ligne .mini.entiere { object-fit: contain; padding: 6%; background: #fff; }

/* ---------- Projets sur ordinateur : l'index ----------
   La liste à gauche, une grande image à droite qui reste en place et montre le projet survolé
   (l'image en entier, avec sa catégorie dessous). Sur téléphone : la grille de vignettes, plus bas. */
.projets-corps { display: contents; }
.index-image { display: none; }
@media (min-width: 761px) {
  #projets .projets-corps { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); column-gap: clamp(40px, 5vw, 80px); max-width: 1180px; margin: 0 auto; align-items: start; }
  #projets .filtres { grid-column: 1 / -1; }
  /* Les rubriques sur une seule ligne (demande de Lucas) : la taille s'ajuste à l'écran ; si la place manque
     (tablette), la ligne glisse de côté comme sur téléphone au lieu de passer à la ligne */
  #projets .filtres { flex-wrap: nowrap; justify-content: flex-start; max-width: none; min-width: 0; width: 100%; gap: 6px clamp(10px, 1.4vw, 22px); overflow-x: auto; scrollbar-width: none; }
  #projets .filtres::-webkit-scrollbar { display: none; }
  #projets .filtre { font-size: clamp(14px, 1.3vw, 18px); flex: none; }
  #projets .filtre:first-child { margin-left: auto; }   /* centrée quand tout tient, sans couper le début quand ça glisse */
  #projets .filtre:last-child { margin-right: auto; }
  #projets #liste-projets { grid-column: 1; grid-row: 2; max-width: none; width: 100%; margin: 0; }
  #projets .voir-tout { grid-column: 1; grid-row: 3; justify-content: flex-start; }
  #projets .index-image { display: block; grid-column: 2; grid-row: 2 / span 2; position: sticky; top: 110px; margin: 0; }
  #projets .index-image img { display: block; width: 100%; aspect-ratio: 5 / 4; object-fit: contain; border-radius: 12px; border: 1px solid var(--filet); background: #fff; }
  #projets .index-image figcaption { margin-top: 14px; font-size: 12px; }
  #projets .ligne { grid-template-columns: 52px minmax(0, 1fr); gap: 4px 16px; padding: 16px 4px; }
  #projets .ligne .mini { display: none; }
  #projets .ligne .num { grid-row: 1 / span 2; }
  #projets .ligne .num b { font-size: 20px; }
  #projets .ligne .titre-projet { font-size: clamp(21px, 2.1vw, 28px); }
  #projets .ligne .cat { grid-column: 2; margin: 0; text-align: left; max-width: none; font-size: 11px; }
  #projets li .ligne { opacity: .5; transition: opacity .3s; }
  #projets li.actif .ligne, #projets .ligne:hover, #projets .ligne:focus-visible { opacity: 1; }
  #projets li.actif .titre-projet { transform: translateX(12px); }
}

/* ---------- Le sentier ---------- */
main { position: relative; }
main > section, main > .defile { position: relative; z-index: 1; }
.sentier { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; overflow: visible; }
.sentier .chemin { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.sentier .etapes circle { fill: var(--fond); stroke: currentColor; stroke-width: 1.6; transition: fill .4s; }
.sentier .etapes circle.atteinte { fill: currentColor; }
.sentier .pointe path { fill: var(--fond); stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.sentier .pointe .mine { fill: currentColor; stroke: none; }

/* ---------- Accueil : nom écrit lettre par lettre, montagne tracée, note fléchée ---------- */
.accueil h1 .lettre { display: inline-block; opacity: 0; transform: translateY(.25em) rotate(-6deg); animation: ecrire .7s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: calc(var(--i) * 70ms + .25s); }
.accueil h1 .espace { display: inline-block; width: .35em; }
@keyframes ecrire { to { opacity: 1; transform: none; } }
.trait.trace .relief { stroke-dasharray: var(--long); stroke-dashoffset: var(--long); animation: tracer var(--t, .8s) calc(var(--d) + .4s) cubic-bezier(.45, 0, .2, 1) forwards; }
.trait.trace .astre { animation: lever 1.7s 1.55s cubic-bezier(.2, .6, .2, 1) both; }
/* pied de page, face scène : le dessin attend qu'on arrive en bas pour se lancer (js/main.js) */
.pied .trait.trace:not(.joue) .relief, .pied .trait.trace:not(.joue) .astre { animation-play-state: paused; }
@keyframes lever { from { transform: translateY(var(--cache)); } }
/* la lune du pied de page (face scène) se clique : elle frémit pendant que la guitare joue */
.trait .cible { fill: transparent; stroke: none; pointer-events: none; }
html[data-mode="scene"] .pied .trait .cible { pointer-events: all; cursor: pointer; }
.trait .astre path.fremit { transform-box: fill-box; transform-origin: center; animation: fremir 2.4s cubic-bezier(.3, 0, .3, 1); }
@keyframes fremir {
  0%, 100% { transform: none; } 8% { transform: rotate(-14deg) scale(1.08); } 18% { transform: rotate(10deg); }
  30% { transform: rotate(-7deg) scale(1.04); } 45% { transform: rotate(5deg); } 62% { transform: rotate(-3deg); } 80% { transform: rotate(1.5deg); }
}
@keyframes tracer { to { stroke-dashoffset: 0; } }

.bascule { position: relative; }
.note {
  position: absolute; left: calc(100% + 11px); top: calc(100% + 10px); line-height: 1.6;
  display: flex; align-items: flex-start; gap: 4px; white-space: nowrap;
  font-size: 17px; letter-spacing: .04em; transform: rotate(-4deg); transform-origin: left top;
  opacity: 0; animation: apparaitre .8s 1.6s forwards;
}
.note .fleche { width: 56px; height: 40px; margin-top: -6px; margin-left: -13px; overflow: visible; }
.note .fleche path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* la flèche se dessine à la main, de la phrase vers l'interrupteur, puis ses deux pointes */
.note .fleche path { stroke-dasharray: 1 2; stroke-dashoffset: 1.05; animation: tracer .65s 1.95s cubic-bezier(.45, 0, .2, 1) forwards; }
.note .fleche path + path { animation-duration: .18s; animation-delay: 2.6s; }
.note .fleche path + path + path { animation-delay: 2.7s; }
.note span { margin-top: 20px; }
@keyframes apparaitre { to { opacity: 1; } }

/* ---------- Guitare (face scène) ---------- */
html[data-mode="scene"] .accueil .trait { display: none; }
.cordes { position: absolute; left: 0; right: 0; bottom: 0; height: 190px; touch-action: none; cursor: crosshair; }
.cordes svg { width: 100%; height: 100%; overflow: visible; display: block; }
.cordes line, .cordes path { stroke: currentColor; fill: none; stroke-linecap: round; }
.cordes .nom { fill: currentColor; font-family: var(--police); font-weight: 700; font-size: 10px; letter-spacing: .28em; text-transform: uppercase; opacity: .7; }
/* notes qui s'envolent quand on gratte */
.note-volante { position: absolute; width: 34px; height: 36px; pointer-events: none; opacity: 0; }
.note-volante svg { width: 100%; height: 100%; overflow: visible; display: block; }
.note-volante ellipse { fill: currentColor; stroke: none; }
.note-volante path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Bandeau qui défile ---------- */
.defile { overflow: hidden; border-block: 1px solid var(--filet); padding: 18px 0; margin-top: 140px; background: var(--fond); }
.defile .piste { display: flex; width: max-content; animation: defiler 48s linear infinite; }
.defile span { font-weight: 700; font-size: 14px; letter-spacing: .32em; text-transform: uppercase; white-space: nowrap; }
@keyframes defiler { to { transform: translateX(-50%); } }

/* ---------- Bouton son ---------- */
.son { background: none; border: 0; color: inherit; font-family: inherit; cursor: pointer; padding: 6px 4px; font-size: 12px; }
.son[aria-pressed="false"] { text-decoration: line-through; opacity: .9; }

/* ---------- Listes façon « Programme de la semaine » ---------- */
.liste { list-style: none; margin: 0 auto; padding: 0; display: grid; gap: 34px; width: fit-content; }
.liste li { display: grid; grid-template-columns: 100px 1fr; align-items: center; gap: 8px; }
.date { text-align: center; }
.date small, .intitule small { display: block; font-weight: 700; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; }
.date b { font-size: 30px; letter-spacing: .08em; line-height: 1; }
.intitule { font-size: 30px; font-weight: 700; letter-spacing: .08em; line-height: 1.1; }
.intitule small { margin-top: 7px; }
.date small { white-space: nowrap; }
#parcours .liste li { grid-template-columns: 112px 1fr; gap: 14px; }

/* Programme, version ordinateur : la semaine se lit de gauche à droite, sur une route tracée à la main,
   une étape par date. Sous 1000 px, on garde la version d'origine (la liste verticale des stories). */
@media (min-width: 1000px) {
  #dates .entete br { display: none; }
  #dates .liste {
    --haut-date: 72px;
    width: min(100%, calc(var(--n, 7) * 168px)); gap: 64px 0;
    grid-template-columns: repeat(var(--n, 7), minmax(0, 1fr));
  }
  #dates .liste li { position: relative; grid-template-columns: none; grid-template-rows: var(--haut-date) 44px auto; justify-items: center; align-items: start; gap: 0; padding: 0 6px; text-align: center; }
  #dates .date { grid-row: 1; height: var(--haut-date); display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; }
  #dates .date b { font-size: 44px; }
  #dates .liste li::before {   /* l'étape */
    content: ''; grid-row: 2; align-self: center; position: relative; z-index: 1;
    width: 14px; height: 14px; border: 1.6px solid currentColor; border-radius: 50%; background: var(--fond);
  }
  #dates .liste li::after {    /* le bout de route jusqu'à la date suivante */
    content: ''; position: absolute; left: 0; right: 0; top: calc(var(--haut-date) + 16px); height: 12px;
    background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M0 6C40 3.6 80 8.4 120 6s60-2.2 80 0' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M0 6C40 3.6 80 8.4 120 6s60-2.2 80 0' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  }
  #dates .intitule { grid-row: 3; font-size: clamp(19px, 1.75vw, 25px); letter-spacing: .06em; line-height: 1.2; }
  #dates .intitule small { margin-top: 12px; letter-spacing: .24em; line-height: 1.7; }
  #dates .liste li:hover::before { background: currentColor; transform: scale(1.3); transition-delay: 0s; }

  /* la route se trace quand on arrive dessus (classes posées par js/main.js) */
  #dates .liste li::after { clip-path: inset(0 0 0 0); transition: clip-path .22s linear calc(var(--i, 0) * .15s + .1s); }   /* inset(0) et pas « none » : sinon la route apparaît d'un coup */
  #dates .liste li::before { transition: transform .4s cubic-bezier(.3, 1.6, .5, 1) calc(var(--i, 0) * .15s + .2s), background .3s; }
  #dates .liste .date, #dates .liste .intitule {
    transition: opacity .5s ease calc(var(--i, 0) * .15s + .25s), translate .6s cubic-bezier(.2, .7, .2, 1) calc(var(--i, 0) * .15s + .25s);
  }
  #dates .liste.a-tracer:not(.vu) li::after { clip-path: inset(0 100% 0 0); }
  #dates .liste.a-tracer:not(.vu) li::before { transform: scale(0); }
  #dates .liste.a-tracer:not(.vu) .date, #dates .liste.a-tracer:not(.vu) .intitule { opacity: 0; translate: 0 10px; }
}
.intitule em { display: block; font-style: normal; font-weight: 400; font-size: 18px; letter-spacing: .03em; margin-top: 8px; color: var(--texte); }
/* Parcours : l'école en valeur (gras, en grand), le détail de la formation en petites capitales */
#parcours .intitule small { font-size: 18px; letter-spacing: .16em; margin-top: 10px; }
#parcours .intitule em { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; line-height: 1.8; margin-top: 6px; }

/* ---------- Écouter ---------- */
.titres { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--filet); }
.titres li { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--filet); }
.lecture { width: 30px; height: 30px; border: 1.5px solid currentColor; border-radius: 50%; display: grid; place-items: center; font-size: 10px; padding-left: 2px; }
.titres li span:last-child { opacity: .9; font-variant-numeric: tabular-nums; }

/* Carrousel « Sur scène » : part de la colonne de texte et file jusqu'au bord droit de l'écran */
.carrousel {
  --haut-photo: clamp(300px, 34vw, 460px);
  margin: 0 calc(-1 * var(--marge));
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
  scrollbar-width: none; cursor: grab;
}
.carrousel::-webkit-scrollbar { display: none; }
.carrousel.tire { cursor: grabbing; user-select: none; -webkit-user-select: none; }
.carrousel:focus-visible { outline-offset: -2px; }
.rail {
  display: flex; gap: 28px; width: max-content;
  padding: 0 var(--marge) 0 calc(var(--marge) + max(0px, (100% - 2 * var(--marge) - 1160px) / 2));
}
.cliche { flex: none; display: grid; gap: 14px; width: calc(var(--haut-photo) * .8); margin: 0; }
.cliche .photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; user-select: none; -webkit-user-drag: none; }
.legende { display: grid; gap: 4px; }   /* sous la photo : un titre en gras, puis une précision plus discrète */
.legende b { font-size: 17px; letter-spacing: .06em; line-height: 1.3; }
.legende small { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; line-height: 1.6; color: var(--texte); }
img.photo { padding: 0; }
img.portrait { width: auto; height: auto; }
/* Les photos apparaissent en douceur quand elles arrivent, sur leur fond vert très clair (js/main.js pose la classe) */
@media (prefers-reduced-motion: no-preference) { img.arrivee { animation: arrivee .45s ease-out; } }
@keyframes arrivee { from { opacity: 0; } }   /* les attributs width/height réservent la place, la taille reste celle de la mise en page */
.carrousel-pied { display: flex; align-items: center; gap: 24px; max-width: 1160px; margin: 30px auto 0; }
.progression { position: relative; flex: 1; height: 1px; background: var(--filet); }
.progression i { position: absolute; left: 0; top: -1px; height: 3px; width: 30%; border-radius: 2px; background: currentColor; }
.indice { font-size: 11px; white-space: nowrap; transition: opacity .5s; }
#live.a-glisse .indice { opacity: 0; }
/* À la souris : une pastille blanche → en bas à droite, à la place de « Glisse → ».
   Un clic avance d'une photo ; au bout elle se retourne (←) et ramène à la première (js/main.js) */
.pastille-suite {
  display: none; place-items: center; flex: none; width: 48px; height: 48px; padding: 0;
  border: 0; border-radius: 50%; background: var(--blanc); color: var(--vert); cursor: pointer;
  box-shadow: 0 8px 22px rgba(10, 30, 15, .25);
}
.pastille-suite svg { width: 24px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  transition: translate .3s cubic-bezier(.2, .7, .2, 1), rotate .45s cubic-bezier(.2, .7, .2, 1); }
.pastille-suite.au-bout svg { rotate: 180deg; }
.pastille-suite:focus-visible { outline: 2px solid var(--blanc); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .pastille-suite { display: grid; }
  .indice { display: none; }
  .pastille-suite:hover svg { translate: 3px 0; }
  .pastille-suite.au-bout:hover svg { translate: -3px 0; }
}
/* Présentation côté musique : une carte blanche posée sur le vert */
#presentation .carte {
  position: relative; display: grid; justify-items: center; gap: 18px; max-width: 760px; margin: 0 auto; text-align: center;
  padding: clamp(36px, 5vw, 64px) clamp(24px, 5vw, 72px); border-radius: 22px;
  background: var(--blanc); color: var(--vert); box-shadow: 0 24px 60px rgba(10, 30, 15, .25);
}
#presentation .carte-titre, #presentation .carte-texte { display: grid; justify-items: center; gap: 18px; }
#presentation .caps, #presentation .chapeau { margin: 0; }
#presentation h2 { font-size: clamp(34px, 4vw, 52px); }
#presentation .chapeau { max-width: 46ch; color: #2F4A35; }
/* Le répertoire : une pilule au trait par genre */
#presentation .outils { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
#presentation .outils span { padding: 6px 12px; border: 1.5px solid currentColor; border-radius: 99px; font-size: 11px; letter-spacing: .1em; white-space: nowrap; }
/* Sur ordinateur : deux colonnes, le titre à gauche, le texte et le répertoire à droite */
@media (min-width: 900px) {
  #presentation .carte { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: 0 56px; max-width: 1000px; text-align: left; justify-items: stretch; }
  #presentation .carte-titre, #presentation .carte-texte { justify-items: start; }
  #presentation .carte-titre { padding-right: 48px; border-right: 1.5px solid rgba(68, 106, 76, .25); }
  #presentation .outils { justify-content: flex-start; }
}
@media (max-width: 760px) {
  #presentation h2 { font-size: 30px; }
}

/* Sous les photos : Instagram et téléphone en deux boutons, comme les autres boutons du site.
   Instagram plein (blanc), le téléphone au trait ; au survol, une petite flèche glisse au bout du bouton */
.notes-contact { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 18px; margin-top: 56px; }
.note-contact {
  display: inline-flex; align-items: center; gap: 12px; padding: 13px 26px 13px 20px;
  border: 1.5px solid currentColor; border-radius: 99px;
  font-size: 18px; letter-spacing: .04em; text-decoration: none;
}
.note-contact:first-child { background: var(--encre); color: var(--fond); }
.note-contact svg { width: 26px; height: 26px; flex: none; }
.note-contact rect, .note-contact circle, .note-contact path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.note-contact .point { fill: currentColor; stroke: none; }
.note-contact b { font-weight: 700; }
.note-contact::after {   /* la flèche, cachée au repos (largeur nulle, l'écart du flex annulé) */
  content: '→'; display: inline-block; max-width: 0; overflow: hidden; margin-left: -12px; opacity: 0; translate: -8px 0;
  transition: max-width .3s cubic-bezier(.2, .7, .2, 1), margin .3s cubic-bezier(.2, .7, .2, 1), opacity .2s, translate .3s cubic-bezier(.2, .7, .2, 1);
}
@media (hover: hover) {
  .note-contact:hover::after { max-width: 1.2em; margin-left: -4px; opacity: 1; translate: 0 0; }
}
.note-contact:focus-visible::after { max-width: 1.2em; margin-left: -4px; opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) { .note-contact::after { transition: none; } }
.note-contact:focus-visible { outline: 2px solid var(--encre); outline-offset: 4px; }
/* ---------- Contact / booking ---------- */
.centre { display: grid; justify-items: center; gap: 22px; text-align: center; }
.centre .bouton { justify-self: center; }
.chapeau { color: var(--texte); max-width: 44ch; font-size: 21px; }
.liens a { text-decoration: none; }
.liens a:hover { text-decoration: underline; text-underline-offset: 6px; }

/* ---------- Formulaire de booking (face scène) ---------- */
.reservation { width: min(680px, 100%); display: grid; gap: 40px; justify-items: center; margin-top: 18px; color-scheme: dark; position: relative; }
/* La bulle d'erreur maison (posée par js/main.js sous le premier champ à compléter) */
.bulle {
  position: absolute; z-index: 45; display: flex; align-items: center; gap: 10px; width: max-content; max-width: min(400px, 100%);
  padding: 10px 16px 10px 12px; border-radius: 14px; background: var(--encre); color: var(--fond);
  font-size: 15px; letter-spacing: .04em; line-height: 1.35; text-align: left;
  box-shadow: 0 14px 34px rgba(10, 30, 15, .35); transform-origin: 26px 0;
}
.bulle[hidden] { display: none; }
.bulle::before { content: ''; position: absolute; top: -6px; left: 20px; width: 13px; height: 13px; background: inherit; border-radius: 3px 0 0 0; transform: rotate(45deg); }
.bulle svg { flex: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bulle.centree { translate: -50% 0; transform-origin: 50% 0; }
.bulle.centree::before { left: calc(50% - 6.5px); }
.bulle.pop { animation: bulle .32s cubic-bezier(.2, .9, .3, 1.25); }
@keyframes bulle { from { opacity: 0; transform: translateY(-6px) scale(.92); } }
@media (prefers-reduced-motion: reduce) { .bulle.pop { animation: none; } }
.types { border: 0; margin: 0; padding: 0; display: grid; gap: 16px; justify-items: center; }
.types legend { font-size: 11px; padding: 0; margin: 0 auto 16px; }
.pastilles { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pastille { position: relative; cursor: pointer; }
.pastille input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pastille span { display: block; border: 1.5px solid currentColor; border-radius: 99px; padding: 8px 20px; font-size: 18px; letter-spacing: .05em; transition: background .25s, color .25s; }
.pastille:hover span { background: var(--teinte); }
.pastille input:checked + span { background: var(--encre); color: var(--fond); }
.pastille input:focus-visible + span { outline: 2px solid currentColor; outline-offset: 3px; }
.champs { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; text-align: left; }
.champ { display: grid; gap: 6px; }
.champ.large { grid-column: 1 / -1; }
.champ .caps { font-size: 11px; }
.champ .caps i { font-style: normal; font-weight: 400; opacity: .9; }
.champ input, .champ textarea {
  width: 100%; padding: 8px 0; border: 0; border-bottom: 1.5px solid var(--filet); border-radius: 0;
  background: none; color: inherit; font: inherit; font-size: 20px; letter-spacing: .03em;
}
.champ textarea { resize: vertical; min-height: 3.2em; line-height: 1.5; }
.champ input:focus, .champ textarea:focus { outline: none; border-bottom-color: currentColor; }
.champ ::placeholder { color: inherit; opacity: .45; }
/* Champ date : calendrier maison, dans la DA (celui du navigateur ne se personnalise pas) */
.champ-date { position: relative; }
.date-saisie { position: relative; }
.date-saisie input { padding-right: 34px; letter-spacing: .015em; cursor: pointer; caret-color: transparent; text-overflow: ellipsis; }
.champ-date.ouvert .date-saisie input { border-bottom-color: currentColor; }
.icone-cal {
  position: absolute; right: 2px; top: 50%; width: 26px; height: 26px; margin-top: -13px; pointer-events: none;
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s;
}
.champ-date.ouvert .icone-cal, .date-saisie:hover .icone-cal { transform: rotate(-8deg); }
.calendrier {
  position: absolute; z-index: 40; top: calc(100% + 12px); left: -16px; width: 332px; max-width: calc(100vw - 12px);
  /* toujours fond blanc, texte vert, des deux côtés du site (demande de Lucas) */
  --fond: var(--blanc); --encre: var(--vert);
  padding: 14px 16px 12px; background: var(--fond); color: var(--encre);
  border: 1.5px solid currentColor; border-radius: 18px; box-shadow: 0 22px 50px rgba(12, 28, 16, .35);
  transform-origin: 30px 0; animation: deplier .35s cubic-bezier(.2, .7, .2, 1);
}
.calendrier[hidden] { display: none; }
@keyframes deplier { from { opacity: 0; transform: translateY(-8px) scale(.97); } }
.cal-tete { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; margin-bottom: 6px; }
.cal-mois { margin: 0; text-align: center; font-weight: 700; font-size: 20px; letter-spacing: .04em; }
.cal-tete button { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; background: none; border: 0; color: inherit; cursor: pointer; }
.cal-tete svg { width: 26px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s; }
@media (hover: hover) {   /* au doigt, le survol resterait collé après le toucher */
  .cal-prec:hover svg { transform: translateX(-3px); }
  .cal-suiv:hover svg { transform: translateX(3px); }
  .cal-jours button:not(:disabled):hover .rond path { stroke-dashoffset: 0; opacity: .35; }
}
.cal-tete button:disabled { opacity: .25; cursor: default; }
.cal-tete button:disabled svg { transform: none; }
.cal-tete button:focus-visible { outline: 1.5px dashed currentColor; outline-offset: -4px; border-radius: 50%; }
.cal-semaine, .cal-jours { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.cal-semaine span { padding: 4px 0 6px .2em; font-size: 11px; font-weight: 700; letter-spacing: .2em; opacity: .9; }
.cal-jours button {
  position: relative; aspect-ratio: 1; display: grid; place-items: center; padding: 0; background: none; border: 0;
  color: inherit; font: inherit; font-size: 18px; letter-spacing: .02em; cursor: pointer;
}
.cal-jours button:disabled { opacity: .28; cursor: default; }
.cal-jours .auj::after { content: ''; position: absolute; left: 50%; bottom: 5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.cal-jours .rond { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); overflow: visible; pointer-events: none; rotate: var(--r); }
.cal-jours .rond path {
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round;
  stroke-dasharray: 1 2; stroke-dashoffset: 1; transition: stroke-dashoffset .45s cubic-bezier(.65, 0, .35, 1), opacity .2s;
}
.cal-jours [aria-pressed="true"] { font-weight: 700; }
.cal-jours [aria-pressed="true"] .rond path { stroke-dashoffset: 0; opacity: 1; }
.cal-jours button:focus-visible { outline: 1.5px dashed currentColor; outline-offset: -5px; border-radius: 50%; }

.reservation .bouton { justify-self: center; cursor: pointer; background: none; color: inherit; font: inherit; font-size: 18px; letter-spacing: .05em; }
.reservation .bouton:disabled { opacity: .5; cursor: wait; }
/* Au survol (et au clavier) : le bouton se remplit de blanc, le texte passe en vert */
@media (hover: hover) { .reservation .bouton:not(:disabled):hover { background: var(--encre); color: var(--fond); } }
.reservation .bouton:focus-visible { outline: none; background: var(--encre); color: var(--fond); }
.etat { min-height: 1.6em; margin: -24px 0 0; font-size: 16px; color: var(--texte); }
.rgpd { margin: -30px 0 0; max-width: 46ch; font-size: 13px; line-height: 1.55; text-align: center; color: var(--texte); }   /* à quoi servent les données du formulaire */
.merci { display: grid; gap: 14px; justify-items: center; }
.reservation[hidden], .merci[hidden] { display: none; }
.merci:focus { outline: none; }   /* le focus sert juste à faire lire le message aux lecteurs d'écran */
.direct { margin-top: 10px; font-size: 11px; }

/* ---------- Pied de page ---------- */
.pied { padding-top: 64px; text-align: center; }
.pied .caps { font-size: 11px; padding: 24px 0 30px; }
@media (max-width: 760px) { .mentions-pied { display: block; } .mentions-pied .sep { display: none; } }   /* sur téléphone : « Mentions légales » sur sa propre ligne, sans point qui traîne */
/* Fin de page : « retour au sommet » à gauche de la montagne, « et côté … ? » à droite, posés sur le sol */
.pied-dessin { position: relative; }
.fin { position: absolute; inset: 0; pointer-events: none; }
.mot {
  position: absolute; bottom: 28px; pointer-events: auto;
  display: inline-flex; align-items: flex-end; gap: 6px; padding: 4px;
  background: none; border: 0; color: inherit; font: inherit; font-size: 17px; letter-spacing: .04em; line-height: 1.2;
  text-decoration: none; white-space: nowrap; cursor: pointer; transform: rotate(-4deg);
}
.mot svg { flex: none; overflow: visible; transition: transform .3s cubic-bezier(.2, .7, .2, 1); }
.mot path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sommet { right: calc(50% + 150px); }
.sommet svg { width: 16px; height: 23px; }
.sommet:hover svg { transform: translateY(-5px); }
.autre-face { left: calc(50% + 150px); }
.autre-face svg { width: 30px; height: 15px; margin-bottom: 2px; }
.autre-face:hover svg { transform: translateX(5px); }

/* ---------- Fiche projet (refaite le 12/11) : plein écran ----------
   Ordinateur : le texte à gauche reste en place pendant qu'on fait défiler les visuels à droite.
   Téléphone : tout l'un sous l'autre (voir plus bas). */
/* Filtres des projets sur téléphone : un bouton « Rubrique : … » qui ouvre la liste des rubriques depuis le bas de l'écran */
.choix-rubrique, .feuille-rubriques { display: none; }
@media (max-width: 760px) {
  .choix-rubrique {
    display: flex; align-items: center; gap: 12px; margin: 0 auto 26px; padding: 12px 22px; min-height: 48px;
    border: 1.5px solid currentColor; border-radius: 99px; background: none; color: inherit; font: inherit; font-size: 18px; letter-spacing: .04em; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .choix-rubrique small { font-size: 11px; }
  .choix-rubrique span { display: inline-flex; gap: 3px; font-weight: 700; }
  .choix-rubrique sup { font-size: 11px; margin-top: 2px; }
  .choix-rubrique svg { width: 16px; height: 10px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .choix-rubrique:active { background: var(--encre); color: var(--fond); }
  .feuille-rubriques[open] {
    display: block; position: fixed; inset: auto 0 0; width: 100%; max-width: none; max-height: 85svh; margin: 0; padding: 0; border: 0; background: none; overflow: visible;
  }
  .feuille-rubriques::backdrop { background: rgba(20, 35, 24, .35); }
  html:has(.feuille-rubriques[open]) { overflow: hidden; }
  .feuille-corps {
    max-height: 85svh; overflow-y: auto; overscroll-behavior: contain; background: var(--blanc); color: var(--vert);
    border-radius: 22px 22px 0 0; padding: 12px 24px calc(28px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(10, 30, 15, .15);
  }
  .feuille-rubriques[open] .feuille-corps { animation: feuille-monte .3s cubic-bezier(.2, .7, .2, 1); }
  @keyframes feuille-monte { from { transform: translateY(100%); } }
  .feuille-poignee { display: block; width: 44px; height: 4px; border-radius: 2px; background: rgba(68, 106, 76, .3); margin: 0 auto 16px; }
  .feuille-corps .caps { margin: 0 0 8px; text-align: center; font-size: 12px; }
  .feuille-corps ul { list-style: none; margin: 0; padding: 0; }
  .feuille-corps li + li { border-top: 1px solid rgba(68, 106, 76, .16); }
  .feuille-corps li button {
    display: flex; align-items: baseline; gap: 10px; width: 100%; min-height: 52px; padding: 13px 4px; border: 0; background: none;
    color: inherit; font: inherit; font-size: 19px; letter-spacing: .04em; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .feuille-corps li button span { flex: 1; }
  .feuille-corps li button b { font-size: 12px; }
  .feuille-corps li button[aria-current] { font-weight: 700; }
  .feuille-corps li button[aria-current]::before { content: '→'; }
  .feuille-corps li button:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; border-radius: 8px; }
}
@media (prefers-reduced-motion: reduce) { .feuille-rubriques[open] .feuille-corps { animation: none; } }

/* Sous « Sur scène » : une note manuscrite fléchée vers les photos (comme celle de l'accueil) ;
   « clique » à la souris, « touche » au doigt ; la flèche se dessine quand on arrive dessus */
.note-live { display: flex; align-items: flex-start; justify-content: center; gap: 6px; margin: 2px 0 -30px; font-size: 18px; line-height: 1.3; letter-spacing: .04em; transform: rotate(-3deg); }
.note-live > span { text-align: right; }
.note-live .doigt { display: none; }
@media (hover: none), (pointer: coarse) { .note-live .souris { display: none; } .note-live .doigt { display: inline; } }
.note-live .fleche { width: 66px; height: 52px; margin-top: 10px; overflow: visible; }
.note-live .fleche path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.note-live.a-tracer .fleche path { stroke-dasharray: 1 2; stroke-dashoffset: 1.05; }
.note-live.a-tracer.vu .fleche path { animation: tracer .6s .2s cubic-bezier(.45, 0, .2, 1) forwards; }
.note-live.a-tracer.vu .fleche path + path { animation-duration: .18s; animation-delay: .8s; }
.note-live.a-tracer.vu .fleche path + path + path { animation-delay: .9s; }
@media (max-width: 760px) { .note-live { font-size: 15px; margin-bottom: -14px; } .note-live .fleche { width: 50px; height: 40px; } }

/* ---------- Photo live en grand, façon story Instagram, sur le vert du site ---------- */
.cliche { border-radius: 12px; }
.cliche .photo:focus-visible { outline: 2px solid var(--encre); outline-offset: 6px; }
@media (hover: hover) and (pointer: fine) { .cliche .photo { cursor: zoom-in; } .carrousel.tire .photo { cursor: grabbing; } }
.visionneuse {
  --fond: var(--vert); --encre: var(--blanc); --texte: rgba(255, 255, 255, .9);
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: var(--fond); color: var(--encre); overscroll-behavior: contain;
}
.visionneuse[open] { display: grid; place-items: center; animation: fiche-entree .35s cubic-bezier(.2, .7, .2, 1) both; }
.visionneuse::backdrop { background: var(--vert); }
html:has(.visionneuse[open]) { overflow: hidden; }
.vis-duo { display: grid; grid-template-columns: auto minmax(0, 400px); gap: clamp(40px, 5vw, 88px); align-items: center; }
/* la story : 9:16, barres en haut, photo de profil + pseudo ; les photos en largeur tiennent en entier sur leur propre flou */
.vis-story {
  position: relative; height: min(calc(100vh - 80px), 920px); aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden;
  background: #1C2E21; box-shadow: 0 30px 80px rgba(10, 30, 15, .45);
}
.vis-story::before { content: ''; position: absolute; inset: 0 0 auto; height: 120px; z-index: 2; background: linear-gradient(rgba(0, 0, 0, .45), transparent); pointer-events: none; }
.vis-image, .vis-flou { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.vis-flou { display: none; filter: blur(28px) brightness(.8); transform: scale(1.15); }
.vis-story.large .vis-flou { display: block; }
.vis-story.large .vis-image { object-fit: contain; }
.vis-story.change .vis-image, .vis-story.change .vis-flou { opacity: 0; }
.vis-barres { position: absolute; top: 12px; left: 10px; right: 10px; z-index: 3; display: flex; gap: 4px; }
.vis-barres i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .4); }
.vis-barres i.vu, .vis-barres i.actuelle { background: var(--blanc); }
.vis-entete {
  position: absolute; top: 26px; left: 12px; right: 12px; z-index: 3; display: flex; align-items: center; gap: 10px;
  font-size: 15px; letter-spacing: .04em; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); pointer-events: none;
}
.vis-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; object-position: 50% 30%; border: 1.5px solid var(--blanc); }
.vis-entete span { font-size: 13px; opacity: .9; }
/* toucher (ou cliquer) à gauche de la story = précédente, à droite = suivante, comme sur Instagram */
.vis-zone { position: absolute; top: 0; bottom: 0; z-index: 2; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.vis-zone.prec { left: 0; width: 35%; }
.vis-zone.suiv { right: 0; width: 65%; }
.vis-bas { display: none; }
.vis-texte { display: grid; gap: 14px; justify-items: start; }
.vis-compteur { margin: 0; font-size: 12px; opacity: .9; }
.visionneuse h2 { margin: 0; font-size: clamp(40px, 4vw, 58px); line-height: 1.1; }
.visionneuse h2:focus { outline: none; }
.visionneuse .insecable { white-space: nowrap; }   /* « Guitare-voix » ne se coupe pas au trait d'union */
.vis-texte h2 { white-space: nowrap; }   /* titre toujours sur une ligne : flèches et bouton restent à la même place d'une photo à l'autre (« Les balances ») */
.visionneuse { -webkit-user-select: none; user-select: none; }
.visionneuse:focus { outline: none; }   /* la story reçoit le focus à l'ouverture : pas de contour (la barre sombre sur téléphone) */   /* un double-clic sur les flèches ne surligne plus « Voir » en bleu */
.vis-detail { margin: 0; font-size: 12px; color: var(--texte); }
.vis-para { margin: 10px 0 0; max-width: 32ch; font-size: 19px; line-height: 1.6; color: var(--texte); white-space: pre-line; }
.vis-nav { display: flex; gap: 12px; margin: 22px 0 18px; }
.vis-rond {
  display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%;
  background: var(--blanc); color: var(--vert); cursor: pointer; box-shadow: 0 10px 26px rgba(10, 30, 15, .25);
}
.vis-rond svg { width: 24px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: translate .25s; }
@media (hover: hover) { .vis-rond[data-sens="1"]:hover svg { translate: 3px 0; } .vis-rond[data-sens="-1"]:hover svg { translate: -3px 0; } }
.vis-rond:focus-visible { outline: 2px solid var(--blanc); outline-offset: 3px; }
.vis-insta { display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px; border-radius: 99px; background: var(--blanc); color: var(--vert); font-size: 17px; letter-spacing: .04em; text-decoration: none; }
.vis-fermer { position: absolute; top: 22px; right: 24px; z-index: 4; }
/* Sur téléphone : la story en plein écran, le texte posé en bas */
@media (max-width: 760px) {
  .vis-duo { display: block; width: 100%; height: 100%; }
  .vis-story { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
  .vis-texte { display: none; }
  .vis-bas {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: grid; gap: 6px; pointer-events: none;
    padding: 110px 22px calc(30px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0, 0, 0, .65));
  }
  .vis-bas b { font-size: 28px; letter-spacing: .05em; }
  .vis-bas small { font-size: 12px; letter-spacing: .24em; text-transform: uppercase; }
  .vis-bas p { margin: 6px 0 0; font-size: 15px; line-height: 1.5; }
  .vis-fermer { top: 62px; right: 8px; border-color: transparent; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
}
@media (prefers-reduced-motion: reduce) { .visionneuse[open] { animation: none; } .vis-image, .vis-flou { transition: none; } }

.fiche {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: var(--fond); color: var(--encre); overflow-y: auto; overscroll-behavior: contain;
}
.fiche[open] { animation: fiche-entree .35s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes fiche-entree { from { opacity: 0; transform: translateY(18px); } }
.fiche::backdrop { background: var(--fond); }
html:has(.fiche[open]) { overflow: hidden; }   /* la page derrière ne bouge plus */
.fiche-barre {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  height: 84px; padding: 0 var(--marge); background: var(--fond);
}
.fiche-compteur { margin: 0; font-size: 12px; }
.fermer-fiche {
  display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px 0 18px;
  border: 1.5px solid currentColor; border-radius: 99px; background: none; color: inherit;
  font-family: inherit; font-size: 12px; letter-spacing: .24em; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.fermer-fiche svg { width: 22px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
@media (hover: hover) { .fermer-fiche:hover { background: var(--encre); color: var(--fond); } }
.fermer-fiche:active { background: var(--encre); color: var(--fond); }
.fiche-corps {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px); align-items: start;
  max-width: 1240px; margin: 0 auto; padding: 28px var(--marge) 0;
}
.fiche-infos { position: sticky; top: 112px; }
.fiche-categorie { margin: 0 0 16px; font-size: 12px; }
.fiche h2 { font-size: clamp(34px, 3.6vw, 52px); margin: 0 0 28px; }
.fiche-texte { display: grid; gap: 16px; color: var(--texte); font-size: 17px; line-height: 1.65; }
.fiche-texte p { margin: 0; }
/* Projet en plusieurs parties : un sous-titre par partie, et chaque partie suivante dans un bloc identique, sous un filet */
.fiche-partie { margin: 0 0 20px; font-size: clamp(22px, 2vw, 28px); font-weight: 700; letter-spacing: .04em; line-height: 1.2; }
#fiche-partie { margin-top: -12px; }
.fiche-partie[hidden] { display: none; }
.fiche-bloc { border-top: 1px solid var(--filet); padding-top: 64px; }
/* Fichiers à télécharger (PDF, vidéo) : des pilules au trait, comme les autres boutons du site */
.fiche-fichiers { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.fiche-fichiers[hidden] { display: none; }
.fiche-fichiers a {
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 18px 9px 14px;
  border: 1.5px solid currentColor; border-radius: 99px; color: inherit; text-decoration: none;
  font-size: 15px; letter-spacing: .03em; transition: background .25s, color .25s;
}
.fiche-fichiers svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fiche-fichiers small { font-size: 12px; letter-spacing: .06em; opacity: .9; }
@media (hover: hover) { .fiche-fichiers a:hover { background: var(--encre); color: var(--fond); } }
.fiche-fichiers a:focus-visible { outline: none; background: var(--encre); color: var(--fond); }
.fiche-nav { display: flex; justify-content: space-between; gap: 20px; margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--filet); }
.fiche-nav[hidden] { display: none; }
.fiche-nav button { padding: 10px 0; background: none; border: 0; color: inherit; font: inherit; font-size: 17px; letter-spacing: .03em; cursor: pointer; }
@media (hover: hover) { .fiche-nav button:hover { text-decoration: underline; text-underline-offset: 6px; } }
.fiche-images { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding-bottom: 96px; }   /* la marge du bas est ici : le texte reste bien en place jusqu'au bout */
.fiche-images img {
  grid-column: 1 / -1; justify-self: center; width: auto; max-width: 100%; height: auto; max-height: 86vh;
  border-radius: 10px;
}
.fiche-images img.etroite { grid-column: span 1; width: 100%; max-height: none; }
/* Lecteurs intégrés : vidéo et PDF (page par page), en tête des visuels de la partie */
.lecteur-video, .lecteur-pdf { grid-column: 1 / -1; margin: 0; }
.lecteur-video video { display: block; width: 100%; height: auto; max-height: 82vh; margin: 0 auto; border-radius: 10px; background: #000; object-fit: contain; }
.lecteur-video video.verticale { width: auto; max-width: 100%; height: min(82vh, 760px); }   /* format TikTok / Reels */
.lecteur-page { position: relative; border: 1px solid var(--filet); border-radius: 10px; overflow: hidden; background: #fff; min-height: 220px; }
.lecteur-page canvas { display: block; width: 100%; height: auto; }
.lecteur-attente { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 20px; text-align: center; font-size: 11px; color: var(--texte); }
.lecteur-attente[hidden] { display: none; }
.lecteur-pdf figcaption { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 12px; flex-wrap: wrap; }
.lecteur-pdf figcaption button {
  width: 40px; height: 40px; border: 1.5px solid currentColor; border-radius: 50%; background: none; color: inherit;
  font: inherit; font-size: 22px; line-height: 1; cursor: pointer; transition: background .25s, color .25s;
}
.lecteur-pdf figcaption button:disabled { opacity: .3; cursor: default; }
@media (hover: hover) { .lecteur-pdf figcaption button:not(:disabled):hover { background: var(--encre); color: var(--fond); } }
.lecteur-pdf figcaption button:focus-visible { outline: none; background: var(--encre); color: var(--fond); }
.lecteur-etat { min-width: 110px; text-align: center; font-size: 11px; }
.lecteur-grand { font-size: 11px; color: inherit; text-underline-offset: 4px; }

/* ---------- Bascule animée (cercle depuis l'interrupteur) ---------- */
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- Téléphone et tablette ---------- */
@media (max-width: 1080px) {
  .menu span { gap: 18px; }
  .menu a { letter-spacing: .2em; font-size: 12px; }
}
@media (max-width: 900px) {
  .menu { display: none; }
  .son { margin-left: auto; }
}
@media (max-width: 760px) {
  body { font-size: 18px; }
  .barre { height: 68px; }
  .logo { width: 34px; height: 32px; }
  .sentier { display: none; }
  .note { position: static; justify-content: center; transform: rotate(-3deg); margin-top: 16px; font-size: 15px; }
  .note .fleche { display: none; }
  .note span { margin-top: 0; }
  .accueil { padding-bottom: 170px; }
  .bascule { flex-direction: column; gap: 12px; }
  .pivot { display: contents; }
  .note { order: 4; }
  .accueil .trait { height: 120px; }
  .pied .trait { height: 110px; }
  .fin { position: static; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; margin-top: 18px; }
  .mot { position: static; font-size: 16px; }
  .bloc { padding-top: 100px; }
  .deux-colonnes { grid-template-columns: 1fr; }
  .liste li { grid-template-columns: 70px 1fr; }
  .champs { grid-template-columns: 1fr; gap: 24px; }
  .pastille span { font-size: 16px; padding: 7px 16px; }
  /* sur téléphone : une seule ligne qui glisse au doigt, fondue sur les bords */
  .filtres {
    flex-wrap: nowrap; justify-content: flex-start; gap: 22px; overflow-x: auto; scrollbar-width: none;
    margin: 0 calc(-1 * var(--marge)) 24px; padding: 0 var(--marge);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 22px, #000 calc(100% - 22px), transparent);
            mask-image: linear-gradient(to right, transparent, #000 22px, #000 calc(100% - 22px), transparent);
  }
  .filtres::-webkit-scrollbar { display: none; }
  .filtre { font-size: 17px; flex: none; }
  #projets .filtres { display: none; }   /* sur téléphone : le bouton « Rubrique » et sa liste, plus bas */
  .calendrier { left: 0; width: 100%; }
  .ligne { grid-template-columns: 64px minmax(0, 1fr); }
  .ligne .cat { grid-column: 2; text-align: left; margin-top: -14px; }
  #parcours .liste li { grid-template-columns: 98px 1fr; } /* les années « 2026–2027 » tiennent sur une ligne */
  .intitule { font-size: 24px; }
  #parcours .intitule small { font-size: 16px; letter-spacing: .12em; }
  .rail { gap: 16px; }
  .notes-contact { flex-direction: column; align-items: stretch; gap: 12px; margin-top: 44px; }
  .note-contact { justify-content: center; font-size: 16px; gap: 10px; padding: 14px 16px; }
  .note-contact svg { width: 24px; height: 24px; }
  .carrousel { --haut-photo: clamp(260px, 72vw, 360px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .interrupteur i, .bouton, .ligne .titre-projet, .filtre, .filtre .souligne { transition: none; }
  .calendrier, .bouton.copie, .liens a.copie { animation: none; }
  #dates .liste li::before, #dates .liste li::after, #dates .liste .date, #dates .liste .intitule { transition: none; }
  .cal-jours .rond path, .icone-cal { transition: none; }
  .accueil h1 .lettre, .note { animation: none; opacity: 1; transform: none; }
  .note { transform: rotate(-4deg); }
  .trait.trace .relief, .note .fleche path { animation: none; stroke-dashoffset: 0; }
  .trait.trace .astre { animation: none; }
  .defile .piste { animation: none; }
}

/* Carrousel sur téléphone : la photo du centre en grand, ses voisines plus petites et voilées, le défilement
   s'arrête toujours sur une photo, et un compteur 01 / 06 à côté de la barre.
   Les tailles suivent le doigt directement (js/main.js) : rien ne penche. Sur ordinateur, rien ne change. */
.compteur { display: none; font-variant-numeric: tabular-nums; }   /* « 01 » et « 06 » ont la même largeur : rien ne bouge */
@media (max-width: 760px) {
  .carrousel { --haut-photo: clamp(260px, 80vw, 380px); scroll-snap-type: x mandatory; }
  .rail { gap: 18px; padding: 0 calc(50% - var(--haut-photo) * .4); }
  .cliche { gap: 18px; scroll-snap-align: center; }
  .cliche .photo { transform: scale(var(--echelle, 1)); transform-origin: 50% 100%; opacity: var(--voile, 1); }
  .legende { text-align: center; opacity: var(--legende, 1); }
  .compteur { display: inline; white-space: nowrap; font-size: 11px; }
  .compteur b { font-size: 22px; letter-spacing: .08em; margin-right: 4px; }
  .compteur small { font-size: 11px; }
}

/* =========================================================
   TÉLÉPHONE (12/11) : menu plein écran, projets en grille, barre « Réserver · Appeler », À propos et
   Parcours remis en page, petits textes agrandis, liens plus faciles à toucher, cordes aérées.
   Rien de tout ça ne s'applique sur ordinateur.
   ========================================================= */
.ouvrir-menu, .barre-resa { display: none; }
.ouvrir-menu, .fermer-menu {
  align-items: center; gap: 10px; height: 44px; padding: 0 16px 0 18px;
  border: 1.5px solid currentColor; border-radius: 99px; background: none; color: inherit;
  font-family: inherit; font-size: 12px; letter-spacing: .24em; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.fermer-menu { display: inline-flex; }
.ouvrir-menu svg, .fermer-menu svg { width: 22px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.ouvrir-menu:active, .fermer-menu:active { background: var(--encre); color: var(--fond); }
/* le menu plein écran */
.menu-mobile {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0;
  padding: 0 var(--marge); border: 0; background: var(--fond); color: var(--encre);
  display: grid; grid-template-rows: auto 1fr auto;
}
.menu-mobile:not([open]) { display: none; }
.menu-mobile::backdrop { background: transparent; }
.menu-mobile[open] { animation: fondu .25s ease both; }
@keyframes fondu { from { opacity: 0; } }
html:has(.menu-mobile[open]) { overflow: hidden; }
.menu-mobile-haut { height: 68px; display: flex; align-items: center; justify-content: space-between; }
.menu-mobile-haut .logo { width: 34px; height: 32px; }
.menu-mobile-liens { align-self: center; }
.menu-mobile-liens span { display: grid; gap: 4px; }
.menu-mobile-liens a {
  justify-self: start; padding: 6px 0; text-decoration: none;
  font-weight: 700; font-size: clamp(38px, 11vw, 54px); letter-spacing: .06em; line-height: 1.2;
}
.menu-mobile[open] .menu-mobile-liens a { animation: monter .55s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 60ms + 80ms); }
@keyframes monter { from { opacity: 0; transform: translateY(16px); } }
.menu-mobile-bascule {
  justify-self: start; margin-bottom: 40px; padding: 12px 0; background: none; border: 0; color: inherit;
  font-family: inherit; font-size: 20px; letter-spacing: .03em; cursor: pointer; transform: rotate(-2deg);
}
@media (max-width: 900px) {
  .ouvrir-menu { display: inline-flex; margin-left: 22px; }
}

@media (max-width: 760px) {
  /* Petits textes : de 11 à 12 px, lettres un peu moins espacées */
  .date small, .intitule small, .legende small, .ligne .num small, .indice, .types legend, .champ .caps,
  .cal-semaine span, .direct, .pied .caps, .compteur, .compteur small { font-size: 12px; letter-spacing: .2em; }
  .outils { font-size: 13px; letter-spacing: .2em; }

  /* Liens plus faciles à toucher (44 px de haut au doigt, sans rien changer à l'œil) */
  .marque { padding: 6px; margin: -6px; }
  .son { padding: 14px 6px; margin-top: -14px; margin-bottom: -14px; }
  .interrupteur::after { content: ''; position: absolute; inset: -10px -8px; }
  .liens a, .direct a { display: inline-block; padding: 14px 2px; margin: -14px 0; }

  /* Contact : Instagram et LinkedIn en notes manuscrites avec leur picto, comme côté musique */
  #contact .liens { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 30px; font-size: 0; }
  #contact .liens a {
    display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 0; margin: 0;
    font-size: 19px; font-weight: 400; letter-spacing: .03em; text-transform: none; transform: rotate(-2deg);
  }
  #contact .liens a + a { transform: rotate(1.5deg); }
  #contact .liens a::before {
    content: ''; flex: none; width: 28px; height: 28px; background: currentColor;
    -webkit-mask: var(--picto) center / contain no-repeat; mask: var(--picto) center / contain no-repeat;
  }
  #contact .liens a[href*="instagram"] { --picto: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Crect x='3' y='3' width='18' height='18' rx='5.5'/%3E%3Ccircle cx='12' cy='12' r='4.3'/%3E%3Ccircle cx='17.4' cy='6.6' r='1' fill='black' stroke='none'/%3E%3C/svg%3E"); }
  #contact .liens a[href*="linkedin"] { --picto: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='4.5'/%3E%3Cpath d='M8 10.6v5.9M8 7.6v.1M11.6 16.5v-5.9M11.6 13.1c0-1.6 1-2.6 2.4-2.6s2.3 1 2.3 2.6v3.4'/%3E%3C/svg%3E"); }

  /* Projets : grille de deux vignettes carrées, le titre dessous */
  .programme-projets { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 14px; border-bottom: 0; }
  .programme-projets li { border-top: 0; }
  .ligne { display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 0; }
  .ligne .num { display: none; }
  .ligne .mini {
    display: block; order: -1; width: 100%; aspect-ratio: 1; margin-bottom: 6px;
    object-fit: cover; object-position: center; border: 1px solid var(--filet); border-radius: 8px;
  }
  .ligne .titre-projet { font-size: 18px; letter-spacing: .04em; line-height: 1.2; }
  .ligne:hover .titre-projet, .ligne:focus-visible .titre-projet { transform: none; }
  .ligne .cat { margin: 0; max-width: none; text-align: left; font-size: 12px; letter-spacing: .12em; line-height: 1.5; }

  /* À propos : le titre et le texte d'abord, le portrait ensuite, plus petit */
  #a-propos .portrait { order: 2; width: min(72%, 300px); justify-self: center; }

  /* Parcours : les années au-dessus du diplôme, sans les gros numéros, descriptions en minuscules */
  #parcours .liste { width: 100%; gap: 34px; }
  #parcours .liste li { grid-template-columns: 1fr; gap: 4px; }
  #parcours .date { text-align: left; }
  #parcours .date b { display: none; }
  #parcours .intitule em { font-size: 16px; font-weight: 400; letter-spacing: .02em; text-transform: none; line-height: 1.55; margin-top: 8px; }


  /* Barre « Réserver une date · Appeler », côté musique */
  .barre-resa {
    display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9;
    padding: 12px var(--marge) calc(12px + env(safe-area-inset-bottom));
    background: var(--fond); border-top: 1px solid var(--filet);
    transform: translateY(105%); transition: transform .45s cubic-bezier(.2, .7, .2, 1);
  }
  .barre-resa.visible { transform: none; }
  .barre-resa .bouton {
    flex: 1 1 0; min-width: 0; justify-content: center; padding: 0 10px; height: 46px;
    font-size: 15px; letter-spacing: .03em; white-space: nowrap; background: none; -webkit-tap-highlight-color: transparent;
  }
  .barre-resa .bouton.plein { flex-grow: 1.5; background: var(--encre); color: var(--fond); }
  .barre-resa .bouton:active { opacity: .75; }

  /* Sur téléphone : pas de guitare ni de bouton Son ; l'accueil côté musique garde sa montagne */
  .cordes, .son { display: none !important; }
  html[data-mode="scene"] .accueil .trait { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .menu-mobile[open], .menu-mobile[open] .menu-mobile-liens a { animation: none; }
  .barre-resa { transition: none; }
}

/* Téléphone, version « plus compacte » (validée le 12/11) : textes et photos un peu plus petits, moins d'espace entre les sections */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .bloc { padding-top: 76px; }
  .entete { margin-bottom: 36px; }
  .entete h2, .texte h2, .centre h2 { font-size: 31px; }
  .accueil h1 { font-size: 46px; }
  .chapeau { font-size: 17px; }
  .texte > p:not(.caps) { line-height: 1.65; }
  #a-propos .portrait { width: min(55%, 240px); }
  .ligne .titre-projet { font-size: 16px; }
  .ligne .mini { aspect-ratio: 4 / 3; }
  .programme-projets { gap: 22px 12px; }
  .carrousel { --haut-photo: clamp(230px, 66vw, 320px); }
  .legende b { font-size: 15px; }
  .intitule { font-size: 20px; }
  .date b { font-size: 24px; }
  .liste { gap: 26px; }
  #parcours .intitule em { font-size: 15px; }
  .note-contact { font-size: 16px; }
  .note-contact svg { width: 24px; height: 24px; }
  #contact .liens a { font-size: 17px; }
  .champ input, .champ textarea { font-size: 17px; }
  .pastille span { font-size: 15px; padding: 6px 14px; }
}

/* Téléphone : la montagne de l'accueil se dessine toujours ; celle du pied de page s'affiche d'emblée, en trait plein */
@media (max-width: 760px) {
  .pied .trait.trace .relief { animation: none; stroke-dasharray: none; stroke-dashoffset: 0; }
  .pied .trait.trace .astre { animation: none; }
}

/* Téléphone : les libellés de l'accueil sont l'un au-dessus de l'autre, l'interrupteur se met donc debout
   (rond en haut = étudiant en com, rond en bas = chanteur guitariste) */
@media (max-width: 760px) {
  .bascule .interrupteur { width: var(--h); height: var(--l); }
  .bascule .interrupteur i { transform: translateY(var(--x)); }
  .bascule .interrupteur.coucou i { animation-name: coucou-debout; }
}
@keyframes coucou-debout {
  35%, 50% { transform: translateY(calc(var(--x) + var(--sens) * (var(--l) - var(--h)) * .5)); }
  72% { transform: translateY(calc(var(--x) - var(--sens) * 2px)); }
}

/* Téléphone : sans sa flèche, la note manuscrite sous l'interrupteur (« clique, je chante aussi » /
   « et je fais aussi de la com ») ne voulait plus rien dire : on la retire */
@media (max-width: 760px) {
  .accueil .note { display: none; }
}

/* Booking, sur téléphone : « Ou directement » repensé. Le numéro en grand (le plus rapide pour réserver),
   l'e-mail et Instagram en notes avec leur picto dessous ; la ligne en petites capitales reste sur ordinateur */
.direct-mobile { display: none; }
@media (max-width: 760px) {
  .direct { display: none; }
  .direct-mobile { display: grid; justify-items: center; gap: 6px; margin-top: 22px; }
  .direct-mobile > .caps { margin: 0 0 2px; font-size: 12px; letter-spacing: .2em; color: var(--texte); }
  .direct-tel {
    display: inline-flex; align-items: center; gap: 12px; min-height: 52px; text-decoration: none;
    font-weight: 700; font-size: 27px; letter-spacing: .06em;
  }
  .direct-autres { display: flex; justify-content: center; gap: 28px; margin: 0; }
  .direct-autres a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 17px; letter-spacing: .03em; text-decoration: none; }
  .direct-autres a:first-child { transform: rotate(-2deg); }
  .direct-autres a:last-child { transform: rotate(1.5deg); }
  .direct-tel svg { width: 26px; height: 26px; flex: none; }
  .direct-autres svg { width: 22px; height: 22px; flex: none; }
  .direct-mobile svg :is(path, rect, circle) { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
  .direct-mobile svg .point { fill: currentColor; stroke: none; }
}

/* Fiche projet sur téléphone : plein écran, une seule colonne, le bouton Fermer toujours en haut,
   les visuels en pleine largeur, « Précédent / Suivant » tout en bas */
@media (max-width: 760px) {
  .fiche-barre { height: 64px; border-bottom: 1px solid var(--filet); }
  .fiche-corps { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 26px var(--marge) 34px; }
  .fiche-infos { display: contents; }
  .fiche h2 { font-size: 30px; margin-bottom: 18px; }
  .fiche-texte { font-size: 16px; line-height: 1.6; }
  .fiche-fichiers { margin-top: 22px; }
  .fiche-bloc { padding-top: 30px; }
  .fiche-partie { font-size: 22px; margin-bottom: 14px; }
  .fiche-fichiers a { font-size: 14px; }
  /* Le premier visuel de chaque partie juste sous le titre (on voit le projet dès l'ouverture), puis le texte,
     les téléchargements, les autres visuels, et « Précédent / Suivant » */
  .fiche-images { display: contents; }
  .fiche-images > * { order: 4; margin-top: 12px; }
  .fiche-images > :first-child { order: 1; margin: 4px 0 26px; }
  .fiche-images > :nth-child(2) { margin-top: 28px; }
  .fiche-texte { order: 2; }
  .fiche-fichiers { order: 3; }
  .fiche-images img, .fiche-images img.etroite { grid-column: 1; width: 100%; max-height: none; border-radius: 8px; }
  .fiche-nav { order: 5; margin-top: 30px; }
}
@media (prefers-reduced-motion: reduce) { .fiche[open] { animation: none; } }

/* À l'ouverture de la fiche ou du menu, le focus va au titre / aux rubriques (et plus sur « Fermer »,
   où Safari dessinait un 2e contour autour du bouton) ; au clavier, les boutons en pilule se remplissent
   au lieu de prendre un contour de plus */
#fiche-titre:focus, .menu-mobile-liens:focus { outline: none; }
.fermer-fiche:focus-visible, .fermer-menu:focus-visible, .ouvrir-menu:focus-visible { outline: none; background: var(--encre); color: var(--fond); }

/* Téléphone : bandeau qui défile plus discret */
@media (max-width: 760px) {
  .defile { padding: 9px 0; margin-top: 80px; }
  .defile span { font-size: 11px; letter-spacing: .2em; }   /* 11 px minimum, comme les autres petites capitales */
}

/* Projets masqués d'un coup (back-office) : seul le message « bientôt » reste, centré comme le Contact */
#projets.bientot .projets-corps, #projets.bientot .filtres, #projets.bientot .voir-tout,
#projets.bientot .choix-rubrique, #projets.bientot .feuille-rubriques, #projets.bientot #liste-projets { display: none; }
#projets.bientot .entete { margin-bottom: 0; }
