/* =========================================================
   PALETTE — inspirée de ton CV (corail, rose, soleil)
   + le bleu "sélection" des logiciels de design
   + les bruns de ton avatar.
   Change une valeur ici et tout le site suit.
   ========================================================= */
:root {
  --blush: #fff1ec;        /* fond principal */
  --creme: #fffaf6;
  --blanc: #ffffff;
  --encre: #141414;
  --corail: #ff5a4e;
  --rose: #ff9fb0;
  --soleil: #ffb627;
  --bleu: #2b59ff;
  --bleu-clair: #b9c8ff;
  --brun: #6b3415;

  --police-titre: "Bricolage Grotesque", system-ui, sans-serif;
  --police-feutre: "Permanent Marker", cursive;
  --police-ui: "Space Mono", ui-monospace, monospace;
}

/* ---------- Bases ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--blush);
  color: var(--encre);
  font-family: var(--police-titre);
  font-size: 1.05rem;
  line-height: 1.55;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* Surlignage façon feutre */
mark {
  background: linear-gradient(transparent 55%, var(--soleil) 55%, var(--soleil) 92%, transparent 92%);
  color: inherit;
  padding: 0 .1em;
}

.bouton {
  display: inline-block;
  padding: .8em 1.5em;
  border: 3px solid var(--encre);
  border-radius: 999px;
  background: var(--encre);
  color: var(--creme);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 4px 4px 0 var(--corail);
  transition: transform .2s, box-shadow .2s;
}
.bouton:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--corail); }
.bouton-contour { background: var(--creme); color: var(--encre); box-shadow: 4px 4px 0 var(--encre); }
.bouton-contour:hover { box-shadow: 7px 7px 0 var(--encre); }

/* =========================================================
   ÉCRAN DE CHARGEMENT
   ========================================================= */
html.en-chargement { overflow: hidden; }

.chargement {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .9rem;
  background:
    linear-gradient(rgba(20, 20, 20, .07) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(20, 20, 20, .07) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--corail);
  transition: transform .9s cubic-bezier(.75, 0, .2, 1), border-radius .9s;
  /* sécurité : si le JavaScript ne marche pas, l'écran disparaît seul */
  animation: secours 0s 8s forwards;
}
.chargement.fini { transform: translateY(-100%); border-radius: 0 0 50% 50% / 0 0 14vh 14vh; }
@keyframes secours { to { visibility: hidden; } }

/* Ta tête en sticker qui rebondit (squash & stretch) */
.chargement-perso { position: relative; width: 190px; height: 250px; }
.chargement-perso img {
  position: absolute;
  bottom: 22px;
  left: 0;
  width: 190px;
  height: 190px;
  object-fit: contain;
  transform-origin: 50% 100%;
  animation: rebond-perso .75s infinite;
}
.chargement-ombre {
  position: absolute;
  bottom: 10px;
  left: 50%;
  width: 110px;
  height: 16px;
  border-radius: 50%;
  background: rgba(20, 20, 20, .25);
  translate: -50% 0;
  animation: rebond-ombre .75s infinite;
}
@keyframes rebond-perso {
  0%, 100% { transform: translateY(0) scale(1.18, .82); animation-timing-function: ease-out; }
  12%      { transform: translateY(-14px) scale(.9, 1.12); animation-timing-function: ease-out; }
  50%      { transform: translateY(-60px) scale(1, 1); animation-timing-function: ease-in; }
  88%      { transform: translateY(-14px) scale(.93, 1.08); animation-timing-function: ease-in; }
}
@keyframes rebond-ombre {
  0%, 100% { transform: scale(1.1); }
  50%      { transform: scale(.55); opacity: .5; }
}

.chargement-texte { margin: 0; font-family: var(--police-ui); font-size: .85rem; }
.chargement-jauge {
  width: min(240px, 70vw);
  height: 12px;
  border: 2.5px solid var(--encre);
  border-radius: 99px;
  background: var(--creme);
  overflow: hidden;
}
#chargement-remplissage { width: 0; height: 100%; background: var(--encre); }
.chargement-pourcent { font-weight: 800; font-stretch: 75%; font-size: 2.4rem; line-height: 1; }

