/* =====================================================================
   IA Espresso — DA v2 « L'imprimerie de 1955 »
   Feuille de styles de référence. À copier dans une page, ou à lier.
   Doc : brand-visuel/v2/DESIGN_SYSTEM.md
   Polices : Source Serif 4, Libre Franklin, Oswald (+ Yellowtail, Ultra en accent)
   ===================================================================== */

:root {
  /* ---- Les trois encres de base (inchangées depuis la v1) ---- */
  --vermilion: #D9502A;   /* encre 1 : le champ */
  --ink:       #20333A;   /* encre 2 : trait, texte */
  --teal:      #9DBBB6;   /* encre 3, accent froid (ou moutarde, jamais les deux) */
  --mustard:   #C9A03B;   /* encre 3, accent chaud (nouvelle) */

  /* ---- Le papier ---- */
  --cream:     #F4E6C4;   /* panneaux */
  --chalk:     #F7EFDC;   /* texte posé sur le rouge */
  --paper-edge:#E6D2A6;   /* bord jauni des panneaux */
  --paper-grey:#B9AE95;   /* filets, légendes */

  /* ---- Les teintes nées de la surimpression ---- */
  --ember:     #B93D1C;   /* rouge profond, texte d'accent sur crème (v1) */
  --brick:     #AB320A;   /* vermillon × moutarde */
  --press:     #853A1E;   /* vermillon × teal : décalage de plaque, bois */
  --olive:     #7C752A;   /* teal × moutarde */
  --salmon:    #E9A27E;   /* vermillon tramé 40 % sur crème */

  /* ---- Rôles ---- */
  --bg: var(--vermilion);
  --surface: var(--cream);
  --text-on-bg: var(--chalk);
  --text-on-surface: var(--ink);
  --accent: var(--ember);

  /* ---- Polices ---- */
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body:    "Libre Franklin", "Franklin Gothic Book", "Helvetica Neue", Arial, sans-serif;
  --font-label:   "Oswald", "Arial Narrow", sans-serif;
  --font-script:  "Yellowtail", "Brush Script MT", cursive;          /* 1-2 mots par visuel */
  --font-numeral: "Ultra", "Rockwell Extra Bold", Georgia, serif;    /* gros chiffres, prix */

  /* ---- Espacement (rythme de 8, inchangé) ---- */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;

  /* ---- Coins : on coupe au massicot, on n'arrondit plus comme une app ---- */
  --radius-panel: 3px;
  --radius-chip:  2px;
  --bevel: 10px;          /* coins coupés des cartouches */

  /* ---- Le décalage de plaque : la seule « ombre » de la v2 ----
     Un aplat d'encre décalé, net, sans flou. Imite la 2e plaque mal calée. */
  --offset: 6px;
  --plate-shift: var(--offset) var(--offset) 0 var(--press);

  /* ---- Filets ---- */
  --rule-double: 4px double var(--ink);
  --rule-on-red: 1px solid var(--chalk);
  --dots-ember:  2px dotted var(--ember);
}

/* ---------------------------------------------------------------------
   Base
   --------------------------------------------------------------------- */
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-on-bg);
  font: 400 17px/1.6 var(--font-body);
  isolation: isolate;
}

/* Grain du papier, sur tout, au-dessus de tout (v1, inchangé) */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 9999;
  opacity: .9;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.05 0 0 0 0 0 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------------
   Typographie
   --------------------------------------------------------------------- */

/* Titre d'affiche : légère surimpression mal calée, 2 px, en brun d'imprimerie */
.titre-affiche {
  font: 800 64px/1.02 var(--font-display);
  letter-spacing: -0.01em;
  color: var(--chalk);
  text-shadow: 2px 2px 0 var(--press);
  margin: 0;
}
.titre-affiche em { font-style: italic; font-weight: 700; }

.surtitre {              /* capitales espacées des manchettes */
  font: 600 13px/1.2 var(--font-label);
  letter-spacing: .14em; text-transform: uppercase;
}

.script {                /* l'enseigne peinte : 1 ou 2 mots */
  font-family: var(--font-script); font-weight: 400;
  font-size: 1.5em; line-height: 1; letter-spacing: 0;
  text-transform: none;
}

.chiffre {               /* gros chiffre façon caractère bois */
  font: 400 72px/0.9 var(--font-numeral);
  color: var(--chalk);
  text-shadow: 3px 3px 0 var(--press);
}

/* ---------------------------------------------------------------------
   Filets et manchette
   --------------------------------------------------------------------- */
