/* =====================================================================
   OPHELY GABRIEL - PORTFOLIO v3
   Toute l'apparence du site est ici.

   SOMMAIRE (cherche le numero avec Cmd+F)
    1. Variables          9. Index des projets
    2. Base              10. A propos
    3. Langues FR / EN   11. Contact
    4. Grain             12. Pied de page
    5. Curseur-etoile    13. Page projet
    6. Navigation        14. Galerie photo
    7. Accueil (hero)    15. Page 404 (lettres decoupees)
    8. Pluie d'etoiles   16. Textes provisoires
                         16b. Hierarchie texte / boutons
                         17. Mobile
                         18. Sans animation
   ===================================================================== */


/* ---------------------------------------------------------------------
   0. POLICES (hebergees sur ton site, dans assets/fonts)
   On ne passe plus par Google : les visiteurs ne sont pas traces, et
   le site charge plus vite. Toutes ces polices sont sous licence libre (OFL).
   --------------------------------------------------------------------- */
@font-face { font-family: "Archivo"; src: url("../assets/fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Familjen Grotesk"; src: url("../assets/fonts/familjen-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Familjen Grotesk"; src: url("../assets/fonts/familjen-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
/* seulement pour la page 404 (lettres decoupees) */
@font-face { font-family: "Bodoni Moda"; src: url("../assets/fonts/bodoni-900-italique.woff2") format("woff2"); font-weight: 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Unbounded"; src: url("../assets/fonts/unbounded-900.woff2") format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("../assets/fonts/caveat-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }


/* ---------------------------------------------------------------------
   1. VARIABLES
   Change une valeur ici, elle change partout sur le site.
   --------------------------------------------------------------------- */
:root {
  /* couleurs (voir DA.md) */
  --fond: #FF2D95;          /* magenta */
  --encre: #270B1E;         /* aubergine, jamais de noir pur */
  --accent: #C6F05A;        /* citron vert */

  /* polices */
  --affiche: "Archivo", "Arial Narrow", sans-serif;     /* nom et titres */
  --texte: "Familjen Grotesk", system-ui, sans-serif;   /* tout le reste */

  /* espaces */
  --marge: clamp(20px, 4vw, 56px);      /* marge gauche/droite de la page */
  --section: clamp(64px, 8vw, 112px);   /* espace entre deux sections */
  --sous-section: clamp(44px, 5vw, 72px); /* espace a l'interieur d'une section */

  /* la forme d'etoile, reutilisee partout avec clip-path */
  --etoile: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  /* l'etoile "eclatee" a 12 branches : assez de place au centre pour du texte */
  --eclat: polygon(50.0% 0.0%, 60.6% 10.4%, 75.0% 6.7%, 79.0% 21.0%, 93.3% 25.0%, 89.6% 39.4%, 100.0% 50.0%, 89.6% 60.6%, 93.3% 75.0%, 79.0% 79.0%, 75.0% 93.3%, 60.6% 89.6%, 50.0% 100.0%, 39.4% 89.6%, 25.0% 93.3%, 21.0% 79.0%, 6.7% 75.0%, 10.4% 60.6%, 0.0% 50.0%, 10.4% 39.4%, 6.7% 25.0%, 21.0% 21.0%, 25.0% 6.7%, 39.4% 10.4%);
}


/* ---------------------------------------------------------------------
   2. BASE
   --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--texte); font-size: 17px; line-height: 1.5;
  color: var(--encre); background: var(--fond);
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--encre); color: var(--fond); }

/* lien "aller au contenu" pour la navigation au clavier :
   invisible tant qu'on n'appuie pas sur Tab */
.aller-contenu { position: absolute; left: -9999px; top: 8px; z-index: 2000; background: var(--encre); color: var(--fond); padding: 8px 14px; }
.aller-contenu:focus { left: 8px; }

/* contour visible quand on navigue au clavier */
:focus-visible { outline: 3px solid var(--encre); outline-offset: 3px; }

/* le grand titre "affiche", reutilise dans toutes les sections */
.titre-affiche {
  font-family: var(--affiche); font-weight: 900; font-stretch: 62%;
  text-transform: uppercase; line-height: .85; letter-spacing: -.005em;
}

/* HIERARCHIE DES TITRES
   1. Le nom (accueil)                         .nom
   2. Les titres de section : Projets, A propos, Parlons-en
      -> tous la meme taille                   .titre-section
   3. Les sous-titres : Parcours, Competences  h3
   4. Les etiquettes : petites capitales       .etiquette-section */
.titre-section { font-size: clamp(56px, 11vw, 170px); margin-bottom: 28px; }
/* quand on clique sur un lien du menu ou sur "defiler", la page s'arrete
   avec le titre de la section en haut, avec un peu d'air au-dessus */
.titre-section { scroll-margin-top: 32px; }


/* ---------------------------------------------------------------------
   3. LANGUES FR / EN
   Chaque texte existe en double : <span lang="fr"> et <span lang="en">.
   La balise <html data-langue="fr"> dit lequel afficher.
   Le bouton FR/EN change cet attribut (voir js/langue.js).
   --------------------------------------------------------------------- */
html[data-langue="fr"] body [lang="en"],
html[data-langue="en"] body [lang="fr"] { display: none !important; }


/* ---------------------------------------------------------------------
   4. GRAIN
   Une image de bruit posee sur toute la page, presque transparente.
   --------------------------------------------------------------------- */
/* Le grain fait partie du FOND de la page (comme un papier) au lieu
   d'etre une couche posee par-dessus tout le site : le navigateur n'a
   plus a le recalculer chaque fois que quelque chose bouge. */
body {
  background-color: var(--fond);
  background-image: url("../assets/grain.png");
  background-size: 180px 180px;
}


/* ---------------------------------------------------------------------
   5. CURSEUR-ETOILE
   Une etoile citron vert qui suit la souris en tournant doucement
   (js/curseur.js). Sur un element avec data-bulle="...", elle devient
   une grande etoile eclatee, s'arrete de tourner et affiche le texte.
   --------------------------------------------------------------------- */
.bulle {
  /* la boite ne fait que suivre la souris (deplacee par js/curseur.js) */
  position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: none;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  opacity: 0;
  will-change: transform;   /* son propre calque : il bouge sans faire redessiner la page */
  transition: width .3s cubic-bezier(.3,1.6,.5,1), height .3s cubic-bezier(.3,1.6,.5,1), opacity .2s;
}
/* deux etoiles empilees : une aubergine (le contour) et une citron
   vert un peu plus petite par-dessus. Ce contour la distingue des
   etoiles qui tombent. Ce sont elles qui tournent, pas la boite :
   sinon la rotation emporterait tout le curseur avec elle. */
.bulle::before, .bulle::after {
  content: ""; position: absolute; inset: 0;
  background: var(--encre); clip-path: var(--etoile);
  animation: tourner 7s linear infinite;
}
.bulle::after { inset: 4px; background: var(--accent); }
@keyframes tourner { to { rotate: 360deg; } }
.bulle span {
  position: relative; z-index: 1; opacity: 0; transition: opacity .2s; padding: 0 10px;
  font: 600 11px/1.05 var(--texte); text-align: center; color: var(--encre);
}
.bulle.parle { width: 76px; height: 76px; }
.bulle.parle::before, .bulle.parle::after { clip-path: var(--eclat); animation: none; }
.bulle.parle::after { inset: 3px; }
.bulle.parle span { opacity: 1; }
/* on cache la fleche de la souris seulement quand la bulle est active */
.avec-bulle, .avec-bulle a, .avec-bulle button { cursor: none; }
.avec-bulle textarea, .avec-bulle input { cursor: text; }
.avec-bulle canvas { cursor: crosshair; }
/* pas de bulle sur telephone et tablette */
@media not ((hover: hover) and (pointer: fine)) { .bulle { display: none; } }


/* ---------------------------------------------------------------------
   6. NAVIGATION
   --------------------------------------------------------------------- */
.nav {
  position: relative; z-index: 20;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px var(--marge);
  font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
}
.nav a { text-decoration: none; display: inline-block; padding: 10px 0; }   /* zone cliquable assez grande pour un doigt */
.nav-logo { font-weight: 600; }
.nav ul { display: flex; align-items: center; gap: clamp(14px, 2.5vw, 32px); list-style: none; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }




/* ---------------------------------------------------------------------
   7. ACCUEIL (HERO)
   Le premier ecran (.ecran) fait toute la hauteur de la fenetre,
   moins la ligne "Projets / defiler" : le premier projet commence
   donc juste sous le bord de l'ecran, et on donne envie de scroller.

   Le nom remplit toute la largeur : "GABRIEL" mesure 3,2 fois la
   taille de la police, donc taille = largeur disponible / 3,25.
   Mais il doit aussi tenir en hauteur : on garde la plus petite
   des deux valeurs (min).
   --------------------------------------------------------------------- */
.accueil { position: relative; overflow: hidden; }
.ecran { min-height: calc(100svh - 90px); display: flex; flex-direction: column; }
.hero { position: relative; z-index: 3; flex: 1; display: flex; flex-direction: column; padding: 2svh var(--marge) 0; pointer-events: none; }
.hero a, .hero .badge { pointer-events: auto; }
/* --taille-nom : la taille du nom. "GABRIEL" mesure 3,2 fois cette taille.
   Sur ordinateur, on garde environ un quart de la largeur libre a gauche
   de GABRIEL pour y poser le metier (d'ou le / 3.9). */
.nom-bloc { --taille-nom: max(56px, min(calc((100vw - 2 * var(--marge)) / 3.9), calc((100svh - 360px) / 1.7))); position: relative; }
.nom { font-size: var(--taille-nom); }
.nom span { display: block; }
.nom span:last-child { text-align: right; }

.hero-bas { display: flex; justify-content: flex-end; align-items: end; flex-wrap: wrap; gap: 16px; margin-top: auto; padding: 3svh 0 72px; }  /* 72px en bas : la place de la dune */
.metier { font-size: clamp(18px, 1.6vw, 24px); font-weight: 600; line-height: 1.25; }
@media (min-width: 801px) {
  .nom-bloc .metier {
    position: absolute; left: 0;
    bottom: calc(var(--taille-nom) * .085);   /* = le bas des lettres de GABRIEL */
    /* la place libre a gauche de GABRIEL, moins une petite marge */
    max-width: calc(100% - 3.2 * var(--taille-nom) - 32px);
  }
}
.metier small { display: block; font-size: 15px; font-weight: 400; }
.badge {
  /* une INFORMATION, pas un bouton : coins presque droits, pas de contour */
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: var(--encre);
  padding: 7px 12px; border-radius: 3px; font-size: 14px; font-weight: 600;
}
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--encre); }


/* ---------------------------------------------------------------------
   8. PLUIE D'ETOILES
   Les etoiles sont creees par js/etoiles.js. Elles sont SOUS le texte
   (z-index 2 < 3), donc le texte reste toujours lisible.
   --------------------------------------------------------------------- */
.chute {
  position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none;
  width: var(--t); height: var(--t); background: var(--c);
  clip-path: var(--etoile);
}
.chute.balayee { transition: transform .9s ease-in, opacity .9s; opacity: 0; }
/* la toile ou sont peintes les etoiles posees (js/etoiles.js) */
.dune { position: absolute; left: 0; width: 100%; z-index: 2; pointer-events: none; }
.couche-etoiles { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; contain: layout style; }
.dune.balayee { transition: transform .9s ease-in, opacity .9s; transform: translateY(160px); opacity: 0; }



/* ---------------------------------------------------------------------
   9. INDEX DES PROJETS
   --------------------------------------------------------------------- */
.projets { position: relative; z-index: 3; padding: 0 var(--marge); }
/* la ligne "Projets / defiler / ranger" : les etoiles se posent sur son filet du haut */
.projets-tete { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; height: 88px; border-top: 2px solid var(--encre); }
.projets-tete .defiler { grid-column: 2; }
.projets-tete .ranger { grid-column: 3; justify-self: end; }
/* de l'air entre la ligne "defiler" et le titre "Projets" + la liste */
.projets > .titre-section { margin-top: clamp(40px, 6vw, 80px); }


.etiquette-section { display: block; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; }
.index { list-style: none; }
.index a {
  display: grid; grid-template-columns: 64px 1fr auto; align-items: baseline; gap: 16px;
  padding: 16px 0; border-top: 2px solid var(--encre); text-decoration: none;
  transition: padding .3s;
}
.index li:last-child a { border-bottom: 2px solid var(--encre); }
.index a:hover, .index a:focus-visible { padding-left: 20px; }
.index .num { font-weight: 600; font-size: 15px; }
.index .titre { font-size: clamp(34px, 6vw, 84px); }
.index .type { font-size: 14px; font-weight: 600; text-align: right; }



/* ---------------------------------------------------------------------
   10. A PROPOS
   --------------------------------------------------------------------- */
.a-propos { padding: var(--section) var(--marge) 0; }

.a-propos-grille { display: grid; grid-template-columns: repeat(12, 1fr); gap: 32px 24px; align-items: start; }
.portrait { grid-column: 1 / 5; position: relative; }
.portrait img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 4px; }
.a-propos-texte { grid-column: 6 / 13; }
.a-propos-texte > p { font-size: clamp(18px, 1.7vw, 24px); line-height: 1.4; margin-bottom: 18px; max-width: 34em; }

.infos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; padding-top: 20px; border-top: 2px solid var(--encre); }
.infos dt { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.infos dd { font-size: 16px; }

.parcours, .savoir-faire { margin-top: var(--sous-section); }
.parcours h3, .savoir-faire h3 { font-size: clamp(32px, 5.5vw, 80px); overflow-wrap: break-word; margin-bottom: 16px; }
.parcours ol { list-style: none; }
.parcours li { display: grid; grid-template-columns: 150px 1fr 1.3fr; gap: 16px; padding: 14px 0; border-top: 2px solid var(--encre); }
.parcours .lieu { display: block; font-size: 14px; }
.parcours li:last-child { border-bottom: 2px solid var(--encre); }
.parcours .annees { font-weight: 600; }
.parcours strong { font-weight: 600; }

.savoir-faire ul { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
/* HORS ECRAN : une ligne de mots repartis sur toute la largeur
   des colonnes de competences (space-between), juste en dessous. */
.interets {
  list-style: none; display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px 16px; margin-top: 36px;
}
.interets li { font-size: clamp(16px, 1.4vw, 19px); font-weight: 600; white-space: nowrap; }
.interets .sep { width: .6em; height: .6em; background: var(--encre); clip-path: var(--etoile); }
.savoir-faire h4 { font-size: 15px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 2px solid var(--encre); }
.savoir-faire p { font-size: 16px; line-height: 1.6; }


/* ---------------------------------------------------------------------
   11. CONTACT
   --------------------------------------------------------------------- */
.contact { padding: var(--section) var(--marge); }
/* "Contact" dans le menu : la page descend jusqu'en bas (c'est la derniere section) */

.contact-intro { font-size: clamp(18px, 1.7vw, 24px); max-width: 30em; margin: 0 0 24px; }
.contact-liens { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; width: fit-content; max-width: 100%; }
.gros-lien {
  font-family: var(--affiche); font-weight: 900; font-stretch: 75%;
  font-size: clamp(28px, 4.5vw, 64px); text-transform: lowercase; text-decoration: none;
  border-bottom: 3px solid var(--encre); line-height: 1.1;
}



/* ---------------------------------------------------------------------
   11b. LA CONSTELLATION (js/constellation.js)
   Les etoiles des visiteurs sont semees dans toute la section Contact,
   derriere le texte, sans jamais le toucher.
   --------------------------------------------------------------------- */
.contact { position: relative; min-height: 78svh; }
.contact > *:not(.ciel-contact):not(dialog):not(.bulle-mot):not(.ajouter-etoile) { position: relative; z-index: 2; }
.ciel-contact { position: absolute; inset: 0; z-index: 1; }
.contact-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px 32px; flex-wrap: wrap; }
/* la ligne du titre laisse passer les clics vers les etoiles qui sont entre le titre et le bouton */
.contact-tete { pointer-events: none; }
.contact-tete .evite { pointer-events: auto; }
.contact-tete .titre-section { margin-bottom: 20px; }
.contact { padding-bottom: calc(var(--section) + 70px); }   /* de la place pour le bouton en bas */
.contact > .ajouter-etoile { z-index: 2;
  position: absolute; right: var(--marge); bottom: 32px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px; text-align: right; max-width: 260px;
}
.ciel-vide-texte, .ciel-aide { font-size: 13px; }
.ciel-vide-texte { display: none; }
.contact.ciel-vide .ciel-vide-texte { display: block; }
.contact.ciel-vide .ciel-aide { display: none; }
.ciel-aide.doigt { display: none; }
@media not ((hover: hover) and (pointer: fine)) { .ciel-aide.souris { display: none; } .contact:not(.ciel-vide) .ciel-aide.doigt { display: block; } }

/* une etoile de visiteur : un bouton en forme d'etoile, oriente au hasard */
.astre {
  position: absolute; width: var(--t); height: var(--t); padding: 0; border: 0;
  background: var(--c); clip-path: var(--etoile); translate: -50% -50%; rotate: var(--angle);
  cursor: pointer; transition: scale .3s cubic-bezier(.3,1.6,.5,1);
}
.astre:hover, .astre:focus-visible, .astre.ouvert { scale: 1.5; }
.astre:focus-visible { outline: none; }
.astre.nouvelle { animation: nait .7s cubic-bezier(.3,1.6,.5,1); }
@keyframes nait { from { scale: 0; rotate: calc(var(--angle) - 180deg); } }

/* la bulle qui montre le mot */
.bulle-mot {
  position: absolute; z-index: 6; width: 240px; padding: 14px 16px;
  background: #FFF4E8; border: 2px solid var(--encre); border-radius: 4px;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.bulle-mot.visible { opacity: 1; }
.bulle-mot p { font: 600 18px/1.3 var(--texte); overflow-wrap: anywhere; }
.bulle-mot img { display: block; width: 100%; height: auto; border-radius: 2px; }
.bulle-mot time { display: block; margin-top: 8px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }

/* la fenetre pour ecrire ou dessiner */
.fenetre-mot {
  margin: auto; width: min(420px, 92vw); padding: 20px; border: 2px solid var(--encre); border-radius: 4px;   /* fenetre plus compacte : la zone de dessin fait 360 px de large */
  background: var(--fond); color: var(--encre);
}
.fenetre-mot::backdrop { background: rgba(39, 11, 30, .7); }
.fenetre-mot form { display: grid; gap: 14px; }
.fenetre-tete, .onglets, .outils-dessin { display: flex; align-items: center; gap: 10px; }
.fenetre-tete { justify-content: space-between; }
.onglets .bouton[aria-pressed="true"], .pastille[aria-pressed="true"] { background: var(--encre); color: var(--fond); }
.fenetre-mot textarea {
  width: 100%; resize: none; padding: 12px; border: 2px solid var(--encre); border-radius: 4px;
  background: #FFF4E8; color: var(--encre); font: 600 18px/1.35 var(--texte);
}
.compteur { display: block; text-align: right; font-size: 13px; margin-top: 4px; }
.fenetre-mot canvas { width: 100%; height: auto; border: 2px solid var(--encre); border-radius: 4px; touch-action: none; cursor: crosshair; }
.pastille { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--encre); background: var(--c); cursor: pointer; }
.pastille[aria-pressed="true"] { outline: 3px solid var(--encre); outline-offset: 2px; background: var(--c); }
.outils-dessin .effacer { margin-left: auto; }
.fenetre-mot[data-mode="mot"] .zone-dessin, .fenetre-mot[data-mode="dessin"] .zone-mot { display: none; }
.note-tableau { font-size: 13px; }
.message { font-weight: 600; font-size: 14px; min-height: 1em; }
.fenetre-mot .bouton.plein { justify-self: start; }

/* ---------------------------------------------------------------------
   12. PIED DE PAGE
   --------------------------------------------------------------------- */
.pied {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding: 24px var(--marge); border-top: 2px solid var(--encre);
  font-size: 14px;
}


/* ---------------------------------------------------------------------
   13. PAGE PROJET
   --------------------------------------------------------------------- */
.projet-tete { padding: 4svh var(--marge) 0; }
.projet-tete .etiquette-section { margin-bottom: 16px; }
.projet-tete .titre-affiche { font-size: clamp(40px, 12vw, 200px); overflow-wrap: break-word; }
.accroche { font-size: clamp(20px, 2vw, 28px); font-weight: 600; line-height: 1.3; max-width: 26em; margin-top: 24px; }

.fiche { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 28px var(--marge) 0; padding: 16px 0; border-top: 2px solid var(--encre); border-bottom: 2px solid var(--encre); }
.fiche dt { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.fiche dd { font-size: 16px; }

.media-principal { margin: 32px var(--marge) 0; }
.media-principal video, .media-principal img { width: 100%; border-radius: 4px; background: var(--encre); }
.media-principal.vertical { display: flex; justify-content: center; }
.media-principal.vertical video, .media-principal.vertical img { width: auto; max-height: 82svh; }

.projet-corps { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; padding: var(--sous-section) var(--marge) 0; }
.bloc { grid-column: 4 / 11; margin-bottom: 36px; }
.bloc h2 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--encre); }
.bloc p { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; margin-bottom: 14px; }

