/* =========================================================
   RUBEN CARLOS — PORTFOLIO · version courte, tons chauds
   ========================================================= */

:root {
  --bg: #14100c;
  --bg-2: #1b1510;
  --card: #231b14;
  --card-2: #2b2118;
  --line: rgba(244, 228, 205, 0.11);
  --line-strong: rgba(244, 228, 205, 0.22);
  --text: #f4eadb;
  --muted: #b5a48f;
  --accent: #f2a541;      /* ambre */
  --accent-2: #e2673a;    /* braise, pour les dégradés */
  --accent-ink: #1d1206;

  --f-display: "Archivo", system-ui, sans-serif;
  --f-body: "Inter Tight", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --radius: 16px;
  --nav-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 56px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; font-family: var(--f-display); font-stretch: 112%; line-height: 1.02; letter-spacing: -0.02em; }
p { margin: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.accent { color: var(--accent); }
.eyebrow { color: var(--muted); display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.rec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 12px var(--accent-2); animation: blink 1.6s steps(2) infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* Grain de pellicule */
.grain {
  position: fixed; inset: -50%; z-index: 100; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(4) infinite;
}
@keyframes grain { 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -2%); } }

/* ---------- Boutons & liens ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 16px; white-space: nowrap;
  transition: transform .25s var(--ease), background .25s, box-shadow .25s, border-color .25s;
}
.btn--primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 30px -10px rgba(242, 165, 65, .6); }
.btn--primary:hover { transform: translateY(-2px); background: #f7b65c; }
.btn--ghost { border-color: var(--line-strong); background: transparent; }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--small { min-height: 42px; padding: 0 18px; font-size: 14px; background: var(--accent); color: var(--accent-ink); }
.btn--small:hover { background: #f7b65c; }
.link-line { position: relative; font-weight: 500; padding-bottom: 2px; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 1px no-repeat; transition: color .2s; }
.link-line:hover { color: var(--accent); }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-inline: var(--gutter);
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: rgba(20, 16, 12, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.nav__logo { font-family: var(--f-display); font-weight: 900; font-size: 22px; letter-spacing: -0.02em; display: inline-flex; align-items: flex-start; gap: 3px; }
.nav__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-top: 3px; }
.nav__links { display: flex; gap: 30px; font-size: 15px; color: var(--muted); }
.nav__links a:hover { color: var(--text); }
@media (max-width: 720px) { .nav__links { display: none; } }

/* ---------- 1. Accueil ---------- */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding-top: var(--nav-h); isolation: isolate; overflow: hidden; }
.hero__media { position: absolute; inset: 0; z-index: -2; background: var(--bg-2); }
.hero__video { width: 100%; height: 100%; object-fit: cover; filter: saturate(.75) sepia(.25) brightness(.85); transform: scale(1.04); }
.hero__shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 80% at 80% 10%, rgba(226, 103, 58, .22), transparent 60%),
    linear-gradient(180deg, rgba(20, 16, 12, .55) 0%, rgba(20, 16, 12, .35) 35%, rgba(20, 16, 12, .92) 78%, var(--bg) 100%),
    linear-gradient(90deg, rgba(20, 16, 12, .75) 0%, transparent 70%);
}
.hero__content { padding-bottom: 40px; }
.hero__title { font-size: clamp(48px, min(9vw, 15vh), 128px); font-weight: 900; }
.hero__sub { margin-top: 24px; max-width: 34em; font-size: clamp(17px, 1.6vw, 20px); color: #e5d8c5; }
.hero__sub strong { color: var(--text); font-weight: 600; }
.hero__ctas { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; }

.facts {
  list-style: none; margin: 0 auto; padding-top: 0; padding-bottom: 40px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
}
.facts li { border-top: 1px solid var(--line-strong); padding: 18px 16px 0 0; display: flex; flex-direction: column; gap: 4px; }
.facts__value { font-family: var(--f-display); font-weight: 800; font-size: clamp(22px, 2.6vw, 32px); color: var(--accent); }
.facts__label { font-size: 14px; color: var(--muted); }
@media (max-width: 600px) {
  .facts { grid-template-columns: 1fr; }
  .facts li { flex-direction: row; align-items: baseline; gap: 12px; padding: 12px 0; }
  .facts__value { min-width: 4.8em; font-size: 22px; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(80px, 11vw, 140px); position: relative; }
.section__head { margin-bottom: clamp(32px, 4vw, 52px); max-width: 820px; }
.h2 { font-size: clamp(38px, 6vw, 76px); font-weight: 900; }
.section__lead { margin-top: 16px; color: var(--muted); font-size: 17px; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- 2. Projets ---------- */
.work { padding-bottom: clamp(56px, 7vw, 90px); }
.chips { position: sticky; top: var(--nav-h); z-index: 20; padding-block: 12px; background: linear-gradient(var(--bg) 70%, rgba(20, 16, 12, 0)); }
.chips__inner { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chips__inner::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg-2);
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  transition: color .2s, background .2s, border-color .2s;
}
.chip:hover { color: var(--text); border-color: var(--muted); }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip__count { opacity: .7; margin-left: 6px; }

.row { padding-top: clamp(28px, 4vw, 44px); }
.row + .row { margin-top: clamp(20px, 3vw, 36px); }
.row__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.row__title { font-size: clamp(24px, 3vw, 34px); font-weight: 800; }
.row__desc { color: var(--muted); font-size: 15px; margin-top: 6px; }
.row__meta { display: flex; align-items: center; gap: 12px; color: var(--muted); flex: none; }
.row__arrows { display: flex; gap: 6px; }
.row__arrow { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; display: grid; place-items: center; transition: border-color .2s, color .2s, opacity .2s; }
.row__arrow:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.row__arrow:disabled { opacity: .3; cursor: default; }
@media (hover: none) { .row__arrows { display: none; } }

.track {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  scroll-padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  padding-bottom: 8px; scrollbar-width: none;
}
.track::-webkit-scrollbar { display: none; }

.card {
  flex: none; scroll-snap-align: start; position: relative; overflow: hidden;
  border-radius: var(--radius); background: var(--card); border: 1px solid var(--line);
  padding: 0; text-align: left; isolation: isolate;
  transition: transform .35s var(--ease), border-color .35s;
}
.card--v { width: clamp(200px, 22vw, 260px); aspect-ratio: 9 / 16; }
.card--h { width: clamp(300px, 44vw, 560px); aspect-ratio: 16 / 9; }
.card:hover { transform: translateY(-4px); border-color: rgba(242, 165, 65, .5); }
.card img, .card video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card video { opacity: 0; transition: opacity .35s; }
.card.is-playing video { opacity: 1; }
.card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(20, 16, 12, .9)); z-index: 1; }
.card__info { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 2; }
.card__title { display: block; font-family: var(--f-display); font-weight: 800; font-size: 18px; line-height: 1.15; }
.card__sub { display: block; color: var(--muted); margin-top: 4px; }
.card__play {
  position: absolute; top: 12px; right: 12px; z-index: 2; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(20, 16, 12, .6); backdrop-filter: blur(6px); display: grid; place-items: center;
  transition: background .25s, color .25s;
}
.card:hover .card__play { background: var(--accent); color: var(--accent-ink); }

