/* France : offres et candidatures. Une seule famille (Bricolage Grotesque, OFL), auto-hébergée. */
@font-face {
  font-family: "Bricolage";
  src: url("/police/bricolage-latin.woff2") format("woff2");
  font-weight: 200 800; font-stretch: 75% 100%; font-display: swap;
  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;
}
@font-face {
  font-family: "Bricolage";
  src: url("/police/bricolage-latin-ext.woff2") format("woff2");
  font-weight: 200 800; font-stretch: 75% 100%; font-display: swap;
  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;
}

:root {
  --papier: #eef0f4;
  --carte: #ffffff;
  --encre: #141b2d;
  --encre-douce: #5c6478;
  --trait: #d9dde6;
  --survol: #e4e7ee;
  --tampon: #4836b8;
  --tampon-fond: #ece9fb;
  --visa: #c8323c;
  --talent: #17805a;
  --alerte: #a15c00;
  --sur-encre: #ffffff;
  --rayon: 10px;
  --rayon-petit: 6px;
  --ombre-feuille: 0 -8px 40px rgb(20 27 45 / .18);
  --nav-h: 64px;
  --police: "Bricolage", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --papier: #0f131d;
    --carte: #181d2a;
    --encre: #e8eaf0;
    --encre-douce: #9aa1b3;
    --trait: #2a3142;
    --survol: #222838;
    --tampon: #a99bff;
    --tampon-fond: #262046;
    --visa: #ff7a80;
    --talent: #4fd1a0;
    --alerte: #f0b357;
    --sur-encre: #0f131d;
    --ombre-feuille: 0 -8px 40px rgb(0 0 0 / .5);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--papier); color: var(--encre);
  font: 400 16px/1.5 var(--police); font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sprite { position: absolute; }
a { color: var(--tampon); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
p { margin: 0 0 .75em; }
[hidden] { display: none !important; }
:focus-visible { outline: 2.5px solid var(--tampon); outline-offset: 2px; border-radius: 4px; }
.evitement { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--encre); color: var(--sur-encre); padding: 8px 12px; border-radius: var(--rayon-petit); }
.evitement:focus { left: 8px; }
.discret-texte { color: var(--encre-douce); }
.nombre { font-variant-numeric: tabular-nums; }

/* ---------- Charpente ---------- */
.appli { min-height: 100dvh; }
.colonne { min-width: 0; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
#barre {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 6px;
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px; min-height: 56px;
  background: color-mix(in srgb, var(--papier) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}
#barre.ombre { border-bottom-color: var(--trait); }
#titre { flex: 1; font-size: 1.35rem; font-weight: 700; letter-spacing: -.01em; font-stretch: 90%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 4px; }
#bandeau { margin: 0 12px 8px; padding: 8px 12px; border-radius: var(--rayon-petit); background: var(--tampon-fond); color: var(--encre); font-size: .9rem; display: flex; gap: 8px; align-items: center; }
#bandeau.hors-ligne { background: color-mix(in srgb, var(--alerte) 16%, var(--carte)); }
#vue { outline: none; padding: 0 12px 24px; max-width: 760px; margin: 0 auto; }

/* Onglets : barre en bas sur téléphone, rail à gauche sur grand écran. */
#onglets {
  position: fixed; inset: auto 0 0 0; z-index: 20; display: flex;
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--carte) 94%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--trait);
}
#onglets .marque { display: none; }
#onglets a {
  position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  height: var(--nav-h); color: var(--encre-douce); text-decoration: none; font-size: .72rem; font-weight: 600;
}
#onglets a[aria-current="page"] { color: var(--tampon); }
#onglets a[aria-current="page"] svg { stroke-width: 2.3; }
.pastille {
  position: absolute; top: 8px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--visa); color: #fff; font-size: .68rem; font-weight: 700; line-height: 18px; text-align: center;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 960px) {
  .appli { display: grid; grid-template-columns: 216px minmax(0, 1fr); }
  .colonne { padding-bottom: 0; }
  #onglets {
    position: sticky; top: 0; inset: auto; height: 100dvh; flex-direction: column; gap: 2px; padding: 20px 12px;
    border-top: 0; border-right: 1px solid var(--trait); background: var(--carte);
  }
  #onglets .marque { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; font-stretch: 85%; padding: 0 10px 20px; }
  #onglets a { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; height: 44px; padding: 0 12px; border-radius: var(--rayon-petit); font-size: .95rem; }
  #onglets a:hover { background: var(--survol); color: var(--encre); }
  #onglets a[aria-current="page"] { background: var(--tampon-fond); }
  .pastille { position: static; margin-left: auto; }
  #barre { padding: 14px 24px 10px; }
  #vue { padding: 0 24px 40px; max-width: 1180px; margin: 0; }
  #vue:has(.double) { max-width: none; }   /* offres : les deux volets prennent toute la largeur */
  #bandeau { margin: 0 24px 10px; }
}

