/* ============================================================
   Samy Belkaci, vidéaste — feuille de style unique

   Fond blanc, encre Pétrole, un seul accent Vermillon.
   Les images sont droites et grandes, aucune ne penche.
   Aucune bibliothèque externe : le défilement est natif.
   ============================================================ */

:root {
  /* Les trois couleurs */
  --blanc: #FFFFFF;
  --petrole: #042A2B;
  --vermillon: #D84727;

  /* Dérivés : opacités de l'encre sur fond blanc */
  --texte-2: rgba(4, 42, 43, .72);
  --texte-3: rgba(4, 42, 43, .48);
  --filet: rgba(4, 42, 43, .16);
  --surface: rgba(4, 42, 43, .04);

  /* Rythme */
  --gouttiere: clamp(20px, 4.5vw, 72px);
  --section: clamp(72px, 9vw, 130px);
  --max: 1600px;

  /* Typographie */
  --titre: "Clash Display", "Helvetica Neue", Arial, sans-serif;
  --texte: "Satoshi", "Helvetica Neue", Arial, sans-serif;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--blanc);
  color: var(--petrole);
  font-family: var(--texte);
  font-weight: 400;
  font-size: clamp(15px, 1.02vw, 17px);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--vermillon);
  outline-offset: 3px;
}

::selection { background: var(--vermillon); color: var(--blanc); }

/* ---------- Typographie ---------- */

h1, h2, h3 {
  font-family: var(--titre);
  font-weight: 600;
  margin: 0;
  letter-spacing: -.025em;
  line-height: 1.04;
}

h1 { font-size: clamp(2.4rem, 5.4vw, 4.4rem); letter-spacing: -.04em; }
h2 { font-size: clamp(2rem, 4.4vw, 3.6rem); letter-spacing: -.035em; }
h3 { font-size: clamp(1.15rem, 1.7vw, 1.45rem); letter-spacing: -.015em; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.label {
  font-family: var(--texte);
  font-weight: 500;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--texte-3);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.6rem;
}
.label::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--vermillon);
  flex: none;
}

.lead { font-size: clamp(1.05rem, 1.45vw, 1.35rem); line-height: 1.5; }
.secondaire { color: var(--texte-2); }

/* ---------- Structure ---------- */

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gouttiere);
}

section { padding: var(--section) 0; position: relative; }

.grille {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(20px, 2.6vw, 48px);
}

/* ---------- En-tête ---------- */

.entete {
  position: sticky;
  top: 0;
  z-index: 70;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.entete.est-collee { border-bottom-color: var(--filet); }
.entete__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 72px;
}
.marque {
  font-family: var(--titre);
  font-weight: 600;
  font-size: 1.04rem;
  letter-spacing: -.02em;
}

.nav { display: flex; gap: clamp(16px, 2.2vw, 36px); }
.nav a {
  font-size: .86rem;
  color: var(--texte-2);
  padding: 4px 0;
  position: relative;
  transition: color .25s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--vermillon);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .4s var(--ease);
}
.nav a:hover { color: var(--petrole); }
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav a[aria-current="page"] { color: var(--petrole); }
.nav a[aria-current="page"]::after { transform: scaleX(1); }

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 28px;
  border-radius: 3px;
  background: var(--vermillon);
  color: var(--blanc);
  font-weight: 500;
  font-size: .94rem;
  border: 1px solid var(--vermillon);
  cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.btn:hover { background: var(--petrole); border-color: var(--petrole); }
.btn svg { transition: transform .4s var(--ease); }
.btn:hover svg { transform: translateX(4px); }

.btn--ligne { background: transparent; border-color: var(--filet); color: var(--petrole); }
.btn--ligne:hover { background: var(--petrole); border-color: var(--petrole); color: var(--blanc); }

