/* =========================================================
   Tom Phenix — Comédien · Voix off
   Direction : sobre, éditoriale, intemporelle.
   ========================================================= */

:root {
  /* Palette — papier chaud, encre, accent terre */
  --paper:      #f6f2ea;
  --paper-alt:  #efe9dd;
  --ink:        #16130f;
  --ink-soft:   #2a2622;
  --muted:      #6f6557;
  --line:       rgba(22, 19, 15, 0.14);
  --line-soft:  rgba(22, 19, 15, 0.08);
  --accent:     #8a4a2c;
  --accent-2:   #b9794f;

  /* Inversé (sections sombres) */
  --dark-bg:    #16130f;
  --dark-paper: #1d1914;
  --dark-ink:   #f1ebe0;
  --dark-muted: #a89c89;
  --dark-line:  rgba(241, 235, 224, 0.16);

  /* Typo */
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --maxw: 1180px;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: clamp(15px, 0.5vw + 14px, 17px);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--paper);
  padding: .6rem 1rem; border-radius: 0 0 4px 0;
}
.skip-link:focus { left: 0; }

::selection { background: var(--accent); color: var(--paper); }

/* ---------- Typo helpers ---------- */
.section__title, .hero__name, .cv__title,
.cv__cat, .contact__email {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: 0.005em;
}

/* =========================================================
   Navigation
   ========================================================= */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav__inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 0.85rem var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.nav__brand { display: flex; flex-direction: column; line-height: 1.05; }
.nav__brand-name {
  font-family: var(--serif); font-size: 1.35rem; font-weight: 600;
  letter-spacing: 0.01em;
}
.nav__brand-role {
  font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.26em;
  color: var(--muted); margin-top: 2px;
}
.nav__links { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.4rem); }
.nav__links a {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--ink-soft); position: relative; padding: 0.3rem 0;
  transition: color .25s ease;
}
.nav__links a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 0; height: 1px; background: var(--accent); transition: width .3s ease;
}
.nav__links a:not(.nav__cta):hover { color: var(--accent); }
.nav__links a:not(.nav__cta):hover::after { width: 100%; }
.nav__cta {
  border: 1px solid var(--ink); padding: 0.5rem 1.1rem !important;
  border-radius: 100px; transition: all .25s ease;
}
.nav__cta:hover { background: var(--ink); color: var(--paper); }

.nav__burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 6px;
}
.nav__burger span {
  width: 24px; height: 2px; background: var(--ink); transition: .3s;
}
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__mobile {
  display: none; flex-direction: column; padding: 0.5rem var(--gutter) 1.25rem;
  border-top: 1px solid var(--line-soft); gap: 0.25rem;
}
/* N'apparaît que lorsque le burger l'ouvre (JS retire l'attribut hidden).
   Le burger étant masqué en desktop, ce menu ne peut s'y afficher. */
.nav__mobile:not([hidden]) { display: flex; }
.nav__mobile a {
  padding: 0.7rem 0; font-size: 0.95rem; text-transform: uppercase;
  letter-spacing: 0.14em; border-bottom: 1px solid var(--line-soft);
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 6rem) var(--gutter) clamp(2rem, 4vw, 3.5rem);
  display: grid; grid-template-columns: 0.85fr 1fr;
  gap: clamp(2rem, 6vw, 5rem); align-items: center;
}
.hero__portrait {
  position: relative;
  aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: 2px;
  box-shadow: 0 30px 60px -30px rgba(22,19,15,.45);
}
.hero__portrait img { width: 100%; height: 100%; object-fit: cover; }

.hero__eyebrow {
  text-transform: uppercase; letter-spacing: 0.32em; font-size: 0.72rem;
  color: var(--accent); margin-bottom: 1.1rem;
}
.hero__name {
  font-size: clamp(3.4rem, 11vw, 7rem); line-height: 0.92;
  font-weight: 500; letter-spacing: -0.01em; margin-bottom: 1.4rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.2rem; }

.hero__socials {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0;
  padding: 2.2rem 1.3rem 1.1rem;
  list-style: none;
  display: flex; align-items: center; gap: 1.3rem;
  background: linear-gradient(to top, rgba(8,6,4,.6), rgba(8,6,4,0));
}
.hero__socials a {
  display: inline-flex; color: #fff; opacity: 0.85;
  transition: opacity .25s ease, transform .25s ease;
}
.hero__socials a:hover { opacity: 1; transform: translateY(-2px); }
.hero__socials svg { width: 22px; height: 22px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.16em;
  padding: 0.95rem 1.7rem; border-radius: 100px; cursor: pointer;
  transition: all .25s ease; border: 1px solid var(--ink);
}
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--accent); border-color: var(--accent); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