/* ---------- 3. Engagements ---------- */
.promises { background: var(--bg-2); border-block: 1px solid var(--line); }
.promises__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.promise { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px 28px; }
.promise__num { display: inline-block; padding: 4px 8px; border-radius: 6px; background: rgba(242, 165, 65, .12); color: var(--accent); margin-bottom: 36px; }
.promise h3 { font-size: 22px; font-weight: 800; margin-bottom: 12px; }
.promise p { color: var(--muted); font-size: 15.5px; }
.promise:nth-child(2) { transition-delay: .08s; } .promise:nth-child(3) { transition-delay: .16s; } .promise:nth-child(4) { transition-delay: .24s; }
@media (max-width: 1000px) { .promises__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .promises__grid { grid-template-columns: 1fr; } .promise__num { margin-bottom: 20px; } }

/* ---------- 4. Méthode ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: s; }
.step { position: relative; padding: 26px 24px 0 0; border-top: 1px solid var(--line-strong); }
.step::before { content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px rgba(242, 165, 65, .7); }
.step__tc { color: var(--accent); }
.step h3 { font-size: 22px; font-weight: 800; margin: 10px 0 10px; }
.step p { color: var(--muted); font-size: 15.5px; }
.step:nth-child(2) { transition-delay: .08s; } .step:nth-child(3) { transition-delay: .16s; } .step:nth-child(4) { transition-delay: .24s; }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: 0; border-left: 1px solid var(--line-strong); margin-left: 4px; }
  .step { border-top: 0; padding: 0 0 30px 26px; }
  .step::before { top: 4px; left: -5px; }
}

.offers { margin-top: clamp(56px, 7vw, 88px); }
.offers__intro { color: var(--muted); margin-bottom: 18px; }
.offers__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.offer { position: relative; padding: 26px 24px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); }
.offer h3 { font-size: 24px; font-weight: 800; }
.offer__for { color: var(--accent); margin: 8px 0 14px; }
.offer p:last-child { color: var(--muted); font-size: 15.5px; }
.offer--featured { background: linear-gradient(160deg, #3a2716, var(--card) 70%); border-color: rgba(242, 165, 65, .45); }
.offer__badge { position: absolute; top: -11px; right: 18px; background: var(--accent); color: var(--accent-ink); padding: 4px 10px; border-radius: 999px; font-size: 11px; }
@media (max-width: 860px) { .offers__grid { grid-template-columns: 1fr; } }

/* ---------- 5. FAQ ---------- */
.faq { padding-top: 0; }
.faq__inner { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(24px, 6vw, 80px); align-items: start; }
.faq__inner .section__head { position: sticky; top: calc(var(--nav-h) + 24px); }
@media (max-width: 860px) { .faq__inner { grid-template-columns: 1fr; } .faq__inner .section__head { position: static; } }
.qa { border-bottom: 1px solid var(--line); }
.qa:first-child { border-top: 1px solid var(--line); }
.qa summary {
  list-style: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative;
  font-family: var(--f-display); font-weight: 700; font-size: clamp(18px, 2vw, 22px); line-height: 1.25;
  transition: color .2s;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-family: var(--f-body); font-weight: 400; font-size: 28px; color: var(--accent); transition: transform .3s var(--ease); }