.lien-fleche {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .92rem;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--filet);
  transition: border-color .3s var(--ease), color .3s var(--ease);
}
.lien-fleche:hover { border-color: var(--vermillon); color: var(--vermillon); }
.lien-fleche svg { transition: transform .4s var(--ease); }
.lien-fleche:hover svg { transform: translateX(5px); }

/* ---------- Hero ---------- */

.hero { padding-top: clamp(56px, 8vw, 96px); padding-bottom: clamp(48px, 6vw, 84px); }
.hero__in {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(24px, 3vw, 56px);
  align-items: center;
}

.hero__texte { grid-column: 1 / 7; }
.hero__titre {
  font-family: var(--titre);
  font-weight: 600;
  font-size: clamp(3rem, 8.4vw, 8rem);
  line-height: .9;
  letter-spacing: -.045em;
  margin: 0 0 clamp(22px, 2.6vw, 36px);
}
.hero__titre span { display: block; }

.hero__sous {
  max-width: 36ch;
  color: var(--texte-2);
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  line-height: 1.55;
  margin-bottom: clamp(26px, 3vw, 38px);
}
.hero__sous strong { color: var(--petrole); font-weight: 500; }

.hero__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--texte-3);
  margin-bottom: clamp(26px, 3vw, 38px);
}
.hero__meta span { width: 4px; height: 4px; border-radius: 50%; background: var(--vermillon); flex: none; }

.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero__vue {
  grid-column: 8 / 13;
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 4px;
  background: var(--surface);
}
.hero__vue video, .hero__vue img { width: 100%; height: 100%; object-fit: cover; }
.hero__legende {
  position: absolute;
  left: 16px; bottom: 14px;
  z-index: 2;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--blanc);
  background: rgba(4, 42, 43, .62);
  padding: 7px 12px;
  border-radius: 3px;
}

/* ---------- Mosaïque, images droites et alignées ---------- */

.mosaique {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.4vw, 24px);
  align-items: start;
}
.tuile {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 4px;
  background: var(--surface);
}
.tuile video, .tuile img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Colonnes de métier ---------- */

.metiers { grid-column: 1 / 13; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 64px); }
.metier { border-top: 1px solid var(--filet); padding-top: 22px; }
.metier h3 { margin-bottom: 10px; }
.metier p { color: var(--texte-2); font-size: .95rem; }

/* ---------- Bandeau d'accroche ---------- */

.bandeau { border-top: 1px solid var(--filet); border-bottom: 1px solid var(--filet); }
.bandeau .grille > div { grid-column: 1 / 11; }
.bandeau p, .bandeau h2 {
  font-family: var(--titre);
  font-weight: 600;
  font-size: clamp(1.6rem, 3.4vw, 3rem);
  line-height: 1.12;
  letter-spacing: -.03em;
}
.bandeau em { font-style: normal; color: var(--vermillon); }

/* ---------- Cartes projet ---------- */

.projets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 2.4vw, 44px);
  align-items: start;
}
.projet {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.projet__media {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 4px;
  background: var(--surface);
  margin-bottom: 18px;
}
.projet__media img, .projet__media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .4s var(--ease);
}
.projet__media video { opacity: 0; }
.projet:hover .projet__media video,
.projet:focus-visible .projet__media video,
.projet.is-active .projet__media video { opacity: 1; }

.projet__lire {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blanc);
  background: rgba(4, 42, 43, .62);
  padding: 8px 14px 8px 8px;
  border-radius: 40px;
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.projet:hover .projet__lire,
.projet:focus-visible .projet__lire,
.projet.is-active .projet__lire { opacity: 1; }
.projet__lire b {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--vermillon);
  display: grid;
  place-items: center;
  flex: none;
}
.projet__lire b::before {
  content: "";
  width: 0; height: 0;
  border-left: 6px solid var(--blanc);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  margin-left: 2px;
}