.filet-double { border: 0; border-top: var(--rule-double); margin: var(--space-4) 0; }
.sur-rouge .filet-double, .filet-double.clair { border-top-color: var(--chalk); }

/* Manchette de journal : filet gras + filet maigre, infos en capitales */
.manchette {
  display: flex; justify-content: space-between; gap: var(--space-4);
  padding: var(--space-2) 0;
  border-top: 5px double currentColor;
  border-bottom: 1px solid currentColor;
}

/* ---------------------------------------------------------------------
   Panneau crème : la page de magazine
   --------------------------------------------------------------------- */
.panneau {
  position: relative;
  background:
    radial-gradient(ellipse at 50% 45%, transparent 62%, rgba(185,150,90,.22) 100%),  /* bord jauni */
    var(--cream);
  color: var(--ink);
  border-radius: var(--radius-panel);
  padding: var(--space-6);
  box-shadow: var(--plate-shift);
}
/* Panneau à onglet, comme une fiche de classeur */
.panneau[data-onglet]::before {
  content: attr(data-onglet);
  position: absolute; left: var(--space-5); top: -30px; height: 30px;
  padding: 0 var(--space-4);
  display: flex; align-items: center;
  background: var(--ink); color: var(--chalk);
  font: 600 13px/1 var(--font-label); letter-spacing: .12em; text-transform: uppercase;
  border-radius: 4px 4px 0 0;
}

/* Séparateur d'items dans un panneau (v1) */
.panneau .item + .item { border-top: var(--dots-ember); }

/* ---------------------------------------------------------------------
   Pastille numérotée : le mode d'emploi
   --------------------------------------------------------------------- */
.pastille {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; flex: none;
  border-radius: 50%;
  background: var(--ink); color: var(--chalk);
  font: 600 17px/1 var(--font-label);
  box-shadow: 0 0 0 2px var(--cream), 0 0 0 4px var(--ink);
}

/* ---------------------------------------------------------------------
   Cartouche à coins coupés : l'étiquette de produit
   --------------------------------------------------------------------- */
.cartouche {
  display: inline-block;
  padding: var(--space-2) var(--space-5);
  background: var(--ink); color: var(--chalk);
  font: 600 14px/1.2 var(--font-label); letter-spacing: .12em; text-transform: uppercase;
  clip-path: polygon(var(--bevel) 0, calc(100% - var(--bevel)) 0, 100% var(--bevel),
    100% calc(100% - var(--bevel)), calc(100% - var(--bevel)) 100%, var(--bevel) 100%,
    0 calc(100% - var(--bevel)), 0 var(--bevel));
}
.cartouche.creme { background: var(--cream); color: var(--ink); }

/* ---------------------------------------------------------------------
   Starburst « NOUVEAU » — une fois par page, seulement s'il y a une offre
   --------------------------------------------------------------------- */
.starburst {
  display: inline-grid; place-items: center; text-align: center;
  width: 120px; aspect-ratio: 1;
  background: var(--mustard); color: var(--ink);
  font: 600 15px/1.05 var(--font-label); letter-spacing: .08em; text-transform: uppercase;
  transform: rotate(-12deg);
  clip-path: polygon(50.0% 0.0%, 57.1% 9.6%, 67.1% 3.0%, 70.5% 14.5%, 82.1% 11.7%, 81.4% 23.6%, 93.3% 25.0%, 88.5% 36.0%, 99.2% 41.3%, 91.0% 50.0%, 99.2% 58.7%, 88.5% 64.0%, 93.3% 75.0%, 81.4% 76.4%, 82.1% 88.3%, 70.5% 85.5%, 67.1% 97.0%, 57.1% 90.4%, 50.0% 100.0%, 42.9% 90.4%, 32.9% 97.0%, 29.5% 85.5%, 17.9% 88.3%, 18.6% 76.4%, 6.7% 75.0%, 11.5% 64.0%, 0.8% 58.7%, 9.0% 50.0%, 0.8% 41.3%, 11.5% 36.0%, 6.7% 25.0%, 18.6% 23.6%, 17.9% 11.7%, 29.5% 14.5%, 32.9% 3.0%, 42.9% 9.6%);
}

/* ---------------------------------------------------------------------
   Tampon encreur — « Testé », « Vérifié » : un par visuel au plus
   Le filtre #tampon-use doit être présent dans la page (voir apercu.html)
   --------------------------------------------------------------------- */
