/* ═══════════════════════════ Le diplôme de la meilleure maîtresse ═══════════════════════════
 *
 * Servie **seulement** sur sa fiche (`views/product-affiche.liquid`) : une mise en page d'affiche n'a rien à faire dans le
 * chemin critique du reste du site.
 *
 * ── Un diplôme d'honneur, quatre styles modernes (19 nov. 2026) ──
 *
 * Le contenu et la structure ne bougent pas : « Diplôme d'honneur », le titre décerné, « décerné à » et le nom, trois mérites,
 * un sceau, « Décerné par » et la signature, l'année scolaire, une ligne du bas. Fred : « pas vieillot » — ni parchemin, ni
 * lettrines, ni sceau de cire, ni cadre à fioritures. Quatre identités d'aujourd'hui :
 * - **Pastel** : fond crème rosé, grandes formes douces (corail, lilas, menthe), Fredoka, le nom
 *   sur une pastille, les mérites en cartes blanches ;
 * - **Minimal** : blanc, Inter serrée, tout aligné à gauche, un seul trait vermillon, des filets fins ;
 * - **Fluo** (celui que la fiche ouvre) : noir et jaune acide, Anton en capitales, le nom sur une plaque jaune un peu penchée, un sceau en éclats ;
 * - **Nuit** : bleu nuit et or, Josefin Sans en capitales espacées, un seul filet doré en cadre, quelques étoiles.
 *
 * **Aucun établissement, aucun emblème public, aucune marque** : l'affiche est un cadeau, elle ne délivre aucun titre officiel.
 *
 * Polices servies par nous (point 2) : Inter, Fredoka, Josefin Sans, Montserrat et Roboto Condensed par `theme.css`, Anton ici.
 *
 * ── Les palettes ──
 *
 * **Ce sont des couleurs de produit, pas de charte** (point 6 quater) : en clair, toutes ici, en tête, et nulle part ailleurs.
 * `[data-style]` ne nomme pas `.dm` exprès, pour que les échantillons du formulaire se colorent avec les mêmes variables.
 */
@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;
}

/* --d-fond, --d-fond-2 : le fond et son dégradé ; --d-encre : le titre, le nom et le texte ; --d-doux : les petits libellés ;
   --d-kicker : « Diplôme d'honneur » ; --d-accent, --d-accent-2, --d-accent-3 : les aplats du décor (jamais du texte) ;
   --d-pastille / --d-pastille-texte : la plaque du nom ; --d-carte / --d-carte-bord : la case d'un mérite ;
   --d-coche-fond / --d-coche : la pastille et le trait d'un mérite ; --d-sceau-1, --d-sceau-2, --d-sceau-3 : la forme, le
   rond et l'étoile du sceau. */
