/* ==========================================================================
   DTB Production — Feuille de style
   Mobile-first · Palette : #1800AD / #FFF0F8 / #FFE800 / #D7D7D7
   ========================================================================== */

/* ---------- 1. Variables ---------- */
:root {
  --blue: #1800AD;
  --blue-deep: #10007a;
  --pink: #FFF0F8;
  --yellow: #FFE800;
  --grey: #D7D7D7;
  --ink: #0d0640;          /* texte courant : bleu presque noir, plus doux que #000 */
  --muted: #4a4470;
  --white: #ffffff;

  --font-display: "Anton", Impact, "Arial Narrow", sans-serif;
  --font-serif: "Sarabun", system-ui, sans-serif;   /* titres : SemiBold Italic */
  --font-sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Échelle typographique fluide */
  --step--1: clamp(0.8rem, 0.78rem + 0.1vw, 0.875rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.6rem, 1.3rem + 1.4vw, 2.5rem);
  --step-3: clamp(2.4rem, 1.7rem + 3.2vw, 4.5rem);
  --step-4: clamp(2.9rem, 1.8rem + 5.4vw, 7rem);

  --space-s: 1rem;
  --space-m: 1.25rem;
  --space-l: clamp(1.25rem, 1rem + 1vw, 2rem);
  --space-xl: clamp(2.25rem, 1.6rem + 2.2vw, 3.5rem);

  --radius: 4px;
  --gutter: 16px;
  --max: 1200px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (min-width: 768px) {
  :root { --gutter: 32px; }
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--pink);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video, iframe { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 2px;
}
.section--blue :focus-visible,
.site-footer :focus-visible { outline-color: var(--yellow); }

::selection { background: var(--yellow); color: var(--blue); }

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

.nowrap { white-space: nowrap; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--gutter); top: -100px;
  z-index: 100;
  background: var(--yellow); color: var(--blue);
  padding: .75rem 1rem; font-weight: 600;
  border-radius: var(--radius);
}
.skip-link:focus { top: var(--gutter); }

/* Étiquette timecode (motif récurrent) */
.tc {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blue);
}

em { font-style: italic; }

/* ---------- 3. Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem;
  min-height: 48px;
  padding: .8rem 1.5rem;
  background: var(--yellow);
  color: var(--blue);
  border: 2px solid var(--blue);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s;
  box-shadow: 0 0 0 0 var(--blue);
}
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 3px 3px 0 0 var(--blue);
}
.btn:active { transform: none; box-shadow: none; }

.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--white); }

.btn-blue { background: var(--blue); color: var(--white); }
.btn-blue:hover { box-shadow: 3px 3px 0 0 var(--ink); }

.btn-small { min-height: 40px; padding: .45rem 1.1rem; font-size: var(--step--1); }

/* ---------- 4. En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--pink);   /* opaque : le fond du logo s'y fond parfaitement */
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--grey); }

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px;
}

.logo { display: inline-flex; align-items: center; }
.logo img {
  height: 44px; width: auto;
  transition: transform .3s var(--ease);
}
.logo:hover img { transform: rotate(-3deg); }

.nav-toggle {
  display: inline-grid; place-items: center;
  width: 48px; height: 48px;
  background: none; border: 0; cursor: pointer;
  margin-right: -12px;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block; width: 24px; height: 2px;
  background: var(--blue);
  transition: transform .3s var(--ease), opacity .2s;
}
.nav-toggle-bar { position: relative; }
.nav-toggle-bar::before,
.nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bar::before { top: -7px; }
.nav-toggle-bar::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

