/* =========================================================
   Page d'accueil — Xavier Smadja
   Direction : le plan technique. Calque gris clair, encre bleu-nuit,
   un seul accent noir, une seule famille (Archivo) jouée en largeur.
   ========================================================= */

/* Police Archivo hébergée sur le site (aucune requête vers Google) */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("../assets/fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("../assets/fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Police Archivo hébergée sur le site (aucune requête vers Google) */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("../assets/fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("../assets/fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --papier: #ececec;
  --papier-clair: #f8f8f8;
  --encre: #0e0e0e;
  --encre-douce: #555555;
  --trait: #cfcfcf;
  --accent: var(--encre);
  --accent-fonce: #2b2b2b;

  --police: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --marge: clamp(1.25rem, 5vw, 4rem);
  --largeur: 1200px;
  --section: clamp(4rem, 9vw, 7.5rem);
  --rayon: 3px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
  -webkit-text-size-adjust: 100%;
}

html, body { overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--police);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 100%;
  color: var(--encre);
  background: var(--papier);
  -webkit-font-smoothing: antialiased;
}

body.fiche-ouverte { overflow: hidden; }

img, video { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; }

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.1;
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; max-width: 68ch; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.lien-evitement {
  position: absolute;
  left: 1rem; top: -3rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--encre);
  color: var(--papier-clair);
}
.lien-evitement:focus { top: 1rem; }

