/* =========================================================
   TOKENS
========================================================= */
:root {
  --paper:      #F2E7D0;  /* papier kraft chaud */
  --paper-dark: #E4D2A8;  /* variante plus dorée du papier */
  --ink:        #241507;  /* encre brun très sombre, presque noir */
  --ink-soft:   #55391F;  /* texte secondaire, brun chaud */
  --red:        #E8401F;  /* accent principal — rouge-brique marqueur */
  --blue:       #C97A17;  /* accent secondaire — ocre / moutarde */
  --yellow:     #FFAE00;  /* accent tertiaire — ambre chaud */

  --font-display: 'Anton', sans-serif;
  --font-body:    'Space Grotesk', sans-serif;
  --font-tag:     'Caveat', cursive;

  --ease-snap: cubic-bezier(.16,1,.3,1);
  --ease-out:  cubic-bezier(.22,1,.36,1);

  --nav-h: 84px;
}

@media (max-width: 720px) {
  :root { --nav-h: 68px; }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  overflow-x: hidden;
  min-height: 100vh;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

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

/* =========================================================
   TEXTURE PAPIER (grain léger, perf-friendly, pas d'image)
========================================================= */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image:
    radial-gradient(circle at 1px 1px, var(--ink) 1px, transparent 0);
  background-size: 3px 3px;
}

/* =========================================================
   CURSEUR PERSONNALISÉ
========================================================= */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--red);
}
.cursor-ring {
  width: 34px; height: 34px;
  border: 1.5px solid var(--ink);
  transition: width .2s var(--ease-out), height .2s var(--ease-out), border-color .2s;
}
.cursor-ring.is-hover {
  width: 56px; height: 56px;
  border-color: var(--red);
}
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* =========================================================
   RIDEAU DE TRANSITION ENTRE PAGES
========================================================= */
.curtain {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: #0B0C0E;
  transform: scaleY(0);
  transform-origin: bottom;
  pointer-events: none;
}
.curtain.is-active {
  pointer-events: all;
}
.curtain-tape {
  position: absolute;
  height: 46px;
  width: 200px;
  background: repeating-linear-gradient(45deg, var(--yellow), var(--yellow) 14px, var(--ink) 14px, var(--ink) 28px);
  opacity: 0;
}
.curtain-tape--1 { top: 30%; left: -40px; transform: rotate(-6deg); }
.curtain-tape--2 { bottom: 25%; right: -40px; transform: rotate(5deg); }

/* =========================================================
   TOPBAR / NAV
========================================================= */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 48px);
  background: var(--paper);
  border-bottom: 3px solid var(--ink);
}

.logo {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 28px);
  letter-spacing: 0.5px;
  position: relative;
  z-index: 10;
}
.logo-dot { color: var(--red); }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 34px);
}
.nav a {
  position: relative;
  font-weight: 600;
  font-size: 15px;
  padding: 6px 2px;
}
.nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 3px;
  background: var(--red);
  transition: right .28s var(--ease-out);
}
.nav a:not(.nav-cta):hover::after,
.nav a.is-active::after {
  right: 0;
}
.nav a.is-active { color: var(--red); }

.nav-cta {
  background: var(--ink);
  color: var(--paper) !important;
  padding: 10px 20px !important;
  border-radius: 100px;
  transform: rotate(-2deg);
  transition: transform .25s var(--ease-out), background .25s;
}
.nav-cta:hover {
  transform: rotate(0deg) scale(1.05);
  background: var(--red);
}

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 310;
}
.burger span {
  display: block;
  height: 3px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .3s var(--ease-out), opacity .3s;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 860px) {
  .burger { display: flex; }
  .nav {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(78vw, 340px);
    background: var(--ink);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 40px;
    transform: translateX(100%);
    transition: transform .4s var(--ease-snap);
  }
  .nav.is-open { transform: translateX(0); }
  .nav a { color: var(--paper); font-size: 22px; font-family: var(--font-display); letter-spacing: .5px; }
  .nav a.is-active { color: var(--yellow); }
  .nav a:not(.nav-cta)::after { background: var(--yellow); }
  .nav-cta { color: var(--ink) !important; background: var(--yellow); }
}

/* =========================================================
   PAGES / ROUTAGE
========================================================= */
#app {
  padding-top: var(--nav-h);
}