/* ---------- Boutons et champs ---------- */
button, .bouton { font: inherit; color: inherit; }
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: var(--rayon-petit); border: 1px solid var(--trait); background: var(--carte); color: var(--encre);
  font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, transform .08s;
}
.bouton:hover { background: var(--survol); }
.bouton:active { transform: scale(.98); }
.bouton[disabled] { opacity: .5; cursor: default; }
.bouton.principal { background: var(--encre); border-color: var(--encre); color: var(--sur-encre); }
.bouton.principal:hover { background: color-mix(in srgb, var(--encre) 86%, var(--tampon)); }
.bouton.accent { background: var(--tampon); border-color: var(--tampon); color: var(--sur-encre); }
.bouton.danger { color: var(--visa); }
.bouton.plat { border-color: transparent; background: transparent; }
.bouton.plat:hover { background: var(--survol); }
.bouton.petit { min-height: 36px; padding: 0 12px; font-size: .88rem; }
.bouton svg { width: 18px; height: 18px; }
.icone {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: transparent; color: var(--encre); cursor: pointer;
}
.icone:hover { background: var(--survol); }
.icone.tourne svg { animation: tourne 1s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }

.champ { display: grid; gap: 6px; margin-bottom: 14px; }
.champ > span { font-size: .88rem; font-weight: 600; color: var(--encre-douce); }
input, textarea, select {
  font: inherit; color: var(--encre); background: var(--carte); width: 100%;
  border: 1px solid var(--trait); border-radius: var(--rayon-petit); padding: 10px 12px; min-height: 44px;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--tampon); outline-offset: -1px; border-color: transparent; }

/* ---------- Liste des offres ---------- */
.outils { position: sticky; top: calc(56px + env(safe-area-inset-top)); z-index: 5; background: var(--papier); padding: 4px 0 10px; }
.recherche { position: relative; }
.recherche svg { position: absolute; left: 12px; top: 50%; translate: 0 -50%; color: var(--encre-douce); width: 18px; height: 18px; pointer-events: none; }
.recherche input { padding-left: 38px; border-radius: 22px; }
.puces { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 0; scrollbar-width: none; align-items: center; }
.puces::-webkit-scrollbar { display: none; }
.puce {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 18px;
  border: 1px solid var(--trait); background: var(--carte); color: var(--encre); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer;
}
.puce[aria-pressed="true"] { background: var(--encre); border-color: var(--encre); color: var(--sur-encre); }
.puce .nombre { opacity: .7; font-weight: 500; }
.puces select { width: auto; min-height: 36px; padding: 0 10px; border-radius: 18px; font-size: .88rem; font-weight: 600; }
.puces .separateur { width: 1px; height: 22px; background: var(--trait); flex: none; margin: 0 2px; }