.nav {
  position: fixed; inset: 64px 0 auto 0;
  background: var(--pink);
  border-bottom: 1px solid var(--grey);
  padding: var(--space-m) var(--gutter) var(--space-l);
  transform: translateY(-8px);
  opacity: 0; visibility: hidden;
  transition: opacity .25s, transform .25s var(--ease), visibility .25s;
}
.nav.is-open { opacity: 1; visibility: visible; transform: none; }
.nav ul { display: grid; gap: .25rem; }
.nav a:not(.btn) {
  display: block; padding: .6rem 0;
  font-family: var(--font-serif); font-style: italic; font-weight: 600;
  font-size: var(--step-2);
  color: var(--blue);
  text-decoration: none;
}
.nav .btn { margin-top: var(--space-s); }
.nav a:not(.btn)[aria-current="true"] {
  background: var(--yellow);
  width: fit-content;
  padding-inline: .5rem;
  margin-inline: -.5rem;
  border-radius: var(--radius);
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .nav {
    position: static; padding: 0; border: 0; background: none;
    opacity: 1; visibility: visible; transform: none;
  }
  .nav ul { display: flex; align-items: center; gap: 2rem; }
  .nav a:not(.btn) {
    font-family: var(--font-sans); font-size: var(--step--1);
    font-weight: 500; padding: .25rem 0;
    background: linear-gradient(var(--blue), var(--blue)) left bottom / 0 1px no-repeat;
    transition: background-size .3s var(--ease);
  }
  .nav a:not(.btn):hover { background-size: 100% 1px; }
  .nav a:not(.btn)[aria-current="true"] { padding: .25rem .6rem; margin-inline: -.6rem; background: var(--yellow); }
  .nav .btn { margin-top: 0; }
}

/* ---------- 5. Accueil ---------- */
.hero { padding-block: var(--space-l); }

.hero .tc { display: inline-flex; align-items: center; gap: .6rem; }

.rec {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 2px var(--blue);
  animation: blink 1.6s steps(1) infinite;
}
@keyframes blink { 50% { opacity: .15; } }

.hero-title {
  margin-top: var(--space-m);
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(3.2rem, 1.2rem + 9vw, 9.5rem);
  line-height: 1;
  letter-spacing: 0.005em;
  color: var(--blue);
}
.hero-title em {
  font-style: normal;
  background: linear-gradient(transparent 60%, var(--yellow) 60%, var(--yellow) 90%, transparent 90%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding-inline: .05em;
}

.hero-bottom {
  display: grid; gap: var(--space-m);
  margin-top: var(--space-l);
}
.hero-lead { max-width: 64ch; font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--blue); font-size: var(--step-1); line-height: 1.45; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.hero-facts {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin-top: var(--space-l);
  border-top: 1px solid var(--blue);
}
.hero-facts div { padding: var(--space-s) .5rem 0 0; }
.hero-facts dt { font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.hero-facts dd { font-family: var(--font-serif); font-style: italic; font-weight: 600; font-size: var(--step-1); color: var(--blue); line-height: 1.2; margin-top: .25rem; }

@media (min-width: 900px) {
  .hero { padding-top: var(--space-xl); }
  .hero-bottom { grid-template-columns: 1fr auto; align-items: end; }
  .hero-facts div { padding-right: var(--space-m); }
  .hero-facts div + div { border-left: 1px solid var(--grey); padding-left: var(--space-m); }
}

/* ---------- 6. Sections ---------- */
.section { padding-block: var(--space-xl); }
.section--rule { border-top: 1px solid var(--grey); }

.section-head { display: grid; gap: .5rem; margin-bottom: var(--space-l); }
.section-title {
  font-family: var(--font-serif);
  font-style: italic; font-weight: 600;
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--blue);
}
.section-intro { color: var(--muted); max-width: 70ch; }

/* ---------- 7. Portfolio ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: var(--space-l); }
.filter {
  min-height: 44px;
  padding: .5rem 1.1rem;
  background: transparent;
  border: 1px solid var(--blue);
  border-radius: 999px;
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.filter:hover { background: var(--white); }
.filter[aria-pressed="true"] { background: var(--blue); color: var(--white); }

.projects {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-l) var(--space-s);
  align-items: start;
}
/* Mobile et tablette : verticaux 2 par ligne, horizontaux pleine largeur */
.project--court { grid-column: span 2; }
.project--long { grid-column: 1 / -1; }

@media (min-width: 768px) {
  .projects { gap: var(--space-l) var(--space-m); }
}
/* Grand écran : verticaux 4 par ligne, horizontaux 2 par ligne, projet vedette pleine largeur */
@media (min-width: 1100px) {
  .project--court { grid-column: span 1; }
  .project--long { grid-column: span 2; }
  .project--featured { grid-column: 1 / -1; }
}

.project[hidden] { display: none; }

.project-btn {
  display: block; width: 100%;
  padding: 0; border: 0; background: none;
  text-align: left; cursor: pointer;
}

.poster {
  position: relative; display: grid; place-items: center;
  overflow: hidden;
  border-radius: var(--radius);
  isolation: isolate;
}
.project--court .poster { aspect-ratio: 9 / 16; }
.project--long .poster { aspect-ratio: 16 / 9; }

.poster img, .poster video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s var(--ease);
}

