/* ═══════════════════════════════ « Édition spéciale » ═══════════════════════════════
 *
 * Servie **seulement** sur sa fiche (`views/product-affiche.liquid`).
 *
 * ── Les couleurs ──
 *
 * Ce sont des couleurs de **produit**, pas de charte (point 6 quater) : le papier journal et
 * l'encre du quotidien, le rouge et le jaune du tabloïd, le papier jauni et le brun de la
 * gazette d'autrefois, le blanc et l'orange de la maquette moderne. Elles sont toutes ici, en
 * tête, et nulle part ailleurs dans le fichier : un essai y tient. `[data-style]` porte le choix
 * du client ; le sélecteur ne nomme pas `.uj`, pour que les vignettes du formulaire prennent les
 * mêmes couleurs.
 *
 * --j-papier : le fond ; --j-encre : le texte ; --j-accent : les rubriques et les filets forts ;
 * --j-sur-accent : le texte posé sur l'accent ; --j-doux : les petites lignes ;
 * --j-titre / --j-texte : les deux voix ; --j-photo : ce que la maquette fait de la photo.
 *
 * ── La mise en page ──
 *
 * Tout en `cqw`, la largeur de l'affiche : un A4 et un 70 × 100 sont la même une à deux
 * échelles. Réglée sur le plus trapu des formats (le 30 × 40) ; l'air en plus des formats
 * allongés se répartit entre les blocs (`space-between`), jamais dans une taille de texte.
 * **Le texte courant suit `--uj-t`**, estimé par le serveur sur le nombre de signes et resserré
 * au pixel par l'éditeur quand la une déborde du bas.
 */
@font-face {
  font-family: "Anton"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/anton-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Anton"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/anton-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

[data-style="Quotidien"] {
  --j-papier: #f2ede1; --j-encre: #1b1916; --j-accent: #1b1916; --j-sur-accent: #f2ede1; --j-doux: #55504a; --j-rouge: #8e1b12;
  --j-titre: "Playfair Display"; --j-texte: "Cormorant Garamond"; --j-photo: grayscale(1) contrast(1.06);
}
[data-style="Tabloïd"] {
  --j-papier: #ffffff; --j-encre: #121212; --j-accent: #d6100a; --j-sur-accent: #ffffff; --j-doux: #4a4a4a; --j-rouge: #d6100a;
  --j-jaune: #ffe14a; --j-titre: "Anton"; --j-texte: "Roboto Condensed"; --j-photo: saturate(1.08) contrast(1.04);
}
[data-style="Gazette"] {
  --j-papier: #e8ddc4; --j-encre: #3a2918; --j-accent: #3a2918; --j-sur-accent: #e8ddc4; --j-doux: #6a5640; --j-rouge: #6e2a17;
  --j-titre: "Cormorant Garamond"; --j-texte: "Cormorant Garamond"; --j-photo: grayscale(1) sepia(.75) contrast(1.05) brightness(.97);
  --j-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .2 0 0 0 0 .1 0 0 0 .12 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}
[data-style="Moderne"] {
  --j-papier: #f7f6f2; --j-encre: #161616; --j-accent: #e8401c; --j-sur-accent: #ffffff; --j-doux: #5b5b58; --j-rouge: #c4300f;
  --j-titre: "Inter"; --j-texte: "Inter"; --j-photo: none;
}

/* Le cadre de la photo avant qu'on la dépose. */
.uj { --j-vide: rgba(0, 0, 0, .07); }

/* ── La base, commune aux quatre ── */
.uj {
  --fond: var(--j-papier); --texte: var(--j-encre); --uj-t: 1;
  padding: 4.2cqw 4.6cqw 3.6cqw; justify-content: space-between; gap: 1.4cqw;
  font-family: var(--j-texte), Georgia, serif; line-height: 1.22; text-align: left;
}
/* `:where` garde cette remise à zéro sous les règles de chaque bloc : écrite `.uj p`, elle était
   plus spécifique qu'elles et annulait toutes leurs marges. */
.uj :where(p, h2, h3, h4, ul, figure, blockquote) { margin: 0; padding: 0; }
.uj ul { list-style: none; }
.uj [hidden] { display: none !important; }
/* Un mot de quarante signes sans espace se coupe plutôt que d'élargir sa colonne. */
.uj__texte, .uj__titre-article, .uj__citation, .uj__signature, .uj__legende, .uj__chapeau, .uj__breve span { overflow-wrap: anywhere; }

/* L'en-tête : le bandeau, le nom du journal, la ligne de date entre deux filets. */
.uj__bandeau, .uj__dateline {
  display: flex; justify-content: space-between; gap: 2cqw; font-family: "Roboto Condensed", "Inter", sans-serif;
  font-size: 1.35cqw; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--j-doux);
}
.uj__bandeau span:first-child { color: var(--j-rouge); font-weight: 800; }
.uj__journal {
  text-align: center; font-family: var(--j-titre), Georgia, serif; font-weight: 900; line-height: 1.18;
  margin: .8cqw 0 0; padding-bottom: .9cqw; letter-spacing: -.01em;
}
/* `width: 100%` et `nowrap` ne sont pas décoratifs : l'éditeur mesure le débordement (`--ech`).
   Le retrait sous le nom du journal non plus : le « J » de Playfair descend jusqu'au filet. */
