/* ==========================================================================
   Charte commune · La Fabrique de l'Imprévu & Les Récits du mardi
   --------------------------------------------------------------------------
   Ce fichier ne contient que ce qui doit être partagé d'un site à l'autre :
   couleurs, polices, échelles, boutons « liquid glass », sur-titres,
   générique, marquage des textes provisoires.
   Chaque site change seulement son accent (voir en bas de la section :root).
   La mise en page propre à chaque site vit dans son propre fichier (site.css).
   ========================================================================== */

/* --- Polices ------------------------------------------------------------
   Titres : FS Industrie Condensed (plaquette 2026). Pas de licence web pour
            l'instant, repli sur Barlow Condensed (Google Fonts), très proche.
   Texte  : Avenir Next (installée sur macOS et iOS), repli Nunito Sans.
   Pour passer en FS Industrie : déposer les .woff2 sous licence dans
   assets/fonts/ et décommenter les @font-face ci-dessous.
   ------------------------------------------------------------------------- */
/*
@font-face { font-family: "FS Industrie Cd"; src: url("../fonts/FSIndustrieCd-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "FS Industrie Cd"; src: url("../fonts/FSIndustrieCd-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "FS Industrie Cd"; src: url("../fonts/FSIndustrieCd-MediumItalic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
*/

:root {
  /* Papier et encres */
  --paper: #fbf8f3;
  --paper-alt: #f3eee5;
  --sheet: #ffffff;
  --ink: #1c1733;
  --ink-soft: #3d3950;
  --muted: #6a6578;
  --line: #e7e0d4;

  /* Les trois teintes de l'eau ondulée (couverture de la plaquette) */
  --eau-nuit: #221938;
  --eau-prune: #634539;
  --eau-cuivre: #ca926b;
  --eau-ombre: #0c060e;
  --night: #17112e;
  --night-text: #f6f1ea;
  --night-muted: #c9c1dd;

  /* Couleurs des projets (relevées dans la plaquette 2026) */
  --c-lichen: #b47ea8;
  --c-heros: #9690cc;
  --c-entre-deux: #c09678;
  --c-je-doute: #789684;
  --c-trace: #6c96b4;
  --c-secret: #b49a68;
  --c-nycthemere: #f2a29b;
  --c-trois: #e490d2;
  --c-nuit: #b4a87e;
  --c-accomp: #e4549c;
  --c-partage: #c4704f;
  --c-transmission: #5a9c42;
  --c-fabrique: #067878;
  --c-edito: #966054;
  --c-image: #dd8b3a;            /* Comme une image : la robe orange */
  --c-cri: #56668f;              /* Comme un cri : la nuit, la mer */

  /* Accent du site : seule valeur à changer d'un site à l'autre.
     Les Récits du mardi : l'orange de la couverture de la plaquette, et son
     magenta pour les petits textes (l'orange n'y est pas assez contrasté). */
  --accent: #ed5e32;
  --accent-ink: #d21676;

  /* Typographie */
  --f-display: "FS Industrie Cd", "FS Industrie Condensed", "Barlow Condensed", "Avenir Next Condensed", "Arial Narrow", sans-serif;
  --f-text: "Avenir Next", "Avenir", "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: clamp(0.84rem, 0.81rem + 0.12vw, 0.9rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.075rem);
  --step-1: clamp(1.18rem, 1.1rem + 0.38vw, 1.38rem);
  --step-2: clamp(1.45rem, 1.27rem + 0.8vw, 1.95rem);
  --step-3: clamp(1.9rem, 1.5rem + 1.7vw, 2.9rem);
  --step-4: clamp(2.4rem, 1.7rem + 3vw, 4.2rem);
  --step-5: clamp(3rem, 1.9rem + 4.8vw, 6.2rem);

  /* Espaces et formes */
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: 2rem;
  --space-xl: 3rem;
  --space-2xl: clamp(3.5rem, 2.5rem + 4vw, 6rem);
  --space-3xl: clamp(5rem, 3.5rem + 6vw, 9rem);
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
  --radius-full: 999px;
  --shadow-s: 0 1px 2px rgb(28 23 51 / 0.06), 0 1px 3px rgb(28 23 51 / 0.08);
  --shadow-m: 0 4px 12px rgb(28 23 51 / 0.07), 0 14px 36px rgb(28 23 51 / 0.09);
  --shadow-l: 0 24px 48px -12px rgb(23 17 46 / 0.3), 0 50px 100px -30px rgb(23 17 46 / 0.35);

  --container: 76rem;
  --gutter: clamp(1rem, 0.4rem + 2.5vw, 2rem);
}

/* Pour La Fabrique de l'Imprévu, le même fichier avec son accent :
   --accent: var(--eau-cuivre); --accent-ink: #9a5a35;
*/