.poster--blue { background: var(--blue); color: var(--yellow); }
.poster--yellow { background: var(--yellow); color: var(--blue); }
.poster--grey { background: var(--grey); color: var(--blue); }
.poster--pink { background: var(--white); color: var(--blue); box-shadow: inset 0 0 0 1px var(--grey); }

/* Repères de cadrage façon viseur */
.poster::before {
  content: ""; position: absolute; inset: 12px; z-index: 1;
  background:
    linear-gradient(currentColor, currentColor) top left / 14px 1px,
    linear-gradient(currentColor, currentColor) top left / 1px 14px,
    linear-gradient(currentColor, currentColor) top right / 14px 1px,
    linear-gradient(currentColor, currentColor) top right / 1px 14px,
    linear-gradient(currentColor, currentColor) bottom left / 14px 1px,
    linear-gradient(currentColor, currentColor) bottom left / 1px 14px,
    linear-gradient(currentColor, currentColor) bottom right / 14px 1px,
    linear-gradient(currentColor, currentColor) bottom right / 1px 14px;
  background-repeat: no-repeat;
  opacity: .6;
  pointer-events: none;
}

.poster-art {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(2.5rem, 2rem + 3vw, 5rem);
  line-height: 1;
  transition: transform .6s var(--ease), opacity .3s;
}

.play {
  position: absolute; z-index: 2;
  right: 16px; bottom: 16px;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 0 1px var(--blue);
  display: grid; place-items: center;
  transition: transform .3s var(--ease), background .2s;
}
.play::after {
  content: ""; margin-left: 3px;
  border-style: solid; border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent var(--blue);
}

.project-btn:hover .poster-art,
.project-btn:hover .poster img { transform: scale(1.05); }
.project-btn:hover .play,
.project-btn:focus-visible .play { transform: scale(1.1); background: var(--yellow); }

.project-meta { display: grid; gap: .2rem; margin-top: .9rem; }
.project-title { font-weight: 600; color: var(--ink); line-height: 1.3; }
.project-info { font-family: var(--font-mono); font-size: .75rem; color: var(--muted); }

/* ---------- 8. À propos ---------- */
.about { display: grid; gap: var(--space-l); }

.portrait-placeholder {
  aspect-ratio: 4 / 5;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(24,0,173,.06) 14px 15px),
    var(--grey);
  border-radius: var(--radius);
  display: flex; align-items: flex-end;
  padding: 1rem;
}
.intro-video {
  display: block; width: 100%;
  padding: 0; border: 0; background: none;
  text-align: left; cursor: pointer;
}
.intro-video { max-width: 340px; }   /* vertical : pas trop haut sur mobile */
.intro-video .poster { aspect-ratio: 9 / 16; }
.intro-video-label .tc { font-style: normal; font-weight: 400; }
.intro-video-label {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem;
  margin-top: .9rem;
  font-family: var(--font-mono); font-style: normal; font-weight: 400; font-size: .75rem; color: var(--muted);   /* même style que « Montage + miniature » */
}
.intro-video:hover .poster img { transform: scale(1.05); }
.intro-video:hover .play,
.intro-video:focus-visible .play { transform: scale(1.1); background: var(--yellow); }

.about-text { display: grid; gap: var(--space-s); align-content: start; }
.about-text .section-title { margin-bottom: .5rem; }
/* Tout le texte de la rubrique : même police, même taille, même graisse */
.about-text p:not(.tc) {
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: 400;
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--ink);
  max-width: 75ch;
}