[data-style="Pastel"] {
  --d-fond: #fff4eb; --d-fond-2: #fff4eb; --d-encre: #2a2257; --d-doux: #5a5190; --d-kicker: #6a4fd6;
  --d-accent: #ff6b57; --d-accent-2: #cfc2ff; --d-accent-3: #a8ecd2;
  --d-pastille: #cfc2ff; --d-pastille-texte: #2a2257; --d-carte: #ffffff; --d-carte-bord: #f1ddd0;
  --d-coche-fond: #a8ecd2; --d-coche: #17503f; --d-sceau-1: #f45a45; --d-sceau-2: #ffb2a4; --d-sceau-3: #ffffff;
}
[data-style="Minimal"] {
  --d-fond: #ffffff; --d-fond-2: #ffffff; --d-encre: #0c0c0c; --d-doux: #555555; --d-kicker: #0c0c0c;
  --d-accent: #ff3d00; --d-accent-2: #0c0c0c; --d-accent-3: #e5e5e5;
  --d-pastille: transparent; --d-pastille-texte: #0c0c0c; --d-carte: transparent; --d-carte-bord: #e2e2e2;
  --d-coche-fond: transparent; --d-coche: #ff3d00; --d-sceau-1: #0c0c0c; --d-sceau-2: #0c0c0c; --d-sceau-3: #ffffff;
}
[data-style="Fluo"] {
  --d-fond: #0c0c0e; --d-fond-2: #0c0c0e; --d-encre: #ffffff; --d-doux: #c9c9d1; --d-kicker: #e4ff2b;
  --d-accent: #e4ff2b; --d-accent-2: #e4ff2b; --d-accent-3: #2c2c33;
  --d-pastille: #e4ff2b; --d-pastille-texte: #0c0c0e; --d-carte: transparent; --d-carte-bord: #e4ff2b;
  --d-coche-fond: transparent; --d-coche: #e4ff2b; --d-sceau-1: #e4ff2b; --d-sceau-2: #0c0c0e; --d-sceau-3: #e4ff2b;
}
[data-style="Nuit"] {
  --d-fond: #0f1b43; --d-fond-2: #1a2c6b; --d-encre: #f7f2e4; --d-doux: #c7cde6; --d-kicker: #efc96e;
  --d-accent: #efc96e; --d-accent-2: #efc96e; --d-accent-3: #2b3f86;
  --d-pastille: transparent; --d-pastille-texte: #efc96e; --d-carte: rgba(255, 255, 255, .04); --d-carte-bord: rgba(239, 201, 110, .4);
  --d-coche-fond: transparent; --d-coche: #efc96e; --d-sceau-1: #efc96e; --d-sceau-2: #0f1b43; --d-sceau-3: #efc96e;
}

.dm {
  --dm-t: 1; --dm-n: 1;
  --fond: var(--d-fond); --texte: var(--d-encre);
  position: relative; isolation: isolate; display: flex; flex-direction: column; padding: 8cqw 8.5cqw 7cqw;
  background: var(--d-fond); color: var(--d-encre); font-family: "Inter", system-ui, sans-serif; line-height: 1.15; text-align: center;
}
.dm :where(p, ul) { margin: 0; padding: 0; }
.dm__deco { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.dm__deco i { position: absolute; display: none; }
.dm__page { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 3.2cqw; }
.dm__page > * { min-width: 0; }

.dm__haut { font-size: calc(2.5cqw * var(--dm-t)); font-weight: 600; letter-spacing: .34em; text-transform: uppercase; color: var(--d-kicker); }
.dm__titre { width: 100%; font-size: calc(9.4cqw * var(--ech, 1) * var(--dm-t)); font-weight: 800; line-height: 1.02; letter-spacing: -.012em; text-wrap: balance; overflow-wrap: anywhere; }
.dm__a { display: flex; flex-direction: column; align-items: center; gap: 1.6cqw; }
.dm__decerne, .dm__pour, .dm__lead { font-size: calc(2.4cqw * var(--dm-t)); font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--d-doux); }
.dm__nom { width: 100%; font-size: calc(7.6cqw * var(--ech, 1) * var(--dm-n) * var(--dm-t)); font-weight: 700; line-height: 1.12; overflow-wrap: anywhere; }
.dm__nom span { padding: .06em .5em; -webkit-box-decoration-break: clone; box-decoration-break: clone; background: var(--d-pastille); color: var(--d-pastille-texte); }