.tampon {
  display: inline-block;
  padding: 6px 14px;
  border: 3px solid var(--ember); border-radius: 6px;
  color: var(--ember);
  font: 600 16px/1 var(--font-label); letter-spacing: .16em; text-transform: uppercase;
  transform: rotate(-8deg);
  mix-blend-mode: multiply; opacity: .85;
  filter: url(#tampon-use);
}
.tampon.rond { border-radius: 50%; padding: 22px 14px; box-shadow: inset 0 0 0 3px var(--cream), inset 0 0 0 4px var(--ember); }

/* ---------------------------------------------------------------------
   Coupon à découper — bloc d'inscription, CTA final
   --------------------------------------------------------------------- */
.coupon {
  position: relative;
  background: var(--cream); color: var(--ink);
  padding: var(--space-6);
  border: 2px dashed var(--ink);
  outline: 6px solid var(--cream);
}
.coupon::before {
  content: "\2702"; position: absolute; top: -17px; left: 24px;
  font-size: 22px; line-height: 1; color: var(--ink);
  background: var(--cream); padding: 0 6px;
}

/* ---------------------------------------------------------------------
   Ticket à encoches — prix, garantie, « ton accès »
   --------------------------------------------------------------------- */
.ticket {
  display: inline-block;
  background: var(--cream); color: var(--ink);
  padding: var(--space-5) var(--space-7);
  -webkit-mask:
    radial-gradient(circle 12px at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle 12px at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
          mask:
    radial-gradient(circle 12px at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle 12px at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
}

/* ---------------------------------------------------------------------
   Timbre dentelé — vignette d'auteur, « Édition n° »
   --------------------------------------------------------------------- */
.timbre {
  display: inline-block; padding: 14px;
  background: var(--cream);
  -webkit-mask: radial-gradient(circle 5px, #0000 97%, #000) -7px -7px / 14px 14px round,
                linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0) 7px 7px / calc(100% - 14px) calc(100% - 14px) no-repeat;
          mask: radial-gradient(circle 5px, #0000 97%, #000) -7px -7px / 14px 14px round,
                linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0) 7px 7px / calc(100% - 14px) calc(100% - 14px) no-repeat;
}

/* ---------------------------------------------------------------------
   Fiche bristol — encadré de prompt, « ma méthode »
   --------------------------------------------------------------------- */
.fiche {
  position: relative;
  background:
    linear-gradient(90deg, transparent 46px, rgba(185,61,28,.55) 46px 48px, transparent 48px),
    repeating-linear-gradient(transparent 0 27px, rgba(157,187,182,.75) 27px 28px),
    var(--chalk);
  background-position: 0 0, 0 10px, 0 0;
  color: var(--ink);
  padding: 10px var(--space-5) var(--space-4) 64px;
  font: 400 16px/28px "Courier Prime", "Courier New", monospace;
  border-radius: 2px;
  box-shadow: var(--plate-shift);
}

/* ---------------------------------------------------------------------
   Points de conduite façon menu de diner — « ce que tu reçois »
   --------------------------------------------------------------------- */
.conduite { display: flex; align-items: baseline; gap: var(--space-2); }
.conduite::after { content: ""; order: 1; flex: 1; border-bottom: 2px dotted currentColor; transform: translateY(-4px); }
.conduite > :last-child { order: 2; }

/* ---------------------------------------------------------------------
   Trame Ben-Day — fond secondaire, ombre de panneau, jamais sous du texte long
   --------------------------------------------------------------------- */
.trame        { background-image: radial-gradient(rgba(32,51,58,.22) 1.2px, transparent 1.6px); background-size: 7px 7px; }
.trame-claire { background-image: radial-gradient(rgba(247,239,220,.28) 1.2px, transparent 1.6px); background-size: 7px 7px; }

/* ---------------------------------------------------------------------
   Bouton : une étiquette imprimée, pas une pilule d'app
   --------------------------------------------------------------------- */
.bouton {
  display: inline-block;
  padding: 14px 28px;
  background: var(--ink); color: var(--chalk);
  font: 600 16px/1 var(--font-label); letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius-chip);
  box-shadow: 4px 4px 0 var(--press);
  transition: transform .12s, box-shadow .12s;
}
.bouton:hover  { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--press); }
.bouton:active { transform: translate(4px, 4px); box-shadow: none; }
.bouton.creme  { background: var(--cream); color: var(--ink); }

/* ---------------------------------------------------------------------
   Illustration posée sur un panneau crème : l'encre entre dans le papier
   (jamais sur le champ vermillon : le multiply y assombrirait le rouge)
   --------------------------------------------------------------------- */
.panneau .gravure { display: block; max-width: 100%; mix-blend-mode: multiply; }