/* ----- Parcours : frise éditoriale (date à gauche, récit à droite) ----- */
.about-text .story {
  margin: .5rem 0;
  border-top: 1px solid var(--blue);
}
.story-clip {
  display: grid;
  grid-template-columns: 1fr;
  padding: .7rem 0 .75rem;
  border-bottom: 1px solid var(--grey);
}
.about-text .story-tc {
  display: flex; align-items: center; gap: .45rem;
  white-space: nowrap;
  align-self: start;
  margin: 0 0 .35rem;
  font-family: var(--font-mono); font-size: .75rem; line-height: 1.3;
  letter-spacing: .04em; text-transform: uppercase; color: var(--blue);
}
.story-clip h3 {
  font-family: var(--font-sans); font-weight: 600;
  font-size: 1.05rem; line-height: 1.35; color: var(--blue);
  margin-bottom: .2rem;
}
.about-text .story-clip p:not(.story-tc) { font-size: var(--step-0); line-height: 1.55; }

/* Année en cours : date surlignée, comme sur l'accueil */
.story-clip--now .story-tc span {
  background: linear-gradient(transparent 45%, var(--yellow) 45%, var(--yellow) 95%, transparent 95%);
  margin-left: -.15em; padding-inline: .15em;
}

@media (min-width: 600px) {
  .story-clip { grid-template-columns: 6.5rem 1fr; column-gap: 1.25rem; align-items: baseline; }
  .about-text .story-tc { margin: 0; align-self: baseline; }
}

/* Souris : texte réduit au repos, il s'agrandit au survol de l'année (pas sur écrans tactiles).
   On zoome (transform) au lieu de changer la taille : les retours à la ligne ne bougent pas. */
@media (hover: hover) {
  .about-text .story-clip p:not(.story-tc) {
    transform: scale(.84); transform-origin: left top;
    color: var(--muted);
    transition: transform .35s var(--ease), color .35s var(--ease);
  }
  .about-text .story-clip:hover p:not(.story-tc) { transform: none; color: var(--ink); }
}
@media (hover: hover) and (prefers-reduced-motion: reduce) {
  .about-text .story-clip p:not(.story-tc) { transition: none; }
}

.about-text .story-outro { font-style: italic; color: var(--muted); }


@media (min-width: 900px) {
  .about { grid-template-columns: 4fr 7fr; gap: var(--space-l); align-items: start; }
  .about-media { position: sticky; top: 6rem; }
}

/* ---------- 9. Services (fond bleu) ---------- */
.section--blue { background: var(--blue); color: var(--pink); }
.section--blue .tc,
.section--blue .section-title { color: var(--yellow); }

/* Portfolio : bandeau bleu (titre + filtres), vidéos sur fond rose */
.section--portfolio { padding-top: 0; }
.portfolio-band {
  background: var(--blue); color: var(--pink);
  padding-block: var(--space-xl) var(--space-l);
  margin-bottom: var(--space-l);
}
.portfolio-band .section-head { margin-bottom: var(--space-m); }
.portfolio-band .filters { margin-bottom: 0; }
.portfolio-band .tc,
.portfolio-band .section-title { color: var(--yellow); }
.portfolio-band .section-intro { color: rgba(255,240,248,.8); }
.portfolio-band :focus-visible { outline-color: var(--yellow); }
.portfolio-band .filter { border-color: rgba(255,240,248,.6); color: var(--pink); }
.portfolio-band .filter:hover { background: rgba(255,240,248,.12); }
.portfolio-band .filter[aria-pressed="true"] { background: var(--yellow); border-color: var(--yellow); color: var(--blue); }


.services { display: grid; gap: 0; border-top: 1px solid rgba(255,240,248,.3); }
.service {
  display: grid; gap: .75rem;
  padding-block: var(--space-l);
  border-bottom: 1px solid rgba(255,240,248,.3);
}
.service h3 {
  font-family: var(--font-serif); font-style: italic; font-weight: 600;
  font-size: clamp(1.4rem, 1.2rem + .5vw, 1.6rem); line-height: 1.1;
  color: var(--white);
}
.service > p:not(.tc) { color: rgba(255,240,248,.85); max-width: 70ch; }
.service-list { display: grid; gap: .4rem; margin-top: .5rem; }
.service-list li { position: relative; padding-left: 1.4rem; color: rgba(255,240,248,.85); }
.service-list li::before {
  content: ""; position: absolute; left: .2rem; top: calc(.75em - 3px);
  width: 6px; height: 6px; border-radius: 50%; background: var(--yellow);
}