.page {
  display: none;
  min-height: calc(100vh - var(--nav-h));
  padding: clamp(40px, 6vw, 90px) clamp(20px, 5vw, 64px) 100px;
  position: relative;
}
.page.is-active {
  display: block;
}
.page.is-entering {
  animation: pageIn .7s var(--ease-out) both;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   HERO (ACCUEIL)
========================================================= */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h) - 40px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-title {
  margin: 0;
  line-height: 0.92;
}
.hero-line--1 {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(58px, 13vw, 168px);
  letter-spacing: -1px;
}
.hero-line--2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 18px;
  font-family: var(--font-display);
  font-size: clamp(26px, 5.4vw, 56px);
  color: var(--red);
  margin-top: 6px;
}
.hero-line--2 em {
  font-style: normal;
}
.hero-line--2 .amp {
  font-family: var(--font-tag);
  color: var(--ink);
  font-size: 1.3em;
  transform: rotate(-8deg);
  display: inline-block;
}

.hero-tagline {
  max-width: 620px;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.5;
  margin: 28px 0 40px;
  color: var(--ink-soft);
}
.hero-tagline-mark {
  background: var(--yellow);
  padding: 0 6px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.hero-scribble {
  position: absolute;
  font-family: var(--font-tag);
  font-size: 26px;
  color: var(--red);
  transform: rotate(-10deg);
}
.hero-scribble--1 {
  top: calc(50% - 40px);
  right: 6%;
}
@media (max-width: 720px) { .hero-scribble--1 { display: none; } }

.hero-sticker {
  position: absolute;
}
.hero-sticker--rec {
  top: 4%;
  right: 2%;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  padding: 8px 14px;
  border: 2px solid var(--ink);
  border-radius: 100px;
  transform: rotate(4deg);
  background: var(--paper);
}
.rec-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
  animation: blink 1.4s infinite;
}
@keyframes blink { 50% { opacity: 0.25; } }

.hero-sticker--tape {
  top: -10px;
  left: 8%;
  width: 140px;
  height: 34px;
  background: repeating-linear-gradient(45deg, var(--yellow), var(--yellow) 10px, var(--ink) 10px, var(--ink) 20px);
  opacity: 0.9;
  transform: rotate(-4deg);
}

.hero-marquee {
  position: absolute;
  left: -20px; right: -20px;
  bottom: 24px;
  overflow: hidden;
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  padding: 10px 0;
  background: var(--ink);
}
.hero-marquee-track {
  display: flex;
  white-space: nowrap;
  animation: marquee 18s linear infinite;
  font-family: var(--font-display);
  font-size: clamp(16px, 2.4vw, 22px);
  color: var(--paper);
}
.hero-marquee-track span {
  flex: 0 0 auto;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* =========================================================
   BOUTONS
========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  padding: 15px 26px;
  border-radius: 100px;
  border: 2.5px solid var(--ink);
  cursor: pointer;
  transition: transform .22s var(--ease-out), background .22s, color .22s, box-shadow .22s;
  background: none;
}
.btn-arrow { width: 18px; height: 18px; transition: transform .25s var(--ease-out); }
.btn:hover .btn-arrow { transform: translateX(4px); }
.btn-arrow--back { transform: rotate(180deg); }
.btn:hover .btn-arrow--back { transform: rotate(180deg) translateX(4px); }

.btn--primary {
  background: var(--ink);
  color: var(--paper);
}
.btn--primary:hover {
  background: var(--red);
  border-color: var(--red);
  color: var(--paper);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--ink);
}
.btn--outline {
  background: transparent;
  color: var(--ink);
}
.btn--outline:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--ink);
  background: var(--yellow);
}
.btn--ghost {
  border-color: transparent;
  background: transparent;
  padding-left: 8px;
}
.btn--ghost:hover { color: var(--red); }

/* =========================================================
   SECTION HEAD (commun)
========================================================= */
.section-head {
  max-width: 760px;
  margin: 0 auto 56px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 84px);
  line-height: 0.95;
  margin: 0 0 12px;
}
.section-title-alt {
  color: var(--red);
}
.section-sub {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 480px;
}

/* =========================================================
   MONTAGE — GRILLE PROJETS
========================================================= */
.projects-grid {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 56px 48px;
}
@media (max-width: 860px) {
  .projects-grid { grid-template-columns: 1fr; gap: 56px; max-width: 640px; }
}