/* --- Base --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-text);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 4px; }
.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-link { position: absolute; left: 1rem; top: -3rem; z-index: 100; background: var(--ink); color: #fff; padding: .5rem 1rem; border-radius: var(--radius-full); text-decoration: none; }
.skip-link:focus { top: 1rem; }
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }

/* --- Sur-titre : petite barre + capitales espacées ---------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .65rem;
  margin: 0 0 var(--space-s);
  font-family: var(--f-text); font-weight: 600; font-size: .78rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink);
}
.eyebrow::before { content: ""; flex: none; width: 1.4rem; height: 3px; border-radius: 3px; background: var(--accent); }

/* --- Boutons « liquid glass » -------------------------------------------
   Moins transparents que chez Apple : un vrai fond, un liseré, un reflet
   en haut, une ombre portée et une flèche. On voit tout de suite que c'est
   cliquable.
   ------------------------------------------------------------------------- */
.btn {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .8em 1.15em .8em 1.35em; border-radius: var(--radius-full);
  font-family: var(--f-text); font-weight: 600; font-size: .95rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  -webkit-backdrop-filter: blur(14px) saturate(1.6); backdrop-filter: blur(14px) saturate(1.6);
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn::after { /* reflet */
  content: ""; position: absolute; inset: 1px 1px 50% 1px; z-index: -1;
  border-radius: var(--radius-full) var(--radius-full) 40% 40% / var(--radius-full) var(--radius-full) 100% 100%;
  background: linear-gradient(180deg, rgb(255 255 255 / .55), rgb(255 255 255 / 0));
  pointer-events: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn__arrow { display: inline-grid; place-items: center; width: 1.55rem; height: 1.55rem; border-radius: 50%; font-size: .95rem; line-height: 1; transition: transform .2s ease; }
.btn:hover .btn__arrow { transform: translateX(2px); }

/* Verre sur fond sombre ou photo */
.btn--glass {
  color: #fff;
  background: linear-gradient(180deg, rgb(255 255 255 / .3), rgb(255 255 255 / .16));
  border-color: rgb(255 255 255 / .55);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .6), inset 0 -1px 0 rgb(255 255 255 / .12), 0 10px 26px -10px rgb(10 6 20 / .6);
}
.btn--glass:hover { background: linear-gradient(180deg, rgb(255 255 255 / .38), rgb(255 255 255 / .22)); }
.btn--glass .btn__arrow { background: rgb(255 255 255 / .9); color: var(--ink); }

/* Verre sur fond clair */
.btn--glass-light {
  color: var(--ink);
  background: linear-gradient(180deg, rgb(255 255 255 / .95), rgb(255 255 255 / .7));
  border-color: rgb(28 23 51 / .16);
  box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 rgb(28 23 51 / .06), 0 8px 22px -10px rgb(28 23 51 / .45);
}
.btn--glass-light:hover { box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 rgb(28 23 51 / .06), 0 12px 28px -10px rgb(28 23 51 / .5); }
.btn--glass-light .btn__arrow { background: var(--ink); color: #fff; }

/* Verre teinté de la couleur du projet (variable --c) */
.btn--tint {
  color: var(--ink);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c, var(--accent)) 22%, white), color-mix(in srgb, var(--c, var(--accent)) 38%, white));
  border-color: color-mix(in srgb, var(--c, var(--accent)) 55%, white);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .8), 0 8px 22px -10px color-mix(in srgb, var(--c, var(--accent)) 70%, black);
}
.btn--tint .btn__arrow { background: color-mix(in oklab, var(--c, var(--accent)) 75%, var(--ink)); color: #fff; }

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* --- Générique (présentation façon fin de film) ------------------------- */
.generique { text-align: center; }
.generique__role { display: block; font-family: var(--f-text); font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.generique__name { display: block; font-family: var(--f-display); font-weight: 500; font-size: 1.45rem; line-height: 1.15; color: var(--ink); }

/* --- Textes provisoires --------------------------------------------------
   Tout ce qui reste à écrire ou à relire par Amélie est entouré de
   pointillés et étiqueté. À supprimer (classe .draft) une fois validé.
   ------------------------------------------------------------------------- */
.draft {
  position: relative;
  outline: 1.5px dashed color-mix(in srgb, var(--accent) 75%, transparent);
  outline-offset: .6rem;
  border-radius: 4px;
}
.draft::before {
  content: attr(data-draft);
  position: absolute; top: -1.45rem; left: -.2rem; z-index: 2;
  padding: .1rem .5rem; border-radius: var(--radius-full);
  background: var(--accent); color: #fff;
  font: 600 .62rem/1.5 var(--f-text); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
}
.draft:not([data-draft])::before { content: "Texte provisoire"; }
.draft-slot.draft { outline: none; }
.draft-slot.draft::before { top: -.75rem; left: 1rem; }
.draft-slot {
  display: grid; place-items: center; min-height: 7rem; padding: 1.25rem 1.5rem;
  border: 1.5px dashed color-mix(in srgb, var(--accent) 80%, transparent); border-radius: var(--radius-m);
  font-family: var(--f-display); font-weight: 300; font-style: italic; font-size: 1.3rem; line-height: 1.35; text-align: center;
  color: inherit; opacity: .9;
}