.projet__nom {
  font-family: var(--titre);
  font-weight: 600;
  font-size: clamp(1.1rem, 1.5vw, 1.32rem);
  letter-spacing: -.02em;
  margin-bottom: 7px;
}
.projet__role {
  color: var(--vermillon);
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 12px;
}
.projet dl { margin: 0; font-size: .9rem; color: var(--texte-2); }
.projet dt { display: none; }
.projet dd { margin: 0 0 5px; }

/* Portfolio : deux colonnes, grandes images, toutes alignées */
.projets--edito { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 3.4vw, 64px); }
.projets--edito .projet__media { margin-bottom: 22px; }
.projets--edito .projet__nom { font-size: clamp(1.3rem, 2vw, 1.8rem); }
.numero {
  font-family: var(--titre);
  font-weight: 600;
  font-size: .76rem;
  color: var(--texte-3);
  letter-spacing: .12em;
  margin-bottom: 10px;
  display: block;
}

/* ---------- Filtres ---------- */

.filtres { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: clamp(32px, 4vw, 56px); }
.filtre {
  font: inherit;
  font-size: .85rem;
  padding: 10px 20px;
  border-radius: 40px;
  border: 1px solid var(--filet);
  background: transparent;
  color: var(--texte-2);
  cursor: pointer;
  transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.filtre:hover { color: var(--petrole); border-color: var(--texte-3); }
.filtre[aria-pressed="true"] { color: var(--blanc); border-color: var(--petrole); background: var(--petrole); }

/* ---------- Parcours ---------- */

.parcours__img { grid-column: 1 / 5; max-width: 320px; }
/* height: auto est indispensable : sans lui, l'attribut height du HTML fige la hauteur
   pendant que le CSS impose la largeur, et la photo est étirée. */
.parcours__img img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 4px;
}
.parcours__txt { grid-column: 6 / 12; }
.parcours__txt p { color: var(--texte-2); }
.parcours__txt p:first-of-type { color: var(--petrole); font-size: clamp(1.04rem, 1.35vw, 1.24rem); }

/* ---------- Services ---------- */

.liste-postes { list-style: none; margin: 0; padding: 0; }
.liste-postes li {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: 20px;
  padding: 26px 0;
  border-bottom: 1px solid var(--filet);
}
.liste-postes li:first-child { border-top: 1px solid var(--filet); }
.liste-postes .num { color: var(--vermillon); font-size: .74rem; letter-spacing: .12em; padding-top: 6px; font-family: var(--titre); font-weight: 600; }
.liste-postes strong { font-family: var(--titre); font-weight: 600; font-size: 1.15rem; display: block; margin-bottom: 5px; }
.liste-postes p { color: var(--texte-2); font-size: .95rem; margin: 0; }

.styles { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(28px, 3.4vw, 64px); align-items: start; }
.style { border-top: 2px solid var(--vermillon); padding-top: 24px; }
.style h3 { margin-bottom: 14px; }
.style p { color: var(--texte-2); font-size: .96rem; }
.style__vue {
  position: relative;
  aspect-ratio: 9 / 16;
  width: clamp(160px, 15vw, 220px);
  overflow: hidden;
  border-radius: 4px;
  margin-bottom: 22px;
  background: var(--surface);
}
.style__vue img, .style__vue video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.style__vue video { opacity: 0; transition: opacity .4s var(--ease); }
.style:hover .style__vue video { opacity: 1; }

.ouverture {
  margin-top: clamp(40px, 4.5vw, 72px);
  padding-top: 26px;
  border-top: 1px solid var(--filet);
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 2fr;
  gap: clamp(20px, 3vw, 48px);
}
.ouverture p { color: var(--texte-2); max-width: 62ch; }

.methode { counter-reset: etape; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: clamp(20px, 2.6vw, 44px); }
.methode > div { counter-increment: etape; border-top: 1px solid var(--filet); padding-top: 20px; }
.methode > div::before {
  content: "0" counter(etape);
  display: block;
  font-family: var(--titre);
  font-weight: 600;
  color: var(--vermillon);
  font-size: .82rem;
  letter-spacing: .1em;
  margin-bottom: 12px;
}
.methode h3 { font-size: 1.04rem; margin-bottom: 6px; }
.methode p { color: var(--texte-2); font-size: .92rem; }