.project-card {
  position: relative;
  cursor: pointer;
  opacity: 0;
  transform: translateY(30px);
}
.project-card.is-visible {
  animation: cardIn .6s var(--ease-out) forwards;
}
@keyframes cardIn {
  to { opacity: 1; transform: translateY(0); }
}
.project-card:nth-child(3n+1) { transform: translateY(30px) rotate(-1.4deg); }
.project-card:nth-child(3n+2) { transform: translateY(30px) rotate(1.2deg); }
.project-card:nth-child(3n+3) { transform: translateY(30px) rotate(-0.6deg); }
.project-card.is-visible:nth-child(3n+1) { animation-name: cardInRotA; }
.project-card.is-visible:nth-child(3n+2) { animation-name: cardInRotB; }
.project-card.is-visible:nth-child(3n+3) { animation-name: cardInRotC; }
@keyframes cardInRotA { to { opacity: 1; transform: translateY(0) rotate(-1.4deg); } }
@keyframes cardInRotB { to { opacity: 1; transform: translateY(0) rotate(1.2deg); } }
@keyframes cardInRotC { to { opacity: 1; transform: translateY(0) rotate(-0.6deg); } }

.project-thumb {
  position: relative;
  aspect-ratio: 16/9;
  border: 3px solid var(--ink);
  overflow: hidden;
  background: var(--ink);
  box-shadow: 9px 9px 0 var(--ink);
  transition: box-shadow .25s var(--ease-out), transform .25s var(--ease-out);
}
.project-card:nth-child(3n+1) .project-thumb { box-shadow: 9px 9px 0 var(--red); }
.project-card:nth-child(3n+2) .project-thumb { box-shadow: 9px 9px 0 var(--blue); }
.project-card:nth-child(3n+3) .project-thumb { box-shadow: 9px 9px 0 var(--yellow); }
.project-card:hover .project-thumb {
  transform: translate(-4px, -4px);
}
.project-card:nth-child(3n+1):hover .project-thumb { box-shadow: 13px 13px 0 var(--red); }
.project-card:nth-child(3n+2):hover .project-thumb { box-shadow: 13px 13px 0 var(--blue); }
.project-card:nth-child(3n+3):hover .project-thumb { box-shadow: 13px 13px 0 var(--yellow); }
.project-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s var(--ease-out), filter .4s;
  filter: grayscale(60%) contrast(1.05);
}
.project-card:hover .project-thumb img {
  transform: scale(1.08);
  filter: grayscale(0%) contrast(1.05);
}
.project-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-play svg {
  width: 78px; height: 78px;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity .25s, transform .25s var(--ease-out);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.4));
}
.project-card:hover .project-play svg {
  opacity: 1;
  transform: scale(1);
}
.project-tag {
  position: absolute;
  top: 10px; left: 10px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  font-weight: 700;
  font-size: 12px;
  padding: 4px 10px;
  transform: rotate(-3deg);
}

.project-info { padding: 18px 4px 0; }
.project-channel {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--ink);
  margin: 0;
}

/* =========================================================
   CTA DE FIN DE SECTION (montage / motion design)
========================================================= */
.section-cta {
  max-width: 1200px;
  margin: 70px auto 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
}

/* =========================================================
   MOTION DESIGN
========================================================= */
.motion-showcase {
  max-width: 1100px;
  margin: 0 auto;
}
.motion-item {
  position: relative;
  margin-bottom: 44px;
}

/* Première vidéo (showreel) : pleine largeur, avec son nom */
.motion-item--first {
  max-width: 920px;
  margin: 0 auto 70px;
}
.motion-item--first .motion-caption {
  margin-top: 22px;
  text-align: center;
}
.motion-item--first .motion-caption h3 {
  font-family: var(--font-display);
  font-size: 26px;
  margin: 0;
}

/* Vidéos suivantes : disposition en quinconce */
.motion-item--quinconce {
  width: 74%;
}
.motion-item--left {
  margin-right: auto;
  margin-left: 0;
  transform: rotate(-1deg);
}
.motion-item--right {
  margin-left: auto;
  margin-right: 0;
  transform: rotate(1deg);
}
@media (max-width: 760px) {
  .motion-item--quinconce {
    width: 100%;
    transform: none !important;
  }
}

.motion-frame {
  position: relative;
  border: 3px solid var(--ink);
  background: var(--ink);
  box-shadow: 10px 10px 0 var(--yellow);
}
.motion-item--right .motion-frame {
  box-shadow: -10px 10px 0 var(--red);
}
.motion-number {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 2;
  background: var(--yellow);
  color: var(--ink);
  border: 2px solid var(--ink);
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1;
  padding: 6px 12px;
  transform: rotate(-4deg);
}
.motion-item--right .motion-number {
  background: var(--red);
  color: var(--paper);
  left: auto;
  right: 14px;
  transform: rotate(4deg);
}
.motion-frame video {
  width: 100%;
  display: block;
  aspect-ratio: 16/9;
  background: #000;
}

