/*
  dorianclowez.fr, dans l'esprit de Gradia : fond lavande très pâle rayé,
  halos de couleur, Instrument Sans, cartes teintées, objets 3D en pâte qu'on
  peut toucher, carrousel 3D, mur de captures incliné (rangée à faire glisser
  sur téléphone), portrait au mur en filigrane.
*/

/* Instrument Sans (licence OFL, assets/polices/OFL.txt), hébergée sur le site :
   aucune requête vers un tiers. Une police variable, deux sous-ensembles. */
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("polices/instrument-sans-latin.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: "Instrument Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("polices/instrument-sans-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --fond: #faf9ff;
  --encre: #242734;
  --texte: #464c69;
  --doux: #676c89;
  --trait: rgba(36, 39, 52, 0.08);
  --blanc: #ffffff;
  --ombre: 0 24px 60px -28px rgba(76, 64, 160, 0.3), 0 2px 6px rgba(36, 39, 52, 0.04);
  --ombre-forte: 0 40px 80px -30px rgba(76, 64, 160, 0.4), 0 4px 12px rgba(36, 39, 52, 0.06);
  --rayures: repeating-linear-gradient(135deg, rgba(110, 100, 190, 0.07) 0 1px, transparent 1px 11px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { background: var(--fond); scroll-behavior: smooth; scroll-padding-top: 90px; scrollbar-gutter: stable; }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--fond);
  background-image: var(--rayures);
  color: var(--encre);
  font-family: "Instrument Sans", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
/* Les cartes du carrousel et le mur débordent : on coupe sans créer de
   zone de défilement (les étapes collantes continuent de marcher). */
main { overflow-x: clip; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid #7a5cf0; outline-offset: 3px; border-radius: 8px; }
.insecable { white-space: nowrap; }
.cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.evitement { position: fixed; left: 16px; top: -80px; z-index: 100; padding: 12px 18px; border-radius: 12px; background: var(--encre); color: var(--fond); font-weight: 500; text-decoration: none; transition: top 0.2s; }
.evitement:focus { top: 16px; }
h1, h2, h3 { margin: 0; font-weight: 600; color: var(--encre); }

/* Boutons et étiquettes */
.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s;
}
.bouton:hover { transform: translateY(-2px); }
.bouton--sombre { background: var(--encre); color: var(--blanc); box-shadow: 0 10px 24px -10px rgba(36, 39, 52, 0.55); }
.bouton--blanc { background: var(--blanc); color: var(--encre); box-shadow: 0 0 0 1px rgba(36, 39, 52, 0.08), 0 10px 24px -14px rgba(76, 64, 160, 0.45); }
.bouton--petit { height: 38px; padding: 0 18px; font-size: 14px; }
.lien { border: 0; background: none; padding: 10px 6px; font-size: 15px; font-weight: 500; color: var(--encre); text-decoration: none; cursor: pointer; }
.lien:hover { text-decoration: underline; text-underline-offset: 5px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 18px; }

.etiquette {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 4px 12px;
  border-radius: 999px;
  background: #f1eeff;
  box-shadow: inset 0 0 0 1px #e4ddff;
  font-size: 13px;
  font-weight: 500;
  color: #6b55d8;
}
.etiquette--orange { background: #fff3e6; box-shadow: inset 0 0 0 1px #ffe1c2; color: #a45713; }
.etiquette--vert { background: #e9f8f1; box-shadow: inset 0 0 0 1px #cdeedd; color: #1e7954; }
.etiquette--bleu { background: #ecf3ff; box-shadow: inset 0 0 0 1px #d6e5ff; color: #3563d6; }

/* La barre de navigation, qui devient une pilule flottante */
.nav { position: fixed; left: 0; right: 0; top: 0; z-index: 50; display: flex; justify-content: center; padding: 14px 16px 0; pointer-events: none; }
.nav__boite {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  max-width: 1120px;
  padding: 8px 8px 8px 22px;
  border-radius: 999px;
  transition: max-width 0.55s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.35s, box-shadow 0.35s, padding 0.35s;
}
.nav.flottante .nav__boite {
  max-width: 840px;
  padding-left: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 0 0 1px rgba(36, 39, 52, 0.06), 0 16px 40px -18px rgba(76, 64, 160, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.nav__logo { display: block; flex: 0 0 auto; width: 86px; color: var(--encre); }
.nav__logo svg { display: block; width: 100%; height: auto; }
.nav__liens { display: flex; gap: 4px; }
.nav__liens a { padding: 7px 14px; border-radius: 999px; font-size: 14px; white-space: nowrap; color: var(--texte); text-decoration: none; transition: background-color 0.25s, color 0.25s; }
.nav__liens a:hover { color: var(--encre); }
.nav__liens a[aria-current="true"] { background: #efeaff; color: var(--encre); }

/* L'ouverture */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 120px 20px 40px; overflow: hidden; }
.hero__halos { position: absolute; inset: 0; pointer-events: none; }
.hero__halos span { position: absolute; left: 50%; top: 8%; width: 60vw; height: 40vw; max-width: 900px; max-height: 560px; margin-left: min(-30vw, -450px); border-radius: 50%; background: #e6e0ff; filter: blur(90px); opacity: 0.45; animation: derive 18s ease-in-out infinite alternate; }
@keyframes derive { from { transform: translate(0, 0) scale(1); } to { transform: translate(4%, 6%) scale(1.08); } }
.hero__scene { position: absolute; inset: 0; z-index: 1; }
.hero__contenu { position: relative; z-index: 2; max-width: 700px; text-align: center; pointer-events: none; }
.hero__contenu .actions, .hero__contenu a, .hero__contenu button { pointer-events: auto; }
.hero h1 { margin-top: 22px; font-size: clamp(38px, 5.2vw, 64px); line-height: 1.12; letter-spacing: -0.025em; }
/* Le métier, sous le nom : même titre pour les moteurs, mais en second */
.hero__metier::first-letter { text-transform: uppercase; }
.hero__metier { display: block; margin-top: 12px; font-size: clamp(22px, 2.5vw, 32px); font-weight: 500; line-height: 1.25; letter-spacing: -0.015em; color: var(--texte); }
.hero__texte { margin: 20px auto 0; max-width: 52ch; font-size: 18px; line-height: 1.6; color: var(--texte); }
.hero .actions { margin-top: 30px; }

.apparait { animation: apparait 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: var(--d, 0s); }
@keyframes apparait { from { opacity: 0; transform: translateY(18px); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }

.etincelle { position: absolute; z-index: 2; width: 26px; height: 26px; fill: #8fb6ff; pointer-events: none; animation: scintille 3.2s ease-in-out infinite; animation-delay: var(--t, 0s); }
.etincelle--petite { width: 16px; height: 16px; fill: #c4b8ff; }
.etincelle--jaune { width: 22px; height: 22px; fill: #ffd36e; }
@keyframes scintille { 0%, 100% { transform: scale(0.8) rotate(0deg); opacity: 0.6; } 50% { transform: scale(1.15) rotate(20deg); opacity: 1; } }


/* Les sections */
.section { position: relative; max-width: 1120px; margin: 0 auto; padding: 120px 20px 0; }
.tete { max-width: 640px; margin: 0 auto; text-align: center; }
.tete h2, .appel h2 { margin-top: 16px; font-size: clamp(30px, 3.4vw, 42px); line-height: 1.2; letter-spacing: -0.02em; }
.tete__texte { margin: 14px auto 0; max-width: 50ch; font-size: 18px; line-height: 1.6; color: var(--texte); }

.js .revele { opacity: 0; transform: translateY(26px); filter: blur(6px); transition: opacity 0.8s ease, transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.8s ease; transition-delay: var(--d, 0s); }
.js .revele.vu { opacity: 1; transform: none; filter: none; }

/* Le carrousel des projets */
.carrousel { position: relative; height: 560px; margin-top: 56px; perspective: 1600px; touch-action: pan-y; user-select: none; }
.carrousel__piste { position: absolute; inset: 0; transform-style: preserve-3d; }
.carte {
  position: absolute;
  left: 50%;
  top: 10px;
  width: min(560px, 82vw);
  margin-left: calc(min(560px, 82vw) / -2);
  padding: 14px 14px 22px;
  border-radius: 28px;
  background: var(--t1);
  box-shadow: var(--ombre-forte);
  cursor: grab;
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s, filter 0.5s;
  will-change: transform;
}
.carte.active { cursor: pointer; }
.carte__image { aspect-ratio: 16 / 10; border-radius: 18px; overflow: hidden; background: #ffffff; box-shadow: 0 0 0 1px rgba(36, 39, 52, 0.06); container-type: inline-size; }
.carte__image img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: scale 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); pointer-events: none; }
.carte.active:hover .carte__image img { scale: 1.04; }
/* La tuile texte (studio TV, sans capture) : le domaine à gauche, le détail à
   droite ; les tailles suivent la largeur de la carte (cqi) */
.carte__ia { display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: center; align-items: baseline; column-gap: 4cqi; row-gap: 1.8cqi; height: 100%; padding: 0 7cqi; background: #1d2030; color: #f2f2f7; font-size: clamp(17px, 5.4cqi, 30px); font-weight: 600; letter-spacing: -0.02em; transition: color 0.4s; }
.carte__ia span { display: contents; }
.carte__ia small { font-size: clamp(12px, 3cqi, 16px); font-weight: 400; line-height: 1.3; letter-spacing: 0; color: #a7abc4; transition: color 0.4s; }
.carte__corps { padding: 18px 10px 0; }
.carte__titre { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.carte h3 { font-size: 24px; letter-spacing: -0.02em; }
.carte__avec { flex: 0 0 auto; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.85); box-shadow: inset 0 0 0 1px rgba(36, 39, 52, 0.07); font-size: 12px; color: var(--texte); }
.carte p { margin: 8px 0 0; font-size: 15px; color: var(--texte); }
.carrousel__fleche { position: absolute; top: 200px; z-index: 30; width: 52px; height: 52px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(36, 39, 52, 0.82); color: #ffffff; cursor: pointer; box-shadow: 0 10px 24px -10px rgba(36, 39, 52, 0.6); transition: transform 0.25s, background-color 0.25s; right: calc(50% - min(560px, 82vw) / 2 - 26px); }
.carrousel__fleche--prec { right: auto; left: calc(50% - min(560px, 82vw) / 2 - 26px); }
.carrousel__fleche--prec svg { rotate: 180deg; }
.carrousel__fleche:hover { transform: scale(1.08); background: var(--encre); }
.carrousel__fleche svg { width: 22px; height: 22px; }
.carrousel:focus { outline: none; }
.carrousel:focus-visible { outline: 2px solid #7a5cf0; outline-offset: 10px; border-radius: 30px; }
.carrousel__points { display: flex; justify-content: center; gap: 8px; margin-top: 8px; }
.carrousel__points button { position: relative; width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: #cfcbe6; cursor: pointer; transition: width 0.35s, background-color 0.35s; }
.carrousel__points button::after { content: ""; position: absolute; inset: -14px -5px; }
.carrousel__points button[aria-current="true"] { width: 26px; background: var(--encre); }

/* Le mur de captures incliné */
.section--mur { max-width: none; padding-left: 0; padding-right: 0; }
.section--mur .tete { padding: 0 20px; }
.mur { position: relative; height: 640px; margin-top: 40px; overflow: hidden; perspective: 1500px; mask-image: linear-gradient(180deg, transparent, #000 10%, #000 88%, transparent); -webkit-mask-image: linear-gradient(180deg, transparent, #000 10%, #000 88%, transparent); }
.mur__plan { position: absolute; left: 50%; top: 50%; width: 2200px; display: grid; gap: 22px; transform: translate(-50%, -50%) rotateX(32deg) rotateZ(-12deg) skewX(8deg); transform-style: preserve-3d; }
.mur__rang { display: flex; gap: 22px; width: max-content; padding-right: 22px; animation: moitie 60s linear infinite; }
@keyframes moitie { to { transform: translateX(-50%); } }
.mur__rang:nth-child(2) { animation-direction: reverse; animation-duration: 70s; }
.mur__rang:nth-child(3) { animation-duration: 54s; }
.mur__rang:hover { animation-play-state: paused; }
.mur__tuile { flex: 0 0 auto; width: 380px; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; background: #ffffff; box-shadow: 0 30px 50px -26px rgba(76, 64, 160, 0.45), 0 0 0 1px rgba(36, 39, 52, 0.05); transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.45s; }
.mur__tuile img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.mur__tuile:hover { transform: translateY(-18px) scale(1.06); box-shadow: 0 50px 70px -30px rgba(76, 64, 160, 0.6); }


/* L'appel au contact */
.appel { position: relative; padding: 70px 30px 74px; border-radius: 32px; text-align: center; background: #f4f1ff; box-shadow: var(--ombre-forte); overflow: hidden; }
.appel .tete__texte { margin-bottom: 28px; }

/* Le pied de page */
.pied { max-width: 1120px; margin: 0 auto; padding: 120px 20px 30px; }
.pied__carte { position: relative; overflow: hidden; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding: 40px 40px 0; border-radius: 28px; background: rgba(255, 255, 255, 0.78); box-shadow: var(--ombre); }
.pied__logo { width: 110px; height: auto; color: var(--encre); }
.pied__marque p { margin: 16px 0 0; max-width: 40ch; font-size: 15px; color: var(--texte); }
.pied__colonne { display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: var(--texte); }
.pied__colonne p { margin: 0 0 4px; font-size: 14px; color: var(--doux); }
.pied__colonne a { text-decoration: none; }
.pied__colonne a:hover { color: var(--encre); text-decoration: underline; text-underline-offset: 4px; }
.pied__bas { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 16px; padding: 22px 0 26px; border-top: 1px solid var(--trait); font-size: 14px; color: var(--doux); }
.pied__bas a { text-decoration: none; }

/* La fiche d'un projet */
.fiche { width: min(1000px, 92vw); max-height: 90dvh; margin: auto; padding: 40px 40px 36px; border: 0; border-radius: 30px; background: #ffffff; color: var(--encre); box-shadow: var(--ombre-forte); overflow: auto; }
.fiche::backdrop { background: rgba(240, 236, 255, 0.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.fiche[open] { animation: fiche 0.45s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes fiche { from { opacity: 0; transform: translateY(20px) scale(0.97); } to { opacity: 1; transform: none; } }
.fiche h2 { margin-top: 14px; font-size: 36px; letter-spacing: -0.02em; }
.fiche__texte { margin: 12px 0 0; max-width: 64ch; font-size: 17px; color: var(--texte); }
.fiche__roles { list-style: none; max-width: 640px; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--trait); }
.fiche__roles li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--trait); font-size: 15px; color: var(--texte); }
.fiche__roles li span:last-child { color: var(--encre); font-weight: 500; }
.fiche__images { display: grid; gap: 22px; margin-top: 28px; }
.fiche__images img { display: block; width: 100%; height: auto; border-radius: 14px; background: #f1eeff; box-shadow: 0 0 0 1px rgba(36, 39, 52, 0.06), 0 20px 40px -24px rgba(76, 64, 160, 0.4); }
.fiche__video { width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; background: #000; box-shadow: 0 20px 40px -24px rgba(76, 64, 160, 0.4); }
/* Ordinateur : la première capture en grand, les suivantes deux par deux. */
.fiche__ecrans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.fiche__ecrans img:first-child { grid-column: 1 / -1; }
/* La première prend toute la largeur ; si la dernière tombe seule sur sa
   ligne (nombre pair d'images), elle la prend aussi, plutôt que laisser un trou */
.fiche__ecrans img:last-child:nth-child(even) { grid-column: 1 / -1; }
/* Téléphones : une rangée d'écrans de même taille, à l'échelle d'un vrai téléphone. */
.fiche__telephones { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; padding: 26px 16px; border-radius: 20px; background: #f4f1ff; }
.fiche__telephones img { width: min(200px, calc(50% - 9px)); border-radius: 26px; }
.fiche__fermer { position: sticky; float: right; top: 0; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #f1eeff; cursor: pointer; }


/* Les filigranes : le logo en contour fin, et un grand mot détouré derrière
   chaque section, qui glisse un peu quand on descend. */
.filigrane-logo { position: absolute; left: 50%; top: 50%; z-index: 0; width: min(1400px, 112vw); height: auto; translate: -50% -50%; color: transparent; stroke: rgba(36, 39, 52, 0.075); stroke-width: 2.2; pointer-events: none; }
.filigrane-logo--appel { width: 118%; top: 54%; stroke: rgba(107, 85, 216, 0.14); stroke-width: 2.6; }
.filigrane-logo--pied { top: auto; bottom: -26%; width: 96%; translate: -50% 0; stroke: rgba(36, 39, 52, 0.07); }
.appel > *:not(.filigrane-logo):not(.etincelle), .pied__carte > *:not(.filigrane-logo) { position: relative; z-index: 1; }
.pied__bas { padding-bottom: 120px; }

.section > *:not(.filigrane-mot) { position: relative; z-index: 1; }
.filigrane-mot {
  position: absolute;
  left: 50%;
  top: 40px;
  z-index: 0;
  translate: -50% 0;
  font-size: clamp(110px, 17vw, 250px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1.2px rgba(36, 39, 52, 0.08);
  pointer-events: none;
  user-select: none;
}
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .filigrane-mot { animation: filigrane linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
    .filigrane-logo:not(.filigrane-logo--pied):not(.filigrane-logo--appel) { animation: filigrane-haut linear both; animation-timeline: scroll(root); animation-range: 0 100vh; }
  }
}
@keyframes filigrane { from { transform: translateX(5%); } to { transform: translateX(-5%); } }
@keyframes filigrane-haut { from { transform: none; } to { transform: translateY(14%) scale(1.06); } }

/* Les réseaux */
.nav__droite { display: flex; align-items: center; gap: 4px; }
.reseau { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--encre); text-decoration: none; cursor: pointer; transition: background-color 0.2s; }
.reseau:hover { background: rgba(36, 39, 52, 0.06); }
.reseau svg { width: 18px; height: 18px; }
.reseau--texte { display: inline-flex; gap: 8px; width: auto; height: 40px; padding: 0 16px; background: #ffffff; box-shadow: inset 0 0 0 1px rgba(36, 39, 52, 0.08); font-size: 14px; font-weight: 500; }
.reseau--texte:hover { background: #ffffff; box-shadow: inset 0 0 0 1px rgba(36, 39, 52, 0.2); }
.appel__reseaux { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }

/* Mon CV : le bouton du menu ouvre le choix entre les deux CV */
.cv { position: relative; margin: 0 4px; }
.cv summary { list-style: none; }
.cv summary::-webkit-details-marker { display: none; }
.cv[open] summary { box-shadow: 0 0 0 1px #b9a9ff, 0 10px 24px -14px rgba(76, 64, 160, 0.45); }
.cv__liste { position: absolute; right: 0; top: calc(100% + 10px); display: grid; gap: 2px; width: max-content; min-width: 240px; padding: 8px; border-radius: 18px; background: var(--blanc); box-shadow: var(--ombre-forte), 0 0 0 1px var(--trait); }
.cv__liste a { display: grid; gap: 1px; padding: 10px 14px; border-radius: 12px; font-size: 15px; font-weight: 500; color: var(--encre); text-decoration: none; }
.cv__liste a:hover { background: #f4f1ff; }
.cv__liste small { font-size: 13px; font-weight: 400; color: var(--doux); }
.sombre .cv__liste { background: var(--nuit); }
.sombre .cv__liste a:hover { background: rgba(185, 169, 255, 0.12); }



/* À propos : le portrait, qui s'incline sous le pointeur */
.profil { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 48px; align-items: center; margin-top: 56px; padding: 28px 44px 28px 28px; border-radius: 30px; background: #ffffff; box-shadow: var(--ombre); }
.profil__photo { position: relative; aspect-ratio: 1; border-radius: 22px; overflow: hidden; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); box-shadow: 0 30px 50px -28px rgba(36, 39, 52, 0.45); will-change: transform; }
.profil__photo.suit { transition: transform 0.12s linear; }
.profil__photo img { width: 100%; height: 100%; object-fit: cover; scale: 1.02; }
.profil__reflet { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, 0.28), transparent 55%); opacity: 0; transition: opacity 0.4s; }
.profil__photo:hover .profil__reflet { opacity: 1; }

/* Le filigrane du portrait : des rangées du logo passent sur le mur, derrière
   la personne (masque du mur), et glissent au défilement et sous le pointeur */
.profil__filigrane {
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-mask: url("../visuels/portrait-mur.png") center / 102% 102% no-repeat;
  mask: url("../visuels/portrait-mur.png") center / 102% 102% no-repeat;
}
.profil__rangs { position: absolute; inset: -2% -40% 0; display: grid; align-content: start; row-gap: 3%; translate: var(--px, 0px) var(--py, 0px); transition: translate 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.profil__photo.suit .profil__rangs { transition: translate 0.18s linear; }
.profil__rang { display: flex; justify-content: center; gap: 4%; }
.profil__rang:nth-child(2) { translate: 19% 0; }
.profil__rang svg { flex: 0 0 auto; width: 34%; height: auto; color: rgba(36, 39, 52, 0.035); stroke: rgba(36, 39, 52, 0.24); stroke-width: 4.5; }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .profil__rang { animation: filigrane-portrait linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
    .profil__rang:nth-child(2) { animation-direction: reverse; }
  }
}
@keyframes filigrane-portrait { from { transform: translateX(9%); } to { transform: translateX(-9%); } }
.profil__texte h3 { margin-top: 14px; font-size: 30px; line-height: 1.15; letter-spacing: -0.02em; }
.profil__texte > p:not(.etiquette) { margin: 14px 0 0; max-width: 54ch; font-size: 17px; color: var(--texte); }
.profil__liens { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 24px; }
.profil__cv + .profil__liens { margin-top: 10px; }
.sombre .profil { background: var(--nuit); }

/* Le mode sombre : une nuit bleutée, les cartes gardent une pointe de leur
   teinte, les objets en pâte restent pastel. */
.theme__soleil { display: none; }
.sombre .theme__soleil { display: block; }
.sombre .theme__lune { display: none; }
.sombre {
  --fond: #101118;
  --encre: #ecedf5;
  --texte: #b4b8cc;
  --doux: #8b90a8;
  --trait: rgba(255, 255, 255, 0.08);
  --nuit: #1a1b25;
  --ombre: 0 24px 60px -28px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05);
  --ombre-forte: 0 40px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --rayures: repeating-linear-gradient(135deg, rgba(170, 160, 255, 0.05) 0 1px, transparent 1px 11px);
  color-scheme: dark;
}
.sombre body, .sombre .hero, .sombre .section { transition: background-color 0.4s, color 0.4s; }
.sombre .hero__halos span { background: #3b3180; opacity: 0.32; }
.sombre .nav.flottante .nav__boite { background: rgba(26, 27, 37, 0.8); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 16px 40px -18px rgba(0, 0, 0, 0.7); }
.sombre .nav__liens a[aria-current="true"] { background: rgba(185, 169, 255, 0.16); }
.sombre .bouton--sombre { background: #ecedf5; color: #14151d; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.8); }
.sombre .bouton--blanc { background: var(--nuit); color: var(--encre); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 10px 24px -14px rgba(0, 0, 0, 0.8); }
.sombre .reseau:hover { background: rgba(255, 255, 255, 0.08); }
.sombre .reseau--texte { background: var(--nuit); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.sombre .etiquette { background: rgba(185, 169, 255, 0.14); box-shadow: inset 0 0 0 1px rgba(185, 169, 255, 0.22); color: #cbbfff; }
.sombre .etiquette--orange { background: rgba(255, 170, 90, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 170, 90, 0.22); color: #ffbd7e; }
.sombre .etiquette--vert { background: rgba(110, 220, 170, 0.12); box-shadow: inset 0 0 0 1px rgba(110, 220, 170, 0.22); color: #86e3b8; }
.sombre .etiquette--bleu { background: rgba(130, 170, 255, 0.12); box-shadow: inset 0 0 0 1px rgba(130, 170, 255, 0.22); color: #a3c0ff; }
.sombre .carte { background: color-mix(in srgb, var(--t1) 9%, var(--nuit)); }
.sombre .carte__image { background: #14151d; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06); }
.sombre .carte__avec { background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.sombre .carrousel__fleche { background: rgba(236, 237, 245, 0.9); color: #14151d; }
.sombre .carrousel__fleche:hover { background: #ffffff; }
.sombre .carrousel__points button { background: #3a3c4f; }
.sombre .carrousel__points button[aria-current="true"] { background: var(--encre); }
.sombre .mur__tuile { background: #14151d; box-shadow: 0 30px 50px -26px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.06); }
.sombre .appel { background: #1b1930; }
.sombre .pied__carte { background: rgba(26, 27, 37, 0.85); }
.sombre .filigrane-logo { stroke: rgba(255, 255, 255, 0.07); }
.sombre .filigrane-logo--appel { stroke: rgba(185, 169, 255, 0.18); }
.sombre .filigrane-mot { -webkit-text-stroke-color: rgba(255, 255, 255, 0.08); }
.sombre .fiche { background: var(--nuit); }
.sombre .fiche::backdrop { background: rgba(8, 8, 14, 0.72); }
.sombre .fiche__fermer { background: #26273a; }
.sombre .fiche__telephones { background: #1b1930; }
.sombre .fiche__images img { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 20px 40px -24px rgba(0, 0, 0, 0.8); }

@media (max-width: 860px) {
  .nav__liens { display: none; }
  .nav.flottante .nav__boite { max-width: 420px; }
  .profil { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 18px 18px 26px; }
  .profil__photo { max-width: 360px; }
  .profil__texte h3 { font-size: 24px; }
  .carrousel { height: 470px; }
  .carrousel__fleche { top: auto; bottom: 0; }
  .mur { height: 440px; }
  .mur__tuile { width: 260px; }
  .pied__carte { grid-template-columns: minmax(0, 1fr); padding: 30px 26px 0; }
  .fiche { padding: 28px 22px; }
  .fiche__ecrans { grid-template-columns: minmax(0, 1fr); }
  /* Sections plus serrées, mots en filigrane à la largeur de l'écran */
  .section { padding-top: 88px; }
  .pied { padding-top: 88px; }
  .filigrane-mot { font-size: min(20vw, 100px); }
  .etincelle { display: none; }
  .js .revele { transition-delay: 0s; }
  /* Carrousel : les cartes de côté ne montrent plus de bouts de texte */
  .carte .carte__corps { transition: opacity 0.4s; }
  .carte:not(.active) .carte__corps { opacity: 0; }
  .carte:not(.active) .carte__ia, .carte:not(.active) .carte__ia small { color: transparent; }
  /* À propos : « M'écrire » en entier, GitHub et LinkedIn dessous */
  .profil__liens .bouton { order: -1; flex: 1 0 100%; justify-content: center; }
  /* Menu : GitHub et LinkedIn restent dans « À propos » et le contact, la place va à « Mon CV » */
  .nav__droite .reseau[href] { display: none; }
  .nav__droite .bouton--petit { padding: 0 15px; }
  .cv { margin: 0 2px; }
  /* Pied : le logo en filigrane remonte dans la carte, liens plus faciles à toucher */
  .filigrane-logo--pied { bottom: -40px; }
  .pied__bas { padding-bottom: 110px; }
  .pied__colonne { gap: 2px; }
  .pied__colonne a, .pied__colonne span { padding: 7px 0; }
}
/* Petits téléphones : le logo et les marges du menu cèdent un peu de place */
@media (max-width: 400px) {
  .nav__boite, .nav.flottante .nav__boite { gap: 10px; padding-left: 14px; }
  .nav__logo { width: 72px; }
}
/* Fiche ouverte : la page derrière ne défile plus, et le défilement de la
   fiche ne se transmet pas à la page en butée */
html.fige { overflow: hidden; }
.fiche { overscroll-behavior: contain; }

/* La rangée de captures à faire glisser, à la place du mur sur téléphone */
.glisse { display: none; }
@media (max-width: 860px) {
  .mur { display: none; }
  .glisse { display: flex; gap: 14px; margin: 36px 0 0; padding: 4px 20px 22px; list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 20px; overscroll-behavior-x: contain; scrollbar-width: none; }
  .glisse::-webkit-scrollbar { display: none; }
  .glisse li { flex: 0 0 min(82%, 340px); scroll-snap-align: start; }
  .glisse__tuile { display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
  .glisse__tuile img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 16px; background: #ffffff; box-shadow: 0 22px 36px -24px rgba(76, 64, 160, 0.5), 0 0 0 1px rgba(36, 39, 52, 0.06); }
  .glisse__nom { display: block; margin-top: 10px; font-size: 14px; color: var(--doux); }
  .sombre .glisse__tuile img { background: #14151d; box-shadow: 0 22px 36px -24px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.06); }
}

/* Téléphone : les objets 3D de l'ouverture ont leur place sous les boutons */
@media (max-width: 759px) {
  .hero--objets .hero__contenu { padding-bottom: 250px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .revele { opacity: 1; transform: none; filter: none; }
}

/* Pages simples : mentions légales et page 404 */
.page-simple { max-width: 760px; margin: 0 auto; padding: 36px 20px 96px; }
.page-simple__haut { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 64px; }
.page-simple__haut img { display: block; width: 96px; height: auto; }
.logo-sombre { display: none !important; }
.sombre .logo-clair { display: none !important; }
.sombre .logo-sombre { display: block !important; }
.page-simple h1 { margin-top: 14px; font-size: clamp(34px, 5vw, 48px); line-height: 1.1; letter-spacing: -0.025em; }
.page-simple h2 { margin: 44px 0 0; font-size: 22px; letter-spacing: -0.01em; }
.page-simple p, .page-simple li { font-size: 16.5px; line-height: 1.65; color: var(--texte); }
.page-simple ul { margin: 12px 0 0; padding-left: 20px; }
.page-simple a:not(.bouton):not(.lien) { color: var(--encre); text-underline-offset: 3px; }
.page-simple__maj { margin-top: 48px; font-size: 14px !important; color: var(--doux) !important; }
.page-simple__actions { margin-top: 28px; }
.a-remplir { padding: 1px 6px; border-radius: 6px; background: #fff1d6; color: #6e3f00; font-weight: 500; }
.sombre .a-remplir { background: rgba(255, 190, 90, 0.16); color: #ffcf8a; }