.fiche { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: clamp(20px, 2.4vw, 40px); font-size: .9rem; }
.fiche dl { margin: 0; }
.fiche dt {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--vermillon);
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--filet);
}
.fiche dd { margin: 0 0 8px; color: var(--texte-2); line-height: 1.45; }

.formats { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.formats li {
  border: 1px solid var(--filet);
  border-radius: 40px;
  padding: 9px 18px;
  font-size: .85rem;
  color: var(--texte-2);
}

/* ---------- Pied de page ---------- */

.pied { border-top: 1px solid var(--filet); padding: var(--section) 0 48px; }
.pied__haut { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(24px, 3vw, 48px); align-items: start; }
.pied__titre { grid-column: 1 / 7; }
.pied__titre h2 { margin-bottom: 26px; }
.pied__coord { grid-column: 8 / 13; }
.pied__coord ul { list-style: none; margin: 0; padding: 0; }
.pied__coord li { padding: 16px 0; border-bottom: 1px solid var(--filet); }
.pied__coord li:first-child { border-top: 1px solid var(--filet); }
.pied__coord a { transition: color .25s var(--ease); }
.pied__coord a:hover { color: var(--vermillon); }
.pied__coord .k { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .16em; color: var(--texte-3); margin-bottom: 5px; }
.pied__bas { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: clamp(48px, 5vw, 88px); font-size: .78rem; color: var(--texte-3); }

/* ---------- Lecteur vidéo ---------- */

.lecteur {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .97);
  padding: 24px;
}
.lecteur.is-open { display: flex; }
.lecteur__boite { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lecteur video {
  max-width: min(420px, 92vw);
  max-height: 80vh;
  width: auto;
  border-radius: 4px;
  background: var(--petrole);
}
.lecteur__titre { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--texte-2); }
.lecteur__fermer {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: 1px solid var(--filet);
  color: var(--petrole);
  font: inherit;
  font-size: .76rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 11px 18px;
  border-radius: 40px;
  cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.lecteur__fermer:hover { background: var(--petrole); color: var(--blanc); border-color: var(--petrole); }

/* ---------- Apparition au scroll, discrète ---------- */

/* Masqué seulement si JavaScript est actif : sans lui, tout reste visible. */
html.js .reveal { opacity: 0; transform: translateY(14px); }
html.js .reveal.vu { opacity: 1; transform: none; transition: opacity .5s var(--ease), transform .5s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  html.js .reveal, html.js .reveal.vu { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .hero__texte { grid-column: 1 / 7; }
  .hero__vue { grid-column: 7 / 13; }
  .projets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .hero__in { gap: 32px; }
  .hero__texte { grid-column: 1 / 13; }
  .hero__vue { grid-column: 1 / 13; aspect-ratio: 16 / 10; }
  .metiers { grid-template-columns: 1fr; }
  .bandeau .grille > div { grid-column: 1 / 13; }
  .parcours__img { grid-column: 1 / 7; max-width: 240px; }
  .parcours__txt { grid-column: 1 / 13; }
  .pied__titre, .pied__coord { grid-column: 1 / 13; }
  .ouverture { grid-template-columns: 1fr; gap: 12px; }
}

@media (max-width: 640px) {
  .mosaique { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .projets, .projets--edito { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .projet__role { font-size: .66rem; letter-spacing: .06em; }
  .projet dd, .projet__nom { overflow-wrap: anywhere; }
  .parcours__img { grid-column: 1 / 13; max-width: 220px; }
  .nav { gap: 16px; }
  .nav a { font-size: .8rem; }
  .nav a[href="index.html"] { display: none; }
  .entete__in { height: 62px; }
  .liste-postes li { grid-template-columns: 2.4rem 1fr; gap: 12px; }
}