.uj__journal span, .uj__titre span { display: block; width: 100%; white-space: nowrap; }
.uj__journal span { font-size: calc(8.4cqw * var(--ech, 1)); }
.uj__dateline { border-top: .55cqw double var(--j-encre); border-bottom: .14cqw solid var(--j-encre); padding: .7cqw 0 .6cqw; color: var(--j-encre); }

/* La une : le surtitre, le gros titre, le sous-titre. */
.uj__surtitre {
  font-family: "Roboto Condensed", "Inter", sans-serif; font-size: 1.5cqw; font-weight: 800; letter-spacing: .2em;
  text-transform: uppercase; color: var(--j-rouge);
}
.uj__titre { font-family: var(--j-titre), Georgia, serif; font-weight: 900; line-height: 1.12; letter-spacing: -.02em; margin-top: .3cqw; }
.uj__titre span { font-size: calc(9.6cqw * var(--ech, 1)); }
.uj__chapeau { font-family: var(--j-texte), Georgia, serif; font-style: italic; font-size: calc(2.7cqw * var(--uj-t)); line-height: 1.2; margin-top: 1.2cqw; color: var(--j-doux); }

/* Le corps : la photo à gauche ; à droite l'exclusivité, et l'encadré des chiffres au pied de
   la colonne, comme une manchette. */
/* **L'air des formats allongés va à la photo**, pas en trous entre les blocs : le corps prend ce
   qui reste (`flex: 1`), et le cadre de la photo s'étire dans sa colonne, jamais sous 42 cqw. */
.uj__corps { flex: 1 1 auto; display: grid; grid-template-columns: 57fr 43fr; gap: 3cqw; border-top: .14cqw solid var(--j-encre); padding-top: 1.6cqw; align-items: stretch; }
.uj__photo { display: flex; flex-direction: column; min-height: 0; }
.uj__colonne { display: flex; flex-direction: column; gap: 2cqw; min-width: 0; }
.uj__cadre { position: relative; overflow: hidden; flex: 1 1 auto; min-height: calc(42cqw * var(--uj-t)); background: var(--j-vide); }
.uj__cadre img {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; filter: var(--j-photo);
  object-position: var(--photo-x, 50%) var(--photo-y, 40%);
  transform: scale(var(--photo-zoom, 1)); transform-origin: var(--photo-x, 50%) var(--photo-y, 40%);
}
.uj__cadre[data-photo] { touch-action: pan-y; cursor: grab; }
.uj__vide {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 1.2cqw; cursor: pointer;
  border: 1px dashed currentColor; opacity: .7; padding: 10%; font-size: 2.2cqw; font-style: italic; text-align: center; margin: 0;
}
.uj__vide svg { width: 7cqw; height: auto; }
.uj__legende { font-size: calc(1.5cqw * var(--uj-t)); font-style: italic; color: var(--j-doux); margin-top: .7cqw; line-height: 1.25; }

