/* ==========================================================
   Portfolio · François-Xavier Mormentyn
   Maquette de référence : 1920px, conteneur 1332px.
   ========================================================== */

/* Police : Sofia Pro (fichiers dans assets/fonts) */
@font-face {
  font-family: "Sofia Pro";
  src: url("../assets/fonts/sofia-pro-extralight.woff2") format("woff2"),
       url("../assets/fonts/Sofia%20Pro%20Extra%20Light.otf") format("opentype");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sofia Pro";
  src: url("../assets/fonts/sofia-pro-light.woff2") format("woff2"),
       url("../assets/fonts/Sofia%20Pro%20Light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sofia Pro";
  src: url("../assets/fonts/sofia-pro-regular.woff2") format("woff2"),
       url("../assets/fonts/Sofia%20Pro%20Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sofia Pro";
  src: url("../assets/fonts/sofia-pro-bold.woff2") format("woff2"),
       url("../assets/fonts/Sofia%20Pro%20Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #000;
  --white: #fff;
  --sand: #f0ead8;
  --placeholder: #535353;
  --sky: #a2c1d3;
  --grey-text: #a6a6a6;
  --chip-bg: #141414;
  --chip-border: #333;
  --btn-bg: #2c2c2c;
  --btn-border: #5a5a5a;
  --line: #3a3a3a;
  --star: #e2a72e;
  --spark: #e22eac;

  --font: "Sofia Pro", "Futura", "Century Gothic", system-ui, sans-serif;
  --light: 300;
  --container: 1332px;
  --gutter: clamp(16px, 4vw, 48px);
  --media-col: clamp(220px, 23.5vw, 330px);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-weight: var(--light);
  color: var(--black);
  background: var(--white);
  line-height: 1.25;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Sélecteur de langue ---------- */
.lang-switch {
  position: fixed;
  top: 20px;
  right: var(--gutter);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(8px);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .1);
  font-size: 14px;
  font-weight: 400;
}
.lang-switch button {
  font: inherit;
  border: 0;
  background: none;
  padding: 2px 4px;
  cursor: pointer;
  color: #888;
}
.lang-switch button[aria-pressed="true"] { color: var(--black); font-weight: 600; }
.lang-switch span { color: #bbb; }

/* ---------- Intro ---------- */
.intro {
  padding-top: clamp(56px, 5.4vw, 100px);
  padding-bottom: clamp(24px, 1.8vw, 34px);
}
.intro__name { font-size: clamp(20px, 1.6vw, 30px); font-weight: 400; }

.intro__title {
  margin-top: clamp(24px, 2.4vw, 44px);
  font-weight: var(--light);
  line-height: 1.05;
}
.intro__role {
  font-size: clamp(36px, 3.35vw, 64px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .005em;
}
.intro__status { white-space: nowrap; font-size: clamp(18px, 1.55vw, 30px); font-weight: 400; margin-left: .3em; }
.intro__tagline {
  display: block;
  margin-top: .15em;
  font-size: clamp(28px, 2.7vw, 52px);
  font-weight: var(--light);
}

.intro__pitch {
  margin-top: clamp(24px, 2.1vw, 40px);
  max-width: 31em;
  font-size: clamp(22px, 2.1vw, 40px);
  font-weight: var(--light);
  line-height: 1.2;
}

/* Dépliant compétences */
.skills { margin-top: clamp(16px, 1.3vw, 24px); }
.skills summary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  font-size: clamp(16px, 1.05vw, 20px);
  font-weight: 400;
  background: #f2f2f2;
  border: 1px solid #c8c8c8;
  border-radius: 3px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.skills summary::-webkit-details-marker { display: none; }
.skills summary::after {
  content: "";
  width: 8px; height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
  transition: transform .2s;
}
.skills[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.skills summary:hover { background: #e9e9e9; }
.skills__body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px 48px;
  max-width: 900px;
  margin-top: 20px;
  font-size: clamp(16px, 1.1vw, 20px);
}
.skills__body h3 { font-size: 1em; font-weight: 500; text-transform: uppercase; margin-bottom: 8px; }
.skills__body li { padding: 3px 0; }
.skills__body li::before { content: "• "; }

.label {
  margin-top: clamp(40px, 3.4vw, 64px);
  font-size: clamp(18px, 1.25vw, 24px);
  font-weight: 500;
  text-transform: uppercase;
}
.label--cases { margin-top: clamp(32px, 2.9vw, 56px); }
.sectors {
  margin-top: clamp(16px, 1.7vw, 32px);
  max-width: 34em;
  font-size: clamp(17px, 1.25vw, 24px);
  font-weight: 400;
  color: var(--grey-text);
}

/* ---------- Études de cas : bases ---------- */
.case { padding-block: clamp(48px, 3.6vw, 64px) clamp(56px, 4vw, 80px); }
.case--dark { background: var(--black); color: var(--white); }
.case--sand { background: var(--sand); }
.case--light { background: var(--white); }

.case__title {
  font-size: clamp(38px, 3.35vw, 64px);
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.05;
}
.case__client {
  font-size: .56em;
  font-weight: var(--light);
  text-transform: none;
  margin-left: .2em;
}
.case__title--md .case__client { font-size: .66em; }
.case__lead {
  margin-top: clamp(16px, 1.7vw, 32px);
  max-width: 41em;
  font-size: clamp(19px, 1.55vw, 30px);
  font-weight: var(--light);
}

.placeholder { background: var(--placeholder); width: 100%; }
.placeholder--wide { aspect-ratio: 1332 / 734; }
.placeholder--square { aspect-ratio: 1; }
.placeholder--sky { background: var(--sky); aspect-ratio: 1; }

.credit {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 400;
  color: #8a8a8a;
}

/* Vidéo / visuel principal */
.hero-media { margin-top: clamp(32px, 2.6vw, 50px); }
.hero-media .credit { text-align: right; }
.hero-media video, .hero-media img { width: 100%; aspect-ratio: 1332 / 734; object-fit: cover; }

/* Chiffre clé */
.highlight {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.2vw, 40px);
  margin-top: clamp(16px, 1.3vw, 24px);
  padding-bottom: clamp(32px, 2.5vw, 48px);
  border-bottom: 1px solid var(--line);
}
.highlight__figure { display: flex; flex-direction: column; flex: none; }
.highlight__figure strong { font-size: clamp(34px, 2.5vw, 48px); font-weight: 600; line-height: 1; letter-spacing: .02em; }
.highlight__figure span { font-size: clamp(20px, 1.55vw, 30px); font-weight: 400; }
.highlight__chevron { width: 22px; height: 84px; flex: none; color: #bbb; }
.highlight__text { max-width: 20em; font-size: clamp(20px, 1.55vw, 30px); font-weight: var(--light); }

/* Projet (image + texte) */
.project {
  display: grid;
  grid-template-columns: var(--media-col) 1fr;
  gap: clamp(24px, 2.4vw, 46px);
  padding-block: clamp(40px, 2.8vw, 54px);
  border-bottom: 1px solid var(--line);
}
.project__media { padding-left: 4px; }
.project__media img, .project__media .placeholder { width: 100%; aspect-ratio: 1; object-fit: cover; }
.project__title {
  font-size: clamp(22px, 1.55vw, 30px);
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.2;
  margin-right: .35em; 
}
.project__sub { font-weight: var(--light); text-transform: none; font-size: .95em; }
.project__text {
  margin-top: clamp(20px, 2.2vw, 42px);
  max-width: 36em;
  font-size: clamp(18px, 1.3vw, 25px);
  font-weight: var(--light);
  line-height: 1.2;
}

/* Chiffres (pastilles) */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: clamp(16px, 1.4vw, 26px);
}
.stats li {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 112px;
  padding: 10px 14px 9px;
  border: 1px solid var(--chip-border);
  border-radius: 4px;
  background: var(--chip-bg);
  text-align: center;
}
.stats strong {
  font-size: clamp(22px, 1.45vw, 28px);
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
  letter-spacing: .01em;
}
.stats sup { font-size: .45em; font-weight: var(--light); vertical-align: super; margin-left: 3px; }
.stats li > span { font-size: 12.5px; font-weight: 400; margin-top: 3px; }
.star { color: var(--star); font-size: .75em; vertical-align: .25em; }
.spark { color: var(--spark); margin-left: -1px; }

.stats--outline li {
  background: transparent;
  border: 1px dashed #6b6b6b;
  min-width: 112px;
}
.stats--outline li > span { font-size: 12px; }

/* Bouton */
.btn {
  display: inline-block;
  margin-top: clamp(24px, 1.7vw, 32px);
  padding: 9px 18px;
  font-size: clamp(16px, 1.05vw, 20px);
  font-weight: 400;
  letter-spacing: .02em;
  text-decoration: none;
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  border-radius: 3px;
  transition: background .2s, border-color .2s;
}
.btn:hover, .btn:focus-visible { background: #444; border-color: #888; }

/* Et aussi */
.more { padding-top: clamp(48px, 4.2vw, 80px); }
.more__title { font-size: clamp(24px, 1.55vw, 30px); font-weight: 600; text-transform: uppercase; padding-left: 4px; }
.more__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 208px));
  gap: 32px 50px;
  margin-top: clamp(24px, 2.4vw, 46px);
}
.more__grid p { margin-top: 22px; font-size: 18px; white-space: nowrap; }
.more__grid strong { font-size: 22px; font-weight: 600; }
.more__grid span { font-weight: 400; margin-left: .2em; }

/* Étude de cas mise en avant (Beffroi) */
.case__head { display: flex; align-items: center; gap: clamp(14px, 1.2vw, 24px); }
.case__logo { width: clamp(70px, 6.1vw, 117px); flex: none; }
.case__note { font-size: clamp(16px, 1.2vw, 23px); font-weight: 400; margin-top: 4px; }

.feature {
  display: grid;
  grid-template-columns: minmax(0, 575px) minmax(0, 1fr);
  gap: clamp(24px, 2.4vw, 46px);
  margin-top: clamp(28px, 2.1vw, 40px);
}
.feature__body { padding-top: clamp(0px, 4.6vw, 88px); }
.feature__text { max-width: 22em; font-size: clamp(19px, 1.55vw, 30px); font-weight: var(--light); line-height: 1.22; }
.case--sand .stats--outline li, .case--light .stats--outline li { border-color: #555; }
.bullets { margin-top: clamp(24px, 2.3vw, 44px); font-size: clamp(17px, 1.15vw, 22px); line-height: 1.3; }
.bullets li::before { content: "• "; }

/* Footer */
.footer { padding-block: 64px 48px; font-size: 14px; color: #888; font-weight: 400; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .project { grid-template-columns: 1fr; }
  .project__media { max-width: 360px; padding-left: 0; }
  .feature { grid-template-columns: 1fr; }
  .feature__body { padding-top: 0; }
  .highlight { flex-wrap: wrap; }
}
@media (max-width: 560px) {
  .highlight__chevron { display: none; }
  .highlight { flex-direction: column; align-items: flex-start; gap: 12px; }
  .stats li { min-width: 0; flex: 1 1 calc(50% - 9px); }
  .more__grid { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
  .more__grid p { white-space: normal; font-size: 15px; margin-top: 10px; }
  .more__grid strong { font-size: 17px; }
  .case__head { align-items: flex-start; }
  .lang-switch { top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