.services-note {
  margin-top: var(--space-l);
  font-family: var(--font-serif); font-style: italic; font-weight: 300;
  font-size: .95rem; color: var(--pink);
}

@media (min-width: 900px) {
  .services { grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid rgba(255,240,248,.3); }
  .service { padding: var(--space-l) var(--space-m); border-bottom: 0; align-content: start; }
  .service:first-child { padding-left: 0; }
  .service + .service { border-left: 1px solid rgba(255,240,248,.3); }
}

/* ---------- 10. Méthode (timeline) ---------- */
.timeline { display: grid; gap: 0; position: relative; }
.step {
  position: relative;
  padding: 0 0 var(--space-l) 2rem;
  border-left: 2px solid var(--blue);
}
.step:last-child { padding-bottom: 0; border-left-color: transparent; }
.step::before {
  content: ""; position: absolute; left: -9px; top: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--yellow); border: 2px solid var(--blue);
}
.step-tc { font-family: var(--font-mono); font-size: var(--step--1); color: var(--blue); }
.step h3 {
  font-family: var(--font-serif); font-style: italic; font-weight: 600;
  font-size: clamp(1.4rem, 1.2rem + .5vw, 1.6rem); color: var(--blue); line-height: 1.1;
  margin: .3rem 0 .5rem;
}
.step p { color: var(--muted); max-width: 64ch; }

@media (min-width: 900px) {
  .timeline { grid-template-columns: repeat(4, 1fr); gap: var(--space-m); }
  .step {
    border-left: 0; border-top: 2px solid var(--blue);
    padding: var(--space-m) 0 0;
  }
  .step:last-child { border-top-color: var(--blue); }
  .step::before { left: 0; top: -9px; }
}

/* ---------- 11. Témoignages ---------- */
.quotes { display: grid; gap: var(--space-l); }
.quote { display: grid; gap: var(--space-s); align-content: start; }
.quote blockquote p {
  font-family: var(--font-serif); font-style: italic; font-weight: 300;
  font-size: var(--step-2);
  line-height: 1.2;
  color: var(--blue);
}
.quote figcaption { font-size: var(--step--1); color: var(--muted); }
.quote figcaption strong { color: var(--ink); }

@media (min-width: 900px) {
  .quotes { grid-template-columns: repeat(3, 1fr); gap: var(--space-m); }
  .quote + .quote { border-left: 1px solid var(--grey); padding-left: var(--space-m); }
  .quote blockquote p { font-size: var(--step-1); }
}
/* Avis : taille discrète, proche du texte courant */
.quotes .quote blockquote p { font-size: 1.125rem; line-height: 1.45; }
/* Un seul avis : pleine largeur */
.quotes--single { grid-template-columns: 1fr !important; }

/* ---------- 12. Contact (fond jaune) ---------- */
.section--yellow { background: var(--yellow); }

.contact { display: grid; gap: var(--space-m); }
.contact-intro { display: grid; gap: var(--space-s); align-content: start; }
.contact-intro > p:not(.tc) { max-width: 60ch; }

/* Contacts centrés sous le formulaire */
.contact-direct {
  display: flex; flex-direction: column; align-items: center;
  gap: var(--space-m);
  margin-top: var(--space-s); padding-top: var(--space-m);
  text-align: center;
}
.contact-direct li { display: grid; justify-items: center; gap: .3rem; }
.contact-direct a:not(.btn) { font-weight: 600; color: var(--blue); }
.contact-direct .btn { margin-top: .35rem; }

.form {
  display: grid; gap: var(--space-m);
  background: var(--pink);
  border: 2px solid var(--blue);
  border-radius: var(--radius);
  padding: var(--space-m);
}

.field-group { border: 0; padding: 0; margin: 0; }
.field-group legend, .field label {
  display: block; margin-bottom: .45rem;
  font-weight: 600; font-size: var(--step--1); color: var(--blue);
}