/* Apparition au scroll (classe "visible" ajoutée par main.js) */
.apparait { opacity: 0; transform: translateY(40px); transition: opacity .7s, transform .7s cubic-bezier(.2, .8, .3, 1.2); }
.apparait.visible { opacity: 1; transform: none; transition-delay: var(--delai, 0s); }


/* =========================================================
   BARRE D'OUTILS (menu en bas de l'écran)
   ========================================================= */
.outils {
  position: fixed;
  left: 50%;
  bottom: 1.2rem;
  z-index: 50;
  display: flex;
  gap: .2rem;
  padding: .4rem;
  background: var(--encre);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .3);
  transform: translate(-50%, 200%);
}
body.pret .outils { animation: monter .6s 2.6s cubic-bezier(.3, 1.4, .5, 1) forwards; }
@keyframes monter { to { transform: translate(-50%, 0); } }

.outils a {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem .85rem;
  border-radius: 11px;
  color: #d9d9d9;
  font-family: var(--police-ui);
  font-size: .78rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.outils svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.outils a:hover { background: #2b2b2b; color: #fff; }
.outils a.actif { background: var(--bleu); color: #fff; }
.outils a.outils-contact:not(.actif) { color: var(--soleil); }


/* =========================================================
   ACCUEIL
   Les animations attendent la classe "pret" sur <body>
   (ajoutée par main.js quand les polices sont chargées).
   ========================================================= */
.accueil {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 2rem;
  padding: 5rem clamp(1.2rem, 5vw, 5rem) 9rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 18%, rgba(255, 90, 78, .45), transparent 38%),
    radial-gradient(circle at 5% 95%, rgba(255, 182, 39, .4), transparent 40%),
    radial-gradient(circle at 55% 60%, rgba(255, 159, 176, .35), transparent 45%),
    linear-gradient(rgba(20, 20, 20, .055) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(20, 20, 20, .055) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--blush);
}
.accueil-texte, .scene { position: relative; z-index: 2; }

.accueil-label {
  margin: 0 0 1rem;
  font-family: var(--police-ui);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .15em;
}

/* Le nom */
.nom {
  margin: 0;
  font-weight: 800;
  font-stretch: 75%;
  font-size: clamp(4.2rem, 11vw, 10.5rem);
  line-height: .82;
  letter-spacing: -.02em;
  text-transform: uppercase;
}
/* min-height : chaque ligne garde sa hauteur pendant que le texte s'écrit */
.nom-prenom, .nom-famille { display: block; min-height: .82em; }
.nom-famille { color: var(--corail); }

/* Le curseur clignotant de la machine à écrire (ajouté par main.js) */
.curseur-texte {
  display: inline-block;
  width: .07em;
  height: .72em;
  margin-left: .04em;
  background: var(--encre);
  vertical-align: baseline;
  animation: clignoter-curseur 1s steps(1) infinite;
}
@keyframes clignoter-curseur { 50% { opacity: 0; } }

.accueil-accroche {
  max-width: 30rem;
  margin: 1.6rem 0 1.8rem;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  opacity: 0;
}
.accueil-boutons { display: flex; flex-wrap: wrap; gap: 1rem; opacity: 0; }
body.pret .accueil-accroche { animation: apparaitre .6s 1.7s forwards; }
body.pret .accueil-boutons  { animation: apparaitre .6s 1.9s forwards; }

/* --- La scène de droite --- */
.scene {
  width: min(520px, 100%);
  aspect-ratio: 1;
  justify-self: center;
}

/* Cadre de sélection bleu */
.selection {
  position: absolute;
  left: 10%;
  top: 6%;
  width: 66%;
  aspect-ratio: 1;
  border: 1.5px solid var(--bleu);
  opacity: 0;
  transform: scale(.85);
}
.selection img { width: 100%; mix-blend-mode: multiply; }
body.pret .selection { animation: pop .5s .9s cubic-bezier(.3, 1.6, .5, 1) forwards; }

.poignee {
  position: absolute;
  width: 11px;
  height: 11px;
  background: #fff;
  border: 1.5px solid var(--bleu);
  translate: -50% -50%;
}
.p1 { left: 0; top: 0; }      .p2 { left: 50%; top: 0; }    .p3 { left: 100%; top: 0; }
.p4 { left: 100%; top: 50%; } .p5 { left: 100%; top: 100%; } .p6 { left: 50%; top: 100%; }
.p7 { left: 0; top: 100%; }   .p8 { left: 0; top: 50%; }

.selection-nom, .selection-taille {
  position: absolute;
  padding: .15em .6em;
  background: var(--bleu);
  color: #fff;
  font-family: var(--police-ui);
  font-size: .72rem;
  white-space: nowrap;
}
.selection-nom { top: -1.9rem; left: -1px; }
.selection-taille { bottom: -2rem; left: 50%; transform: translateX(-50%); }

/* Sticker rond "Stage!" */
.sticker-stage {
  position: absolute;
  right: 0;
  top: 0;
  width: 36%;
  aspect-ratio: 1;
  display: grid;
  place-content: center;
  text-align: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3ee, var(--rose) 45%, var(--corail));
  border: 5px solid #fff;
  box-shadow: 0 8px 20px rgba(255, 90, 78, .45);
  opacity: 0;
  transform: scale(2.5) rotate(20deg);
}
.sticker-stage-petit {
  font-family: var(--police-ui);
  font-size: clamp(.6rem, 1.1vw, .75rem);
  font-weight: 700;
  text-transform: uppercase;
}
.sticker-stage-grand {
  font-family: var(--police-feutre);
  font-size: clamp(1.7rem, 3.6vw, 2.8rem);
  line-height: 1;
}
body.pret .sticker-stage {
  animation:
    coller .45s 1.5s cubic-bezier(.5, 0, .7, 1.4) forwards,
    balancer 3s 2.2s ease-in-out infinite;
}

/* Fenêtre d'export */
.export {
  position: absolute;
  left: -8%;
  bottom: -17%;
  width: 74%;
  padding-bottom: .9rem;
  background: #1d1d1f;
  color: #eee;
  border-radius: 12px;
  font-family: var(--police-ui);
  font-size: .74rem;
  box-shadow: 0 20px 40px rgba(20, 20, 20, .3);
  opacity: 0;
  transform: translateY(30px);
}
body.pret .export { animation: glisser .6s 2s cubic-bezier(.2, .9, .3, 1) forwards; }

.export-barre-titre {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .6rem .8rem;
  border-bottom: 1px solid #333;
  color: #999;
  /* sur mobile, on déplace la fenêtre par sa barre de titre (le reste laisse défiler la page) */
  touch-action: none;
}
/* La fenêtre se déplace à la souris (voir main.js) */
.export { cursor: grab; user-select: none; }
.export a { cursor: pointer; }
.export.deplace { cursor: grabbing; box-shadow: 0 30px 60px rgba(20, 20, 20, .4); }
.export-barre-titre i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.export-barre-titre i:nth-child(2) { background: #febc2e; }
.export-barre-titre i:nth-child(3) { background: #28c840; }
.export-barre-titre span { margin-left: .4rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.export-etapes { display: flex; flex-wrap: wrap; gap: .35rem; padding: .8rem .8rem .5rem; }
.export-etapes li { padding: .1em .55em; border-radius: 5px; background: #2e2e30; color: #888; transition: background .3s, color .3s; }
.export-etapes li.fait { background: #1f4d33; color: #7ee2a4; }
.export-etapes li.fait::before { content: "✓ "; }
.export-etapes li.erreur { background: var(--corail); color: #fff; animation: clignoter 1s steps(2) infinite; }
.export-etapes li.erreur::before { content: "✗ "; }

.export-progression { display: flex; align-items: center; gap: .6rem; padding: 0 .8rem; }
.export-jauge { flex: 1; height: 8px; border-radius: 99px; background: #333; overflow: hidden; }
.export-remplissage { width: 0; height: 100%; background: linear-gradient(90deg, var(--soleil), var(--corail)); }

.export-erreur {
  max-height: 0;
  overflow: hidden;
  padding: 0 .8rem;
  transition: max-height .5s;
}
.export-erreur.visible { max-height: 6rem; }
.export-erreur p { margin: .7rem 0 .3rem; color: #ff8d84; }
.export-erreur em { font-style: normal; color: #fff; font-weight: 700; }
.export-erreur a { color: var(--soleil); font-weight: 700; }

/* Curseurs multijoueur */
.curseur {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  pointer-events: none;
  opacity: 0;
}
.curseur svg { width: 20px; height: 20px; stroke: #fff; stroke-width: 1.5; }
.curseur span {
  margin: 14px 0 0 -4px;
  padding: .1em .55em;
  border-radius: 0 8px 8px 8px;
  color: #fff;
  font-family: var(--police-ui);
  font-size: .72rem;
}
.curseur-vous svg { fill: var(--bleu); }
.curseur-vous span { background: var(--bleu); }
.curseur-moi svg { fill: var(--corail); }
.curseur-moi span { background: var(--corail); }

body.pret .curseur-vous { animation: apparaitre .4s 3s forwards, trajet-vous 14s 3s ease-in-out infinite; }
body.pret .curseur-moi  { animation: apparaitre .4s 3.4s forwards, trajet-moi 17s 3.4s ease-in-out infinite; }

@keyframes trajet-vous {
  0%, 100% { left: 70%; top: 88%; }
  25%      { left: 66%; top: 30%; }
  50%      { left: 82%; top: 66%; }
  75%      { left: 48%; top: 72%; }
}
@keyframes trajet-moi {
  0%, 100% { left: 18%; top: 92%; }
  30%      { left: 42%; top: 22%; }
  60%      { left: 30%; top: 64%; }
  80%      { left: 56%; top: 84%; }
}

/* Gros texte qui défile */
.defile { display: flex; overflow: hidden; white-space: nowrap; pointer-events: none; }
.defile div { flex-shrink: 0; animation: defiler 40s linear infinite; }

.defile-fond {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1.5rem;
  z-index: 1;
  font-weight: 800;
  font-stretch: 75%;
  font-size: clamp(4rem, 12vw, 10rem);
  line-height: 1;
  color: rgba(255, 90, 78, .13);
}

/* Les animations réutilisées */
@keyframes apparaitre { to { opacity: 1; } }
@keyframes pop        { to { opacity: 1; transform: none; } }
@keyframes glisser    { to { opacity: 1; transform: none; } }
@keyframes coller     { to { opacity: 1; transform: scale(1) rotate(-12deg); } }
@keyframes balancer   { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(-4deg) scale(1.04); } }
@keyframes clignoter  { 50% { opacity: .55; } }
@keyframes defiler    { to { transform: translateX(-100%); } }


/* =========================================================
   SECTIONS (communes)
   ========================================================= */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 7rem clamp(1.2rem, 5vw, 3rem) 3rem;
}

.section-tete {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: .3rem 1.2rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--encre);
}
.section-num {
  font-weight: 800;
  font-stretch: 75%;
  font-size: clamp(3.5rem, 9vw, 7rem);
  line-height: .8;
  color: var(--corail);
}
.section-titre {
  margin: 0;
  font-weight: 800;
  font-stretch: 75%;
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  line-height: .85;
  letter-spacing: -.01em;
  text-transform: uppercase;
}
.section-note {
  margin: 0 0 .3rem auto;
  font-family: var(--police-feutre);
  font-size: 1.3rem;
  color: var(--corail);
  transform: rotate(-4deg);
}


/* =========================================================
   01 — PROJETS
   ========================================================= */
.filtres { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.filtre {
  padding: .45em 1.1em;
  border: 2px solid var(--encre);
  border-radius: 999px;
  background: transparent;
  color: var(--encre);
  font-family: var(--police-ui);
  font-size: .8rem;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.filtre:hover { background: var(--soleil); }
.filtre.actif { background: var(--encre); color: var(--creme); }

.grille-projets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.projet {
  display: flex;
  flex-direction: column;
  border: 3px solid var(--encre);
  border-radius: 20px;
  overflow: hidden;
  background: var(--creme);
  box-shadow: 6px 6px 0 var(--encre);
  cursor: pointer;
  outline: none;
}
.projet.cache { display: none; }

.projet-visuel {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .14) 0 14px, transparent 14px 28px),
    var(--fond);
  overflow: hidden;
}
.projet-visuel img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.projet-visuel span {
  padding: .3em .8em;
  background: var(--creme);
  border: 2px solid var(--encre);
  font-family: var(--police-feutre);
  transform: rotate(-4deg);
}

.projet-infos {
  position: relative;
  flex: 1;
  padding: 1.1rem 1.3rem 1.3rem;
  border-top: 3px solid var(--encre);
}
.projet-num {
  position: absolute;
  top: -1.6rem;
  right: 1.1rem;
  width: 3.1rem;
  height: 3.1rem;
  display: grid;
  place-items: center;
  border: 3px solid var(--encre);
  border-radius: 50%;
  background: var(--fond);
  font-weight: 800;
  font-size: 1.15rem;
}
.projet h3 { margin: 0 3.5rem .2rem 0; font-size: 1.35rem; line-height: 1.15; }
.projet p { margin: 0; font-size: .95rem; opacity: .75; }
.projet-tag {
  display: inline-block;
  margin-top: .8rem;
  padding: .15em .75em;
  border: 1.5px solid var(--encre);
  border-radius: 999px;
  font-family: var(--police-ui);
  font-size: .7rem;
  text-transform: uppercase;
}

/* Les cartes se "collent" comme des stickers en arrivant */
.projet.apparait { transform: none; }
.projet:nth-child(odd)  { --rot: 7deg; }
.projet:nth-child(even) { --rot: -6deg; }
.projet.visible {
  transition: transform .25s, box-shadow .25s;
  animation: coller-carte .65s var(--delai, 0s) cubic-bezier(.3, 1.2, .5, 1) backwards;
}
@keyframes coller-carte {
  0%   { opacity: 0; transform: translateY(-50px) scale(1.25) rotate(var(--rot)); box-shadow: 25px 35px 30px rgba(20, 20, 20, .18); }
  55%  { opacity: 1; transform: scale(.96) rotate(calc(var(--rot) * -.15)); box-shadow: 2px 2px 0 var(--encre); }
  78%  { transform: scale(1.02); }
  100% { opacity: 1; transform: none; box-shadow: 6px 6px 0 var(--encre); }
}
.projet:hover,
.projet:focus-visible { transform: translate(-4px, -4px) rotate(-1deg); box-shadow: 11px 11px 0 var(--encre); }
.projet:hover .projet-visuel img { transform: scale(1.05); }

/* Fenêtre détaillée */
.detail {
  width: min(820px, 92vw);
  max-height: 88vh;
  padding: 2.5rem;
  border: 3px solid var(--encre);
  border-radius: 20px;
  background: var(--creme);
  color: var(--encre);
  box-shadow: 10px 10px 0 var(--corail);
}
.detail::backdrop { background: rgba(20, 20, 20, .65); }
.detail-tag { margin: 0; font-family: var(--police-ui); font-size: .8rem; text-transform: uppercase; color: var(--corail); }
.detail h3 {
  margin: .2rem 3rem 1rem 0;
  font-weight: 800;
  font-stretch: 75%;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: .95;
  text-transform: uppercase;
}
.detail img, .detail iframe { width: 100%; border-radius: 10px; margin: 1rem 0; border: 0; }
.detail iframe { aspect-ratio: 16 / 9; height: auto; }
.detail-fermer {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border: 2px solid var(--encre);
  border-radius: 50%;
  background: var(--soleil);
  font-size: 1rem;
  cursor: pointer;
}
.detail-fermer:hover { background: var(--corail); color: #fff; }


/* =========================================================
   02 — À PROPOS
   ========================================================= */
/* Grand écran : model sheet + passions à gauche, texte à droite */
.apropos {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  grid-template-areas:
    "planche  texte"
    "passions passions";
  gap: 0 3rem;
  align-items: start;
}
.planche          { grid-area: planche; }
.apropos-texte    { grid-area: texte; }
.apropos-passions { grid-area: passions; padding: 2.5rem 1rem 0; } /* laisse la place à la note du dessous */
.apropos-passions .mini-titre { margin-top: 0; }

/* La model sheet scotchée */
.planche {
  position: relative;
  margin: 3rem 1rem 4rem;
  padding: 1.2rem;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 14px 34px rgba(20, 20, 20, .14);
  rotate: -1.5deg;
}
.planche img { width: 100%; }

.scotch {
  position: absolute;
  top: -13px;
  width: 95px;
  height: 28px;
  background: rgba(255, 182, 39, .65);
}
.scotch-g { left: 8%; rotate: -8deg; }
.scotch-d { right: 8%; rotate: 6deg; }

/* Annotations au feutre */
.note {
  position: absolute;
  display: flex;
  flex-direction: column;
  font-family: var(--police-feutre);
  font-size: clamp(.85rem, 1.4vw, 1.1rem);
  line-height: 1.1;
  color: var(--corail);
  white-space: nowrap;
}
.note svg { width: 52px; height: 44px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* Animation : le texte s'écrit de gauche à droite, puis la flèche se trace.
   --n (dans le HTML) = l'ordre de la note */
.note-texte {
  clip-path: inset(-20% 100% -20% 0);
  transition: clip-path .8s ease-out;
}
.note path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset .45s ease-out;
}
.planche.visible .note-texte { clip-path: inset(-20% 0 -20% 0); transition-delay: calc(.7s + var(--n) * 1s); }
.planche.visible .note path  { stroke-dashoffset: 0; transition-delay: calc(1.45s + var(--n) * 1s); }

.note-cheveux { top: -3.4rem; left: -.5rem; rotate: -5deg; }
.note-cheveux svg { margin-left: 2.5rem; }

.note-creoles { top: -3.4rem; right: -.5rem; align-items: flex-end; rotate: 4deg; }
.note-creoles svg { margin-right: 2.5rem; }

.note-sommeil { bottom: -4.4rem; left: 22%; flex-direction: column-reverse; rotate: -2deg; }
.note-sommeil svg { margin-left: 5rem; }

.apropos-intro {
  margin: 0 0 1.8rem;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.4;
  font-weight: 500;
}

.stickers { display: flex; flex-wrap: wrap; gap: .7rem; }
.stickers li {
  padding: .35em .95em;
  border: 2.5px solid var(--encre);
  border-radius: 999px;
  background: var(--c);
  font-weight: 700;
  font-size: .95rem;
  box-shadow: 3px 3px 0 var(--encre);
  rotate: var(--r);
  transition: rotate .2s, scale .2s;
}
.stickers li:hover { rotate: 0deg; scale: 1.08; }

.mini-titre {
  margin: 2.2rem 0 .9rem;
  font-family: var(--police-ui);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}

/* Logos des logiciels + étiquette au survol (façon info-bulle de logiciel) */
.logiciels { display: flex; flex-wrap: wrap; gap: .6rem; padding-top: .3rem; }
.logiciels li {
  position: relative;
  width: 3.3rem;
  height: 3.3rem;
  display: grid;
  place-items: center;
  border: 2.5px solid var(--encre);
  border-radius: 12px;
  background: var(--f);
  box-shadow: 3px 3px 0 var(--encre);
  cursor: default;
  outline: none;
  transition: transform .2s cubic-bezier(.3, 1.6, .5, 1), box-shadow .2s;
}
/* Les logos en image : 50 % de la tuile, pour garder une marge autour */
.logiciels img { width: 50%; height: 50%; object-fit: contain; pointer-events: none; }

/* Suite Adobe : les lettres, comme les icônes officielles */
.logiciels .adobe {
  border-color: var(--c);
  color: var(--c);
  font-weight: 800;
  font-size: 1.25rem;
}

/* L'étiquette (texte pris dans data-nom) */
.logiciels li::after {
  content: attr(data-nom);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  z-index: 5;
  padding: .3em .7em;
  border-radius: 6px;
  background: var(--bleu);
  color: #fff;
  font-family: var(--police-ui);
  font-size: .72rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 6px) scale(.8);
  transition: opacity .15s, transform .2s cubic-bezier(.3, 1.6, .5, 1);
}
/* La petite pointe sous l'étiquette */
.logiciels li::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  z-index: 5;
  border: 6px solid transparent;
  border-top-color: var(--bleu);
  border-bottom: 0;
  opacity: 0;
  transform: translate(-50%, 6px);
  transition: opacity .15s, transform .2s;
}

.logiciels li:hover,
.logiciels li:focus-visible { transform: translateY(-5px) rotate(-5deg); box-shadow: 5px 6px 0 var(--encre); }
.logiciels li:hover::after,
.logiciels li:focus-visible::after { opacity: 1; transform: translate(-50%, 0) scale(1) rotate(5deg); }
.logiciels li:hover::before,
.logiciels li:focus-visible::before { opacity: 1; transform: translate(-50%, 0); }

/* Activités : petites cartes-stickers avec une illu */
/* Activités : tes illus posées librement, le nom au feutre en dessous */
.interets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem 1rem;
  padding-top: .5rem;
}
.interets li {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.interets img {
  width: 100%;
  height: 210px;
  object-fit: contain;
  transform-origin: 50% 90%;
}
.interets li:hover img { animation: gigoter .55s ease-in-out; }
.interet-nom {
  margin-top: .3rem;
  font-family: var(--police-feutre);
  font-size: 1.05rem;
  line-height: 1.1;
  color: var(--encre);
}
@keyframes gigoter {
  25% { transform: rotate(-8deg); }
  50% { transform: rotate(6deg) scale(1.05); }
  75% { transform: rotate(-3deg); }
}


/* =========================================================
   03 — PARCOURS (frise)
   ========================================================= */
.frise {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.2rem;
  padding-top: 2.5rem;
}
.frise::before {
  content: "";
  position: absolute;
  top: calc(1rem - 1.5px);
  left: 0;
  right: 0;
  border-top: 3px dashed var(--encre);
  /* la ligne se trace de gauche à droite */
  clip-path: inset(-5px 100% -5px 0);
  transition: clip-path 1.6s cubic-bezier(.6, 0, .3, 1);
}
.frise.visible::before { clip-path: inset(-5px 0 -5px 0); }

/* Chaque étape apparaît quand la ligne l'atteint */
.etape:nth-child(1) { --i: 0; } .etape:nth-child(2) { --i: 1; } .etape:nth-child(3) { --i: 2; }
.etape:nth-child(4) { --i: 3; } .etape:nth-child(5) { --i: 4; }
.frise .etape.visible { transition-delay: calc(var(--i) * .3s); }

.etape {
  position: relative;
  padding: 1.2rem 1.1rem 1.3rem;
  border: 3px solid var(--encre);
  border-radius: 16px;
  background: var(--creme);
  box-shadow: 5px 5px 0 var(--c);
}
.etape::before {
  content: "";
  position: absolute;
  top: calc(-1.5rem - 13px);
  left: 1.1rem;
  width: 20px;
  height: 20px;
  border: 3px solid var(--encre);
  border-radius: 50%;
  background: var(--c);
  transform: scale(0);
  transition: transform .45s cubic-bezier(.3, 1.8, .5, 1);
}
.frise.visible .etape::before { transform: scale(1); transition-delay: calc(.15s + var(--i) * .3s); }
.etape-date { display: block; font-weight: 800; font-stretch: 75%; font-size: 1.5rem; line-height: 1.1; }
.etape-type { display: block; margin-top: .2rem; font-family: var(--police-ui); font-size: .68rem; text-transform: uppercase; opacity: .65; }
.etape h3 { margin: .7rem 0 .3rem; font-size: 1.1rem; line-height: 1.2; }
.etape p { margin: 0; font-size: .9rem; opacity: .8; }


/* =========================================================
   04 — CONTACT
   ========================================================= */
.contact {
  position: relative;
  margin-top: 6rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 25%, #ff8a65, transparent 45%),
    radial-gradient(circle at 85% 75%, #ff4d6d, transparent 50%),
    radial-gradient(circle at 60% 10%, var(--rose), transparent 40%),
    var(--corail);
}

.defile-bande {
  width: 110%;
  margin-left: -5%;
  padding: .7rem 0;
  background: var(--encre);
  color: var(--creme);
  font-weight: 800;
  font-stretch: 75%;
  font-size: clamp(1.3rem, 2.5vw, 1.9rem);
  rotate: -2deg;
  translate: 0 1.2rem;
}
.defile-bande div { animation-duration: 30s; }
.defile-bande b { color: var(--soleil); font-weight: inherit; }

.contact-contenu {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem clamp(1.2rem, 5vw, 3rem) 8rem;
}
.section-tete-clair .section-num { color: var(--creme); }

.contact-grille {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.liens { display: grid; gap: 1.1rem; }
.lien {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .3rem 1rem;
  padding: 1rem 1.4rem;
  border: 3px solid var(--encre);
  border-radius: 18px;
  background: var(--c);
  color: var(--encre);
  text-decoration: none;
  box-shadow: 6px 6px 0 var(--encre);
  rotate: var(--r);
  transition: rotate .2s, translate .2s, box-shadow .2s;
}
.lien:hover { rotate: 0deg; translate: -3px -3px; box-shadow: 10px 10px 0 var(--encre); }
.lien-label {
  font-weight: 800;
  font-stretch: 75%;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  line-height: 1;
  text-transform: uppercase;
}
.lien-valeur { font-family: var(--police-ui); font-size: .82rem; word-break: break-all; }

.generique {
  padding: 2rem 1.8rem 1.8rem;
  border-radius: 20px;
  background: var(--encre);
  color: var(--creme);
  text-align: center;
  rotate: 1.5deg;
  box-shadow: 0 18px 40px rgba(20, 20, 20, .3);
}
.generique-titre { margin: 0 0 1.2rem; font-family: var(--police-feutre); font-size: 1.9rem; color: var(--soleil); }
.generique dl { margin: 0; }
.generique dl div { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: .35rem 0; }
.generique dt { text-align: right; font-family: var(--police-ui); font-size: .68rem; text-transform: uppercase; opacity: .6; padding-top: .3em; }
.generique dd { margin: 0; text-align: left; font-weight: 600; }
.generique img { width: 90px; margin: 1.4rem auto 0; border-radius: 50%; background: var(--creme); }

.signature {
  width: fit-content;
  margin: 4rem auto 0;
  padding: .45em 1.1em;
  border-radius: 10px;
  background: var(--encre);
  color: var(--creme);
  font-family: var(--police-ui);
  font-size: .75rem;
}


/* =========================================================
   TABLETTE & MOBILE
   ========================================================= */
@media (max-width: 980px) {
  .frise { grid-template-columns: repeat(2, 1fr); padding-top: 0; }
  .frise::before, .etape::before { display: none; }
}

@media (max-width: 860px) {
  .accueil { grid-template-columns: 1fr; padding-top: 3.5rem; text-align: left; }
  /* Sur mobile : la tête, puis la fenêtre d'export en dessous */
  .scene { width: min(420px, 100%); aspect-ratio: auto; margin-top: 2.5rem; }
  .selection { position: relative; left: 0; top: 0; width: 68%; }
  .sticker-stage { top: -1.5rem; width: 38%; }
  .export { position: relative; left: 0; bottom: 0; width: 100%; margin-top: 3rem; }
  .projet-visuel { aspect-ratio: 16 / 10; }
  .curseur { display: none; }
  .apropos { grid-template-columns: 1fr; grid-template-areas: "planche" "texte" "passions"; }
  .apropos-passions { padding: 2.5rem 0 0; }
  .interets img { height: 130px; }
  .contact-grille { grid-template-columns: 1fr; }
  .planche { margin: 3.5rem .5rem 4.5rem; }
}

@media (max-width: 560px) {
  .outils { gap: 0; padding: .3rem; }
  .outils a { flex-direction: column; gap: .15rem; padding: .45rem .55rem; font-size: .6rem; }
  .frise { grid-template-columns: 1fr; }
  .interets { grid-template-columns: repeat(2, 1fr); }
  .interets img { height: 120px; }
  .generique { padding: 1.6rem 1rem; }
  .detail { padding: 2rem 1.3rem; }
}

/* Accessibilité : si la personne a désactivé les animations */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
  .apparait { opacity: 1; transform: none; }
  .curseur { display: none; }
}