/* ---------- Boutons ---------- */
.bouton {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  border: 1.5px solid currentColor;
  border-radius: var(--rayon);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  font-stretch: 108%;
  text-decoration: none;
  color: var(--encre);
  background: transparent;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
@media (hover: hover) and (pointer: fine) {
  .bouton:hover { background: var(--encre); color: var(--papier-clair); border-color: var(--encre); }
}

.bouton-plein { background: var(--encre); border-color: var(--encre); color: var(--papier-clair); }
@media (hover: hover) and (pointer: fine) {
  .bouton-plein:hover { background: var(--accent-fonce); border-color: var(--accent-fonce); color: #fff; }
}
.bouton:disabled { opacity: 0.6; cursor: progress; }

/* ---------- Barre de navigation ---------- */
.barre {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem var(--marge);
  background: var(--papier);
  transition: box-shadow 0.25s;
}
/* La barre garde exactement la même taille : seul le trait du bas apparaît (rien ne bouge au premier défilement) */
.barre.defilee { box-shadow: 0 1px 0 var(--trait); }

.barre-nom {
  font-weight: 750;
  font-stretch: 125%;
  font-size: 1.05rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.menu { display: flex; align-items: center; gap: clamp(0.75rem, 2vw, 1.75rem); }
.menu a {
  font-size: 0.95rem;
  text-decoration: none;
  padding-block: 0.25rem;
  border-bottom: 1.5px solid transparent;
}
@media (hover: hover) and (pointer: fine) {
  .menu a:hover { border-bottom-color: var(--accent); }
}
.menu .menu-langue {
  padding: 0.3rem 0.7rem;
  border: 1.5px solid var(--trait);
  border-radius: var(--rayon);
}
@media (hover: hover) and (pointer: fine) {
  .menu .menu-langue:hover { border-color: var(--encre); }
}

.barre-menu {
  display: none;
  width: 2.75rem; height: 2.75rem;
  border: 0; padding: 0;
  background: none;
  color: var(--encre);
  cursor: pointer;
}
.barre-menu-icone,
.barre-menu-icone::before,
.barre-menu-icone::after {
  display: block;
  width: 1.5rem; height: 2px;
  margin: auto;
  background: currentColor;
  transition: transform 0.2s, opacity 0.2s;
}
.barre-menu-icone { position: relative; }
.barre-menu-icone::before,
.barre-menu-icone::after { content: ""; position: absolute; left: 0; }
.barre-menu-icone::before { top: -7px; }
.barre-menu-icone::after { top: 7px; }
.barre.ouverte .barre-menu-icone { background: transparent; }
.barre.ouverte .barre-menu-icone::before { transform: translateY(7px) rotate(45deg); }
.barre.ouverte .barre-menu-icone::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Sections ---------- */
.section {
  padding: var(--section) max(var(--marge), (100% - var(--largeur)) / 2);
}

.entete {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem 3rem;
  align-items: end;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  padding-bottom: 1.25rem;
  border-bottom: 1.5px solid var(--encre);
}
.entete h2 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
.entete p { margin: 0; color: var(--encre-douce); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: stretch;
}

.hero-texte {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 7rem var(--marge) 4rem max(var(--marge), (100vw - var(--largeur)) / 2);
}

.hero-salut {
  margin: 0 0 0.5rem;
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  color: var(--encre-douce);
}

.hero-nom {
  font-size: clamp(3.4rem, 10.5vw, 9.5rem);
  font-weight: 800;
  font-stretch: 125%;
  line-height: 0.88;
  letter-spacing: -0.035em;
}
.hero-nom .ligne { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.hero-nom .ligne > span { display: block; }

/* La ligne de cote : comme sur un plan, elle mesure le nom */
.hero-cote {
  position: relative;
  align-self: stretch;
  max-width: none;
  margin: 1.6rem 0 2.5rem;
  display: flex;
  justify-content: center;
  color: var(--accent);
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  font-weight: 500;
}
.hero-cote::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  border-top: 1.5px solid currentColor;
}
.hero-cote::after {
  content: "";
  position: absolute;
  inset: calc(50% - 0.6rem) 0 auto 0;
  height: 1.2rem;
  border-inline: 1.5px solid currentColor;
}
.hero-cote span {
  position: relative;
  z-index: 1;
  padding: 0 0.9rem;
  background: var(--papier);
}
.hero-bloc { display: inline-flex; flex-direction: column; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero-photo {
  position: relative;
  margin-top: 4.25rem;
  overflow: hidden;
  background: var(--encre);
}
.hero-photo img,
.hero-photo picture {
  display: block;
  width: 100%;
  height: 100%;
}
.hero-photo img {
  object-fit: cover;
  object-position: 72% 30%;
}

/* ---------- À propos ---------- */
.apropos {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
  background: var(--papier-clair);
}
.apropos h3 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  margin: 0 0 1rem;
}
.apropos h3 + p { margin-top: 0; }
.apropos p + h3 { margin-top: 2.5rem; }
.apropos-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--rayon);
}

/* ---------- Compétences ---------- */
.competences-liste {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem clamp(1.5rem, 4vw, 3rem);
  margin: 0;
}
.competences-liste > div {
  padding-top: 1rem;
  border-top: 1.5px solid var(--trait);
}
.competence-icone {
  display: block;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 1rem;
  object-fit: contain;
  object-position: left center;
  transition: transform 0.5s var(--sortie, ease);
}
@media (hover: hover) and (pointer: fine) {
  .competences-liste > div:hover .competence-icone { transform: translateY(-4px) rotate(-4deg); }
}
.competences-liste dt {
  font-size: 1.25rem;
  font-weight: 700;
  font-stretch: 112%;
  margin-bottom: 0.4rem;
}
.competences-liste dd { margin: 0; color: var(--encre-douce); }

/* ---------- Projets ---------- */
.projets { background: var(--papier-clair); }

.projets-liste {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr));
  gap: 2.5rem clamp(1.25rem, 2.5vw, 2rem);
}