.surface { background: var(--carte); border-radius: var(--rayon); border: 1px solid var(--trait); overflow: hidden; }
.lignes { list-style: none; margin: 0; padding: 0; }
.lignes > li + li { border-top: 1px solid var(--trait); }
.ligne {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 14px 14px 13px 16px;
  color: inherit; text-decoration: none; position: relative;
}
.ligne:hover { background: var(--survol); }
.ligne[aria-current="true"] { background: var(--tampon-fond); }
.ligne[aria-current="true"]::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--tampon); }
.ligne-titre { font-weight: 600; font-size: 1.02rem; line-height: 1.3; }
.ligne.nouvelle .ligne-titre::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--tampon); margin-right: 8px; vertical-align: .12em; }
.ligne.vue .ligne-titre { font-weight: 500; }
.ligne-meta { grid-column: 1; color: var(--encre-douce); font-size: .88rem; display: flex; flex-wrap: wrap; gap: 2px 12px; }
.ligne-cote { grid-column: 2; grid-row: 1 / span 3; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.ligne-marques { grid-column: 1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; align-items: center; }
.ligne.ecartee { opacity: .6; }

/* Le tampon VISA : l'élément qu'on retient. */
.tampon {
  display: inline-block; padding: 1px 7px 0; border: 2px solid currentColor; outline: 1px solid currentColor; outline-offset: 1.5px;
  border-radius: 3px; color: var(--visa); font-weight: 800; font-size: .7rem; letter-spacing: .1em; font-stretch: 80%;
  transform: rotate(-4deg); line-height: 1.5; mix-blend-mode: multiply;
}
.tampon.talent { color: var(--talent); transform: rotate(3deg); }
.tampon.grand { font-size: .95rem; padding: 3px 12px 2px; border-width: 2.5px; outline-offset: 2.5px; }
@media (prefers-color-scheme: dark) { .tampon { mix-blend-mode: normal; } }
.tampon-mini { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 2px solid var(--tampon); outline: 1px solid var(--tampon); outline-offset: 1.5px; border-radius: 4px; color: var(--tampon); font-size: .95rem; transform: rotate(-5deg); }
.etiquette { font-size: .76rem; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: var(--survol); color: var(--encre-douce); }
.etat { font-size: .76rem; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: var(--tampon-fond); color: var(--tampon); }

/* Le signal : le score en 8 barres. */
.signal { display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; }
.signal i { width: 3px; border-radius: 1px; background: var(--trait); }
.signal i:nth-child(1) { height: 4px; } .signal i:nth-child(2) { height: 5.5px; } .signal i:nth-child(3) { height: 7px; } .signal i:nth-child(4) { height: 8.5px; }
.signal i:nth-child(5) { height: 10px; } .signal i:nth-child(6) { height: 11.5px; } .signal i:nth-child(7) { height: 13px; } .signal i:nth-child(8) { height: 16px; }
.signal i.on { background: var(--encre); }
.signal.fort i.on { background: var(--tampon); }
.signal-texte { font-size: .76rem; color: var(--encre-douce); font-variant-numeric: tabular-nums; }

.plus { display: flex; justify-content: center; padding: 14px; }
.compte { color: var(--encre-douce); font-size: .85rem; padding: 2px 4px 8px; display: flex; justify-content: space-between; gap: 8px; }

/* Écran double sur grand écran : liste + détail. */
.double { display: block; }
.double .volet-detail { display: none; }
@media (min-width: 960px) {
  .double { display: grid; grid-template-columns: minmax(340px, 460px) minmax(0, 1fr); gap: 24px; align-items: start; }
  .double .volet-detail { display: block; position: sticky; top: 72px; max-height: calc(100dvh - 88px); overflow: auto; border-radius: var(--rayon); }
  .double .volet-liste .outils { top: 0; position: relative; }
  .double .volet-detail .detail { background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 24px 28px; }
  .double .volet-detail .barre-actions { position: sticky; bottom: 0; margin: 20px -28px -24px; padding: 14px 28px; border-radius: 0 0 var(--rayon) var(--rayon); }
}

/* ---------- Détail d'une offre ---------- */
.detail { padding-top: 4px; }
.detail-tete { display: grid; gap: 10px; margin-bottom: 18px; }
.detail h2 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.015em; font-stretch: 92%; line-height: 1.15; text-wrap: balance; }
.detail .entreprise { font-size: 1.05rem; font-weight: 600; }
.faits { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--encre-douce); font-size: .92rem; margin: 0; padding: 0; list-style: none; }
.marques { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.texte-annonce { max-width: 80ch; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1rem; line-height: 1.6; }
.texte-annonce.replie { max-height: 22em; overflow: hidden; mask-image: linear-gradient(#000 70%, transparent); -webkit-mask-image: linear-gradient(#000 70%, transparent); }
.bloc { margin: 22px 0; }
.bloc > h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.encart { background: var(--tampon-fond); border-radius: var(--rayon); padding: 14px 16px; }
.encart p:last-child { margin-bottom: 0; }
.barre-actions {
  position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); z-index: 4;
  display: flex; gap: 8px; flex-wrap: wrap; margin: 20px -12px 0; padding: 12px;
  background: color-mix(in srgb, var(--papier) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--trait);
}
.barre-actions .bouton.principal { flex: 1 1 auto; }
@media (min-width: 960px) { .barre-actions { background: color-mix(in srgb, var(--carte) 94%, transparent); } }

/* Rédaction de l'IA */
.redaction { display: grid; gap: 12px; }
.section-ia { background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 14px 16px; }
.section-ia > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.section-ia h4 { margin: 0; font-size: 1rem; font-weight: 700; }
.section-ia .corps { max-width: 80ch; overflow-wrap: anywhere; }
.section-ia .corps ul, .section-ia .corps ol { padding-left: 1.3em; margin: 0 0 .75em; }
.section-ia .corps li { margin-bottom: .25em; }
.attente { display: flex; align-items: center; gap: 12px; color: var(--encre-douce); }
.attente::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--trait); border-top-color: var(--tampon); animation: tourne .9s linear infinite; flex: none; }
.erreur { color: var(--visa); }

