/* =========================================================================
   Artcadia Design — feuille de style unique
   Mobile-first, vanilla CSS, pas de framework.
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. Fontes self-hosted
   ------------------------------------------------------------------------- */

@font-face {
  font-family: 'Inter';
  src: url('/fonts/InterVariable.woff2') format('woff2-variations'),
       url('/fonts/InterVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Instrument Serif';
  src: url('/fonts/InstrumentSerif-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Instrument Serif';
  src: url('/fonts/InstrumentSerif-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* -------------------------------------------------------------------------
   2. Tokens
   ------------------------------------------------------------------------- */

:root {
  --paper: #fafafa;
  --paper-soft: #f1f1f1;
  --ink: #141414;
  --ink-muted: #5c5c5c;
  --ink-soft: #8a8a8a;
  --rule: #e5e5e5;
  --rule-soft: #ececec;

  --serif: 'Instrument Serif', 'Iowan Old Style', 'Apple Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  --page-max: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --measure: 62ch;

  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs:  0.75rem;
  --space-s:   1rem;
  --space-m:   1.5rem;
  --space-l:   2.5rem;
  --space-xl:  4rem;
  --space-2xl: 6rem;
  --space-3xl: clamp(6rem, 14vw, 11rem);
}

/* -------------------------------------------------------------------------
   3. Reset léger
   ------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  font-feature-settings: "kern", "liga", "calt", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden; /* sécurise le breakout full-bleed de .hero-media */
}

img, svg { display: block; max-width: 100%; height: auto; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: inherit; text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; text-decoration-color: var(--rule); transition: text-decoration-color 0.15s ease, color 0.15s ease; }
a:hover, a:focus-visible { text-decoration-color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}

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

/* -------------------------------------------------------------------------
   4. Utilitaires
   ------------------------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: -10000px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: var(--space-xs) var(--space-s);
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus { left: var(--gutter); top: var(--space-s); }

.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;
}

.section-num {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
}

/* -------------------------------------------------------------------------
   5. Masthead — header global
   ------------------------------------------------------------------------- */

.masthead {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  padding: clamp(1.5rem, 3vh, 2.5rem) var(--gutter);
  background: transparent;
  border-bottom: none;
}

.masthead-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.masthead-logo img {
  height: 80px;
  width: auto;
  /* Le logo source est bichromique sombre — on l'inverse pour qu'il passe en clair sur la vidéo */
  filter: brightness(0) invert(1);
}
.masthead-logo:focus-visible { outline-offset: 6px; }

.masthead-nav {
  display: flex;
  gap: clamp(1rem, 2.5vw, 2.25rem);
  font-size: 0.875rem;
}
.masthead-nav a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.01em;
  padding: 0.25em 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.masthead-nav a:hover,
.masthead-nav a:focus-visible {
  color: #fff;
  border-bottom-color: #fff;
  outline: none;
}

/* Sur mobile, on masque la nav — le logo seul tient lieu de masthead.
   Les 3 sections du one-page sont accessibles en scrollant. */
@media (max-width: 720px) {
  .masthead-nav { display: none; }
}

/* Pages sans hero immersif (politique de confidentialité) — masthead sticky standard */
.legal-page .masthead {
  position: sticky;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--rule-soft);
}
.legal-page .masthead-logo img {
  filter: none;
}
.legal-page .masthead-nav a {
  color: var(--ink-muted);
}
.legal-page .masthead-nav a:hover,
.legal-page .masthead-nav a:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* -------------------------------------------------------------------------
   6. Layout principal
   ------------------------------------------------------------------------- */

main {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding-block: var(--space-3xl);
}

/* Trait horizontal seulement entre sections — pas sur la première (juste après le hero) */
.section + .section {
  border-top: 1px solid var(--rule);
}

@media (min-width: 900px) {
  .section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: var(--space-xl);
    align-items: start;
  }

  /* Expertises : layout pleine largeur (titre au-dessus, piliers en dessous) */
  .section-pillars {
    display: block;
  }
}

/* Expertises : fond gris léger, étendu bord à bord du viewport */
.section-pillars {
  background: var(--paper-soft);
  box-shadow: 0 0 0 100vmax var(--paper-soft);
  clip-path: inset(0 -100vmax);
}

/* Pas de trait au-dessus / en-dessous du bloc gris — la couleur fait la séparation */
.section + .section-pillars,
.section-pillars + .section {
  border-top: none;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: var(--space-l);
}

@media (min-width: 900px) {
  .section-head {
    position: sticky;
    top: clamp(5rem, 10vh, 6.5rem);
    margin-bottom: 0;
  }

  /* Expertises : head statique au-dessus des colonnes */
  .section-pillars .section-head {
    position: static;
    margin-bottom: var(--space-xl);
  }
}

.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}

.section-body {
  max-width: var(--measure);
}

.section-body p {
  font-size: clamp(0.875rem, 0.9vw, 0.9375rem);
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 1.25em;
}
.section-body p:last-child { margin-bottom: 0; }

