/*
 * Médiablue - feuille de style commune des pages refondues (2026)
 * Charte : prune, miel et lin. Titres Bricolage Grotesque, accents Instrument Serif, texte Figtree.
 * Polices auto-hébergées (aucun appel à Google Fonts) : voir /fonts/.
 * Les sections propres à une page vont dans sa propre feuille (ex. css/accueil.css).
 */

@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/bricolage-grotesque.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }

:root {
  --paper: #f6f1ef;
  --paper-2: #fcf9f7;
  --ink: #2a1a26;
  --muted: #6b5864;
  --line: #e6dbd8;
  --plum: #4a2545;
  --plum-deep: #351a31;
  --on-plum: #f6f1ef;
  --on-plum-muted: #d7c2d0;
  --honey: #e9b44c;
  --print: #4a2545;
  --linen: #efe3d3;
  --linen-ink: #6b4a1f;
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --nav-h: 74px;
}
:root { --accent-ink: var(--plum); color-scheme: light; }
/* Thème sombre : selon le réglage du système, sauf choix explicite du visiteur (data-theme sur <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1a1218; --paper-2: #22171f; --ink: #f1e9ec; --muted: #bba9b4; --line: #3a2a35;
    --plum: #3b1f37; --plum-deep: #120b11; --on-plum: #f1e9ec; --on-plum-muted: #cdb6c5;
    --honey: #f0c062; --print: #e4d3dc; --linen: #30231a; --linen-ink: #ecc994;
    --accent-ink: var(--honey);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --paper: #1a1218; --paper-2: #22171f; --ink: #f1e9ec; --muted: #bba9b4; --line: #3a2a35;
    --plum: #3b1f37; --plum-deep: #120b11; --on-plum: #f1e9ec; --on-plum-muted: #cdb6c5;
    --honey: #f0c062; --print: #e4d3dc; --linen: #30231a; --linen-ink: #ecc994;
    --accent-ink: var(--honey);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 1.0625rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; margin: 0; }
p { margin: 0; }
em.s { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, 4.5vw); padding-right: max(16px, 4.5vw); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 10; background: var(--honey); color: #1b1218; padding: 10px 16px; border-radius: 999px; font-weight: 600; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--focus, var(--accent-ink)); outline-offset: 3px; }
/* Sur les bandeaux sombres, le contour de focus passe en miel pour rester visible. */
.close, .site-footer, .player { --focus: var(--honey); }