/* ---------- Candidatures ---------- */
.objectif { display: grid; gap: 8px; padding: 16px; margin-bottom: 18px; }
.objectif-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.objectif-tete strong { font-size: 1.6rem; font-weight: 700; font-stretch: 90%; font-variant-numeric: tabular-nums; }
.jauge { display: grid; grid-template-columns: repeat(var(--n, 5), 1fr); gap: 4px; }
.jauge i { height: 8px; border-radius: 4px; background: var(--trait); }
.jauge i.on { background: var(--tampon); }
.groupe { margin: 0 0 20px; }
.groupe > h2 { font-size: 1rem; font-weight: 700; color: var(--encre-douce); margin: 0 4px 8px; display: flex; gap: 8px; align-items: baseline; }
.groupe > h2 .nombre { font-weight: 500; }
.cand { padding: 14px 16px; display: grid; gap: 6px; }
.cand-tete { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.cand-poste { font-weight: 600; font-size: 1.02rem; line-height: 1.3; }
.cand-entreprise { color: var(--encre-douce); font-size: .92rem; }
.cand-note { font-size: .92rem; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--encre); background: var(--papier); border-radius: var(--rayon-petit); padding: 8px 10px; }
.cand-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.cand.a-relancer { box-shadow: inset 3px 0 0 var(--alerte); }
.relance { color: var(--alerte); font-weight: 600; font-size: .85rem; }
.flottant {
  position: fixed; right: 16px; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); z-index: 15;
  border-radius: 28px; min-height: 52px; padding: 0 20px; box-shadow: 0 6px 20px rgb(20 27 45 / .25);
}
@media (min-width: 960px) { .flottant { position: static; box-shadow: none; } .entete-ecran { display: flex; justify-content: flex-end; margin-bottom: 12px; } }