/* =========================================================
   Sections génériques
   ========================================================= */
.section {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 7rem) var(--gutter);
}
.section--dark {
  max-width: none; background: var(--dark-bg); color: var(--dark-ink);
}
.section--dark .section__num { color: var(--dark-muted); }
.section--dark .section__title { color: var(--dark-ink); }
.section--dark .section__head { border-color: var(--dark-line); }

.section--dark > .section__head,
.section--dark > .reel {
  max-width: var(--maxw); margin-left: auto; margin-right: auto;
  padding-left: var(--gutter); padding-right: var(--gutter);
}

.section__head {
  display: flex; align-items: baseline; gap: 1.1rem;
  padding-bottom: 1.4rem; margin-bottom: 2.6rem;
  border-bottom: 1px solid var(--line);
}
.section__num {
  font-family: var(--serif); font-size: 0.95rem; color: var(--muted);
  letter-spacing: 0.1em;
}
.section__title { font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1; }

.section__head--action { flex-wrap: wrap; }
.section__download {
  margin-left: auto; align-self: center;
  font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.16em;
  border: 1px solid var(--ink); border-radius: 100px;
  padding: 0.6rem 1.2rem; transition: all .25s ease;
}
.section__download:hover { background: var(--ink); color: var(--paper); }

/* =========================================================
   En bref (fiche + compétences)
   ========================================================= */
.profil {
  display: grid; grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 4.5rem); align-items: start;
}

/* Fiche caractéristiques */
.profil__facts {
  background: var(--paper-alt); border: 1px solid var(--line-soft);
  padding: 1.6rem 1.8rem; border-radius: 3px;
}
.facts { display: grid; gap: 0; }
.facts > div {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line-soft);
}
.facts > div:last-child { border-bottom: 0; }
.facts dt {
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.68rem;
  color: var(--muted);
}
.facts dd { font-family: var(--serif); font-size: 1.15rem; text-align: right; }

/* Compétences catégorisées */
.profil__skills {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.6rem, 4vw, 2.6rem) clamp(2rem, 5vw, 3.5rem);
}
.skillcat__title {
  font-family: var(--serif); font-size: 1.3rem; color: var(--accent);
  margin-bottom: 0.9rem; padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}
.skillcat__list { list-style: none; padding: 0; display: grid; gap: 0.55rem; }
.skillcat__list li {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; font-size: 1rem;
}
.skillcat__list li span {
  font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--muted); text-align: right;
}

/* =========================================================
   Bande démo
   ========================================================= */
.reel__frame {
  position: relative; aspect-ratio: 16 / 9; width: 100%;
  background: #000; border-radius: 3px; overflow: hidden;
  box-shadow: 0 30px 70px -30px rgba(0,0,0,.6);
}
.reel__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.reel__caption {
  margin-top: 1.2rem; color: var(--dark-muted); font-size: 0.95rem;
  display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: space-between;
}
.reel__caption a { color: var(--accent-2); border-bottom: 1px solid transparent; transition: border .25s; }
.reel__caption a:hover { border-color: var(--accent-2); }

/* =========================================================
   Galerie photos
   ========================================================= */
/* Masonry en colonnes : respecte l'orientation réelle (portrait, buste, pied) */
.gallery { columns: 3; column-gap: 1rem; }
.gallery__item {
  break-inside: avoid; margin: 0 0 1rem;
  position: relative; overflow: hidden; border-radius: 2px;
  background: var(--paper-alt);
}
.gallery__item img {
  width: 100%; height: auto; display: block;
  transition: transform .6s cubic-bezier(.2,.6,.2,1), filter .6s;
  filter: grayscale(18%);
}
.gallery__item img { cursor: zoom-in; }
.gallery__item:hover img { transform: scale(1.03); filter: grayscale(0%); }

/* Lightbox — agrandissement plein écran */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(12, 10, 8, 0.94);
  opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s;
  cursor: zoom-out;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__img {
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  object-fit: contain; border-radius: 2px;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.8);
  transform: scale(.97); transition: transform .3s ease;
}
.lightbox.is-open .lightbox__img { transform: scale(1); }
.lightbox__close {
  position: absolute; top: clamp(.8rem, 3vw, 1.6rem); right: clamp(.8rem, 3vw, 1.6rem);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25);
  color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease;
}
.lightbox__close:hover { background: rgba(255,255,255,.22); }
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2);
  color: #fff; font-size: 1.6rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease;
}
.lightbox__nav:hover { background: rgba(255,255,255,.2); }
.lightbox__nav--prev { left: clamp(.6rem, 3vw, 2rem); }
.lightbox__nav--next { right: clamp(.6rem, 3vw, 2rem); }
@media (max-width: 600px) { .lightbox__nav { display: none; } }