.uj__rubrique {
  font-family: "Roboto Condensed", "Inter", sans-serif; font-size: calc(1.4cqw * var(--uj-t)); font-weight: 800; letter-spacing: .18em;
  text-transform: uppercase; color: var(--j-rouge); margin-bottom: .5cqw;
}
.uj__titre-article { font-family: var(--j-titre), Georgia, serif; font-weight: 800; font-size: calc(3cqw * var(--uj-t)); line-height: 1.08; margin-bottom: .8cqw; }
.uj__texte { font-size: calc(1.85cqw * var(--uj-t)); line-height: 1.3; text-align: justify; hyphens: auto; }
.uj__article--1 .uj__texte::first-letter { font-family: var(--j-titre), Georgia, serif; font-weight: 900; float: left; font-size: 3.1em; line-height: .82; margin: .06em .08em 0 0; }

/* Le bas : l'enquête et le témoignage, séparés d'un filet. Un bloc qui se tait laisse sa place
   à l'autre (`flex`), et la rangée entière se tait quand les deux sont vides. */
.uj__bas { display: flex; gap: 2.6cqw; border-top: .14cqw solid var(--j-encre); padding-top: 1.6cqw; align-items: stretch; }
.uj__bas:not(:has(> :not([hidden]))) { display: none; }
.uj__bas > * { flex: 1 1 0; min-width: 0; }
.uj__bas > .uj__article { flex-grow: 1.35; }
.uj__bas > * + * { border-left: .12cqw solid var(--j-encre); padding-left: 2.6cqw; }
.uj__article--2 .uj__titre-article { font-size: calc(2.5cqw * var(--uj-t)); }
.uj__article--2 .uj__texte { font-size: calc(1.6cqw * var(--uj-t)); }
.uj__citation { font-family: var(--j-titre), Georgia, serif; font-style: italic; font-size: calc(2.3cqw * var(--uj-t)); line-height: 1.22; }
.uj__citation::before { content: "« "; }
.uj__citation::after { content: " »"; }
.uj__signature { font-size: calc(1.45cqw * var(--uj-t)); margin-top: .9cqw; color: var(--j-doux); }
.uj__signature::before { content: "— "; }
.uj__chiffres { margin-top: auto; border-top: .14cqw solid var(--j-encre); padding-top: 1.2cqw; }
.uj__chiffres li { font-size: calc(1.55cqw * var(--uj-t)); line-height: 1.2; padding: .45cqw 0; border-bottom: .1cqw dotted var(--j-doux); }
.uj__chiffres b { font-family: var(--j-titre), Georgia, serif; font-weight: 900; font-size: 1.55em; font-variant-numeric: lining-nums tabular-nums; }
.uj__depuis, .uj__population { font-size: calc(1.4cqw * var(--uj-t)); line-height: 1.25; margin-top: .7cqw; color: var(--j-doux); font-style: italic; }

/* Le pied : la météo, la petite annonce, et la mention. */
.uj__pied { display: flex; flex-wrap: wrap; gap: .6cqw 3cqw; border-top: .55cqw double var(--j-encre); padding-top: 1cqw; font-size: calc(1.5cqw * var(--uj-t)); }
.uj__breve { flex: 1 1 36cqw; min-width: 0; line-height: 1.25; }
.uj__breve b { font-family: "Roboto Condensed", "Inter", sans-serif; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--j-rouge); margin-right: .5em; }
.uj__mention { flex: 1 1 100%; text-align: center; font-size: 1.2cqw; letter-spacing: .06em; color: var(--j-doux); }

/* ══ Quotidien — le journal du matin, noir sur papier journal, photo en noir et blanc. ══ */
.uj[data-style="Quotidien"] .uj__journal { font-style: normal; }

/* ══ Tabloïd — le nom du journal dans un bandeau rouge, les gros titres en capitales, les
   rubriques en étiquettes, une bande jaune sous la une. ══ */