.qa[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.qa summary:hover { color: var(--accent); }
.qa p { padding: 0 44px 24px 0; color: var(--muted); }

/* ---------- 6. Contact ---------- */
.contact { overflow: hidden; background: var(--bg-2); border-top: 1px solid var(--line); }
.contact__glow { position: absolute; width: 900px; height: 900px; left: -300px; bottom: -500px; border-radius: 50%; background: radial-gradient(circle, rgba(226, 103, 58, .22), transparent 65%); pointer-events: none; }
.contact__inner { position: relative; display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
@media (max-width: 900px) { .contact__inner { grid-template-columns: 1fr; } }
.contact__title { font-size: clamp(40px, 5.4vw, 70px); }
.contact__text { margin-top: 20px; color: var(--muted); max-width: 30em; }
.contact__direct { margin-top: 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }

.form { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 3vw, 32px); display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field__label { font-size: 14px; font-weight: 600; color: var(--text); padding: 0; }
.field__label em { font-style: normal; font-weight: 400; color: var(--muted); margin-left: 6px; font-size: 13px; }
.field input, .field textarea {
  width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line-strong); border-radius: 12px;
  padding: 13px 14px; font: inherit; font-size: 16px; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input::placeholder, .field textarea::placeholder { color: #7f705f; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(242, 165, 65, .18); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pick label { position: relative; }
.pick input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pick span { display: inline-block; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 14px; color: var(--muted); transition: all .2s; }
.pick input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.pick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.pick label:hover span { color: var(--text); }
.form__error { color: #ff9a7a; font-size: 14px; }
.form__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.form__actions .btn { flex: 1 1 200px; }

/* ---------- Pied de page ---------- */
.footer { padding-top: 56px; border-top: 1px solid var(--line); overflow: hidden; }
.footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; }
.footer__credits { color: var(--muted); max-width: 46em; line-height: 1.8; }
.footer__links { display: flex; gap: 22px; font-weight: 500; }
.footer__links a:hover { color: var(--accent); }
.footer__word {
  font-family: var(--f-display); font-weight: 900; font-stretch: 112%; letter-spacing: -0.04em; white-space: nowrap;
  font-size: clamp(56px, 15.5vw, 220px); line-height: .9; text-align: center; margin-top: 40px;
  background: linear-gradient(180deg, var(--card-2), var(--bg)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--muted); padding-block: 22px 28px; border-top: 1px solid var(--line); }
.footer__legal a:hover { color: var(--accent); }

/* ---------- Lecteur ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(10, 8, 6, .94); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 60px var(--gutter) 24px; }
.lightbox[hidden] { display: none; }
.lightbox__stage { width: 100%; max-width: 1100px; max-height: calc(100svh - 120px); display: flex; justify-content: center; }
.lightbox__stage video { max-width: 100%; max-height: calc(100svh - 120px); border-radius: 12px; background: #000; }
.lightbox__close { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; font-size: 18px; }
.lightbox__close:hover { border-color: var(--accent); color: var(--accent); }
.lightbox__caption { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .grain, .rec-dot { animation: none; }
}