/* =========================================================
   CV / Parcours
   ========================================================= */
.cv {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: clamp(2rem, 5vw, 3.5rem) clamp(2.5rem, 6vw, 5rem);
}
/* 4 rubriques en grille 2×2 : Audiovisuel · Théâtre / Voix · Formation */
.cv__cat {
  font-size: 1.5rem; margin-bottom: 1rem;
  padding-bottom: 0.6rem; border-bottom: 1px solid var(--line);
  color: var(--accent);
}
.cv__list { list-style: none; padding: 0; }
.cv__row {
  display: grid; grid-template-columns: 6.6rem 1fr;
  gap: 0.15rem 1.1rem; padding: 0.85rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.cv__row:last-child { border-bottom: 0; }
.cv__year {
  grid-row: span 2; font-family: var(--serif); font-size: 1.05rem;
  color: var(--muted); padding-top: 0.15rem; white-space: nowrap;
}
.cv__title {
  font-family: var(--serif); font-size: 1.2rem; line-height: 1.2;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.6rem;
}
.cv__role {
  font-family: var(--sans); font-style: normal; font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent);
}
.cv__meta { font-size: 0.85rem; color: var(--muted); }
.cv__meta b { font-weight: 500; color: var(--ink-soft); }

/* =========================================================
   Contact
   ========================================================= */
.contact { background: var(--dark-bg); color: var(--dark-ink); }
.contact__inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6rem) var(--gutter);
  text-align: center;
}
.contact__eyebrow {
  text-transform: uppercase; letter-spacing: 0.3em; font-size: 0.72rem;
  color: var(--dark-muted); margin-bottom: 1.4rem;
}
.contact__email {
  font-family: var(--serif); font-size: clamp(1.8rem, 5vw, 3.2rem);
  display: inline-block; border-bottom: 1px solid transparent;
  transition: border-color .3s, color .3s;
}
.contact__email:hover { color: var(--accent-2); border-color: var(--accent-2); }
.contact__socials {
  list-style: none; padding: 0; margin: 2.4rem 0 0;
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center;
}
.contact__socials a {
  display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%;
  color: var(--dark-muted);
  border: 1px solid var(--dark-line);
  transition: color .25s ease, border-color .25s ease, background .25s ease, transform .25s ease;
}
.contact__socials a:hover {
  color: var(--dark-bg); background: var(--dark-ink);
  border-color: var(--dark-ink); transform: translateY(-2px);
}
.contact__legal {
  margin-top: 3rem; font-size: 0.72rem; letter-spacing: 0.1em;
  color: var(--dark-muted); text-transform: uppercase;
}
/* Phrase d'accroche discrète — présente surtout pour le référencement */
.contact__seo {
  margin: 1rem auto 0; max-width: 46ch;
  font-size: 0.7rem; line-height: 1.5; letter-spacing: 0.02em;
  color: color-mix(in srgb, var(--dark-muted) 60%, var(--dark-bg));
}

/* =========================================================
   Placeholders d'images (avant dépôt des fichiers)
   ========================================================= */
.ph-img.is-missing {
  position: relative; min-height: 100%;
}
.ph-img.is-missing::after {
  content: attr(data-label) " — déposez l'image";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 1rem;
  background:
    repeating-linear-gradient(45deg, var(--paper-alt) 0 12px, #e7e0d2 12px 24px);
  color: var(--muted); font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.14em; border: 1px dashed var(--line);
}

/* =========================================================
   Animations d'apparition
   ========================================================= */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .hero { grid-template-columns: 1fr; }
  .hero__portrait { max-width: 360px; order: -1; justify-self: center; }
  .profil { grid-template-columns: 1fr; }
  .cv { grid-template-columns: 1fr; }
  .gallery { columns: 2; }
  .section__download { margin-left: 0; width: 100%; text-align: center; margin-top: 0.5rem; }
}
@media (max-width: 520px) {
  .profil__skills { grid-template-columns: 1fr; }
  .gallery { columns: 1; }
  .reel__caption { flex-direction: column; }
}

/* Réduction d'animation */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .gallery__item img { transition: none; }
}