/* =========================================================
   À PROPOS
========================================================= */
.about {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 70px;
  align-items: start;
}
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; gap: 50px; }
}

.about-portrait {
  position: relative;
}
.about-portrait-frame {
  aspect-ratio: 4/5;
  border: 3px solid var(--ink);
  background:
    repeating-linear-gradient(135deg, var(--paper-dark) 0 18px, var(--paper) 18px 36px);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-2deg);
  box-shadow: 12px 12px 0 var(--ink);
}
.about-portrait-tag {
  font-family: var(--font-display);
  font-size: 140px;
  color: var(--red);
  opacity: 0.9;
}
.about-sticker {
  position: absolute;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 100px;
}
.about-sticker--1 { top: 6%; right: -10%; transform: rotate(6deg); background: var(--red); }
.about-sticker--2 { bottom: 20%; left: -12%; transform: rotate(-5deg); background: var(--blue); color: var(--paper); }
.about-sticker--3 { bottom: -4%; right: 4%; transform: rotate(3deg); background: var(--yellow); color: var(--ink); }
@media (max-width: 500px) {
  .about-sticker--1, .about-sticker--2 { display: none; }
}

.about-text p {
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0 0 24px;
  max-width: 620px;
}
.about-hello {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 44px);
  color: var(--ink);
  line-height: 1.1;
}
.about-name { color: var(--red); }
.hl {
  background: var(--yellow);
  padding: 0 4px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  color: var(--ink);
}

/* =========================================================
   CONTACT — FORMULAIRE
========================================================= */
.contact-wrap {
  max-width: 640px;
  margin: 0 auto 80px;
}
.contact-form {
  border: 3px solid var(--ink);
  padding: clamp(24px, 4vw, 44px);
  position: relative;
  background: var(--paper);
  box-shadow: 10px 10px 0 var(--red);
}
.form-step-label {
  display: inline-block;
  font-family: var(--font-tag);
  font-size: 22px;
  color: var(--red);
  margin-bottom: 22px;
  transform: rotate(-2deg);
}
.field {
  display: block;
  margin-bottom: 22px;
}
.field-label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
}
.field input[type="text"],
.field textarea {
  width: 100%;
  border: 2px solid var(--ink);
  background: var(--paper);
  padding: 13px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  resize: vertical;
  transition: box-shadow .2s, transform .2s;
}
.field input[type="text"]:focus,
.field textarea:focus {
  outline: none;
  box-shadow: 4px 4px 0 var(--ink);
  transform: translate(-2px, -2px);
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip {
  border: 2px solid var(--ink);
  background: transparent;
  padding: 10px 16px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, color .2s, transform .2s;
}
.chip:hover { transform: translateY(-2px); }
.chip.is-selected {
  background: var(--ink);
  color: var(--paper);
}

.form-step-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.contact-note {
  margin-top: 22px;
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 560px;
}
.contact-note strong { color: var(--ink); }

/* =========================================================
   RÉSEAUX SOCIAUX
========================================================= */
.socials {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}
.social-link {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 2.5px solid var(--ink);
  border-radius: 100px;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 14px;
  transition: transform .22s var(--ease-out), background .22s, color .22s;
}
.social-link svg { width: 18px; height: 18px; }
.social-link:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translate(-2px, -2px) rotate(-2deg);
}

/* =========================================================
   MODALE VIDÉO
========================================================= */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease-out);
}
.video-modal.is-open {
  opacity: 1;
  pointer-events: all;
}
.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(21, 19, 16, 0.9);
}
.video-modal-box {
  position: relative;
  width: min(920px, 100%);
  transform: scale(0.92);
  transition: transform .3s var(--ease-snap);
}
.video-modal.is-open .video-modal-box {
  transform: scale(1);
}
.video-modal-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border: 3px solid var(--paper);
}
.video-modal-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.video-modal-close {
  position: absolute;
  top: -46px;
  right: 0;
  background: var(--paper);
  border: 2px solid var(--paper);
  border-radius: 50%;
  width: 38px; height: 38px;
  font-size: 16px;
  cursor: pointer;
}

/* =========================================================
   FOCUS VISIBLE (accessibilité clavier)
========================================================= */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