/* -------------------------------------------------------------------------
   7. Hero — stage immersif avec vidéo en background
   ------------------------------------------------------------------------- */

.hero-stage {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--ink);
  margin: 0 0 var(--space-3xl);
  isolation: isolate;
}

.hero-stage-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
}


/* Voile noir 45% par-dessus la vidéo */
.hero-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1;
  pointer-events: none;
}

.hero-stage-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: clamp(1.5rem, 3vw, 2.25rem);
  min-height: 100vh;
  min-height: 100dvh;
  /* Ancré à ~1/3 du bas, donc texte à ~2/3 depuis le haut */
  padding: clamp(6rem, 14vh, 9rem) var(--gutter) clamp(8rem, 33vh, 22rem);
  max-width: var(--page-max);
  margin: 0 auto;
  box-sizing: border-box;
  color: #fff;
}

.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.5rem, 11vw, 9.5rem);
  line-height: 0.95;
  letter-spacing: -0.025em;
  margin: 0;
  color: #fff;
}

.hero-baseline {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.5rem, 4.5vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: #fff;
  margin: 0;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .hero-baseline {
    white-space: normal;
    font-size: clamp(1.5rem, 6vw, 2.5rem);
    line-height: 1.15;
  }
}

.hero-lede {
  font-family: var(--sans);
  font-size: clamp(0.875rem, 0.95vw, 0.9375rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
  max-width: 52ch;
  margin: 0;
  font-weight: 400;
}

/* -------------------------------------------------------------------------
   8. Piliers
   ------------------------------------------------------------------------- */

.pillars {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

@media (min-width: 720px) {
  .pillars {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-l);
  }
}

.pillar {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  padding-top: var(--space-m);
  border-top: 1px solid var(--rule);
}

.pillar-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.625rem, 2.3vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-s);
  color: var(--ink);
  text-wrap: balance;
}
.pillar-title em {
  font-style: italic;
  font-weight: 400;
}

.pillar-lede {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink);
  margin: 0 0 var(--space-s);
}

.pillar-body {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--ink-muted);
  margin: 0;
}

/* -------------------------------------------------------------------------
   9. Contact
   ------------------------------------------------------------------------- */

.contact-lede {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.75rem, 3.2vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 var(--space-l);
  white-space: nowrap;
}

@media (max-width: 720px) {
  .contact-lede {
    white-space: normal;
    font-size: clamp(1.5rem, 5vw, 2rem);
  }
}

.contact-details {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.contact-email {
  font-family: var(--sans);
  font-size: clamp(1rem, 1.2vw, 1.1875rem);
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.25em;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--rule);
  width: max-content;
  max-width: 100%;
}
.contact-email:hover,
.contact-email:focus-visible {
  text-decoration-color: var(--ink);
}

.contact-address {
  font-size: 0.875rem;
  color: var(--ink-muted);
  font-style: normal;
}

/* -------------------------------------------------------------------------
   10. Footer
   ------------------------------------------------------------------------- */

.site-footer {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--ink);
  isolation: isolate;
  margin: 0;
  border-top: none;
}

.site-footer-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
}

.site-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
  pointer-events: none;
}

.site-footer-content {
  position: relative;
  z-index: 2;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--space-2xl) var(--gutter);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-l);
  font-size: 0.8125rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
}

@media (min-width: 720px) {
  .site-footer-content {
    grid-template-columns: 2fr 1fr;
    gap: var(--space-xl);
    align-items: end;
  }
  .site-footer-meta { text-align: right; }
}

.site-footer p { margin: 0 0 0.25em; }
.site-footer p:last-child { margin-bottom: 0; }

.site-footer a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-color: rgba(255, 255, 255, 0.3);
}
.site-footer a:hover,
.site-footer a:focus-visible {
  color: #fff;
  text-decoration-color: #fff;
}

/* -------------------------------------------------------------------------
   11. Pages secondaires (privacy)
   ------------------------------------------------------------------------- */

.legal {
  max-width: 68ch;
  margin: 0 auto;
  padding: var(--space-2xl) var(--gutter);
}

.legal h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-s);
}

.legal .legal-meta {
  font-size: 0.8125rem;
  color: var(--ink-soft);
  margin-bottom: var(--space-xl);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.legal h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.375rem, 2vw, 1.75rem);
  line-height: 1.2;
  margin: var(--space-xl) 0 var(--space-s);
  letter-spacing: -0.005em;
}

.legal p, .legal li {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--ink);
}

.legal ul {
  padding-left: 1.25em;
  margin: 0 0 1em;
}
.legal li { margin-bottom: 0.35em; }

.legal-back {
  display: inline-block;
  margin-top: var(--space-xl);
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

/* -------------------------------------------------------------------------
   12. Print
   ------------------------------------------------------------------------- */

@media print {
  .masthead, .skip-link { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
}