.dm__merites { display: flex; flex-direction: column; gap: 2.2cqw; }
.dm__liste { list-style: none; display: grid; gap: 1.8cqw; text-align: left; }
.dm__merite {
  display: flex; align-items: center; gap: 2.6cqw; font-size: calc(3.5cqw * var(--dm-t)); line-height: 1.2; font-weight: 500;
  padding: calc(1.5cqw * var(--dm-t)) 2.4cqw; background: var(--d-carte); border: .22cqw solid var(--d-carte-bord); border-radius: 2.4cqw; overflow-wrap: anywhere;
}
.dm__merite[hidden] { display: none; }
.dm__merite svg { flex: none; width: calc(5cqw * var(--dm-t)); height: calc(5cqw * var(--dm-t)); padding: .7cqw; border-radius: 50%; background: var(--d-coche-fond); fill: none; stroke: var(--d-coche); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

.dm__pied { display: flex; align-items: center; justify-content: center; gap: 4.4cqw; }
.dm__sceau { flex: none; width: calc(15.5cqw * var(--dm-t)); height: calc(15.5cqw * var(--dm-t)); overflow: visible; }
.dm__forme { display: none; fill: var(--d-sceau-1); }
.dm__rond { fill: var(--d-sceau-2); }
.dm__etoile { fill: var(--d-sceau-3); }
.dm__signe { min-width: 0; flex: 0 1 auto; max-width: 62cqw; text-align: left; display: flex; flex-direction: column; gap: .8cqw; }
.dm__signature { font-size: calc(4.8cqw * var(--ech, 1) * var(--dm-t)); font-weight: 700; line-height: 1.12; overflow-wrap: anywhere; }
.dm__annee { font-size: calc(2.7cqw * var(--dm-t)); font-weight: 500; letter-spacing: .06em; color: var(--d-doux); }
.dm__annee[hidden], .dm__mention[hidden] { display: none; }
.dm__mention { font-size: calc(3cqw * var(--dm-t)); font-style: italic; font-weight: 500; color: var(--d-doux); }

/* ── Pastel : des formes douces, des pastilles, des cartes blanches ── */
.dm[data-style="Pastel"] { font-family: "Inter", system-ui, sans-serif; }
.dm[data-style="Pastel"] :is(.dm__titre, .dm__nom, .dm__signature) { font-family: "Fredoka", system-ui, sans-serif; }
.dm[data-style="Pastel"] .dm__titre { font-weight: 600; }
.dm[data-style="Pastel"] .dm__nom { font-weight: 600; }
.dm[data-style="Pastel"] .dm__nom span { border-radius: 99cqw; padding: .08em .65em; }
.dm[data-style="Pastel"] .dm__merite { box-shadow: 0 .5cqw 0 var(--d-carte-bord); }
.dm[data-style="Pastel"] .dm__deco i:nth-child(1) { display: block; width: 38cqw; height: 38cqw; right: -14cqw; top: -20cqw; border-radius: 50%; background: var(--d-accent); }
.dm[data-style="Pastel"] .dm__deco i:nth-child(2) { display: block; width: 50cqw; height: 46cqw; left: -25cqw; bottom: -24cqw; border-radius: 46% 54% 58% 42% / 52% 44% 56% 48%; background: var(--d-accent-2); }
.dm[data-style="Pastel"] .dm__deco i:nth-child(3) { display: block; width: 24cqw; height: 11cqw; right: -5cqw; bottom: 38cqw; border-radius: 99cqw; background: var(--d-accent-3); transform: rotate(-24deg); }
.dm[data-style="Pastel"] .dm__forme--rosette { display: block; }

/* ── Minimal : du blanc, une fonte, un trait vermillon, tout à gauche ── */
.dm[data-style="Minimal"] { text-align: left; }
.dm[data-style="Minimal"] .dm__titre { font-weight: 800; letter-spacing: -.035em; line-height: .98; font-size: calc(10.4cqw * var(--ech, 1) * var(--dm-t)); }
.dm[data-style="Minimal"] .dm__haut { padding-top: 3cqw; letter-spacing: .3em; }
.dm[data-style="Minimal"] .dm__a { align-items: flex-start; }
.dm[data-style="Minimal"] .dm__nom { font-weight: 800; letter-spacing: -.02em; }
.dm[data-style="Minimal"] .dm__nom span { padding: 0; border-bottom: .8cqw solid var(--d-accent); }
.dm[data-style="Minimal"] .dm__merite { border: 0; border-top: .2cqw solid var(--d-carte-bord); border-radius: 0; padding-left: 0; padding-right: 0; font-weight: 500; }
.dm[data-style="Minimal"] .dm__liste { gap: 0; }
.dm[data-style="Minimal"] .dm__liste .dm__merite:last-child { border-bottom: .2cqw solid var(--d-carte-bord); }
.dm[data-style="Minimal"] .dm__pied { flex-direction: row-reverse; justify-content: space-between; }
.dm[data-style="Minimal"] .dm__deco i:nth-child(1) { display: block; left: 8.5cqw; top: 8cqw; width: 14cqw; height: 1.1cqw; background: var(--d-accent); }
.dm[data-style="Minimal"] .dm__forme--rosette { display: block; }
.dm[data-style="Minimal"] .dm__sceau { width: calc(13cqw * var(--dm-t)); height: calc(13cqw * var(--dm-t)); }

/* ── Fluo : noir, jaune acide, capitales Anton ── */
.dm[data-style="Fluo"] :is(.dm__titre, .dm__nom, .dm__signature) { font-family: "Anton", Impact, sans-serif; font-weight: 400; text-transform: uppercase; letter-spacing: .01em; }
.dm[data-style="Fluo"] .dm__titre { line-height: 1.2; font-size: calc(11.6cqw * var(--ech, 1) * var(--dm-t)); }
.dm[data-style="Fluo"] .dm__nom { line-height: 1.22; font-size: calc(8.6cqw * var(--ech, 1) * var(--dm-n) * var(--dm-t)); }
.dm[data-style="Fluo"] .dm__nom span { display: inline-block; padding: .04em .4em; transform: rotate(-2.2deg); }
.dm[data-style="Fluo"] .dm__signature { font-size: calc(5.4cqw * var(--ech, 1) * var(--dm-t)); }
.dm[data-style="Fluo"] :is(.dm__haut, .dm__decerne, .dm__pour, .dm__lead) { font-family: "Roboto Condensed", system-ui, sans-serif; font-weight: 700; }
.dm[data-style="Fluo"] .dm__merite { font-family: "Roboto Condensed", system-ui, sans-serif; font-weight: 700; font-size: calc(3.9cqw * var(--dm-t)); letter-spacing: .02em; border-width: .35cqw; border-radius: 99cqw; padding-left: 3cqw; }
.dm[data-style="Fluo"] .dm__sceau { transform: rotate(12deg); }
.dm[data-style="Fluo"] .dm__deco i:nth-child(1) { display: block; width: 52cqw; height: 52cqw; right: -30cqw; top: -30cqw; border-radius: 50%; border: 2.2cqw solid var(--d-accent); }
.dm[data-style="Fluo"] .dm__deco i:nth-child(2) { display: block; left: 0; right: 0; bottom: 0; height: 3.2cqw; background: var(--d-accent); }
.dm[data-style="Fluo"] .dm__forme--eclats { display: block; }

/* ── Nuit : bleu nuit, or, capitales espacées, un seul filet ── */
.dm[data-style="Nuit"] { font-family: "Josefin Sans", system-ui, sans-serif; background: linear-gradient(180deg, var(--d-fond) 0%, var(--d-fond-2) 100%); }
.dm[data-style="Nuit"] :is(.dm__titre, .dm__nom, .dm__signature) { font-family: "Josefin Sans", system-ui, sans-serif; }
.dm[data-style="Nuit"] .dm__titre { font-weight: 700; text-transform: uppercase; letter-spacing: .05em; line-height: 1.08; font-size: calc(7.4cqw * var(--ech, 1) * var(--dm-t)); }
.dm[data-style="Nuit"] .dm__nom { font-weight: 600; color: var(--d-pastille-texte); letter-spacing: .04em; }
.dm[data-style="Nuit"] .dm__nom span { padding: 0; }
.dm[data-style="Nuit"] .dm__merite { font-weight: 400; letter-spacing: .02em; border-radius: 1.2cqw; }
.dm[data-style="Nuit"] .dm__page { padding: 3.6cqw 2.4cqw; }
.dm[data-style="Nuit"] .dm__deco i:nth-child(1) { display: block; inset: 3.6cqw; border: .32cqw solid var(--d-accent); }
.dm[data-style="Nuit"] .dm__deco i:nth-child(2) { display: block; inset: 0; background:
  radial-gradient(circle at 12% 9%, var(--d-encre) 0 .22cqw, transparent .3cqw), radial-gradient(circle at 88% 12%, var(--d-encre) 0 .3cqw, transparent .4cqw),
  radial-gradient(circle at 24% 91%, var(--d-encre) 0 .26cqw, transparent .36cqw), radial-gradient(circle at 80% 87%, var(--d-encre) 0 .2cqw, transparent .3cqw),
  radial-gradient(circle at 6% 52%, var(--d-encre) 0 .2cqw, transparent .3cqw), radial-gradient(circle at 94% 48%, var(--d-encre) 0 .26cqw, transparent .36cqw); opacity: .8; }
.dm[data-style="Nuit"] .dm__forme--rosette { display: block; }

/* ── Le formulaire ──
 *
 * Qui offre (trois boutons radio), les échantillons du style, les dés et les idées. Les échantillons prennent les variables du
 * style qu'ils montrent. */
.dm-modes input, .dm-styles input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dm-modes { display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem; }
.dm-modes label {
  display: flex; flex-direction: column; gap: .2rem; cursor: pointer; margin: 0; min-height: 4.8rem; justify-content: center;
  border: .15rem solid rgba(var(--color-foreground), .15); border-radius: .8rem; padding: .8rem 1.2rem; line-height: 1.25;
}
.dm-modes__nom { font-size: 1.5rem; font-weight: 600; }
.dm-modes label small { font-size: 1.2rem; opacity: .8; }
.dm-modes input:checked + label { border-color: rgb(var(--color-foreground)); box-shadow: inset 0 0 0 .1rem rgb(var(--color-foreground)); }
.dm-modes input:focus-visible + label, .dm-styles input:focus-visible + label { outline: .2rem solid rgb(var(--bleu-focus)); outline-offset: .2rem; }
.dm-aide { display: block; font-size: 1.2rem; opacity: .8; margin: 0 0 .4rem; }
.dm-ligne { display: flex; gap: .6rem; align-items: end; margin-bottom: .8rem; }
.dm-ligne__champ { flex: 1; min-width: 0; }
.dm-ligne__champ label { display: block; font-size: 1.3rem; margin-bottom: .3rem; }
.dm-ligne__champ input { width: 100%; }
.dm-de {
  width: 4.4rem; height: 4.4rem; display: inline-flex; align-items: center; justify-content: center;
  border: .1rem solid currentColor; border-radius: .8rem; background: transparent; cursor: pointer; flex: none;
}
.dm-de svg { width: 2.2rem; height: 2.2rem; fill: none; stroke: currentColor; stroke-width: 1.6; }
.dm-de svg circle { fill: currentColor; stroke: none; }
.dm-de[hidden], .dm-tout[hidden], .dm-idees[hidden] { display: none; }
.dm-tout { justify-self: start; margin: .4rem 0 1rem; }
.dm-idees { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .6rem; }
.dm-idees button {
  min-height: 4.4rem; padding: .4rem 1.2rem; border: .1rem solid currentColor; border-radius: 99rem; background: transparent;
  font: inherit; font-size: 1.3rem; cursor: pointer; text-align: left; max-width: 100%;
}
.dm-styles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.dm-styles label {
  display: flex; flex-direction: column; align-items: center; gap: .3rem; cursor: pointer; margin: 0;
  font-size: 1.4rem; font-weight: 600; text-align: center; line-height: 1.25;
  border: .15rem solid rgba(var(--color-foreground), .15); border-radius: .8rem; padding: .8rem .6rem;
}
.dm-styles label small { font-weight: 400; font-size: 1.2rem; opacity: .8; }
.dm-styles input:checked + label { border-color: rgb(var(--color-foreground)); }
.dm-echantillon {
  display: flex; align-items: center; justify-content: center; gap: .5rem; width: 100%; max-width: 10rem; height: 4rem;
  background: var(--d-fond); border: .15rem solid var(--d-carte-bord); border-radius: .6rem; color: var(--d-encre);
}
.dm-echantillon b { font-weight: 800; font-size: 1.5rem; letter-spacing: .02em; }
.dm-echantillon i { display: block; width: .8rem; height: .8rem; border-radius: 50%; background: var(--d-accent); }
.dm-echantillon i + i { background: var(--d-accent-2); }
@media (min-width: 750px) { .dm-styles { grid-template-columns: repeat(4, minmax(0, 1fr)); } .dm-modes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
