/* Feeds — univers « Bouclage » : la salle de rédaction d'un quotidien régional au moment du bouclage.
   Papier journal, encre, rouge BAT, cyan quadri. Filets d'un pixel, aucun arrondi, aucune ombre. */
:root {
  --papier: #F1EDE2;
  --papier-clair: #F8F5EE;
  --papier-fonce: #E4DED0;
  --encre: #121212;
  --encre-2: #34322D;
  --doux: #5E5A50;
  --filet: #121212;
  --filet-doux: #C9C2B2;
  --rouge: #D61F14;
  --rouge-vif: #E3261C;
  --cyan: #0089C7;
  --cyan-texte: #006690;
  --magenta: #E5007E;
  --jaune: #F5C800;
  --ok: #006690;
  --alerte: #8A6400;
  --erreur: #D61F14;
  --accent: #121212;
  --t-petit: 12.5px;
  --t-texte: 15px;
  --t-titre: 26px;
  --t-une: clamp(52px, 6.4vw, 96px);
  --serre: "wdth" 62;
  --etroit: "wdth" 75;
  --sortie: cubic-bezier(0.16, 1, 0.3, 1);
  --rail: 236px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--papier);
  color: var(--encre);
  font: 400 var(--t-texte)/1.5 Archivo, "Helvetica Neue", Arial, sans-serif;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