/* Navigation */
.site-nav { position: sticky; top: 0; z-index: 3; background: var(--paper); background: color-mix(in srgb, var(--paper) 88%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); padding-top: env(safe-area-inset-top, 0px); }
.site-nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; padding-bottom: 16px; flex-wrap: wrap; }
.mark { display: inline-flex; align-items: baseline; gap: 2px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.35rem; letter-spacing: -.02em; }
.mark em.s { font-size: 1.5rem; color: var(--accent-ink); }
.links { display: flex; gap: 26px; align-items: center; font-size: .97rem; font-weight: 500; }
.links a { text-decoration: none; color: var(--muted); }
.links a:hover { color: var(--ink); }
.links a.btn-honey, .links a.btn-honey:hover { color: #1b1218; }
.site-nav { position: sticky; }
.nav-pages { display: flex; gap: 26px; align-items: center; }
.menu-toggle { display: none; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: transparent; color: var(--ink); font: inherit; font-weight: 600; font-size: .93rem; cursor: pointer; }
.menu-toggle::before { content: ""; width: 14px; height: 10px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat; }
.menu-toggle[aria-expanded="true"]::before { border: 0; height: 14px; background: linear-gradient(45deg, transparent 45%, currentColor 45%, currentColor 55%, transparent 55%), linear-gradient(-45deg, transparent 45%, currentColor 45%, currentColor 55%, transparent 55%); }
@media (max-width: 760px) {
  .links { gap: 10px; }
  .js .menu-toggle { display: inline-flex; }
  /* Panneau déroulant (sans JavaScript, les liens restent affichés en ligne) */
  .js .nav-pages { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 8px max(16px, 4.5vw) 18px; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px -24px rgba(40, 20, 35, .5); }
  .js .nav-pages.is-open { display: flex; }
  .js .nav-pages a { padding: 14px 0; font-size: 1.15rem; color: var(--ink); border-bottom: 1px solid var(--line); }
  .js .nav-pages a:last-child { border-bottom: 0; }
  html:not(.js) .nav-pages { flex-wrap: wrap; gap: 6px 16px; font-size: .9rem; }
}
@media (max-width: 430px) {
  .menu-toggle { width: 40px; padding: 0; justify-content: center; }
  .menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.theme-toggle { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 50%; border: 1.5px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; }
.theme-toggle:hover { border-color: var(--honey); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

/* Boutons */
.btn { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 1rem; padding: 13px 24px; border-radius: 999px; border: 1.5px solid transparent; transition: transform .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-honey { background: var(--honey); color: #1b1218; }
.btn-line { border-color: currentColor; color: var(--ink); }
.btn-small { padding: 9px 18px; font-size: .93rem; }
.btn-note { font-weight: 400; opacity: .8; }
.arrow { font-family: var(--serif); font-size: 1.25em; line-height: 1; }

/* Bandeaux */
.band { padding-top: clamp(72px, 10vw, 128px); padding-bottom: clamp(72px, 10vw, 128px); }
.label { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 22px; }
.label::before { content: ""; width: 22px; height: 2px; background: var(--honey); border-radius: 2px; }
h2 { font-weight: 650; font-size: clamp(2rem, 4.4vw, 3.3rem); line-height: 1.05; letter-spacing: -.025em; max-width: 20ch; }
h2 em.s { font-size: 1.08em; }
h1 { font-weight: 700; font-size: clamp(2.5rem, 6.2vw, 4.9rem); line-height: .98; letter-spacing: -.035em; }
h1 em.s { color: var(--accent-ink); font-size: 1.1em; letter-spacing: -.01em; }
.lede { font-size: clamp(1.1rem, 1.7vw, 1.28rem); color: var(--muted); max-width: 44ch; }
h3 { font-weight: 650; font-size: 1.3rem; line-height: 1.2; letter-spacing: -.01em; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* Grille de cartes */
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); margin-top: 52px; }
.card { background: var(--paper-2); border: 1px solid var(--line); border-radius: 22px; padding: 30px 28px 32px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.card .glyph { width: 46px; height: 46px; border-radius: 50%; background: var(--linen); color: var(--linen-ink); display: grid; place-items: center; font-family: var(--serif); font-style: italic; font-size: 1.5rem; margin-bottom: 6px; }
.card p { color: var(--muted); }

/* En-tête des pages intérieures */
.page-head { padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(40px, 6vw, 72px); }
.page-head h1 { font-size: clamp(2.3rem, 5.4vw, 4rem); line-height: 1; max-width: 18ch; }
.page-head .lede { margin-top: 22px; }
.page-head-ctas { margin-top: 30px; }

/* Texte long (pages légales, articles) */
.prose { padding-bottom: clamp(72px, 10vw, 128px); }
.prose > * { max-width: 68ch; }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: 2.2em; margin-bottom: .6em; max-width: none; }
.prose h3 { margin-top: 1.6em; margin-bottom: .4em; }
.prose p, .prose ul, .prose ol, .prose dl { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose a { color: var(--accent-ink); text-underline-offset: 2px; }
.prose dt { font-weight: 600; }
.prose dd { margin: 0 0 .8em; color: var(--muted); }
.prose .maj { color: var(--muted); font-size: .95rem; }

/* Lecteur vidéo (aperçu cliquable) */
.player { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; font: inherit; text-align: left; border-radius: clamp(12px, 1.6vw, 18px); overflow: hidden; background: var(--plum); color: var(--on-plum); margin-top: 12px; box-shadow: 0 24px 60px -24px rgba(40, 20, 35, .45); }
.player canvas { position: absolute; top: -10%; left: 35%; width: 70%; height: 120%; opacity: .35; }
.play-big { position: absolute; left: 50%; top: 50%; width: clamp(72px, 9vw, 104px); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: var(--honey); display: grid; place-items: center; transition: transform .2s ease; }
.play-big::after { content: ""; margin-left: 6px; border-left: 26px solid #1b1218; border-top: 16px solid transparent; border-bottom: 16px solid transparent; }
.player-meta { position: absolute; left: clamp(18px, 3vw, 36px); bottom: clamp(16px, 3vw, 32px); display: grid; gap: 2px; font-size: .95rem; color: var(--on-plum-muted); }
.player-launch { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: inherit; }
.player-launch:hover .play-big { transform: translate(-50%, -50%) scale(1.06); }
.player.is-playing { background: #000; }
.player.is-playing canvas { display: none; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-meta strong { font-family: var(--display); font-weight: 650; font-size: clamp(1.1rem, 2vw, 1.5rem); color: var(--on-plum); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper-2); font-size: .92rem; font-weight: 500; }

/* Bandeau d'appel à l'action (bas de page) */
.close { background: var(--plum-deep); color: var(--on-plum); border-radius: clamp(24px, 4vw, 44px) clamp(24px, 4vw, 44px) 0 0; position: relative; overflow: hidden; }
.close .wrap { position: relative; display: grid; gap: 28px; }
.close .label { color: var(--on-plum-muted); }
.close h2 { color: var(--on-plum); max-width: 16ch; }
.close h2 em.s { color: var(--honey); }
.close p { color: var(--on-plum-muted); max-width: 50ch; font-size: 1.15rem; }
.close .price { color: var(--on-plum); font-weight: 600; }
.close canvas { position: absolute; right: -120px; top: -60px; width: 520px; height: 520px; opacity: .18; pointer-events: none; }
.close .btn-line { color: var(--on-plum); }
.close p a { color: var(--on-plum); text-decoration-color: var(--honey); text-underline-offset: 3px; }
.close .contact-alt { font-size: 1rem; }
.close .contact-alt a { color: var(--on-plum); }

/* Pied de page */
.site-footer { background: var(--plum-deep); color: var(--on-plum-muted); padding-top: 28px; padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); font-size: .92rem; border-top: 1px solid rgba(255, 255, 255, .1); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
.site-footer address { font-style: normal; }
.site-footer a { color: var(--on-plum); text-decoration-color: rgba(255, 255, 255, .35); }
.site-footer nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }

@media (max-width: 900px) {
  .three { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .close canvas { width: 360px; height: 360px; right: -140px; }
  .play-big::after { border-left-width: 18px; border-top-width: 11px; border-bottom-width: 11px; margin-left: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .play-big { transition: none; }
  .btn:hover { transform: none; }
  .player-launch:hover .play-big { transform: translate(-50%, -50%); }
}