.uj[data-style="Tabloïd"] .uj__journal { background: var(--j-accent); color: var(--j-sur-accent); font-weight: 400; text-transform: uppercase; letter-spacing: .02em; padding: 1cqw 2cqw .6cqw; margin: .6cqw 0; }
.uj[data-style="Tabloïd"] .uj__journal span { font-size: calc(8cqw * var(--ech, 1)); }
.uj[data-style="Tabloïd"] .uj__dateline { border-top: 0; }
.uj[data-style="Tabloïd"] .uj__titre { font-weight: 400; text-transform: uppercase; letter-spacing: 0; line-height: .95; }
.uj[data-style="Tabloïd"] .uj__titre span { font-size: calc(11cqw * var(--ech, 1)); }
.uj[data-style="Tabloïd"] .uj__surtitre { display: inline-block; background: var(--j-jaune); color: var(--j-encre); padding: .3cqw 1cqw; }
.uj[data-style="Tabloïd"] .uj__chapeau { font-family: "Roboto Condensed", sans-serif; font-style: normal; font-weight: 700; color: var(--j-encre); }
.uj[data-style="Tabloïd"] .uj__rubrique { display: inline-block; background: var(--j-accent); color: var(--j-sur-accent); padding: .25cqw .9cqw; }
.uj[data-style="Tabloïd"] .uj__titre-article { font-weight: 400; text-transform: uppercase; line-height: 1.14; }
.uj[data-style="Tabloïd"] .uj__citation { font-family: "Roboto Condensed", sans-serif; font-weight: 700; font-style: normal; }
.uj[data-style="Tabloïd"] .uj__chiffres b { font-weight: 400; color: var(--j-accent); }
.uj[data-style="Tabloïd"] .uj__article--1 .uj__texte::first-letter { font-weight: 400; color: var(--j-accent); }
.uj[data-style="Tabloïd"] .uj__cadre { box-shadow: 0 0 0 .5cqw var(--j-jaune); }
.uj[data-style="Tabloïd"] .uj__pied { border-top: .5cqw solid var(--j-accent); }

/* ══ Gazette — le papier jauni et son grain, le nom en capitales espacées, les filets
   doubles, la photo sépia : une gazette d'autrefois. ══ */