/* variante 2 colonnes (page Story Docks) : la video a gauche,
   les textes a droite. La video reste visible quand on fait defiler
   les textes (position: sticky). */
.projet-deux { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(24px, 4vw, 64px); align-items: start; padding: 32px var(--marge) var(--sous-section); }
.projet-deux-media { position: sticky; top: 24px; }
.projet-deux-media video { width: auto; max-width: 100%; height: auto; max-height: 86svh; border-radius: 4px; }
.projet-deux .bloc { grid-column: auto; }
.projet-deux .bloc:last-child { margin-bottom: 0; }

.galerie-projet { display: grid; grid-template-columns: repeat(var(--colonnes, 3), 1fr); gap: 20px; margin: 8px var(--marge) var(--sous-section); align-items: start; }
.galerie-projet img, .galerie-projet video { width: 100%; border-radius: 4px; background: var(--encre); }

/* projet suivant : une grande ligne comme dans l'index */
.suivant { display: block; margin: 0 var(--marge); padding: 24px 0 40px; border-top: 2px solid var(--encre); text-decoration: none; }
.suivant small { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.suivant .titre-affiche { display: block; font-size: clamp(38px, 9vw, 140px); transition: padding .3s; }
.suivant:hover .titre-affiche { padding-left: 24px; }

.lien-externe { font-weight: 600; text-underline-offset: 4px; }


/* ---------------------------------------------------------------------
   14. GALERIE PHOTO
   Colonnes CSS : les photos gardent leur format d'origine
   et se rangent comme un mur, sans etre recadrees.
   --------------------------------------------------------------------- */
.mur { columns: 3 260px; column-gap: 20px; margin: 32px var(--marge) var(--sous-section); }
/* invisible le temps que les photos soient melangees (js/galerie.js) */
.js .mur { opacity: 0; transition: opacity .4s; }
.js .mur.pret { opacity: 1; }
.mur button { display: block; width: 100%; margin-bottom: 20px; padding: 0; border: 0; background: none; break-inside: avoid; cursor: zoom-in; }
.mur img { width: 100%; border-radius: 4px; transition: transform .4s cubic-bezier(.3,1.5,.5,1); }
.mur button:hover img { transform: rotate(-1.5deg) scale(1.02); }

/* la visionneuse plein ecran (js/galerie.js) */
.visionneuse { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.visionneuse::backdrop { background: rgba(39, 11, 30, .92); }
.visionneuse[open] { display: grid; place-items: center; }
.visionneuse img { max-width: 92vw; max-height: 86vh; width: auto; height: auto; border-radius: 4px; }



/* ---------------------------------------------------------------------
   15. PAGE 404 - LETTRES DECOUPEES
   Chaque lettre recoit au hasard une police et parfois un fond
   (js/lettres.js). Le melange change a chaque visite.
   --------------------------------------------------------------------- */
.page-404 { min-height: 100svh; display: flex; flex-direction: column; }
.page-404 main { flex: 1; display: grid; place-content: center; text-align: center; padding: 40px var(--marge); }
.decoupe { font-size: clamp(64px, min(18vw, 26svh), 260px); line-height: 1.05; }
.decoupe .lettre { display: inline-block; padding: 0 .04em; margin: 0 .01em; }
.decoupe .f1 { font-family: var(--affiche); font-weight: 900; font-stretch: 62%; }
.decoupe .f2 { font-family: "Bodoni Moda", serif; font-style: italic; font-weight: 900; }
.decoupe .f3 { font-family: "Unbounded", sans-serif; font-weight: 900; font-size: .78em; }
.decoupe .f4 { font-family: "Caveat", cursive; font-weight: 700; font-size: 1.1em; }
.decoupe .fond-blanc { background: #FFFFFF; }
.decoupe .fond-encre { background: var(--encre); color: #FFC2E0; }
.decoupe .fond-citron { background: var(--accent); }
.page-404 p { font-size: clamp(18px, 2vw, 26px); font-weight: 600; margin: 24px 0; }


/* ---------------------------------------------------------------------
   16. TEXTES PROVISOIRES
   Tout ce qui porte la classe "a-ecrire" attend ton vrai texte.
   Une petite etiquette le signale. Quand tu as ecrit ton texte,
   enleve simplement class="a-ecrire".
   --------------------------------------------------------------------- */
.a-ecrire { position: relative; }
.a-ecrire::before {
  content: "texte provisoire"; display: inline-block; margin-right: 8px;
  font: 600 11px/1 var(--texte); text-transform: uppercase; letter-spacing: .06em;
  background: var(--encre); color: var(--accent); padding: 4px 6px; border-radius: 3px;
  vertical-align: middle;
}
html[data-langue="en"] .a-ecrire::before { content: "placeholder text"; }


/* =====================================================================
   HIERARCHIE DES TEXTES ET DES ELEMENTS CLIQUABLES
   Une seule regle pour tout le site, pour qu'on reconnaisse
   au premier coup d'oeil ce qui se lit et ce qui se clique :

   SE LIT (jamais de cadre)
   - Etiquette : petites capitales          -> .etiquette-section, dt, h4
   - Information : surlignage citron, coins droits -> .badge

   SE CLIQUE
   - Lien texte : souligne                 -> liens dans les phrases, e-mail
   - Bouton : pastille arrondie a contour  -> .bouton
   (exception : "defiler" est une indication, sans cadre)
   - Bouton principal : pastille pleine    -> .bouton.plein
   Tous les boutons ont la meme taille et la meme typo (celle des
   etiquettes), et deviennent citron vert au survol.
   ===================================================================== */
.bouton, .langue, .ranger, .visionneuse button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 13px/1 var(--texte); text-transform: uppercase; letter-spacing: .05em;
  text-decoration: none; white-space: nowrap;
  padding: 10px 16px; min-height: 38px;
  border: 2px solid var(--encre); border-radius: 40px;
  background: transparent; color: var(--encre);
  cursor: pointer; transition: background .2s, color .2s;
}
.bouton.plein { background: var(--encre); color: var(--fond); }
.bouton:hover, .langue:hover, .ranger:hover { background: var(--accent); color: var(--encre); }

/* FR / EN : la langue active est pleine, l'autre est pale */
.langue { padding: 8px 14px; min-height: 34px; }
.langue b { font-weight: 600; opacity: .4; }
html[data-langue="fr"] .langue .fr,
html[data-langue="en"] .langue .en { opacity: 1; }

/* "defiler" : une indication plutot qu'un bouton. Le mot en etiquette,
   et une petite etoile dessous qui rebondit pour inviter a scroller. */
.defiler {
  position: relative; z-index: 6; display: inline-flex; flex-direction: column; align-items: center; gap: 8px;
  font: 600 13px/1 var(--texte); text-transform: uppercase; letter-spacing: .06em; text-decoration: none;
}
.defiler::after {
  content: ""; width: 14px; height: 14px; background: var(--encre); clip-path: var(--etoile);
  animation: rebond 1.4s ease-in-out infinite;
}
@keyframes rebond { 0%, 100% { translate: 0 -3px; } 50% { translate: 0 6px; } }

/* "ranger les etoiles" : n'apparait qu'au-dela de 30 etoiles */
.ranger { position: relative; z-index: 6; }
.ranger:not(.visible) { display: none; }   /* cache tant qu il y a moins de 30 etoiles */

/* la visionneuse photo est sur fond sombre : boutons citron vert */
.visionneuse button { position: fixed; background: var(--accent); border-color: var(--accent); }
.visionneuse .fermer { top: 20px; right: 20px; }
.visionneuse .precedent { left: 20px; top: 50%; translate: 0 -50%; }
.visionneuse .suivante { right: 20px; top: 50%; translate: 0 -50%; }

/* les etiquettes : toujours la meme typo, jamais de cadre */
.etiquette-section, .infos dt, .fiche dt, .savoir-faire h4, .bloc h2, .suivant small {
  font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; line-height: 1.3;
}


/* ---------------------------------------------------------------------
   17. MOBILE (moins de 800 px de large)
   --------------------------------------------------------------------- */
@media (max-width: 800px) {
  body { font-size: 16px; }
  /* sur telephone, le nom et le metier se regroupent au milieu de l'ecran */
  .hero { justify-content: center; padding-top: 0; }
  .nom-bloc { --taille-nom: calc((100vw - 2 * var(--marge)) / 3.25); }
  .metier { margin-top: 28px; }
  .hero-bas { margin-top: 0; padding: 28px 0 0; flex-direction: column; align-items: flex-start; }
  .hero { padding-bottom: 56px; }
  .nav { flex-wrap: wrap; }
  .nav ul { gap: 14px; flex-wrap: wrap; }
  .nav .cache-mobile { display: none; }
  .index a { grid-template-columns: 36px 1fr; }
  .index .type { display: none; }
  .portrait { grid-column: 3 / 11; }
  .a-propos-texte { grid-column: 1 / -1; }
  .infos { grid-template-columns: 1fr 1fr; }
  .parcours li { grid-template-columns: 1fr; gap: 4px; }
  .a-propos-grille { gap: 24px; }
  .interets { justify-content: flex-start; gap: 8px 22px; }
  .interets .sep { display: none; }   /* sur telephone, la ligne passe a la ligne : pas d etoile en debut de ligne */
  .savoir-faire ul { grid-template-columns: 1fr 1fr; }
  .fiche { grid-template-columns: 1fr 1fr; }
  .bloc { grid-column: 1 / -1; }
  .projet-deux { grid-template-columns: 1fr; }
  .contact { min-height: 92svh; }
  .projet-deux-media { position: static; display: flex; justify-content: center; }
  .projet-deux-media video { width: auto; max-width: 100%; max-height: 80svh; }
  .galerie-projet { grid-template-columns: 1fr 1fr; }
  .mur { columns: 2; column-gap: 10px; }
  .mur button { margin-bottom: 10px; }
}
@media (max-width: 480px) {
  /* petite navigation : tout tient sur une ligne. Le bouton de langue
     n'affiche que l'AUTRE langue (EN quand on est en francais). */
  .nav { flex-wrap: nowrap; gap: 10px; font-size: 12px; letter-spacing: .02em; }
  .nav ul { flex-wrap: nowrap; gap: 11px; }
  .langue { padding: 6px 10px; min-height: 30px; font-size: 12px; }
  .langue .barre,
  html[data-langue="fr"] .langue .fr,
  html[data-langue="en"] .langue .en { display: none; }
  .langue b { opacity: 1; }
  .savoir-faire ul, .infos { grid-template-columns: 1fr; }
  .galerie-projet { gap: 10px; }
}


/* ---------------------------------------------------------------------
   18. SANS ANIMATION
   Si la personne a demande a son ordinateur de reduire les animations,
   tout reste visible mais rien ne bouge.
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .bulle, .chute, .ranger { display: none !important; }
  .avec-bulle, .avec-bulle a, .avec-bulle button { cursor: auto; }
}