.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  position: relative;
  display: inline-flex; align-items: center;
  min-height: 44px; padding: .45rem 1rem;
  border: 1px solid var(--blue); border-radius: 999px;
  font-size: var(--step--1); cursor: pointer;
  transition: background .2s, color .2s;
}
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.chip:has(input:checked) { background: var(--blue); color: var(--white); }
.chip:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 3px; }

.field-row { display: grid; gap: var(--space-m); }
@media (min-width: 600px) { .field-row { grid-template-columns: 1fr 1fr; } }

.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: .7rem .9rem;
  background: var(--white);
  border: 1px solid var(--blue);
  border-radius: var(--radius);
  transition: box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--blue) 50%), linear-gradient(135deg, var(--blue) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px; background-repeat: no-repeat;
  padding-right: 2.5rem;
}
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: none; box-shadow: 0 0 0 3px var(--yellow), 0 0 0 5px var(--blue);
}
.field [aria-invalid="true"] { border-color: #b00020; border-width: 2px; }

.field-hint { margin-top: .35rem; font-size: .8rem; color: var(--muted); }
.field-error { margin-top: .35rem; font-size: .8rem; font-weight: 600; color: #b00020; }
.field-error:empty { display: none; }

.form-legal { font-size: .8rem; color: var(--muted); }
.form .btn { justify-self: start; }
.form-status { font-weight: 600; color: var(--blue); }
.form-status:empty { display: none; }

@media (min-width: 900px) {
  .form { padding: var(--space-l); }
}

/* ---------- 13. Pied de page ---------- */
.site-footer { background: var(--blue); color: var(--pink); padding-block: var(--space-m); }
.footer-bottom {
  display: grid; gap: var(--space-s);
  font-size: var(--step--1);
}
.footer-bottom ul { display: flex; gap: var(--space-m); }
@media (min-width: 768px) {
  .footer-bottom { grid-template-columns: 1fr auto; align-items: center; }
}

/* ---------- 14. Lecteur vidéo ---------- */
.player {
  width: min(100% - 2 * var(--gutter), 1100px);
  max-height: calc(100dvh - 2rem);
  padding: 0; border: 0;
  background: transparent; color: var(--pink);
  overflow: visible;
}
.player::backdrop { background: rgba(13, 6, 64, .92); }
.player[open] { animation: pop .3s var(--ease); }
@keyframes pop { from { opacity: 0; transform: scale(.97); } }

.player-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .75rem; }
.player-title { font-family: var(--font-serif); font-style: italic; font-weight: 600; font-size: var(--step-1); }
.player-close {
  min-height: 44px; padding: .4rem 1rem;
  background: var(--yellow); color: var(--blue);
  border: 0; border-radius: 999px;
  font-family: var(--font-mono); font-size: var(--step--1);
  cursor: pointer; flex-shrink: 0;
}
.player-frame {
  background: #000; border-radius: var(--radius); overflow: hidden;
  display: grid; place-items: center;
  max-height: calc(100dvh - 7rem);
}
.player-frame video, .player-frame iframe { width: 100%; max-height: calc(100dvh - 7rem); border: 0; }
.player-frame iframe { aspect-ratio: 16 / 9; height: auto; }
.player.is-vertical { width: min(100% - 2 * var(--gutter), 420px); }
.player.is-vertical .player-frame iframe { aspect-ratio: 9 / 16; }
/* Instagram ajoute un bandeau en haut et en bas : hauteur fixe plutôt qu'un ratio */
.player-frame iframe.is-instagram { aspect-ratio: auto; height: min(calc(100dvh - 7rem), 780px); background: #fff; }

.player-empty {
  aspect-ratio: 16 / 9; width: 100%;
  display: grid; place-items: center; text-align: center;
  padding: 2rem; color: var(--grey);
  font-family: var(--font-mono); font-size: var(--step--1);
}
.player.is-vertical .player-empty { aspect-ratio: 9 / 16; }

/* ---------- 15. Animations d'apparition ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* Surlignage jaune (comme « bulle » sur l'accueil) */
.mark {
  background: linear-gradient(transparent 58%, var(--yellow) 58%, var(--yellow) 92%, transparent 92%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding-inline: .08em;
}