.uj[data-style="Gazette"] { background-image: var(--j-grain); background-size: 26cqw; }
.uj[data-style="Gazette"] .uj__journal { font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.uj[data-style="Gazette"] .uj__titre { font-weight: 700; font-style: italic; letter-spacing: 0; text-align: center; }
.uj[data-style="Gazette"] .uj__surtitre, .uj[data-style="Gazette"] .uj__chapeau { text-align: center; }
.uj[data-style="Gazette"] .uj__titre-article { font-weight: 700; }
.uj[data-style="Gazette"] .uj__texte, .uj[data-style="Gazette"] .uj__legende, .uj[data-style="Gazette"] .uj__breve { font-weight: 600; }
.uj[data-style="Gazette"] .uj__chiffres b { font-weight: 700; }
.uj[data-style="Gazette"] .uj__cadre { box-shadow: 0 0 0 .3cqw var(--j-encre); }
/* Les petites capitales de la gazette, à la place de la linéale des trois autres. */
.uj[data-style="Gazette"] .uj__bandeau, .uj[data-style="Gazette"] .uj__dateline, .uj[data-style="Gazette"] .uj__surtitre,
.uj[data-style="Gazette"] .uj__rubrique, .uj[data-style="Gazette"] .uj__breve b {
  font-family: "Cormorant Garamond", Georgia, serif; font-weight: 700; letter-spacing: .12em;
}
.uj[data-style="Gazette"] .uj__bandeau, .uj[data-style="Gazette"] .uj__dateline { font-size: 1.55cqw; }
.uj[data-style="Gazette"] .uj__corps, .uj[data-style="Gazette"] .uj__bas { border-top: .5cqw double var(--j-encre); }

/* ══ Quotidien — Cormorant est maigre aux petites tailles : le texte courant y prend du corps. ══ */
.uj[data-style="Quotidien"] .uj__texte, .uj[data-style="Quotidien"] .uj__legende, .uj[data-style="Quotidien"] .uj__breve,
.uj[data-style="Quotidien"] .uj__chapeau, .uj[data-style="Quotidien"] .uj__depuis, .uj[data-style="Quotidien"] .uj__population { font-weight: 600; }

/* ══ Moderne — blanc, une seule couleur vive, Inter partout, des filets fins. ══ */
.uj[data-style="Moderne"] .uj__journal { font-weight: 900; letter-spacing: -.045em; text-align: left; }
.uj[data-style="Moderne"] .uj__titre { font-weight: 900; letter-spacing: -.045em; }
.uj[data-style="Moderne"] .uj__dateline { border-top: .35cqw solid var(--j-accent); }
.uj[data-style="Moderne"] .uj__chapeau { font-style: normal; font-weight: 500; }
.uj[data-style="Moderne"] .uj__titre-article { font-weight: 800; letter-spacing: -.02em; }
.uj[data-style="Moderne"] .uj__texte { text-align: left; hyphens: manual; font-size: calc(1.7cqw * var(--uj-t)); }
.uj[data-style="Moderne"] .uj__article--2 .uj__texte { font-size: calc(1.5cqw * var(--uj-t)); }
.uj[data-style="Moderne"] .uj__citation { font-style: normal; font-weight: 600; font-size: calc(2.1cqw * var(--uj-t)); }
.uj[data-style="Moderne"] .uj__citation::before, .uj[data-style="Moderne"] .uj__citation::after { color: var(--j-accent); }
.uj[data-style="Moderne"] .uj__chiffres b { font-weight: 800; color: var(--j-accent); }
.uj[data-style="Moderne"] .uj__article--1 .uj__texte::first-letter { float: none; font: inherit; margin: 0; }
.uj[data-style="Moderne"] .uj__pied { border-top: .14cqw solid var(--j-encre); }

/* ═══════════════════════════════ Le formulaire ═══════════════════════════════ */
.uj-section { border: 0; padding: 0; margin: 0 0 2.4rem; min-width: 0; }
.uj-section > legend { font-family: "Playfair Display", Georgia, serif; font-weight: 800; font-size: 2rem; padding: 0; margin-bottom: 1rem; }
.uj-styles { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.uj-styles input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.uj-styles label {
  display: flex; flex-direction: column; gap: .2rem; min-height: 4.4rem; padding: 1rem 1.4rem; cursor: pointer;
  border: .1rem solid rgba(var(--color-foreground), .22); border-radius: .8rem;
  background: var(--j-papier); color: var(--j-encre);
}
.uj-styles__nom { font-family: var(--j-titre), Georgia, serif; font-weight: 800; font-size: 1.8rem; line-height: 1.1; }
.uj-styles__ligne { font-size: 1.25rem; color: var(--j-doux); }
.uj-styles [data-style="Tabloïd"] .uj-styles__nom { font-weight: 400; text-transform: uppercase; color: var(--j-accent); }
.uj-styles input:checked + label { border-color: rgb(var(--color-foreground)); box-shadow: inset 0 0 0 .2rem rgb(var(--color-foreground)); }
.uj-styles input:focus-visible + label { outline: .2rem solid rgb(var(--bleu-focus)); outline-offset: .2rem; }
.uj-article { border-left: .3rem solid rgba(var(--color-foreground), .15); padding-left: 1.2rem; margin: 0 0 1.6rem; }
.uj-article__tete { display: flex; align-items: center; gap: .8rem; margin: 0 0 .6rem; font-size: 1.4rem; text-transform: uppercase; letter-spacing: .1em; }
.uj-article__tete .uj-de { margin-left: auto; }
.uj-article textarea, .uj-section input[type="text"], .uj-section input[type="date"], .uj-section input[type="number"] { font-size: 1.6rem; }
.uj-article textarea { width: 100%; resize: vertical; font-family: inherit; line-height: 1.4; }
.uj-idees { display: flex; flex-wrap: wrap; gap: .6rem; margin: .4rem 0 1.4rem; }
.uj-idee {
  font: inherit; font-size: 1.2rem; min-height: 4.4rem; padding: .6rem 1.2rem; cursor: pointer; text-align: left;
  background: none; color: inherit; border: .1rem dashed rgba(var(--color-foreground), .3); border-radius: 99px;
}
.uj-idee:hover { border-style: solid; border-color: rgb(var(--color-foreground)); }
.uj-de, .uj-hasard { font: inherit; min-height: 4.4rem; min-width: 4.4rem; cursor: pointer; background: none; color: inherit; border: .1rem solid rgba(var(--color-foreground), .3); border-radius: .6rem; }
.uj-hasard { padding: .6rem 1.4rem; margin-bottom: 1rem; }
/* Sur téléphone, les idées défilent sur une rangée au doigt plutôt que de s'empiler (la règle
   de l'avis de recherche) : huit articles empilés feraient un écran entier entre deux champs. */
@media (max-width: 749px) {
  .uj-idees { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: .4rem; -webkit-overflow-scrolling: touch; }
  .uj-idee { flex: none; scroll-snap-align: start; white-space: nowrap; }
}