.projet-carte {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.projet-image {
  display: block;
  margin-bottom: 0.9rem;
  border: 1.5px solid var(--trait);
  border-radius: var(--rayon);
  overflow: hidden;
  background: #fff;
  transition: border-color 0.2s;
}
.projet-image img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}
.projet-dates { font-size: 0.85rem; color: var(--encre-douce); }
.projet-nom {
  font-size: 1.3rem;
  font-weight: 750;
  font-stretch: 118%;
  line-height: 1.2;
  margin: 0.15rem 0 0.2rem;
}
.projet-role { font-size: 0.98rem; color: var(--encre-douce); }
.projet-image {
  position: relative;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s;
}
.projet-image.suit { transition: transform 0.12s linear, border-color 0.2s; }
.projet-image img { transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.projet-carte:focus-visible .projet-image { border-color: var(--encre); }
@media (hover: hover) and (pointer: fine) {
  .projet-carte:hover .projet-image { border-color: var(--encre); }
}
.projet-carte:focus-visible .projet-image img { transform: scale(1.08); }
@media (hover: hover) and (pointer: fine) {
  .projet-carte:hover .projet-image img { transform: scale(1.08); }
}

/* Bandeau "Voir le projet" qui monte au survol */
.projet-voir {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.7rem 1rem;
  background: var(--encre);
  color: var(--papier-clair);
  font-size: 0.9rem;
  font-weight: 600;
  transform: translateY(101%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.projet-carte:focus-visible .projet-voir { transform: none; }
@media (hover: hover) and (pointer: fine) {
  .projet-carte:hover .projet-voir { transform: none; }
}
@media (hover: none) { .projet-voir { display: none; } }

/* Le nom se souligne en se dessinant */
.projet-nom {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  align-self: flex-start;
}
.projet-carte:focus-visible .projet-nom { background-size: 100% 2px; }
@media (hover: hover) and (pointer: fine) {
  .projet-carte:hover .projet-nom { background-size: 100% 2px; }
}

/* Fiche projet (fenêtre) */
.projet-fiche {
  width: min(64rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 1.5px solid var(--encre);
  border-radius: var(--rayon);
  color: var(--encre);
  background: var(--papier-clair);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.projet-fiche::backdrop { background: rgba(0, 0, 0, 0.7); }
.projet-fiche[open] { animation: fiche-entree 0.22s ease-out; }

.fiche-entete {
  position: sticky;
  top: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 1.25rem;
  align-items: start;
  padding: 1.5rem clamp(1.25rem, 3vw, 2.25rem) 1.25rem;
  border-bottom: 1.5px solid var(--encre);
  background: var(--papier-clair);
}
.fiche-dates { margin: 0 0 0.35rem; font-size: 0.9rem; color: var(--encre-douce); }
.fiche-entete h3 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 0.4rem; }
.fiche-sujet { margin: 0; color: var(--encre-douce); }
.fiche-logo img { width: 4.5rem; height: 4.5rem; object-fit: contain; border-radius: var(--rayon); }
.fiche-fermer {
  width: 2.5rem; height: 2.5rem;
  border: 1.5px solid var(--trait);
  border-radius: var(--rayon);
  background: none;
  color: var(--encre);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .fiche-fermer:hover { border-color: var(--encre); }
}

.fiche-corps {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: 1.75rem clamp(1.25rem, 3vw, 2.25rem);
}
.fiche-texte h4 { font-size: 1.1rem; margin-bottom: 0.75rem; }
.fiche-texte p { font-size: 1rem; }

/* Le cartouche : comme celui d'un plan, il résume la fiche */
.fiche-specs {
  align-self: start;
  margin: 0;
  border: 1.5px solid var(--encre);
  border-radius: var(--rayon);
}
.fiche-specs > div { padding: 0.9rem 1.1rem; }
.fiche-specs > div + div { border-top: 1px solid var(--trait); }
.fiche-specs dt { font-weight: 700; font-stretch: 112%; margin-bottom: 0.3rem; }
.fiche-specs dd { margin: 0; font-size: 0.95rem; color: var(--encre-douce); }
.fiche-specs ul { margin: 0; padding-left: 1.1rem; }

.fiche-medias {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
  padding: 0 clamp(1.25rem, 3vw, 2.25rem) 2rem;
}
.fiche-medias img { width: 100%; border-radius: var(--rayon); background: #fff; }
.fiche-video video { width: 100%; max-height: 70vh; border-radius: var(--rayon); background: #000; }

/* ---------- Passions ---------- */
.passions-mosaique {
  list-style: none;
  margin: 0 0 2.5rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.6vw, 1.5rem);
}
.passions-mosaique figure { position: relative; margin: 0; overflow: hidden; }
.passions-mosaique picture { display: block; overflow: hidden; border-radius: var(--rayon); }
.passions-mosaique img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
@media (hover: hover) and (pointer: fine) {
  .passions-mosaique figure:hover img { transform: scale(1.05); }
}
.passions-mosaique figcaption { font-weight: 600; }

/* Style de légende : change la classe de <ul class="passions-mosaique legende-..."> dans index.php
   legende-sous | legende-bandeau | legende-vertical | legende-etiquette */

/* sous : le nom sous la photo, toujours lisible */
.legende-sous figcaption {
  margin-top: 0.7rem;
  padding-top: 0.55rem;
  border-top: 1.5px solid var(--encre);
  font-size: 1rem;
}

/* bandeau : un bandeau noir monte depuis le bas au survol (toujours visible sur écran tactile) */
.legende-bandeau figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.8rem 1rem;
  background: var(--encre);
  color: var(--papier-clair);
  transform: translateY(101%);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.legende-bandeau figure:focus-within figcaption { transform: none; }
@media (hover: hover) and (pointer: fine) {
  .legende-bandeau figure:hover figcaption { transform: none; }
}
@media (hover: none) { .legende-bandeau figcaption { transform: none; } }

/* vertical : le nom couché le long du bord gauche */
.legende-vertical figcaption {
  position: absolute;
  inset: 0 auto 0 0;
  display: flex;
  align-items: flex-end;
  padding: 0.9rem 0.7rem;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: #fff;
  letter-spacing: 0.04em;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.55), transparent);
}
.legende-vertical figcaption span { transform: none; }

/* etiquette : une pastille noire collée en haut à gauche */
.legende-etiquette figcaption {
  position: absolute;
  top: 0; left: 0;
  padding: 0.45rem 0.8rem;
  background: var(--encre);
  color: var(--papier-clair);
  font-size: 0.9rem;
  border-bottom-right-radius: var(--rayon);
  transition: padding 0.3s;
}
@media (hover: hover) and (pointer: fine) {
  .legende-etiquette figure:hover figcaption { padding-inline: 1.2rem; }
}

/* ---------- Contact ---------- */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  background: var(--encre);
  color: var(--papier);
}
.contact h2 { font-size: clamp(2rem, 4.5vw, 3.25rem); margin-bottom: 1.25rem; }
.contact-infos > p { color: #b8b8b8; }
.contact-infos dl { margin: 2rem 0; }
.contact-infos dl > div {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid rgba(236, 236, 236, 0.2);
}
.contact-infos dt { color: #b8b8b8; }
.contact-infos dd { margin: 0; }
.contact-infos a { text-underline-offset: 3px; }
.contact .bouton-plein { background: var(--papier); border-color: var(--papier); color: var(--encre); }
@media (hover: hover) and (pointer: fine) {
  .contact .bouton-plein:hover { background: #fff; border-color: #fff; color: var(--encre); }
}
.contact .bouton:not(.bouton-plein) { color: var(--papier); }
@media (hover: hover) and (pointer: fine) {
  .contact .bouton:not(.bouton-plein):hover { background: var(--papier); color: var(--encre); border-color: var(--papier); }
}

.contact-form {
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1.5px solid rgba(236, 236, 236, 0.35);
  border-radius: var(--rayon);
}
.contact-form h3 { font-size: 1.5rem; margin-bottom: 1.25rem; }
.contact-form label { font-size: 0.9rem; color: #b8b8b8; margin-bottom: 0.3rem; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  margin-bottom: 1.25rem;
  padding: 0.7rem 0.8rem;
  border: 1.5px solid rgba(236, 236, 236, 0.3);
  border-radius: var(--rayon);
  font: inherit;
  color: var(--papier);
  background: rgba(236, 236, 236, 0.06);
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--papier); background: rgba(236, 236, 236, 0.1); }
.contact-form .bouton { align-self: flex-start; }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* Le remplissage automatique du navigateur ne doit pas peindre les champs en bleu clair */
.contact-form input:-webkit-autofill,
.contact-form input:-webkit-autofill:focus,
.contact-form textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--papier);
  caret-color: var(--papier);
  -webkit-box-shadow: 0 0 0 1000px #1b1b1b inset;
  transition: background-color 9999s ease-out;
}
.contact-statut { margin: 1rem 0 0; min-height: 1.5em; font-size: 0.95rem; }
.contact-statut[data-type="ok"] { color: #8fe3b0; }
.contact-statut[data-type="erreur"] { color: #ffb4a8; }

/* ---------- Pied de page ---------- */
.pied {
  padding: 1.5rem var(--marge);
  background: var(--encre);
  border-top: 1px solid rgba(236, 236, 236, 0.15);
  color: #b8b8b8;
  font-size: 0.85rem;
  text-align: center;
}
.pied p { margin: 0 auto; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero-texte { padding: 2.5rem var(--marge) 3rem; }
  .hero-photo { order: -1; height: 55svh; margin-top: 4rem; }
  .competences-liste { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .barre-menu { display: block; }
  .menu {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--marge) 1.25rem;
    background: var(--papier);
    border-bottom: 1.5px solid var(--encre);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-0.5rem);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  }
  .barre.ouverte { background: var(--papier); }
  .barre.ouverte .menu { visibility: visible; opacity: 1; transform: none; }
  .menu a { padding: 0.8rem 0; border-bottom: 1px solid var(--trait); font-size: 1.05rem; }
  .menu a:hover { border-bottom-color: var(--trait); color: var(--accent); }
  .menu .menu-langue { margin-top: 1rem; align-self: flex-start; border: 1.5px solid var(--trait); }
}

@media (max-width: 720px) {
  .entete { grid-template-columns: minmax(0, 1fr); }
  .apropos { grid-template-columns: minmax(0, 1fr); }
  .apropos-photo { order: -1; }
  .apropos-photo img { aspect-ratio: 3 / 2; }
  .fiche-corps { grid-template-columns: minmax(0, 1fr); }
  .fiche-entete { grid-template-columns: minmax(0, 1fr) auto; }
  .fiche-logo { display: none; }
  .fiche-entete { position: static; }
  .passions-mosaique { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .passions-mosaique li:last-child { display: none; } /* 8 photos : grille paire sur mobile */
}

@media (max-width: 520px) {
  .competences-liste { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
  .contact-infos dl > div { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; }
  .hero-actions .bouton { flex: 1 1 auto; text-align: center; }
  .hero-bloc { align-self: stretch; }
}

/* =========================================================
   Animations (actives seulement si JavaScript tourne : html.js)
   ========================================================= */
:root { --sortie: cubic-bezier(0.16, 1, 0.3, 1); }

/* --- 1. Ouverture : plus d'écran d'attente, la photo se déploie et le nom monte dès l'affichage --- */
.js .hero-photo picture { animation: photo-deploie 1.3s var(--sortie) 0.05s both; }
@keyframes photo-deploie {
  from { clip-path: inset(0 0 100% 0); transform: scale(1.3); }
  to { clip-path: inset(0 0 0 0); transform: scale(1); }
}
.js .hero-nom .ligne > span { animation: ligne-monte 1.1s var(--sortie) both; }
.js .hero-nom .ligne:nth-child(1) > span { animation-delay: 0.3s; }
.js .hero-nom .ligne:nth-child(2) > span { animation-delay: 0.42s; }
@keyframes ligne-monte { from { transform: translateY(105%); } to { transform: none; } }

.js .hero-salut { animation: apparait 0.8s var(--sortie) 0.2s both; }
.js .hero-cote::before, .js .hero-cote::after { animation: cote-trace 1s var(--sortie) 0.7s both; transform-origin: left; }
.js .hero-cote span { animation: apparait 0.7s ease 1s both; }
.js .hero-actions { animation: apparait 0.8s var(--sortie) 0.9s both; }
.js .barre { animation: barre-descend 0.8s var(--sortie) 0.15s both; }
@keyframes apparait { from { opacity: 0; transform: translateY(0.8rem); } to { opacity: 1; transform: none; } }
@keyframes cote-trace { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes barre-descend { from { transform: translateY(-100%); } to { transform: none; } }

/* --- 2. Premier défilement : le texte s'efface vers le haut, la photo se resserre et grossit (--defile : 0 à 1) --- */
.hero-texte {
  transform: translateY(calc(var(--defile, 0) * -4rem));
  opacity: calc(1 - var(--defile, 0) * 1.4);
}
.hero-photo img { transform: scale(calc(1 + var(--defile, 0) * 0.18)); }

/* --- 3. La photo "À propos" s'ouvre en grand en arrivant (--p : 0 à 1, calculé en JS) --- */
.js [data-ouvre-photo] {
  overflow: hidden; /* l'image agrandie ne doit pas élargir la page (bug mobile) */
  --p: 0;
  clip-path: inset(calc((1 - var(--p)) * 16%) calc((1 - var(--p)) * 16%) calc((1 - var(--p)) * 16%) calc((1 - var(--p)) * 16%) round var(--rayon));
}
.js [data-ouvre-photo] img { transform: scale(calc(1.3 - var(--p) * 0.3)); }

/* --- 4. Titres de section : révélés par un masque, une seule fois --- */
.js [data-titre] {
  clip-path: inset(0 0 100% 0);
  transform: translateY(0.6em);
}
.js [data-titre].vu {
  clip-path: inset(-0.1em -0.1em -0.2em -0.1em);
  transform: none;
  transition: clip-path 0.9s var(--sortie), transform 0.9s var(--sortie);
}

/* --- 5. Cartes projets : la vignette se dévoile en cascade --- */
.js .projets-liste .projet-image { clip-path: inset(100% 0 0 0); }
.js .projets-liste li.vu .projet-image {
  clip-path: inset(0 0 0 0);
  transition: clip-path 0.9s var(--sortie) calc(var(--i, 0) * 90ms), transform 0.5s var(--sortie), border-color 0.2s;
}
.js .projets-liste .projet-dates,
.js .projets-liste .projet-nom,
.js .projets-liste .projet-role { opacity: 0; }
.js .projets-liste li.vu .projet-dates,
.js .projets-liste li.vu .projet-nom,
.js .projets-liste li.vu .projet-role { opacity: 1; transition: opacity 0.7s ease calc(var(--i, 0) * 90ms + 0.35s), background-size 0.45s var(--sortie); }

@media (prefers-reduced-motion: reduce) {
  .passions-mosaique img { transition: none; }
  .hero-texte { transform: none; opacity: 1; }
  .hero-photo img { transform: none; }
  .js [data-ouvre-photo] { clip-path: none; }
  .js [data-ouvre-photo] img { transform: none; }
  .js [data-titre] { clip-path: none; transform: none; }
  .js .projets-liste .projet-image { clip-path: none; }
  .js .projets-liste .projet-dates, .js .projets-liste .projet-nom, .js .projets-liste .projet-role { opacity: 1; }
}

@keyframes fiche-entree {
  from { opacity: 0; transform: translateY(0.75rem); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* Mouvement réduit : plus aucun déplacement ni zoom, mais on garde les fondus (opacité, couleurs) */
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-property: opacity, color, background-color, border-color !important;
  }
}