::selection { background: var(--rouge); color: var(--papier-clair); }
* { scrollbar-width: thin; scrollbar-color: var(--encre-2) transparent; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
input, textarea { caret-color: var(--rouge); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1; font-weight: 900; font-variation-settings: var(--serre); letter-spacing: -.005em; }
h1 { font-size: 44px; }
h2 { font-size: var(--t-titre); }
h3 { font-size: 20px; font-variation-settings: var(--etroit); font-weight: 800; }
p { margin: 0 0 .75rem; }
small, .doux { color: var(--doux); font-size: var(--t-petit); }
code { background: var(--papier-fonce); padding: 1px 5px; font-size: .92em; }
pre { font-family: inherit; }

/* ---------- la une : grand titre de page, filet gras */
.une { padding-top: .1em; font-size: var(--t-une); line-height: .84; font-weight: 900; font-variation-settings: var(--serre); letter-spacing: -.015em; margin: 0; }
.entete-page { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; border-bottom: 3px solid var(--filet); padding-bottom: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.entete-page h1 { margin: 0; }
.entete-page p { margin: 6px 0 0; }
.date-edition { font-weight: 700; text-align: right; font-size: var(--t-texte); }
.date-edition b { color: var(--rouge); }

/* ---------- rail (barre latérale) */
body.avec-menu { padding-left: var(--rail); }
.menu {
  position: fixed; inset: 0 auto 0 0; width: var(--rail); z-index: 30;
  display: flex; flex-direction: column; gap: 20px;
  padding: 24px 16px 18px; background: var(--encre); color: var(--papier); overflow-y: auto;
}
.menu .marque { text-decoration: none; display: block; padding: 0 4px; }
.menu .marque strong { display: block; font-weight: 900; font-variation-settings: var(--serre); font-size: 50px; line-height: .86; letter-spacing: -.01em; }
.menu .marque span { display: block; font-size: var(--t-petit); opacity: .62; margin-top: 8px; }
.modules { display: flex; flex-direction: column; }
.modules a, .pied-menu a {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; text-decoration: none;
  font-weight: 700; font-size: var(--t-texte); color: var(--papier); opacity: .62; transition: opacity .15s, background .15s;
}
.modules a:hover, .pied-menu a:hover { opacity: 1; }
.modules a.actif, .pied-menu a.actif { opacity: 1; background: #1F1E1C; }
.modules a.actif .icone, .pied-menu a.actif .icone { stroke: var(--rouge-vif); stroke-width: 2.4; }
.modules .nb { margin-left: auto; background: var(--rouge-vif); color: #fff; font-size: 11px; font-weight: 800; padding: 1px 6px; }
.icone { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: square; }
.clients-menu { display: flex; flex-direction: column; gap: 10px; flex: 1 0 auto; }
.clients-menu input[type=search] { background: #1C1B19; border: 1px solid #34322D; color: var(--papier); padding: 7px 10px; font-size: var(--t-petit); }
.clients-menu input[type=search]::placeholder { color: #8C877C; }
.titre-groupe { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; opacity: .55; padding: 0 2px 2px; }
.pastilles-clients { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pastille-client {
  position: relative; height: 54px; background: #000; border: 1px solid #2C2B28; display: grid; place-items: center;
  text-decoration: none; color: var(--papier); overflow: hidden; transition: border-color .15s, transform .2s var(--sortie);
}
.pastille-client img { max-width: 78%; max-height: 34px; object-fit: contain; }
.pastille-client .sans-logo { font-weight: 900; font-variation-settings: var(--serre); font-size: 15px; text-transform: uppercase; letter-spacing: .02em; padding: 0 4px; text-align: center; line-height: 1; }
.pastille-client:hover { border-color: var(--papier); }
.pastille-client.actif { border-color: var(--rouge-vif); box-shadow: inset 0 0 0 1px var(--rouge-vif); }
.pastille-client .marqueur { position: absolute; right: 4px; top: 4px; width: 7px; height: 7px; background: var(--rouge-vif); }
.pastille-client[hidden] { display: none; }
.client-menu.nouveau { color: var(--papier); opacity: .7; font-weight: 700; font-size: var(--t-petit); text-decoration: none; padding: 4px 2px; }
.client-menu.nouveau:hover { opacity: 1; }
.pied-menu { display: flex; flex-direction: column; border-top: 1px solid #34322D; padding-top: 8px; }
.reperes { display: flex; gap: 6px; padding: 4px 4px 0; }
.reperes i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.barre-mobile, .voile, .onglets-bas { display: none; }
.barre { display: flex; align-items: center; height: 64px; padding: 0 28px; border-bottom: 3px solid var(--filet); }
.barre .marque { font-weight: 900; font-variation-settings: var(--serre); font-size: 34px; text-decoration: none; }

main { padding: 28px 36px 90px; max-width: 1560px; }
main.large { max-width: none; }

/* ---------- messages */
.flash { list-style: none; padding: 0; margin: 0 0 18px; }
.flash li { background: var(--encre); color: var(--papier); padding: 10px 14px; margin-bottom: 6px; font-weight: 600; }

/* ---------- boutons et champs */
.bouton, button {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 40px; padding: 0 18px; border: 1.5px solid var(--encre); border-radius: 0;
  background: var(--encre); color: var(--papier-clair);
  font: inherit; font-weight: 800; font-size: var(--t-texte); font-variation-settings: var(--etroit); letter-spacing: .01em;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, color .15s, transform .12s var(--sortie);
}
.bouton:hover, button:hover { background: #2A2926; }
.bouton:active, button:active { transform: translateY(1px); }
.bouton.secondaire, button.secondaire { background: transparent; color: var(--encre); }
.bouton.secondaire:hover, button.secondaire:hover { background: var(--encre); color: var(--papier-clair); }
.bouton.discret, button.discret { background: transparent; color: var(--encre-2); border-color: transparent; padding: 0 8px; text-decoration: underline; text-decoration-color: var(--filet-doux); }
.bouton.discret:hover, button.discret:hover { color: var(--encre); background: transparent; text-decoration-color: var(--encre); }
.bouton.danger, button.danger { background: transparent; color: var(--rouge); border-color: var(--rouge); }
.bouton.danger:hover, button.danger:hover { background: var(--rouge); color: #fff; }
.bouton.ia, button.ia, .bouton.bat, button.bat { background: var(--rouge); border-color: var(--rouge); color: #fff; }
.bouton.ia:hover, button.ia:hover, .bouton.bat:hover, button.bat:hover { background: #B8160D; border-color: #B8160D; }
button.bat, .bouton.bat { font-weight: 900; font-variation-settings: var(--serre); font-size: 24px; min-height: 50px; padding: 0 22px; letter-spacing: .03em; }
button:disabled, .bouton[aria-disabled="true"] { opacity: .45; cursor: progress; }
button.bat:disabled { opacity: 1; background: transparent; color: var(--doux); border: 1.5px dashed var(--doux); cursor: not-allowed; }
.petit { min-height: 32px; padding: 0 12px; font-size: 13px; }

label { display: block; font-weight: 700; font-size: 13px; margin: 0 0 6px; }
label .doux { font-weight: 400; }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--encre); border-radius: 0;
  background: var(--papier-clair); color: var(--encre); font: inherit;
}
textarea { resize: vertical; min-height: 84px; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--cyan); outline-offset: 1px; }
input::placeholder, textarea::placeholder { color: #8C877C; }
.champ { margin-bottom: 14px; }
.ligne { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.ligne > .champ { flex: 1 1 180px; }
.case { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.case input { width: 18px; height: 18px; accent-color: var(--encre); }

/* ---------- blocs */
.carte { background: var(--papier-clair); border: 1px solid var(--filet); padding: 20px 22px; }
.carte + .carte { margin-top: 16px; }
.carte > h2:first-child, .carte > .ligne:first-child h2 { padding-bottom: 10px; border-bottom: 1px solid var(--filet); margin-bottom: 14px; }
.grille-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.grille-cartes > .carte { margin-top: 0; }
.vide-etat { text-align: center; padding: 56px 20px; color: var(--doux); font-weight: 600; }
.pastilles { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pastille {
  display: inline-block; padding: 2px 7px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  border: 1px solid var(--encre); color: var(--encre); background: transparent; line-height: 1.5; white-space: nowrap;
}
.pastille.ok { background: var(--cyan); border-color: var(--cyan); color: #fff; }
.pastille.alerte { background: var(--jaune); border-color: var(--jaune); color: var(--encre); }
.pastille.erreur { background: var(--rouge); border-color: var(--rouge); color: #fff; }
.pastille.original { background: var(--encre); color: var(--papier-clair); }
.pastille.classique { background: transparent; }
.pastille.chaud { background: #F3D9C4; border-color: #F3D9C4; }
.pastille.froid { background: #CFE4EF; border-color: #CFE4EF; }

/* ---------- cartes clients (page Clients) */
.carte-client { display: flex; flex-direction: column; gap: 12px; text-decoration: none; padding: 0; overflow: hidden; transition: transform .25s var(--sortie); }
.carte-client:hover { transform: translateY(-2px); }
.carte-client .logo { height: 110px; background: #000; display: grid; place-items: center; }
.carte-client .logo img { max-width: 64%; max-height: 66px; object-fit: contain; }
.carte-client .initiale { font-weight: 900; font-variation-settings: var(--serre); font-size: 34px; color: var(--papier); text-transform: uppercase; }
.carte-client .corps { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.carte-client h2 { font-size: 24px; margin: 0; }

/* ---------- en-tête client + onglets */
.entete-client { display: flex; align-items: center; gap: 16px; border-bottom: 3px solid var(--filet); padding-bottom: 14px; margin-bottom: 0; flex-wrap: wrap; }
.entete-client .avatar { width: 92px; height: 64px; background: #000; display: grid; place-items: center; flex: none; }
.entete-client .avatar img { max-width: 80%; max-height: 44px; object-fit: contain; }
.entete-client .avatar span { color: var(--papier); font-weight: 900; font-variation-settings: var(--serre); font-size: 22px; }
.entete-client h1 { font-size: 54px; margin: 0; line-height: .9; }
.entete-client .infos { display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.onglets { display: flex; gap: 0; border-bottom: 1px solid var(--filet); margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; }
.onglets::-webkit-scrollbar { display: none; }
.onglets a {
  padding: 12px 16px 10px; text-decoration: none; font-weight: 800; font-variation-settings: var(--etroit);
  text-transform: uppercase; letter-spacing: .03em; font-size: 13px; color: var(--doux);
  border-bottom: 4px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color .15s;
}
.onglets a:hover { color: var(--encre); }
.onglets a.actif { color: var(--encre); border-bottom-color: var(--rouge); }
.sous-onglets { display: flex; gap: 14px; margin: -12px 0 20px; font-size: 13px; font-weight: 700; }
.sous-onglets a { color: var(--doux); }
.sous-onglets a.actif { color: var(--encre); text-decoration-color: var(--rouge); text-decoration-thickness: 2px; }

/* ---------- Aujourd'hui : À boucler / Sous presse */
.edition-du-jour { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 0; align-items: start; margin: -28px -36px 0; }
.colonne-boucler { padding: 28px 36px 40px; border-right: 1px solid var(--filet); min-width: 0; }
.colonne-presse { padding: 28px 28px 40px; position: sticky; top: 0; max-height: 100vh; overflow-y: auto; }
.filtres { display: flex; gap: 0; margin: 14px 0 6px; }
.filtres button { min-height: 34px; padding: 0 14px; font-size: 13px; background: transparent; color: var(--encre); border-color: var(--encre); margin-right: -1.5px; }
.filtres button[aria-pressed="true"] { background: var(--encre); color: var(--papier-clair); }
.edition { display: grid; grid-template-columns: 76px minmax(120px, 190px) minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--filet); position: relative; }
.edition .puce-client { width: 76px; height: 56px; background: #000; display: grid; place-items: center; text-decoration: none; }
.edition .puce-client img { max-width: 80%; max-height: 38px; object-fit: contain; }
.edition .puce-client span { color: var(--papier); font-weight: 900; font-variation-settings: var(--serre); font-size: 14px; text-transform: uppercase; text-align: center; line-height: 1; }
.edition .nom { font-weight: 900; font-variation-settings: var(--etroit); font-size: 22px; line-height: 1.02; text-decoration: none; }
.edition .nom small { display: block; font-weight: 500; font-variation-settings: "wdth" 100; font-size: 13px; color: var(--doux); margin-top: 5px; }
.edition .actions-edition { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.edition .actions-edition .note-bat { flex-basis: 100%; text-align: right; font-size: 11.5px; }
.edition.partie .cdf > span { opacity: .45; }
.cdf { display: flex; border: 1px solid var(--filet); height: 90px; position: relative; text-decoration: none; overflow: hidden; background: var(--papier-fonce); }
.cdf > span { flex: 0 0 72px; background: var(--papier-fonce) center / cover no-repeat; border-right: 1px solid var(--filet); transition: transform .3s var(--sortie); }
.cdf > span:last-of-type { border-right: 1px solid var(--filet); }
.cdf:hover > span { transform: scale(1.04); }
.cdf .compte { position: absolute; right: 0; bottom: 0; font-style: normal; background: var(--encre); color: var(--papier-clair); font-size: 11px; font-weight: 800; padding: 1px 6px; }
.barre-rouge { position: absolute; left: 3%; right: 3%; top: calc(50% - 2px); height: 4px; background: var(--rouge-vif); transform: rotate(-2deg) scaleX(0); transform-origin: left; pointer-events: none; z-index: 1; }
.edition.partie .barre-rouge { transform: rotate(-2deg) scaleX(1); }
.anim .edition.partie .barre-rouge { animation: trait-barre .45s .25s var(--sortie) both; }
@keyframes trait-barre { from { transform: rotate(-2deg) scaleX(0); } to { transform: rotate(-2deg) scaleX(1); } }
.tampon {
  position: absolute; right: 14px; top: 50%; translate: 0 -50%; z-index: 2; pointer-events: none;
  border: 4px solid var(--rouge-vif); color: var(--rouge-vif); background: color-mix(in srgb, var(--papier) 82%, transparent);
  font-weight: 900; font-variation-settings: var(--serre); font-size: 30px; line-height: 1; padding: 4px 12px 3px;
  rotate: -8deg; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap;
}
.tampon small { display: block; color: inherit; font-size: 12px; font-weight: 800; letter-spacing: .06em; font-variation-settings: "wdth" 100; }
.tampon.claque { animation: tampon .34s var(--sortie) both; }
@keyframes tampon { 0% { opacity: 0; scale: 2.4; rotate: -16deg; } 70% { opacity: 1; scale: .94; } 100% { opacity: 1; scale: 1; rotate: -8deg; } }
.secousse { animation: secousse .22s .2s ease-out; }
@keyframes secousse { 0%, 100% { translate: 0 0; } 30% { translate: 0 2px; } 60% { translate: 0 -1px; } }
.negatif-voile { position: fixed; inset: 0; z-index: 100; pointer-events: none; backdrop-filter: invert(1); -webkit-backdrop-filter: invert(1); }
/* Le coup de stylo rouge : une ellipse tracée à la main autour d'un mot (le nom à revoir, « vide »…). */
.entoure-zone { position: relative; display: inline-block; }
.entoure { position: absolute; left: -12px; top: -9px; width: calc(100% + 24px); height: calc(100% + 18px); pointer-events: none; overflow: visible; }
.entoure path { fill: none; stroke: var(--rouge-vif); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 320; stroke-dashoffset: 0; }
.anim .entoure path { animation: stylo .8s .35s var(--sortie) both; }
@keyframes stylo { from { stroke-dashoffset: 320; } to { stroke-dashoffset: 0; } }
.groupe-titre { display: flex; justify-content: space-between; align-items: baseline; margin: 28px 0 0; padding-bottom: 6px; border-bottom: 3px solid var(--filet); }
.groupe-titre h2 { margin: 0; font-size: 30px; }
.colonne-presse .une { font-size: 56px; }
.presse-ligne { display: grid; grid-template-columns: 50px 36px minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--filet); }
.presse-ligne .heure { font-weight: 800; font-size: 17px; }
.presse-ligne .vignette-mini { width: 36px; height: 45px; background: var(--papier-fonce) center / cover; }
.presse-ligne b { display: block; font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.presse-ligne span { display: block; font-size: 12.5px; color: var(--doux); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.point-prog { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); display: inline-block; margin-right: 6px; vertical-align: 1px; }
.priorites { list-style: none; margin: 0; padding: 0; }
.priorite a { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--filet); text-decoration: none; }
.priorite .rang { font-weight: 900; font-variation-settings: var(--serre); font-size: 22px; color: var(--doux); }
.priorite .qui b { display: block; font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.priorite .qui small { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.priorite .reserve { font-weight: 900; font-variation-settings: var(--serre); font-size: 24px; white-space: nowrap; }
.priorite.vide .reserve, .priorite.urgent .reserve { color: var(--rouge); }
.priorite.vide .rang, .priorite.urgent .rang { color: var(--rouge); }
.priorite.bientot .reserve { box-shadow: inset 0 -6px 0 var(--jaune); }
.priorite a:hover b { text-decoration: underline; }
.tampon-auto { border-color: var(--cyan); color: var(--cyan-texte); }
.jour-presse { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; margin: 16px 0 0; color: var(--doux); }
.alerte-noire { background: var(--encre); color: var(--papier); padding: 13px 15px; margin-top: 14px; text-decoration: none; display: block; }
.alerte-noire b { display: block; color: #FF6B60; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.alerte-noire p { font-weight: 700; font-size: 15px; margin: 4px 0 0; }
.alerte-noire + .alerte-noire { margin-top: 6px; }

/* ---------- photos */
.mur { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 0; border-top: 1px solid var(--filet); border-left: 1px solid var(--filet); }
.vignette { background: var(--papier-clair); border-right: 1px solid var(--filet); border-bottom: 1px solid var(--filet); display: flex; flex-direction: column; }
.vignette .image { aspect-ratio: 4 / 5; background: var(--papier-fonce) center / cover no-repeat; position: relative; }
.vignette .image .pastilles { position: absolute; left: 6px; top: 6px; }
.vignette .pied { padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.vignette .pied input { padding: 6px 8px; font-size: 13px; }
.vignette .actions { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.vignette .actions button { min-height: 28px; padding: 0 8px; font-size: 12px; }
.choix-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 6px; max-height: 340px; overflow: auto; padding: 2px; }
.choix-photos label { margin: 0; position: relative; cursor: pointer; }
.choix-photos img { width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block; border: 3px solid transparent; }
.choix-photos input { position: absolute; opacity: 0; }
.choix-photos input:checked + img { border-color: var(--rouge-vif); }
.choix-photos input:focus-visible + img { outline: 2px solid var(--cyan); }
.depot { border: 1.5px dashed var(--encre); padding: 26px; text-align: center; background: var(--papier); transition: background .15s; }
.depot.survol { background: var(--jaune); }

/* ---------- lots (liste des feeds d'un client) */
.mini-grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; overflow: hidden; background: var(--filet); border: 1px solid var(--filet); aspect-ratio: 9 / 8; }
.mini-grille div { background: var(--papier-fonce) center / cover no-repeat; aspect-ratio: 3 / 4; }

/* ---------- éditeur */
.editeur { display: grid; grid-template-columns: minmax(340px, 470px) minmax(0, 1fr); gap: 28px; align-items: start; }
.editeur > #inspecteur { container-type: inline-size; min-width: 0; }
.telephone { background: #fff; border: 1px solid var(--filet); padding: 18px 10px 14px; position: sticky; top: 20px; }
.telephone .profil { display: flex; gap: 12px; align-items: center; padding: 0 8px 14px; }
.telephone .profil .avatar { width: 54px; height: 54px; border-radius: 50%; background: #000; display: grid; place-items: center; overflow: hidden; flex: none; }
.telephone .profil .avatar img { max-width: 72%; max-height: 60%; object-fit: contain; }
.telephone .profil strong { display: block; }
.grille-ig { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.tuile { position: relative; aspect-ratio: 3 / 4; background: var(--papier-fonce) center / cover no-repeat; cursor: pointer; outline: 3px solid transparent; outline-offset: -3px; transition: outline-color .15s; }
.tuile:hover { outline-color: var(--cyan); }
.tuile.selection { outline-color: var(--rouge-vif); z-index: 1; }
.tuile.glisse { opacity: .35; }
.tuile.cible { box-shadow: inset 4px 0 0 var(--rouge-vif); }
.tuile .num { position: absolute; left: 0; bottom: 0; background: var(--encre); color: var(--papier-clair); font-size: 11px; font-weight: 800; padding: 1px 6px; }
.tuile .etat { position: absolute; right: 5px; top: 5px; width: 11px; height: 11px; border: 2px solid #fff; }
.tuile .etat.envoye { background: var(--cyan); }
.tuile .etat.erreur { background: var(--rouge-vif); }
.tuile .etat.modifie { background: var(--jaune); }
.tuile .multi { position: absolute; right: 5px; bottom: 4px; color: #fff; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .6)); }
.tuile .multi .icone { width: 15px; height: 15px; }
.tuile.vide { display: grid; place-items: center; color: var(--doux); font-size: 1.6rem; border: 1px dashed var(--encre); background: var(--papier); }
.separateur-feed { text-align: center; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--doux); margin: 10px 0 6px; border-top: 1px dashed var(--filet-doux); padding-top: 8px; font-weight: 700; }
.precedents .tuile { opacity: .45; cursor: default; }
.inspecteur { display: grid; grid-template-columns: minmax(320px, 540px) minmax(0, 1fr); gap: 22px; align-items: start; }
.inspecteur .apercu { position: sticky; top: 20px; }
.inspecteur .apercu img { width: 100%; display: block; background: var(--papier-fonce); border: 1px solid var(--filet); }
.slides { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.slides figure { margin: 0; }
.slides figcaption { font-size: 12px; color: var(--doux); margin-top: 4px; text-align: center; font-weight: 700; }
.slides.story figure { max-width: 230px; }
.barre-outils { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 3px solid var(--filet); position: relative; }
.barre-outils .espace { flex: 1; }
.titre-lot { font-size: 40px; font-weight: 900; font-variation-settings: var(--serre); border: 1px solid transparent; background: transparent; padding: 0 6px; margin-left: -6px; width: auto; min-width: 300px; line-height: 1.1; }
.titre-lot:hover { border-color: var(--filet-doux); }
.commentaire-ia { background: var(--encre); color: var(--papier); padding: 13px 16px; font-size: 14px; margin-bottom: 18px; }
.commentaire-ia strong { color: #FF6B60; }
.compteur { font-size: 12px; color: var(--doux); text-align: right; margin-top: 4px; }
.cadrage { position: relative; overflow: hidden; cursor: crosshair; border: 1px solid var(--filet); }
.cadrage img { width: 100%; display: block; }
.cadrage .point { position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--rouge-vif); transform: translate(-50%, -50%); pointer-events: none; transition: left .2s var(--sortie), top .2s var(--sortie); }
.reglage-cadrage { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: start; margin-bottom: 14px; }
.reglage-cadrage input[type=range] { width: 100%; accent-color: var(--rouge); }
.stories-bande { display: flex; gap: 6px; overflow-x: auto; padding: 6px 2px 10px; }
.stories-bande .story { flex: none; width: 72px; aspect-ratio: 9 / 16; background: var(--papier-fonce) center / cover; cursor: pointer; position: relative; border: 2px solid transparent; transition: border-color .15s; }
.stories-bande .story:hover { border-color: var(--cyan); }
.stories-bande .story.selection { border-color: var(--rouge-vif); }
.stories-bande .story.vide { display: grid; place-items: center; background: var(--papier); border: 1px dashed var(--encre); color: var(--doux); font-size: 1.4rem; }
.stories-bande .story .etat { position: absolute; right: 4px; top: 4px; width: 10px; height: 10px; border: 2px solid #fff; }
.stories-bande .story .etat.envoye { background: var(--cyan); }
.stories-bande .story .etat.erreur { background: var(--rouge-vif); }
.stories-bande .story .etat.modifie { background: var(--jaune); }
@container (max-width: 760px) {
  .inspecteur { grid-template-columns: 1fr; }
  .inspecteur .apercu { position: static; }
  .inspecteur .slides { max-width: 520px; }
}

/* ---------- dialogues */
dialog { border: 2px solid var(--encre); border-radius: 0; padding: 0; width: min(760px, calc(100vw - 32px)); background: var(--papier-clair); color: var(--encre); }
dialog::backdrop { background: rgba(18, 18, 18, .55); }
dialog[open] { animation: monte .28s var(--sortie); }
@keyframes monte { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
dialog .contenu { padding: 22px 24px; max-height: calc(100vh - 160px); overflow: auto; }
dialog .contenu h2 { border-bottom: 3px solid var(--filet); padding-bottom: 10px; }
dialog .pied { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--filet); background: var(--papier); }

/* ---------- dépêches (suivi des tâches) */
.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 6px; z-index: 50; max-width: 400px; }
.toast { background: var(--encre); color: var(--papier); padding: 12px 16px; font-size: 14px; font-weight: 600; animation: depeche .32s var(--sortie); display: flex; gap: 10px; align-items: baseline; }
.toast::before { content: ""; width: 10px; height: 10px; flex: none; background: var(--cyan); translate: 0 1px; }
.toast.erreur::before { background: var(--rouge-vif); }
.toast.attente::before { display: none; }
@keyframes depeche { from { opacity: 0; translate: 24px 0; } to { opacity: 1; translate: 0 0; } }
.roue { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(241, 237, 226, .3); border-top-color: var(--jaune); display: inline-block; animation: tourne .8s linear infinite; vertical-align: -2px; margin-right: 8px; }
@keyframes tourne { to { transform: rotate(360deg); } }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--filet-doux); vertical-align: top; }
th { color: var(--encre); font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; border-bottom: 2px solid var(--filet); }

.couleurs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.couleurs input[type=color] { width: 100%; height: 44px; border: 1px solid var(--encre); padding: 2px; background: var(--papier-clair); }
.variantes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0; border-left: 1px solid var(--filet); border-top: 1px solid var(--filet); }
.variantes div { padding: 14px; display: grid; place-items: center; aspect-ratio: 2 / 1; border-right: 1px solid var(--filet); border-bottom: 1px solid var(--filet); }
.variantes img { max-width: 100%; max-height: 54px; }
.apercus { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.apercus img { width: 100%; border: 1px solid var(--filet); }

/* ---------- dictée vocale */
.dictee { position: relative; display: block; }
.dictee > input, .dictee > textarea { padding-right: 46px; }
.micro .icone { width: 16px; height: 16px; }
.micro { position: absolute; right: 6px; top: 6px; width: 32px; height: 32px; min-height: 32px; padding: 0; border-radius: 50%;
  background: var(--papier); border: 1px solid var(--encre); color: var(--encre); font-size: 14px; line-height: 1; }
.micro:hover { background: var(--papier-fonce); }
.micro[data-etat="ecoute"] { background: var(--rouge); border-color: var(--rouge); color: #fff; animation: pulsation 1.2s infinite; }
.micro[data-etat="transcription"] { background: var(--encre); color: var(--papier); }
@keyframes pulsation { 0% { box-shadow: 0 0 0 0 rgba(214, 31, 20, .45); } 70% { box-shadow: 0 0 0 10px rgba(214, 31, 20, 0); } 100% { box-shadow: 0 0 0 0 rgba(214, 31, 20, 0); } }

/* ---------- choix en pastilles */
label.choix { margin: 0; cursor: pointer; position: relative; font-weight: 700; }
.choix input { position: absolute; opacity: 0; pointer-events: none; }
.choix span { display: inline-block; padding: 6px 13px; border: 1px solid var(--encre); background: var(--papier-clair); font-size: 13px; transition: background .15s, color .15s; }
.choix input:checked + span { background: var(--encre); color: var(--papier-clair); }
.choix input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }
.choix.suggestion span { border-style: dashed; }

/* ---------- types de clients, interrupteurs, listes */
.type-client { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0; border: 1px solid var(--encre); }
.type-client label { display: flex; gap: 12px; align-items: flex-start; padding: 14px; cursor: pointer; font-weight: 400; margin: 0; transition: background .15s; }
.type-client label + label { border-left: 1px solid var(--encre); }
.type-client label:has(input:checked) { background: var(--encre); color: var(--papier); }
.type-client label:has(input:checked) small { color: #C9C2B2; }
.type-client input { margin-top: 3px; accent-color: var(--rouge); }
.type-client strong { display: block; margin-bottom: 2px; font-size: 18px; font-weight: 900; font-variation-settings: var(--etroit); }
.interrupteur { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--filet-doux); }
.interrupteur:last-child { border-bottom: 0; }
.interrupteur .texte { flex: 1; }
.interrupteur .texte strong { font-size: 17px; font-weight: 800; font-variation-settings: var(--etroit); }
.interrupteur .texte small { display: block; margin-top: 2px; }
.interrupteur.verrou { opacity: .75; }
.bascule { position: relative; width: 52px; height: 28px; flex: none; margin: 0; }
.bascule input { opacity: 0; width: 0; height: 0; position: absolute; }
.bascule span { position: absolute; inset: 0; background: var(--papier-fonce); border: 1.5px solid var(--encre); transition: background .2s; cursor: pointer; }
.bascule span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 19px; height: 19px; background: var(--encre); transition: transform .25s var(--sortie), background .2s; }
.bascule input:checked + span { background: var(--cyan); border-color: var(--cyan); }
.bascule input:checked + span::after { transform: translateX(23px); background: #fff; }
.bascule input:disabled + span { cursor: not-allowed; opacity: .45; }
.bascule input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }
.script-messages { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--filet-doux); }
.script-messages h3 { margin-bottom: 12px; }
.progression { display: flex; gap: 3px; margin-top: 6px; }
.progression i { width: 22px; height: 8px; border: 1px solid var(--encre); }
.progression i.fait { background: var(--rouge-vif); border-color: var(--rouge-vif); }
.liste-simple { list-style: none; padding: 0; margin: 0; }
.liste-simple li { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--filet-doux); font-size: 14px; }
.liste-simple li:last-child { border-bottom: 0; }
.vignette-carree { width: 48px; height: 60px; background: var(--papier-fonce) center / cover; flex: none; }
.etoiles { display: inline-flex; gap: 1px; vertical-align: -2px; }
.etoiles svg { width: 15px; height: 15px; fill: none; stroke: var(--encre); stroke-width: 1.6; }
.etoiles svg.pleine { fill: var(--rouge-vif); stroke: var(--rouge-vif); }

/* ---------- planification */
.planif-client { padding: 0; overflow: hidden; }
.planif-client > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 18px; cursor: pointer; flex-wrap: wrap; }
.planif-client > summary::-webkit-details-marker { display: none; }
.planif-client > summary strong { font-size: 20px; font-weight: 900; font-variation-settings: var(--etroit); }
.planif-client[open] > summary { border-bottom: 1px solid var(--filet); background: var(--papier); }
.planif-corps { padding: 16px 18px; display: grid; gap: 18px; }
.puce { width: 12px; height: 12px; flex: none; border: 1px solid rgba(0, 0, 0, .2); }
.file { border: 1px solid var(--filet); padding: 14px; background: var(--papier); }
.apercu-feed { border: 1px solid var(--filet); background: #fff; padding: 14px; max-width: 420px; }
.apercu-feed .grille-ig { gap: 2px; }
.file-entete { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.file-entete h3 { margin: 0; }
.horaires { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.horaire { display: inline-flex; gap: 6px; align-items: center; background: var(--papier-clair); border: 1px solid var(--encre); padding: 3px 10px; font-size: 13px; font-weight: 700; cursor: pointer; transition: background .15s; }
.horaire:hover { background: var(--jaune); }
.file-contenu { display: flex; gap: 0; overflow-x: auto; padding-bottom: 6px; border-left: 1px solid var(--filet); }
.element-file { flex: none; width: 128px; background: var(--papier-clair); border: 1px solid var(--filet); border-left: 0; font-size: 12px; }
.element-file .image { aspect-ratio: 4 / 5; background: var(--papier-fonce) center / cover; position: relative; }
.element-file.story .image { aspect-ratio: 9 / 16; }
.element-file .image .nb { position: absolute; right: 0; top: 0; background: var(--encre); color: var(--papier); padding: 0 6px; font-weight: 800; }
.element-file .texte { padding: 4px 8px 6px; max-height: 3.6em; overflow: hidden; color: var(--doux); }
.element-file .actions { display: flex; justify-content: space-between; padding: 2px; border-top: 1px solid var(--filet-doux); }
.element-file .actions button { min-height: 26px; padding: 0 8px; font-size: 13px; text-decoration: none; }
.element-file .actions .icone { width: 15px; height: 15px; }
.element-file .quand { padding: 5px 8px 0; font-weight: 800; color: var(--encre); }
.agenda { display: grid; gap: 0; }
.agenda-jour h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin: 22px 0 4px; color: var(--doux); font-variation-settings: "wdth" 100; }
.agenda-jour h3::first-letter { text-transform: uppercase; }
.agenda-ligne { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--filet); padding: 8px 2px; font-size: 14px; }
.agenda-ligne .heure { font-weight: 800; width: 48px; font-size: 16px; }
.agenda-ligne .vignette-carree { width: 34px; height: 42px; }
.avis-carte { display: grid; gap: 10px; }
.avis-carte blockquote { margin: 0; padding: 10px 14px; background: var(--papier); border: 1px solid var(--filet-doux); font-size: 15px; }

/* ---------- l'encre se pose : entrée des listes (seulement si le script tourne : sans lui, tout reste visible) */
.anim .encre > * { animation: encre .5s var(--sortie) both; animation-delay: calc(min(var(--i, 0), 14) * 32ms); }
@keyframes encre { from { opacity: 0; filter: blur(5px); translate: 0 6px; } to { opacity: 1; filter: blur(0); translate: 0 0; } }
.anim .une-anim { animation: une .55s var(--sortie) both; }
@keyframes une { from { clip-path: inset(100% -0.1em -0.25em -0.1em); translate: 0 14px; } to { clip-path: inset(-0.4em -0.1em -0.25em -0.1em); translate: 0 0; } }

@media (prefers-reduced-motion: reduce) {
  .anim .encre > *, .anim .une-anim { animation-name: fondu; animation-duration: .2s; }
  @keyframes fondu { from { opacity: 0; } to { opacity: 1; } }
  .tampon.claque { animation: fondu .2s both; }
  .secousse, .anim .entoure path, .anim .edition.partie .barre-rouge { animation: none; }
  .cdf:hover > span, .carte-client:hover { transform: none; }
}

/* ---------- téléphone et petits écrans */
@media (max-width: 1250px) {
  body.avec-menu .editeur { grid-template-columns: 1fr; }
  body.avec-menu .telephone { position: static; max-width: 470px; }
  .edition-du-jour { grid-template-columns: 1fr; }
  .colonne-boucler { border-right: 0; }
  .colonne-presse { position: static; max-height: none; border-top: 3px solid var(--filet); }
}
@media (max-width: 900px) {
  body.avec-menu { padding-left: 0; padding-bottom: 64px; }
  .menu { transform: translateX(-100%); transition: transform .25s var(--sortie); }
  body.menu-ouvert .menu { transform: none; }
  body.menu-ouvert .voile { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 25; }
  .barre-mobile { display: flex; align-items: center; gap: 6px; position: sticky; top: 0; z-index: 20; height: 54px; padding: 0 10px; background: var(--encre); color: var(--papier); }
  .barre-mobile .marque { font-weight: 900; font-variation-settings: var(--serre); font-size: 28px; text-decoration: none; }
  .barre-mobile button { background: transparent; border: 0; color: var(--papier); padding: 0 8px; }
  .onglets-bas { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--encre); padding-bottom: env(safe-area-inset-bottom); }
  .onglets-bas a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 0 8px; color: var(--papier); text-decoration: none; font-size: 11px; font-weight: 700; opacity: .65; }
  .onglets-bas a.actif { opacity: 1; box-shadow: inset 0 3px 0 var(--rouge-vif); }
  main { padding: 20px 16px 40px; }
  .edition-du-jour { margin: -20px -16px 0; }
  .colonne-boucler, .colonne-presse { padding: 20px 16px; }
  .edition { grid-template-columns: 64px minmax(0, 1fr); gap: 10px 14px; }
  .edition .puce-client { width: 64px; height: 48px; }
  .edition .cdf { grid-column: 1 / -1; height: 80px; }
  .cdf > span { flex-basis: 64px; }
  .edition .actions-edition { grid-column: 1 / -1; }
  .edition .actions-edition button, .edition .actions-edition .bouton { flex: 1; }
  .tampon { right: 12px; font-size: 24px; }
  .date-edition { text-align: left; }
  .entete-client h1 { font-size: 40px; }
  .titre-lot { font-size: 30px; min-width: 0; width: 100%; }
  .inspecteur { grid-template-columns: 1fr; }
  .inspecteur .apercu { position: static; }
  .apercus { grid-template-columns: 1fr 1fr; }
  button, .bouton { min-height: 44px; }
  .petit { min-height: 36px; }
}

/* ---------- Fox, l'assistant (panneau à droite, partout) */
.redac-bouton {
  position: fixed; right: 22px; bottom: 22px; z-index: 40; min-height: 56px; padding: 0 18px 0 14px; gap: 10px;
  background: var(--encre); border-color: var(--encre); color: var(--papier-clair);
  font-weight: 900; font-variation-settings: var(--serre); font-size: 22px; letter-spacing: .02em; text-transform: uppercase;
  transition: transform .25s var(--sortie), background .15s;
}
.redac-bouton { padding-left: 6px; }
.redac-bouton:hover { transform: translateY(-2px); }
body.redac-ouvert .redac-bouton { transform: translateY(120%); }
.redac {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 45; width: min(440px, 100vw);
  display: flex; flex-direction: column; background: var(--papier-clair); border-left: 2px solid var(--encre);
  animation: redac-entre .32s var(--sortie);
}
.redac[hidden] { display: none; }
@keyframes redac-entre { from { translate: 40px 0; opacity: 0; } to { translate: 0 0; opacity: 1; } }
.redac-tete { display: flex; align-items: center; gap: 6px; background: var(--encre); color: var(--papier); padding: 14px 12px 12px 18px; }
.redac-tete > div { flex: 1; }
.redac-tete strong { display: block; font-weight: 900; font-variation-settings: var(--serre); font-size: 34px; line-height: .9; }
.redac-tete small { color: #8C877C; font-size: 12px; }
.redac-tete .discret { color: var(--papier); text-decoration: none; }
.redac-tete .discret:hover { color: #fff; }
.redac-voix { display: flex; gap: 6px; align-items: center; margin: 0 6px 0 0; font-size: 12px; font-weight: 700; color: var(--papier); cursor: pointer; }
.redac-voix input { accent-color: var(--rouge-vif); }
.redac-fil { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.redac-message { max-width: 92%; font-size: 15px; line-height: 1.45; }
.redac-message p { margin: 0 0 6px; }
.redac-message p:last-child { margin-bottom: 0; }
.redac-message ul { margin: 4px 0 6px; padding-left: 18px; }
.redac-message.utilisateur { align-self: flex-end; background: var(--encre); color: var(--papier-clair); padding: 9px 13px; }
.redac-message.assistant { align-self: flex-start; padding: 10px 13px; border: 1px solid var(--filet); background: #fff; }
.redac-message.assistant small { display: block; margin-top: 6px; }
.redac-message.arrive, .redac-carte.arrive { animation: encre .45s var(--sortie) both; }
.redac-carte { position: relative; border: 2px solid var(--rouge-vif); background: #fff; padding: 12px 14px; }
.redac-carte b { display: block; color: var(--rouge); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.redac-carte p { margin: 6px 0 10px; font-weight: 700; }
.redac-carte.faite { border-color: var(--cyan); }
.redac-carte.faite b { color: var(--cyan-texte); }
.redac-carte.annulee { border-color: var(--filet-doux); opacity: .7; }
.redac-carte .tampon { right: 12px; font-size: 22px; }
.redac-attente { display: flex; gap: 4px; align-items: center; color: var(--doux); font-size: 13px; }
.redac-attente i { width: 6px; height: 16px; background: var(--encre); animation: imprime 1s infinite ease-in-out; }
.redac-attente i:nth-child(2) { animation-delay: .15s; }
.redac-attente i:nth-child(3) { animation-delay: .3s; }
.redac-attente span { margin-left: 8px; }
@keyframes imprime { 0%, 100% { transform: scaleY(.3); opacity: .4; } 50% { transform: scaleY(1); opacity: 1; } }
.redac-suggestions { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 18px 10px; }
.choix-rapide { min-height: 30px; padding: 0 10px; font-size: 12.5px; background: transparent; color: var(--encre); border: 1px solid var(--encre); font-variation-settings: "wdth" 100; font-weight: 700; }
.choix-rapide:hover { background: var(--encre); color: var(--papier-clair); }
.redac-saisie { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); border-top: 2px solid var(--encre); background: var(--papier); }
.redac-saisie textarea { min-height: 52px; resize: none; }
.redac-micro, .redac-envoyer { min-height: 52px; width: 52px; padding: 0; }
.redac-micro { background: var(--rouge); border-color: var(--rouge); }
.redac-micro .icone, .redac-envoyer .icone { width: 22px; height: 22px; stroke-width: 2.2; }
.redac-micro[data-etat="ecoute"] { animation: pulsation 1.2s infinite; background: var(--encre); border-color: var(--encre); }
.redac-micro[data-etat="ecoute"] .icone { stroke: var(--rouge-vif); }
@media (max-width: 900px) {
  .redac-bouton { bottom: calc(76px + env(safe-area-inset-bottom)); right: 14px; min-height: 50px; font-size: 18px; }
  .redac { width: 100vw; border-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .redac, .redac-message.arrive, .redac-carte.arrive { animation: none; }
  .redac-attente i { animation: none; opacity: .6; }
}

/* ---------- Studio (Créer) */
.studio { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(320px, 1.15fr) minmax(280px, .9fr); gap: 0; border: 1px solid var(--filet); background: var(--papier-clair); }
.studio-etape { padding: 18px 20px 22px; min-width: 0; }
.studio-etape + .studio-etape { border-left: 1px solid var(--filet); }
.studio-etape h2 { display: flex; align-items: baseline; gap: 10px; border-bottom: 3px solid var(--filet); padding-bottom: 8px; margin-bottom: 16px; }
.studio-etape .numero { color: var(--rouge-vif); font-size: 34px; }
.studio-clients { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 4px; max-height: 236px; overflow-y: auto; padding: 2px; }
.studio-client { margin: 0; cursor: pointer; position: relative; }
.studio-client input { position: absolute; opacity: 0; }
.studio-client span { height: 52px; background: #000; display: grid; place-items: center; border: 2px solid transparent; transition: border-color .15s; }
.studio-client img { max-width: 78%; max-height: 32px; object-fit: contain; }
.studio-client em { color: var(--papier); font-style: normal; font-weight: 900; font-variation-settings: var(--serre); font-size: 13px; text-transform: uppercase; text-align: center; line-height: 1; padding: 0 3px; }
.studio-client input:checked + span { border-color: var(--rouge-vif); }
.studio-client input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }
.studio-apercu { position: relative; margin-bottom: 14px; }
.studio-apercu img { width: 100%; display: block; border: 1px solid var(--filet); background: var(--papier-fonce); }
.studio-apercu .slides.story { grid-template-columns: minmax(0, 240px); }
.studio-bloc + .studio-bloc { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--filet-doux); }
.creneaux { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 12px; }
.creneaux span { font-size: 12px; padding: 2px 7px; border: 1px solid var(--filet-doux); color: var(--doux); }
.creneaux span.prochain { border-color: var(--rouge-vif); color: var(--rouge); font-weight: 800; }
.studio-fait { border: 2px solid var(--cyan); padding: 12px 14px; font-weight: 700; }
@media (max-width: 1250px) {
  .studio { grid-template-columns: 1fr 1fr; }
  .studio-etape:nth-child(3) { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--filet); }
}
@media (max-width: 900px) {
  .studio { grid-template-columns: 1fr; }
  .studio-etape + .studio-etape { border-left: 0; border-top: 1px solid var(--filet); }
}

.fox-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: block; flex: none; box-shadow: 0 0 0 2px var(--rouge-vif); }
.fox-avatar.grand { width: 52px; height: 52px; }
.fox-avatar.reflechit { animation: fox-reflechit 1.1s ease-in-out infinite; }
@keyframes fox-reflechit { 0%, 100% { rotate: 0deg; translate: 0 0; } 30% { rotate: -6deg; translate: 0 -2px; } 60% { rotate: 4deg; } }
.redac-bouton:hover .fox-avatar { animation: fox-salut .5s var(--sortie); }
@keyframes fox-salut { 0% { rotate: 0deg; } 40% { rotate: -12deg; } 70% { rotate: 6deg; } 100% { rotate: 0deg; } }
.fox-portrait { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; display: block; margin: 4px 0 14px; box-shadow: 0 0 0 3px var(--encre); }
.redac-accueil { animation: encre .5s var(--sortie) both; }
body.fox-ecoute .fox-avatar.grand { box-shadow: 0 0 0 3px var(--rouge-vif); animation: pulsation 1.2s infinite; }
@media (prefers-reduced-motion: reduce) {
  .fox-avatar.reflechit, .redac-bouton:hover .fox-avatar, body.fox-ecoute .fox-avatar.grand, .redac-accueil { animation: none; }
}

/* ---------- arrivages de photos */
.arrivages { list-style: none; margin: 0; padding: 0; }
.arrivage { display: grid; grid-template-columns: 64px minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--filet); }
.arrivage .quand b { display: block; font-weight: 900; font-variation-settings: var(--serre); font-size: 26px; line-height: 1; }
.arrivage .qui strong { font-size: 17px; font-weight: 800; }
.arrivage .qui small { display: block; }
.petit-cdf { height: 62px; }
.petit-cdf > span { flex-basis: 50px; }
.etat-arrivage { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
@media (max-width: 900px) {
  .arrivage { grid-template-columns: 56px minmax(0, 1fr); }
  .arrivage .petit-cdf, .arrivage .etat-arrivage { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ---------- récapitulatif de la planification */
.recap-planif { margin-bottom: 22px; }
.recap { border-top: 3px solid var(--filet); border-bottom: 1px solid var(--filet); }
.recap th, .recap td { border-bottom: 1px solid var(--filet-doux); padding: 8px 10px; vertical-align: middle; }
.recap tr:last-child th, .recap tr:last-child td { border-bottom: 0; }
.recap th { width: 290px; font-size: 14px; font-weight: 800; text-transform: none; letter-spacing: 0; color: var(--encre); border-bottom-width: 1px; }
.recap .nombre { width: 70px; font-weight: 900; font-variation-settings: var(--serre); font-size: 30px; line-height: 1; text-align: right; }
.recap .qui { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.recap .ligne-alerte .nombre, .recap .ligne-alerte th { color: var(--rouge); }
.recap .pastille { text-decoration: none; text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 700; padding: 3px 8px; cursor: pointer; }
.recap button.pastille { min-height: 0; background: transparent; color: var(--encre); border: 1px solid var(--encre); font-variation-settings: "wdth" 100; }
.recap button.pastille:hover, .recap a.pastille:hover { background: var(--encre); color: var(--papier-clair); }
@media (max-width: 900px) {
  .recap, .recap tbody, .recap tr, .recap th, .recap td { display: block; width: auto; }
  .recap tr { display: grid; grid-template-columns: 1fr auto; padding: 8px 0; border-bottom: 1px solid var(--filet-doux); }
  .recap th, .recap td { border: 0; padding: 2px 0; }
  .recap .qui { grid-column: 1 / -1; }
}

/* ---------- La voix de Fox (réglages) et Fox qui parle */
.voix-choix { display: grid; gap: 0; border-top: 1px solid var(--filet-doux); }
.voix-ligne { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--filet-doux); }
.voix-ligne label { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; cursor: pointer; font-weight: 700; }
.voix-ligne input { accent-color: var(--rouge-vif); }
.fox-avatar.parle { animation: fox-parle .42s ease-in-out infinite alternate; }
@keyframes fox-parle { from { scale: 1; rotate: -2deg; } to { scale: 1.06; rotate: 2deg; } }
@media (prefers-reduced-motion: reduce) { .fox-avatar.parle { animation: none; box-shadow: 0 0 0 3px var(--rouge-vif); } }

/* ---------- Déclinaisons du logo (fiche client) */
.declinaisons { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); border-top: 1px solid var(--filet); border-left: 1px solid var(--filet); margin-bottom: 14px; }
.declinaison { display: grid; grid-template-rows: auto 1fr auto; border-right: 1px solid var(--filet); border-bottom: 1px solid var(--filet); background: var(--papier-clair); }
.declinaison-apercu { height: 104px; display: grid; place-items: center; padding: 16px; border-bottom: 1px solid var(--filet); }
.declinaison-apercu img { max-width: 100%; max-height: 64px; object-fit: contain; }
.declinaison-apercu span { font-size: 12px; font-weight: 700; background: var(--papier-clair); color: var(--encre); padding: 2px 8px; }
.declinaison.absente .declinaison-apercu { background-image: repeating-linear-gradient(135deg, transparent 0 8px, rgb(255 255 255 / .06) 8px 9px); }
.declinaison-texte { padding: 10px 12px 4px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.declinaison-texte small { flex-basis: 100%; line-height: 1.35; }
.declinaison-actions { display: flex; flex-wrap: wrap; gap: 2px 14px; padding: 6px 12px 10px; }
.declinaison-actions form { margin: 0; }
.lien-action { background: none; border: 0; padding: 4px 0; min-height: 32px; font: inherit; font-size: 13px; font-weight: 800; color: var(--encre); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.lien-action:hover { color: var(--rouge); }
.lien-action:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ---------- DA en étapes : chemin de fer (le plan des pages d'un numéro) */
.onglet-signal { display: inline-block; margin-left: 6px; padding: 1px 6px; font-size: 11px; font-weight: 800; background: var(--jaune); color: var(--encre); vertical-align: 2px; }
.da-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; padding: 18px 0 16px; border-top: 3px solid var(--encre); border-bottom: 1px solid var(--encre); margin-bottom: 18px; }
.da-tete h2 { margin: 0 0 6px; font-size: clamp(26px, 3.4vw, 38px); font-variation-settings: var(--serre); line-height: 1; }
.da-tete p { margin: 0; max-width: 70ch; }
.da-tete .pastille .icone { width: 14px; height: 14px; vertical-align: -2px; }
.chemin-de-fer { list-style: none; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-left: 1px solid var(--encre); }
.page-cdf { border: 1px solid var(--encre); border-left: 0; background: var(--papier-clair); min-width: 0; }
.page-cdf a { display: grid; gap: 4px; padding: 12px 12px 14px; color: inherit; text-decoration: none; height: 100%; aspect-ratio: 3 / 4; align-content: space-between; }
.page-cdf .numero { font-size: clamp(34px, 5vw, 64px); font-weight: 900; font-variation-settings: var(--serre); line-height: .85; }
.page-cdf strong { font-size: 15px; line-height: 1.15; }
.page-cdf small { font-size: 12px; font-weight: 700; display: flex; gap: 4px; align-items: center; }
.page-cdf small .icone { width: 13px; height: 13px; flex: none; }
.page-cdf.faite { background: var(--encre); color: var(--papier-clair); }
.page-cdf.en_cours { box-shadow: inset 0 0 0 3px var(--rouge-vif); }
.page-cdf.en_cours .numero { color: var(--rouge); }
.page-cdf.verrouillee { background-image: repeating-linear-gradient(135deg, transparent 0 9px, rgb(18 18 18 / .07) 9px 10px); color: rgb(18 18 18 / .55); }
.page-cdf a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.page-cdf a:focus-visible { outline: 2px solid var(--cyan); outline-offset: -4px; }
@media (max-width: 760px) {
  .chemin-de-fer { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .page-cdf a { aspect-ratio: auto; min-height: 104px; }
}

.da-etape { border-top: 1px solid var(--encre); position: relative; }
.da-etape:last-of-type { border-bottom: 1px solid var(--encre); }
.da-etape > summary { list-style: none; display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; cursor: pointer; }
.da-etape > summary::-webkit-details-marker { display: none; }
.da-etape > summary .numero { font-size: 40px; font-weight: 900; font-variation-settings: var(--serre); line-height: 1; text-align: center; }
.da-etape-titre { display: grid; gap: 2px; }
.da-etape-titre strong { font-size: 20px; }
.da-etape-titre small { color: rgb(18 18 18 / .7); }
.da-etape-etat { font-size: 13px; font-weight: 800; display: flex; gap: 6px; align-items: center; }
.da-etape-etat .icone { width: 16px; height: 16px; }
.da-etape.faite .da-etape-etat { color: var(--cyan); }
.da-etape.en_cours > summary .numero { color: var(--rouge); }
.da-etape.verrouillee > summary { opacity: .55; }
.da-etape-corps { padding: 0 0 22px 70px; }
@media (max-width: 760px) { .da-etape-corps { padding-left: 0; } .da-etape > summary { grid-template-columns: 40px 1fr; } .da-etape-etat { grid-column: 2; } }
.da-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.da-logos, .da-palette { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.da-logos figure, .da-palette figure { margin: 0; }
.da-logos figure div { width: 150px; aspect-ratio: 2 / 1; display: grid; place-items: center; padding: 10px; border: 1px solid var(--encre); }
.da-logos img { max-width: 100%; max-height: 44px; object-fit: contain; }
.da-palette figure div { width: 92px; height: 60px; border: 1px solid var(--encre); }
.da-logos figcaption, .da-palette figcaption { font-size: 12px; font-weight: 700; margin-top: 4px; }
.da-modeles { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; }
.da-modeles figure { margin: 0; flex: none; }
.da-modeles img { height: 150px; width: auto; display: block; border: 1px solid var(--encre); }
.da-modeles figcaption { font-size: 11px; font-weight: 800; margin-top: 3px; }
.da-depot-modeles { display: grid; grid-template-columns: minmax(140px, 200px) 1fr; gap: 12px; align-items: stretch; }
@media (max-width: 600px) { .da-depot-modeles { grid-template-columns: 1fr; } }
.da-styles { border: 0; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); border-top: 1px solid var(--filet-doux); border-left: 1px solid var(--filet-doux); }
.da-styles legend { font-weight: 800; margin-bottom: 8px; padding: 0; }
.choix-style { display: flex; gap: 10px; padding: 10px 12px; border-right: 1px solid var(--filet-doux); border-bottom: 1px solid var(--filet-doux); cursor: pointer; align-items: flex-start; }
.choix-style input { accent-color: var(--rouge-vif); margin-top: 4px; }
.choix-style span { display: grid; gap: 2px; }
.choix-style small { color: rgb(18 18 18 / .7); line-height: 1.3; }
.choix-style:has(input:checked) { background: var(--encre); color: var(--papier-clair); }
.choix-style:has(input:checked) small { color: rgb(248 245 238 / .75); }
.da-stories { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 150px), 1fr)); gap: 14px; }
.da-story { display: grid; gap: 8px; cursor: pointer; }
.da-story img { width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; border: 1px solid var(--encre); transition: transform .25s var(--sortie); }
.da-story span { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.da-story input { accent-color: var(--rouge-vif); width: 18px; height: 18px; }
.da-story:has(input:checked) img { outline: 3px solid var(--rouge-vif); outline-offset: 2px; }
.da-story:has(input:not(:checked)) img { filter: grayscale(.85); opacity: .6; }
.da-story:hover img { transform: translateY(-3px); }
.da-test { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.da-test-grille { display: grid; grid-template-columns: repeat(3, 110px); gap: 3px; }
.da-test-grille img { width: 110px; aspect-ratio: 4 / 5; object-fit: cover; display: block; }
.da-test-stories { display: flex; gap: 6px; flex-wrap: wrap; }
.da-test-stories img { width: 84px; aspect-ratio: 9 / 16; object-fit: cover; border: 1px solid var(--encre); }
.da-versions { margin-top: 24px; }
.da-active { font-size: 13px; }
.verrou-da { display: flex; gap: 18px; align-items: flex-start; }
.verrou-da .icone.grande { width: 44px; height: 44px; flex: none; color: var(--rouge); }
.verrou-da h2 { margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .da-story img { transition: none; } .da-story:hover img { transform: none; } }

/* ---------- Feeds : nouvelles photos à composer */
.arrivee { border-top: 3px solid var(--rouge); margin-bottom: 16px; }
.arrivee-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.arrivee-tete h2 { margin: 0 0 4px; }
.arrivee-tete p { margin: 0; max-width: 70ch; }
.arrivee-photos { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 4px; align-items: center; }
.arrivee-photos img { height: 96px; aspect-ratio: 4 / 5; object-fit: cover; flex: none; border: 1px solid var(--encre); }
.arrivee-photos .compte { flex: none; font-weight: 900; font-size: 22px; padding: 0 10px; font-variation-settings: var(--serre); }
.declinaison.ecartee .declinaison-apercu img { opacity: .28; filter: grayscale(1); }
.declinaison.ecartee .declinaison-texte strong { text-decoration: line-through; text-decoration-thickness: 2px; }
.retenue-bascule { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 10px; border: 1px solid var(--encre); background: transparent; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; color: var(--encre); }
.retenue-bascule .icone { width: 14px; height: 14px; opacity: 0; }
.retenue-bascule.oui { background: var(--encre); color: var(--papier-clair); }
.retenue-bascule.oui .icone { opacity: 1; }
.retenue-bascule:disabled { cursor: not-allowed; opacity: .5; }
.retenue-bascule:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.da-logos figure.ecartee img { opacity: .28; filter: grayscale(1); }
.da-logos figcaption form { margin: 0; }

/* ---------- Pilote auto : l'agent de réponse */
.agent-tete { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 8px; }
.agent-tete h2 { margin: 0 0 4px; }
.agent-tete p { margin: 0; max-width: 72ch; }
.agent-essai { border-top: 1px solid var(--filet-doux); margin-top: 18px; padding-top: 14px; }
.agent-fil, .liste-simple .echange { display: grid; gap: 6px; }
.agent-fil { margin-top: 12px; max-width: 620px; }
.bulle-recue, .bulle-agent { margin: 0; padding: 8px 12px; max-width: 85%; line-height: 1.4; font-size: 14px; }
.bulle-recue { background: var(--papier-clair); border: 1px solid var(--filet-doux); justify-self: start; }
.bulle-recue strong { margin-right: 6px; }
.bulle-agent { background: var(--encre); color: var(--papier-clair); justify-self: end; }
.bulle-agent small { display: block; margin-top: 4px; opacity: .75; }
.bulle-agent.attente { opacity: .6; font-style: italic; }
.liste-simple .echange { padding: 10px 0; border-bottom: 1px solid var(--filet-doux); }
.echange-meta { display: flex; gap: 8px; align-items: center; }
.studio-import { margin-top: 10px; padding: 12px 14px; }
.studio-import p { margin: 0 0 4px; }
.da-lexique { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--filet-doux); }
.da-lue { margin-top: 12px; padding: 12px 14px; background: var(--papier-clair); border: 1px solid var(--encre); }
.da-lue p { margin: 0 0 8px; }
.mot-fox { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0 0; }
.mot-fox .fox-avatar { width: 28px; height: 28px; box-shadow: 0 0 0 2px var(--rouge-vif); }

/* ---------- Réglages : coûts de l'écosystème */
.couts-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-top: 1px solid var(--encre); border-left: 1px solid var(--encre); margin: 14px 0; }
.couts-chiffres div { padding: 12px 14px; border-right: 1px solid var(--encre); border-bottom: 1px solid var(--encre); display: grid; gap: 2px; }
.couts-chiffres small { font-weight: 700; color: rgb(18 18 18 / .7); }
.couts-chiffres strong { font-size: clamp(24px, 3vw, 34px); font-weight: 900; font-variation-settings: var(--serre); line-height: 1; font-variant-numeric: tabular-nums; }
.couts-jours { display: flex; align-items: flex-end; gap: 3px; height: 70px; margin: 6px 0 16px; border-bottom: 1px solid var(--encre); }
.couts-jours span { flex: 1; min-width: 4px; height: max(2px, var(--h)); background: var(--encre); }
.couts-jours span:hover { background: var(--rouge); }
.couts-tables { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.couts-tables h3 { margin: 0 0 6px; }
.couts-tables table { width: 100%; font-variant-numeric: tabular-nums; }
.couts-tables td:last-child, .couts-tables th:last-child { text-align: right; }
.couts-reglages { margin-top: 18px; border-top: 1px solid var(--filet-doux); padding-top: 12px; }
.couts-reglages summary { cursor: pointer; font-weight: 800; }
.couts-tarifs { display: grid; gap: 6px; margin: 10px 0 16px; }
.ligne-tarif { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--filet-doux); }
.ligne-tarif > span { flex: 1 1 260px; font-weight: 700; }
.ligne-tarif label { display: flex; gap: 6px; align-items: center; font-size: 13px; margin: 0; }
.ligne-tarif input { width: 100px; padding: 4px 6px; }
.ligne-abo { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.ligne-abo [data-nom] { flex: 0 1 260px; }
.ligne-abo [data-mensuel] { width: 110px; }

/* ---------- Fox : conversation à la voix */
.redac-direct { display: grid; gap: 6px; padding: 10px 18px 6px; }
.redac-conversation { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 48px; border: 0; background: var(--encre); color: var(--papier-clair); font: inherit; font-weight: 900; font-size: 17px; letter-spacing: .01em; cursor: pointer; }
.redac-conversation:hover { background: #2A2A2A; }
.redac-conversation:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.redac-conversation[aria-pressed="true"] { background: var(--rouge); }
.redac-conversation .onde { display: inline-flex; gap: 3px; align-items: center; height: 20px; }
.redac-conversation .onde i { width: 3px; height: 8px; background: currentColor; }
.redac[data-conversation="ecoute"] .onde i { animation: onde .9s ease-in-out infinite; }
.redac[data-conversation="ecoute"] .onde i:nth-child(2) { animation-delay: .15s; }
.redac[data-conversation="ecoute"] .onde i:nth-child(3) { animation-delay: .3s; }
.redac[data-conversation="ecoute"] .onde i:nth-child(4) { animation-delay: .45s; }
.redac[data-conversation="parle"] .onde i { animation: onde .5s ease-in-out infinite alternate; }
@keyframes onde { 0%, 100% { height: 6px; } 50% { height: 20px; } }
.redac-etat { color: rgb(18 18 18 / .7); font-size: 12px; text-align: center; min-height: 16px; }
.redac[data-conversation="ecoute"] .fox-avatar.grand { box-shadow: 0 0 0 3px var(--rouge-vif); animation: pulsation 1.2s infinite; }
@media (prefers-reduced-motion: reduce) { .redac .onde i { animation: none !important; height: 12px; } }
.lien-action.supprimer { color: var(--rouge); display: inline-flex; align-items: center; gap: 4px; }
.lien-action.supprimer .icone { width: 15px; height: 15px; }
.da-logos figcaption { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.couts-chaine { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 0; border-top: 3px solid var(--encre); margin: 6px 0 18px; }
.couts-chaine div { padding: 12px 14px 12px 0; display: grid; gap: 2px; }
.couts-chaine small { font-weight: 700; color: rgb(18 18 18 / .7); }
.couts-chaine strong { font-size: 30px; font-weight: 900; font-variation-settings: var(--serre); line-height: 1; font-variant-numeric: tabular-nums; }
.couts-chaine span { font-size: 13px; }
.couts-feeds { width: 100%; margin-bottom: 18px; font-variant-numeric: tabular-nums; }
.couts-feeds td:not(:first-child), .couts-feeds th:not(:first-child) { text-align: right; }

/* ---------- Arrivages : file de traitement (à la chaîne) */
.file-traitement { border-top: 3px solid var(--encre); padding-top: 12px; margin-bottom: 28px; }
.file-tete { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.file-tete h2 { margin: 0; }
.file-lots { list-style: none; margin: 0; padding: 0; }
.file-lot { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--encre); overflow: hidden; }
.file-lot .ordre { font-size: 46px; font-weight: 900; font-variation-settings: var(--serre); line-height: 1; text-align: center; }
.file-lot .qui { display: grid; gap: 2px; }
.file-lot.bloque { opacity: .6; }
.file-lot.en-cours .ordre { color: var(--rouge); animation: pulsation 1.2s infinite; }
.file-vide { padding: 14px 0; }
.titre-historique { margin: 0 0 8px; }
@media (max-width: 760px) { .file-lot { grid-template-columns: 40px 1fr; } .file-lot .cdf, .file-lot .etat-arrivage { grid-column: 2; } }
.etat-clients { white-space: pre-wrap; font-size: 12px; line-height: 1.45; background: var(--papier-clair); border: 1px solid var(--filet-doux); padding: 10px 12px; max-height: 320px; overflow: auto; }
.inspiration-apercu { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.inspiration-apercu img { height: 110px; width: auto; border: 1px solid var(--encre); }


/* ---------- DA proposée par Fox */
.da-proposition { border: 1px solid var(--encre); background: var(--papier-clair); padding: 14px 16px; margin-bottom: 18px; }
.da-proposition h3 { display: flex; gap: 8px; align-items: center; }
.proposition-champs { display: grid; gap: 0; border-top: 1px solid var(--filet-doux); margin: 10px 0; }
.proposition-champ { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--filet-doux); cursor: pointer; margin: 0; }
.proposition-champ input { margin-top: 4px; accent-color: var(--rouge-vif); }
.proposition-champ span { display: grid; gap: 3px; }
.proposition-champ small { color: rgb(18 18 18 / .8); line-height: 1.4; }
.texte-propose { white-space: pre-line; }
.sources { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
.table-da { width: 100%; margin-top: 12px; }
.table-da td { vertical-align: top; padding-top: 10px; padding-bottom: 10px; }
.table-da .en-pause { opacity: .55; }
.table-da .lexique-court { font-size: 13px; max-width: 420px; }
.table-da .actions-da { text-align: right; white-space: nowrap; }
.lien-toutes-da { margin: -6px 0 12px; font-size: 13px; text-align: right; }

/* ---------- Fox, la renarde : elle vit en bas de l'écran, court, s'assoit, regarde la souris, fait coucou, dort.
   Sa position et sa pose sont pilotées par static/renarde.js (data-pose sur .renarde-scene). */
.renarde-scene { --x: calc(100vw - 150px); position: fixed; left: 0; bottom: 8px; z-index: 40; width: 124px; height: 124px;
  transform: translateX(var(--x)); transition: transform var(--duree, 0s) linear; pointer-events: none; }
.renarde-scene.vers-gauche .renarde-court { transform: scaleX(-1); }
.renarde-bouton { position: absolute; inset: 0; padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto; }
.renarde-bouton:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.renarde { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; overflow: visible; display: block; }
.renarde * { transform-box: fill-box; }
.renarde-court { display: none; height: 92%; bottom: 2px; }
.renarde-scene[data-pose="court"] .renarde-assise { display: none; }
.renarde-scene[data-pose="court"] .renarde-court { display: block; }
.renarde-bulle { position: absolute; bottom: 100%; right: 30px; margin-bottom: 2px; padding: 6px 10px; background: var(--encre); color: var(--papier-clair);
  font-weight: 800; font-size: 13px; line-height: 1.2; white-space: nowrap; opacity: 0; transform: translateY(6px) scale(.96); transform-origin: 80% 100%;
  transition: opacity .2s, transform .25s var(--sortie); pointer-events: none; }
.renarde-bulle::after { content: ""; position: absolute; right: 18px; top: 100%; border: 6px solid transparent; border-top-color: var(--encre); }
.renarde-scene.dit .renarde-bulle, .renarde-bouton:hover .renarde-bulle, .renarde-bouton:focus-visible .renarde-bulle { opacity: 1; transform: none; }

/* Assise : elle respire, remue la queue, cligne des yeux, bouge les oreilles, ses yeux suivent la souris. */
.renarde .corps { animation: renarde-souffle 3.4s ease-in-out infinite; transform-origin: 50% 100%; }
.renarde .queue { animation: renarde-queue 2.6s ease-in-out infinite alternate; transform-origin: 0% 85%; }
.renarde .tete { animation: renarde-tete 7s ease-in-out infinite; transform-origin: 50% 90%; }
.renarde .oreille-g { animation: renarde-oreille 6.5s ease-in-out infinite; transform-origin: 70% 100%; }
.renarde .oreille-d { animation: renarde-oreille 6.5s ease-in-out 1.7s infinite; transform-origin: 30% 100%; }
.renarde .regard { transform: translate(calc(var(--rx, 0) * 1px), calc(var(--ry, 0) * 1px)); transition: transform .15s ease-out; }
.renarde .yeux { animation: renarde-cligne 5.2s infinite; transform-origin: 50% 55%; }
.renarde .paupieres, .renarde .zzz, .renarde .bouche { opacity: 0; }
.renarde .bouche { transform-origin: 50% 0%; }
.renarde .aura { animation: renarde-aura 4.5s ease-in-out infinite; transform-origin: 50% 50%; }
.renarde .lueur-queue { animation: renarde-aura 2.6s ease-in-out infinite; transform-origin: 50% 50%; }
.renarde .etincelle { opacity: 0; animation: renarde-etincelle 3.6s ease-in-out infinite; transform-origin: 50% 50%; }
.renarde .e2 { animation-delay: .9s; } .renarde .e3 { animation-delay: 1.8s; } .renarde .e4 { animation-delay: 2.7s; }
.renarde .patte { transform-origin: 50% 100%; }

/* Coucou : elle lève la patte et l'agite (survol, arrivée, réussite). */
.renarde-scene.coucou .patte-d { animation: renarde-coucou 1.1s var(--sortie); }
.renarde-scene.coucou .tete { animation: renarde-penche 1.1s var(--sortie); }
/* Saut de joie (BAT, feed composé, tâche réussie). */
.renarde-scene.joie .renarde-assise .corps-entier, .renarde-scene.joie .renarde-assise .etincelles { animation: renarde-saut .7s var(--sortie) 2; transform-origin: 50% 100%; }
.renarde-scene.joie .etincelle { animation-duration: .7s; }
/* Souci (erreur) : oreilles baissées, petite secousse. */
.renarde-scene.souci .oreille-g { animation: none; transform: rotate(-28deg); }
.renarde-scene.souci .oreille-d { animation: none; transform: rotate(28deg); }
.renarde-scene.souci .corps-entier { animation: renarde-secoue .5s ease-in-out 2; }
/* Elle dort quand on ne bouge plus : yeux fermés, queue posée, « z » qui montent. */
.renarde-scene[data-pose="dort"] .yeux { opacity: 0; }
.renarde-scene[data-pose="dort"] .paupieres { opacity: 1; }
.renarde-scene[data-pose="dort"] .tete { animation: renarde-dodo 4s ease-in-out infinite; }
.renarde-scene[data-pose="dort"] .queue { animation-duration: 6s; }
.renarde-scene[data-pose="dort"] .zzz { opacity: 1; }
.renarde-scene[data-pose="dort"] .z { animation: renarde-z 3s ease-in-out infinite; transform-origin: 50% 50%; opacity: 0; }
.renarde-scene[data-pose="dort"] .z2 { animation-delay: 1s; } .renarde-scene[data-pose="dort"] .z3 { animation-delay: 2s; }
.renarde-scene[data-pose="dort"] .etincelles, .renarde-scene[data-pose="dort"] .aura { opacity: .3; }

/* Elle court : pattes au galop, corps qui rebondit, queue qui flotte, petite poussière derrière. */
.renarde-court .corps-c { animation: renarde-galop-corps .36s ease-in-out infinite; transform-origin: 50% 50%; }
.renarde-court .patte-c { transform-origin: 50% 0%; }
.renarde-court .av-proche { animation: renarde-patte-av .36s linear infinite; }
.renarde-court .av-loin { animation: renarde-patte-av .36s linear -.18s infinite; }
.renarde-court .ar-proche { animation: renarde-patte-ar .36s linear infinite; }
.renarde-court .ar-loin { animation: renarde-patte-ar .36s linear -.18s infinite; }
.renarde-court .queue-c { animation: renarde-queue-c .36s ease-in-out infinite alternate; transform-origin: 100% 100%; }
.renarde-court .tete-c { animation: renarde-tete-c .36s ease-in-out infinite; transform-origin: 0% 100%; }
.renarde-court .ombre-c { animation: renarde-ombre-c .36s ease-in-out infinite; transform-origin: 50% 50%; }
.renarde-court .p { animation: renarde-poussiere .6s ease-out infinite; transform-origin: 50% 50%; }
.renarde-court .p2 { animation-delay: .2s; } .renarde-court .p3 { animation-delay: .4s; }

@keyframes renarde-souffle { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.025); } }
@keyframes renarde-queue { from { transform: rotate(-7deg); } to { transform: rotate(9deg); } }
@keyframes renarde-tete { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-4deg); } 55% { transform: rotate(3deg); } }
@keyframes renarde-oreille { 0%, 88%, 100% { transform: rotate(0); } 91% { transform: rotate(-13deg); } 95% { transform: rotate(5deg); } }
@keyframes renarde-cligne { 0%, 93%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.08); } }
@keyframes renarde-aura { 0%, 100% { transform: scale(.94); opacity: .75; } 50% { transform: scale(1.04); opacity: 1; } }
@keyframes renarde-etincelle { 0%, 100% { opacity: 0; transform: scale(.4) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } }
@keyframes renarde-coucou { 0%, 100% { transform: translate(0, 0) rotate(0); } 20% { transform: translate(6px, -44px) rotate(-30deg); }
  35% { transform: translate(8px, -48px) rotate(-55deg); } 50% { transform: translate(6px, -46px) rotate(-20deg); } 65% { transform: translate(8px, -48px) rotate(-55deg); } 80% { transform: translate(6px, -44px) rotate(-25deg); } }
@keyframes renarde-penche { 0%, 100% { transform: rotate(0); } 30%, 70% { transform: rotate(-9deg); } }
@keyframes renarde-saut { 0%, 100% { transform: translateY(0) scale(1, 1); } 15% { transform: translateY(0) scale(1.08, .9); } 45% { transform: translateY(-34px) scale(.95, 1.06) rotate(-4deg); } 80% { transform: translateY(0) scale(1.06, .94); } }
@keyframes renarde-secoue { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes renarde-dodo { 0%, 100% { transform: rotate(10deg) translateY(4px); } 50% { transform: rotate(12deg) translateY(6px); } }
@keyframes renarde-z { 0% { opacity: 0; transform: translate(0, 8px) scale(.6); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(10px, -14px) scale(1.1); } }
@keyframes renarde-galop-corps { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6px) rotate(-2deg); } }
@keyframes renarde-patte-av { 0% { transform: rotate(38deg); } 50% { transform: rotate(-42deg); } 100% { transform: rotate(38deg); } }
@keyframes renarde-patte-ar { 0% { transform: rotate(-40deg); } 50% { transform: rotate(36deg); } 100% { transform: rotate(-40deg); } }
@keyframes renarde-queue-c { from { transform: rotate(-8deg); } to { transform: rotate(10deg); } }
@keyframes renarde-tete-c { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(3deg); } }
@keyframes renarde-ombre-c { 0%, 100% { transform: scale(1); opacity: .18; } 50% { transform: scale(.8); opacity: .1; } }
@keyframes renarde-poussiere { 0% { opacity: .9; transform: translate(0, 0) scale(.6); } 100% { opacity: 0; transform: translate(-16px, -6px) scale(1.4); } }
@keyframes renarde-parle { 0%, 100% { opacity: .9; transform: scaleY(.4); } 50% { opacity: 1; transform: scaleY(1.2); } }
@keyframes renarde-dresse { to { transform: rotate(0) scaleY(1.08); } }

/* Avec Fox (panneau, conversation) : elle écoute (oreilles dressées, aura bleue), réfléchit, parle (bouche au rythme de la voix). */
body.fox-ecoute .renarde .oreille-g, body.fox-ecoute .renarde .oreille-d { animation: renarde-dresse .3s var(--sortie) forwards; }
body.fox-ecoute .renarde .aura { animation-duration: 1.1s; }
body.fox-reflechit .renarde .etincelle { animation-duration: 1s; }
body.fox-reflechit .renarde .queue { animation-duration: .8s; }
body.fox-parle .renarde .bouche { opacity: 1; animation: renarde-parle .3s ease-in-out infinite; }
body.fox-parle.voix-mesuree .renarde .bouche { animation: none; transform: scaleY(calc(.3 + var(--voix, .5) * 1.4)); }
body.fox-parle .renarde .sourire { opacity: 0; }
.redac .fox-avatar { background: #FBEFD9; }
@media (max-width: 900px) {
  .renarde-scene { bottom: calc(62px + env(safe-area-inset-bottom)); width: 92px; height: 92px; }
}
@media (prefers-reduced-motion: reduce) {
  .renarde-scene { transition: none; }
  .renarde *, .renarde-scene * { animation: none !important; }
  .renarde .etincelle { opacity: .8; }
}
.renarde-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Prévisionnel des coûts */
.prevision { border-top: 3px solid var(--encre); margin-top: 22px; padding-top: 12px; }
.prevision h3 { margin: 0 0 4px; font-size: 24px; }
.prevision-grille { display: grid; gap: 0; border-top: 1px solid var(--filet-doux); margin: 10px 0 14px; }
.prevision-ligne { display: grid; grid-template-columns: minmax(0, 1fr) 100px 90px; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--filet-doux); margin: 0; cursor: text; }
.prevision-ligne span { display: grid; gap: 2px; }
.prevision-ligne small { line-height: 1.35; }
.prevision-ligne input { width: 100%; text-align: right; font-variant-numeric: tabular-nums; }
.prevision-ligne output { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.prevision-total { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); border-top: 1px solid var(--encre); border-left: 1px solid var(--encre); }
.prevision-total div { padding: 10px 12px; border-right: 1px solid var(--encre); border-bottom: 1px solid var(--encre); display: grid; gap: 2px; }
.prevision-total small { font-weight: 700; color: rgb(18 18 18 / .7); }
.prevision-total strong { font-size: 26px; font-weight: 900; font-variation-settings: var(--serre); font-variant-numeric: tabular-nums; line-height: 1; }
.prevision-total .total { background: var(--encre); color: var(--papier-clair); }
.prevision-total .total small { color: rgb(248 245 238 / .75); }
@media (max-width: 600px) { .prevision-ligne { grid-template-columns: 1fr 80px; } .prevision-ligne output { grid-column: 2; } }

/* ---------- Vie de la page : coups de stylo, titres, survols, boutons */
.stylo { position: relative; display: inline-block; }
.stylo-trace { position: absolute; pointer-events: none; overflow: visible; }
.stylo-trace path { fill: none; stroke: var(--rouge-vif); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 320; stroke-dashoffset: 0; }
.trace-souligne { left: -3%; width: 106%; bottom: -.38em; height: .5em; }
.trace-souligne path { stroke-width: 3; }
.trace-entoure { left: -12px; top: -9px; width: calc(100% + 24px); height: calc(100% + 18px); }
.anim .stylo-trace path { animation: stylo .9s .45s var(--sortie) both; }
/* Sous chaque grand titre, un filet rouge qui se trace. */
.entete-page .une-anim::after, .une-anim.titre-filet::after { content: ""; display: block; width: 56px; height: 6px; margin-top: .14em; background: var(--rouge-vif);
  transform-origin: left; }
.anim .entete-page .une-anim::after { animation: filet-rouge .5s .5s var(--sortie) both; }
@keyframes filet-rouge { from { transform: scaleX(0); } to { transform: scaleX(1); } }
/* L'encoche rouge : au survol d'une ligne cliquable, un coin rouge se pose en haut à gauche. */
.edition, .file-lot, .priorite a, .presse-ligne, .page-cdf a, .declinaison, .da-story { position: relative; }
.edition::before, .file-lot::before, .priorite a::before, .page-cdf a::before, .declinaison::before {
  content: ""; position: absolute; left: 0; top: 0; width: 14px; height: 14px; background: var(--rouge-vif);
  clip-path: polygon(0 0, 100% 0, 0 100%); transform: scale(0); transform-origin: 0 0; transition: transform .22s var(--sortie); pointer-events: none; z-index: 2; }
.edition:hover::before, .file-lot:hover::before, .priorite a:hover::before, .page-cdf a:hover::before, .declinaison:hover::before { transform: scale(1); }
.priorite a, .presse-ligne { transition: background .2s, padding-left .25s var(--sortie); }
.priorite a:hover { background: rgb(214 31 20 / .04); padding-left: 6px; }
/* Boutons : on sent le clic ; le BAT brille au survol. */
button:not(:disabled):active, .bouton:active { transform: translateY(1px) scale(.985); }
button, .bouton { transition: transform .12s, background .15s, color .15s, border-color .15s; }
button.bat, .bouton.bat { position: relative; overflow: hidden; }
button.bat::after, .bouton.bat::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgb(255 255 255 / .35), transparent);
  transform: skewX(-18deg); transition: left .55s var(--sortie); pointer-events: none; }
button.bat:not(:disabled):hover::after, .bouton.bat:hover::after { left: 120%; }
@media (prefers-reduced-motion: reduce) {
  .anim .stylo-trace path, .anim .entete-page .une-anim::after { animation: none; }
  .edition::before, .file-lot::before, .priorite a::before, .page-cdf a::before, .declinaison::before, button.bat::after { transition: none; }
}
.fox-direct { border-top: 3px solid var(--rouge); }
.etapes-cle { margin: 8px 0 12px; padding-left: 20px; display: grid; gap: 4px; }
.redac-activer { margin: 0 18px 8px; padding: 12px 14px; border: 1px solid var(--encre); background: var(--papier-clair); font-size: 14px; display: grid; gap: 8px; }
.redac-activer ol { margin: 0; padding-left: 18px; display: grid; gap: 2px; }