/* ---------- Bilan ---------- */
.chiffres { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--trait); }
.chiffres > a, .chiffres > div { background: var(--carte); padding: 14px 16px; color: inherit; text-decoration: none; display: grid; gap: 2px; }
.chiffres > a:hover { background: var(--survol); }
.chiffres strong { font-size: 1.7rem; font-weight: 700; font-stretch: 88%; font-variant-numeric: tabular-nums; line-height: 1.1; }
.chiffres span { color: var(--encre-douce); font-size: .88rem; }
@media (min-width: 640px) { .chiffres { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.carte-bloc { padding: 16px; margin-top: 16px; }
.carte-bloc > h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: 12px; }
.carte-bloc > h2 + .discret-texte { margin: -8px 0 12px; font-size: .88rem; }
.grille-bilan { display: grid; gap: 0 16px; }
@media (min-width: 960px) { .grille-bilan { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.semaines { position: relative; display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; align-items: end; height: 150px; padding-top: 18px; }
.semaines .cible { position: absolute; left: 0; right: 0; border-top: 1.5px dashed var(--encre-douce); opacity: .6; }
.semaines .cible span { position: absolute; right: 0; top: -18px; font-size: .72rem; color: var(--encre-douce); }
.semaine { display: grid; grid-template-rows: 1fr auto; height: 100%; gap: 4px; text-align: center; }
.semaine .colonne-barre { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.semaine .valeur { font-size: .75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.semaine .barre { width: 100%; max-width: 34px; border-radius: 4px 4px 0 0; background: var(--encre); min-height: 2px; }
.semaine.atteint .barre { background: var(--tampon); }
.semaine .date { font-size: .68rem; color: var(--encre-douce); white-space: nowrap; }

.repartition { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.repartition li { display: grid; grid-template-columns: minmax(84px, 9em) minmax(0, 1fr) 2.5em; gap: 10px; align-items: center; font-size: .92rem; }
.repartition .piste { height: 10px; border-radius: 5px; background: var(--survol); overflow: hidden; }
.repartition .piste i { display: block; height: 100%; border-radius: 5px; background: var(--encre); }
.repartition .piste i.accent { background: var(--tampon); }
.repartition .piste i.rouge { background: var(--visa); opacity: .8; }
.repartition b { text-align: right; font-variant-numeric: tabular-nums; }
.liste-simple { list-style: none; margin: 0; padding: 0; }
.liste-simple li { padding: 10px 0; border-top: 1px solid var(--trait); display: flex; justify-content: space-between; gap: 10px; }
.liste-simple li:first-child { border-top: 0; padding-top: 0; }

/* ---------- Profil ---------- */
.profil textarea { min-height: 55vh; font-size: .95rem; }
.profil .pied { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); background: var(--papier); padding: 10px 0; }
@media (min-width: 960px) { .profil .pied { bottom: 0; } .profil { max-width: 820px; } }
.profil .pied .discret-texte { font-size: .88rem; }

/* ---------- Vides, chargement ---------- */
.vide { text-align: center; padding: 40px 16px; display: grid; gap: 12px; justify-items: center; }
.vide h2 { font-size: 1.2rem; }
.vide p { color: var(--encre-douce); max-width: 36ch; margin: 0; }
.squelette { display: grid; gap: 1px; }
.squelette i { display: block; height: 76px; background: linear-gradient(90deg, var(--carte) 30%, var(--survol) 50%, var(--carte) 70%) 0 0 / 300% 100%; animation: luit 1.4s ease-in-out infinite; }
@keyframes luit { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ---------- Feuilles (dialog) ---------- */
#feuille {
  border: 0; padding: 0; color: var(--encre); background: var(--carte);
  width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 16px 16px 0 0; box-shadow: var(--ombre-feuille);
  max-height: 90dvh; padding-bottom: env(safe-area-inset-bottom);
}
#feuille[open] { animation: monte .22s cubic-bezier(.2, .8, .2, 1); }
#feuille::backdrop { background: rgb(10 14 24 / .45); }
@keyframes monte { from { transform: translateY(40px); opacity: 0; } }
@media (min-width: 640px) {
  #feuille { max-width: 520px; margin: auto; border-radius: 14px; }
  @keyframes monte { from { transform: translateY(12px) scale(.98); opacity: 0; } }
}
.feuille-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 10px 4px 20px; }
.feuille-tete h2 { font-size: 1.15rem; font-weight: 700; }
.feuille-corps { padding: 8px 20px 4px; }
.feuille-corps > p { color: var(--encre-douce); }
.feuille-actions { display: flex; gap: 8px; justify-content: flex-end; padding: 8px 20px 20px; flex-wrap: wrap; }
.choix-statut { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.choix-statut .bouton[aria-pressed="true"] { background: var(--encre); color: var(--sur-encre); border-color: var(--encre); }

/* ---------- Toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom)); z-index: 60;
  translate: -50% 12px; opacity: 0; pointer-events: none; max-width: min(92vw, 440px);
  background: var(--encre); color: var(--sur-encre); padding: 12px 18px; border-radius: 22px; font-weight: 500; font-size: .95rem;
  transition: opacity .2s, translate .2s; text-align: center;
}
#toast.visible { opacity: 1; translate: -50% 0; }
#toast.erreur { background: var(--visa); color: #fff; }
@media (min-width: 960px) { #toast { bottom: 28px; left: calc(50% + 108px); } }

kbd { font: inherit; font-size: .78rem; border: 1px solid var(--trait); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--carte); }
.raccourcis { display: none; color: var(--encre-douce); font-size: .8rem; gap: 12px; flex-wrap: wrap; padding: 10px 4px; }
@media (min-width: 960px) and (hover: hover) { .raccourcis { display: flex; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.marques .nonvue { margin-left: auto; }
