/* ==========================================================================
   Blitz Design - feuille de style de l'application
   Pas d'étape de compilation au lot 0 : Vue et Vite n'arrivent qu'au lot 3,
   pour le canevas de l'éditeur. Ici, du CSS écrit à la main suffit largement.
   ========================================================================== */

:root {
  /* Le thème est déclaré au navigateur : sans cela, il dessine des barres
     de défilement et des contrôles clairs, même en thème sombre. */
  color-scheme: light;
  --encre:      #0f172a;
  --encre-doux: #64748b;
  --encre-pale: #94a3b8;
  --fond:       #f6f7f9;
  --surface:    #ffffff;
  --bord:       #e4e8ee;
  --bord-fort:  #cfd6e0;
  --accent:     #4f46e5;
  --accent-fonce: #4338ca;
  --accent-pale:  #eef2ff;
  --ok:         #15803d;
  --ok-pale:    #f0fdf4;
  --err:        #dc2626;
  --err-pale:   #fef2f2;
  --ombre:      0 1px 2px rgba(15, 23, 42, .04), 0 4px 12px rgba(15, 23, 42, .05);
  --rayon:      12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --encre:      #e8ecf3;
    --encre-doux: #98a3b5;
    --encre-pale: #6b7688;
    --fond:       #0b1120;
    --surface:    #131c2e;
    --bord:       #24304a;
    --bord-fort:  #33425f;
    --accent:     #7c74f0;
    --accent-fonce: #9089f4;
    --accent-pale:  #1c2340;
    --ok:         #4ade80;
    --ok-pale:    #12251a;
    --err:        #f87171;
    --err-pale:   #2a1618;
    --ombre:      0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Barre supérieure ---------------------------------------------------- */

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--bord);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar .dedans {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.marque {
  font-weight: 650;
  font-size: 15.5px;
  letter-spacing: -.01em;
  color: var(--encre);
  display: flex;
  align-items: center;
  gap: 9px;
}
.marque:hover { text-decoration: none; }
.marque .puce {
  width: 24px; height: 24px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  display: grid; place-items: center;
  color: #fff; font-size: 13px; font-weight: 700;
}
.topbar nav { display: flex; gap: 4px; margin-left: 8px; }
.topbar nav a {
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--encre-doux);
  font-size: 14px;
  font-weight: 500;
}
.topbar nav a:hover { background: var(--fond); color: var(--encre); text-decoration: none; }
.topbar nav a.actif { background: var(--accent-pale); color: var(--accent-fonce); }
.topbar .pousse { margin-left: auto; }

.utilisateur { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent-pale);
  color: var(--accent-fonce);
  display: grid; place-items: center;
  font-size: 11.5px; font-weight: 650;
  letter-spacing: .02em;
}
.utilisateur .nom { font-size: 13.5px; color: var(--encre-doux); }
@media (max-width: 640px) { .utilisateur .nom { display: none; } }

/* --- Structure de page --------------------------------------------------- */

.page { max-width: 1180px; margin: 0 auto; padding: 32px 24px 80px; }

.entete {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.entete h1 { margin: 0; font-size: 24px; letter-spacing: -.02em; font-weight: 640; }
.entete .sous { margin: 3px 0 0; color: var(--encre-doux); font-size: 14px; }
.entete .actions { margin-left: auto; display: flex; gap: 10px; }

/* --- Boutons ------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  font: inherit; font-size: 14px; font-weight: 550;
  cursor: pointer;
  background: var(--accent); color: #fff;
  transition: background .12s ease, border-color .12s ease;
}
.btn:hover { background: var(--accent-fonce); text-decoration: none; color: #fff; }
.btn.neutre { background: var(--surface); color: var(--encre); border-color: var(--bord-fort); }
.btn.neutre:hover { background: var(--fond); color: var(--encre); }
.btn.danger { background: transparent; color: var(--err); border-color: transparent; }
.btn.danger:hover { background: var(--err-pale); color: var(--err); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* --- Messages ------------------------------------------------------------ */

.avis {
  padding: 11px 15px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 20px;
  border: 1px solid;
}
.avis.ok  { background: var(--ok-pale);  color: var(--ok);  border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.avis.err { background: var(--err-pale); color: var(--err); border-color: color-mix(in srgb, var(--err) 30%, transparent); }

/* --- Formulaires --------------------------------------------------------- */

.champ { margin-bottom: 18px; }
.champ label {
  display: block;
  font-size: 13px;
  font-weight: 550;
  margin-bottom: 6px;
  color: var(--encre);
}
.champ .aide { font-weight: 400; color: var(--encre-pale); }
.champ input, .champ textarea, .champ select {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--bord-fort);
  border-radius: 9px;
  background-color: var(--surface);
  color: var(--encre);
  font: inherit; font-size: 14.5px;
}
.champ textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
/* Choix de fichier (import d'archive) : au thème, comme le reste du formulaire. */
.champ input[type="file"] { padding: 8px 10px; font-size: 13.5px; cursor: pointer; }
.champ input[type="file"]::file-selector-button {
  margin-right: 10px; padding: 6px 12px; border: 1px solid var(--bord-fort); border-radius: 7px;
  background: var(--fond); color: var(--encre); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.champ input[type="file"]::file-selector-button:hover { border-color: var(--accent); color: var(--accent); }
.champ input:focus, .champ textarea:focus, .champ select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.champ.faux input, .champ.faux textarea { border-color: var(--err); }
.champ .erreur { color: var(--err); font-size: 12.5px; margin-top: 5px; }

/* --- Listes déroulantes -------------------------------------------------
   La flèche native (un carré gris sous Windows) est remplacée par un chevron
   dessiné avec deux dégradés : il suit le thème clair ou sombre sans image.
   ⚠️ Toujours `background-color`, jamais le raccourci `background`, sur un
   select : le raccourci efface le chevron. */
select {
  appearance: none;
  -webkit-appearance: none;
  padding: 9px 38px 9px 13px;
  border: 1px solid var(--bord-fort);
  border-radius: 9px;
  background-color: var(--surface);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--encre-doux) 50%),
    linear-gradient(135deg, var(--encre-doux) 50%, transparent 50%);
  background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  color: var(--encre);
  font: inherit;
  font-size: 14px;
  line-height: 1.3;
  cursor: pointer;
  color-scheme: light;
  transition: border-color .12s ease, box-shadow .12s ease;
}
select:hover { border-color: var(--encre-pale); }
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
select:disabled { opacity: .55; cursor: not-allowed; }
select option { background-color: var(--surface); color: var(--encre); }
/* Les titres de groupe (« Claude (Anthropic) »…) aussi : sans fond explicite,
   ils retombent sur le blanc du système alors que le texte suit le thème
   sombre - illisible. Constaté le 2026-09-10 sur le sélecteur de modèle. */
select optgroup {
  background-color: var(--surface);
  color: var(--encre-doux);
  font-style: normal;
  font-weight: 600;
}
.champ select { padding-right: 38px; }
@media (prefers-color-scheme: dark) {
  /* La liste qui s'ouvre est dessinée par le système : on lui dit le thème. */
  select { color-scheme: dark; }
}

/* --- Cartes de projet ---------------------------------------------------- */

.grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}
.carte {
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  padding: 18px 20px;
  box-shadow: var(--ombre);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .12s ease, transform .12s ease;
}
.carte:hover { border-color: var(--bord-fort); transform: translateY(-1px); }
.carte h2 { margin: 0; font-size: 16px; font-weight: 620; letter-spacing: -.01em; }
.carte h2 a { color: var(--encre); }
/* Pastille « commentaires du client à traiter », en bout de titre. */
.carte h2 { display: flex; align-items: center; gap: 8px; }
.carte h2 > a:first-child { min-width: 0; overflow-wrap: anywhere; }
.carte h2 .pastille-com {
  margin-left: auto; flex: none;
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px; border-radius: 99px;
  background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums;
}
.carte h2 .pastille-com:hover { background: var(--accent-fonce); color: #fff; text-decoration: none; }
.carte .client { color: var(--encre-doux); font-size: 13.5px; margin: -6px 0 0; }
.carte .notes {
  color: var(--encre-doux); font-size: 13.5px; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.carte .pied {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--bord);
  display: flex; align-items: center; gap: 12px;
  font-size: 12.5px; color: var(--encre-pale);
}
.carte .pied .liens { margin-left: auto; display: flex; gap: 6px; }
/* Le pied tient sur UNE ligne, quelle que soit la carte (Alexandre) : le
   compteur ne se coupe jamais, même à « 10 000 maquettes » ; les actions
   sont des icônes à largeur fixe ; seule la date peut se raccourcir, dans
   le cas extrême où la place manquerait. */
.carte .pied { flex-wrap: nowrap; min-width: 0; }
.carte .pied > .etiquette { flex: none; white-space: nowrap; }
.carte .pied > span:not(.etiquette):not(.liens) {
  flex: 0 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.carte .pied .liens { flex: none; gap: 2px; align-items: center; }
.carte .pied .liens form { margin: 0; }
.carte .pied .liens .icone {
  display: grid; place-items: center;
  width: 28px; height: 28px; padding: 0;
}
.carte .pied .liens a, .carte .pied .liens button {
  font-size: 12.5px; padding: 4px 9px; border-radius: 7px;
  border: 0; background: transparent; color: var(--encre-doux);
  cursor: pointer; font-family: inherit;
}
.carte .pied .liens a:hover { background: var(--fond); color: var(--encre); text-decoration: none; }
.carte .pied .liens button:hover { background: var(--err-pale); color: var(--err); }

.etiquette {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 550;
  background: var(--fond);
  color: var(--encre-doux);
  border: 1px solid var(--bord);
}

/* --- Recherche ----------------------------------------------------------- */

.recherche { position: relative; }
.recherche input {
  width: 260px;
  padding: 9px 13px;
  border: 1px solid var(--bord-fort);
  border-radius: 9px;
  background: var(--surface);
  color: var(--encre);
  font: inherit; font-size: 14px;
}
.recherche input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

/* --- État vide ----------------------------------------------------------- */

.vide {
  background: var(--surface);
  border: 1px dashed var(--bord-fort);
  border-radius: var(--rayon);
  padding: 56px 24px;
  text-align: center;
}
.vide h2 { margin: 0 0 6px; font-size: 17px; font-weight: 600; }
.vide p { margin: 0 auto 20px; color: var(--encre-doux); max-width: 420px; font-size: 14px; }

/* --- Page de connexion --------------------------------------------------- */

.connexion {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.connexion .boite {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: 16px;
  padding: 34px 32px;
  box-shadow: var(--ombre);
}
.connexion .marque { justify-content: center; margin-bottom: 6px; font-size: 17px; }
.connexion .intro {
  text-align: center; color: var(--encre-doux);
  font-size: 13.5px; margin: 0 0 26px;
}
.connexion .btn { width: 100%; justify-content: center; margin-top: 4px; padding: 11px; }
.connexion .note {
  margin: 22px 0 0; text-align: center;
  font-size: 12.5px; color: var(--encre-pale); line-height: 1.5;
}

/* --- Lot 2 : noyau de connaissance ---------------------------------------- */

.avis.info {
  background: var(--accent-pale);
  color: var(--accent-fonce);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}

.deux-colonnes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 32px;
  align-items: start;
}
@media (max-width: 900px) { .deux-colonnes { grid-template-columns: 1fr; } }

textarea.code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.65;
  tab-size: 2;
}

pre.lecture {
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  padding: 22px 24px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.7;
  box-shadow: var(--ombre);
}

.titre-flanc {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--encre-pale);
  margin: 0 0 12px;
}
.flanc-vide { color: var(--encre-doux); font-size: 13.5px; margin: 0; }

.versions { list-style: none; margin: 0; padding: 0; }
.versions li { padding: 11px 0; border-bottom: 1px solid var(--bord); }
.versions li:last-child { border-bottom: 0; }
.ligne-version { display: flex; align-items: center; gap: 8px; }
.ligne-version a { font-size: 14px; font-weight: 550; }
.note-version { margin: 3px 0 0; font-size: 13px; color: var(--encre); }
.meta-version { margin: 2px 0 0; font-size: 12px; color: var(--encre-pale); }

/* --- Interrupteurs de skills ---------------------------------------------- */

.bloc {
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  padding: 20px 22px;
  margin: 26px 0;
}
fieldset.bloc { border: 1px solid var(--bord); }
.bloc legend {
  font-size: 13px;
  font-weight: 600;
  padding: 0 8px;
  color: var(--encre);
}
.bloc h3 { margin: 0 0 12px; font-size: 14px; font-weight: 600; }

.liste-interrupteurs { display: flex; flex-direction: column; gap: 2px; }

.interrupteur {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 400;
  margin: 0;
}
.interrupteur:hover { background: var(--fond); }
.interrupteur input { width: auto; margin: 3px 0 0; accent-color: var(--accent); flex: none; }
.interrupteur span { display: block; font-size: 14px; }
.interrupteur strong { font-weight: 550; }
.interrupteur em {
  display: block;
  font-style: normal;
  font-size: 12.5px;
  color: var(--encre-doux);
  margin-top: 1px;
}

.ligne-deux { display: grid; grid-template-columns: 200px 1fr; gap: 22px; align-items: start; }
@media (max-width: 640px) { .ligne-deux { grid-template-columns: 1fr; } }

/* --- Aperçu des couches du prompt ----------------------------------------- */

.apercu { background: var(--fond); }
.couches { list-style: none; margin: 0 0 14px; padding: 0; }
.couches li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 0;
  font-size: 13.5px;
  border-bottom: 1px solid var(--bord);
}
.couches li:last-child { border-bottom: 0; }
.couches .rang {
  flex: none;
  width: 20px; height: 20px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--bord-fort);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 600;
  color: var(--encre-doux);
}
.couches em {
  font-style: normal;
  color: var(--encre-doux);
  font-size: 13px;
  margin-left: auto;
  text-align: right;
}
.couches em.absent { color: var(--encre-pale); }

.etiquette.vert {
  background: var(--ok-pale);
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 30%, transparent);
}

/* --- Lot 3 : éditeur ------------------------------------------------------ */

.editeur {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 1050px) { .editeur { grid-template-columns: 1fr; } }

.scene {
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  overflow: hidden;
  box-shadow: var(--ombre);
}
.barre-scene {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--bord);
  background: var(--fond);
  flex-wrap: wrap;
}
.largeurs { display: flex; gap: 3px; background: var(--surface);
            border: 1px solid var(--bord-fort); border-radius: 8px; padding: 2px; }
.largeurs button {
  border: 0; background: transparent; color: var(--encre-doux);
  font: inherit; font-size: 12.5px; font-weight: 550;
  padding: 4px 11px; border-radius: 6px; cursor: pointer;
}
.largeurs button:hover { color: var(--encre); }
.largeurs button.actif { background: var(--accent); color: #fff; }
.etat-scene { font-size: 12.5px; color: var(--encre-doux); }
.lien-scene { margin-left: auto; font-size: 12.5px; }

.cadre {
  margin: 0 auto;
  transition: max-width .18s ease;
  background: var(--surface);
}
.cadre iframe {
  display: block;
  width: 100%;
  height: 68vh;
  min-height: 460px;
  border: 0;
  background: #fff;
}

.flanc { display: flex; flex-direction: column; gap: 16px; }
.flanc .bloc { margin: 0; }

.cible { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; }
.cible code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  background: var(--accent-pale);
  color: var(--accent-fonce);
  padding: 2px 7px;
  border-radius: 6px;
}
.extrait {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--encre-doux);
  border-left: 2px solid var(--bord-fort);
  padding-left: 10px;
}
.btn.petit { padding: 5px 11px; font-size: 12.5px; }

.ligne-boutons { display: flex; gap: 8px; }

.progression { margin-top: 14px; }
.progression .barre {
  height: 5px; background: var(--bord); border-radius: 99px; overflow: hidden;
}
.progression .barre i {
  display: block; height: 100%; width: 0;
  background: var(--accent); transition: width .25s ease;
}
.chiffres {
  margin: 8px 0 0; font-size: 12.5px; color: var(--encre-doux);
  font-variant-numeric: tabular-nums;
}
.couches-actives { margin: 5px 0 0; font-size: 12px; color: var(--encre-pale); }

.lien-bouton {
  border: 0; background: transparent; color: var(--accent);
  font: inherit; font-size: 12.5px; cursor: pointer; padding: 0;
}
.lien-bouton:hover { text-decoration: underline; }

.ligne-creation { display: flex; flex-wrap: wrap; gap: 8px; }
.ligne-creation .btn { flex: none; white-space: nowrap; }
/* Dans un bloc étroit (la colonne de 280 px des exports), le champ prend la
   place qui reste au lieu d'imposer sa largeur naturelle : sans ça, il
   poussait le bouton « Publier » hors du cadre. */
.bloc .ligne-creation input { flex: 1 1 0; min-width: 0; }
.ligne-creation input {
  padding: 9px 13px; border: 1px solid var(--bord-fort); border-radius: 9px;
  background: var(--surface); color: var(--encre); font: inherit; font-size: 14px;
}
.ligne-creation input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

/* --- Lot 4 : exports ------------------------------------------------------ */

.lien-client {
  margin: 0 0 14px;
  padding: 9px 12px;
  background: var(--accent-pale);
  border-radius: 9px;
  font-size: 13.5px;
  word-break: break-all;
}
details summary { cursor: pointer; font-size: 13px; }
details summary::marker { color: var(--encre-pale); }

/* --- Lot 5 : partage client et annotations -------------------------------- */

.pastille {
  display: inline-grid; place-items: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 99px;
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 650;
  vertical-align: 2px;
}

.liens-partage { list-style: none; margin: 0; padding: 0; }
.liens-partage li { padding: 12px 0; border-bottom: 1px solid var(--bord); }
.liens-partage li:last-child { border-bottom: 0; }
.ligne-lien { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ligne-lien a { font-size: 13.5px; word-break: break-all; }
.lien-mort { font-size: 13.5px; color: var(--encre-pale); text-decoration: line-through; word-break: break-all; }
.liens-partage li.etat-revoque, .liens-partage li.etat-expire { opacity: .62; }

.annotations { list-style: none; margin: 0; padding: 0; }
.annot {
  padding: 12px 0;
  border-bottom: 1px solid var(--bord);
}
.annot:last-child { border-bottom: 0; }
.annot.etat-applied, .annot.etat-dismissed { opacity: .58; }
.annot-entete { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.annot-entete strong { font-size: 13.5px; font-weight: 600; }
/* Numéro du repère posé sur l'aperçu : même forme, même couleur. */
.annot-numero {
  display: inline-grid; place-items: center; flex: none;
  width: 20px; height: 20px; border-radius: 10px 10px 10px 3px;
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700;
}
/* Commentaire désigné depuis un repère de l'aperçu. */
.annot.eclair { animation: annot-eclair 1.6s ease; }
@keyframes annot-eclair {
  0%, 35% { background: var(--accent-pale); box-shadow: -8px 0 0 var(--accent-pale), 8px 0 0 var(--accent-pale); }
  100% { background: transparent; box-shadow: none; }
}
.annot-texte {
  margin: 0 0 7px;
  font-size: 13.5px;
  border-left: 2px solid var(--bord-fort);
  padding-left: 10px;
  white-space: pre-line;
}
.annot-cible {
  margin: 0 0 8px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12px; color: var(--encre-pale);
}
.annot-cible code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  background: var(--accent-pale); color: var(--accent-fonce);
  padding: 1px 6px; border-radius: 5px;
}
.annot-cible .orphelin {
  background: var(--err-pale); color: var(--err);
  padding: 1px 7px; border-radius: 5px; font-weight: 550;
}
.annot-cible .perime { font-style: italic; }
.annot-cible .quand { margin-left: auto; }
.annot-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* --- Vue client ----------------------------------------------------------- */

body.client { background: var(--fond); }
body.client .topbar .dedans { gap: 18px; }
.onglets { display: flex; gap: 3px; flex-wrap: wrap; }
.onglets button {
  border: 0; background: transparent; color: var(--encre-doux);
  font: inherit; font-size: 13.5px; font-weight: 500;
  padding: 7px 12px; border-radius: 8px; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
}
.onglets button:hover { background: var(--fond); color: var(--encre); }
.onglets button.actif { background: var(--accent-pale); color: var(--accent-fonce); }

.bandeau-aide {
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  color: #92400e;
  padding: 10px 24px;
  font-size: 13.5px;
  display: flex; align-items: center; gap: 10px;
}
@media (prefers-color-scheme: dark) {
  .bandeau-aide { background: #2a2413; border-color: #4d3f18; color: #fcd34d; }
}
.bandeau-aide .fermer { margin-left: auto; }
.fermer {
  border: 0; background: transparent; color: inherit;
  font-size: 20px; line-height: 1; cursor: pointer; padding: 0 4px; opacity: .6;
}
.fermer:hover { opacity: 1; }

.scene-client { padding: 20px 24px 40px; transition: padding-right .2s ease; }
body.tiroir-ouvert .scene-client { padding-right: 380px; }
@media (max-width: 860px) { body.tiroir-ouvert .scene-client { padding-right: 24px; } }
.scene-client .cadre {
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  overflow: hidden;
  box-shadow: var(--ombre);
  transition: max-width .18s ease;
}
.scene-client iframe {
  display: block; width: 100%; height: 82vh; min-height: 500px; border: 0; background: #fff;
}

.tiroir {
  position: fixed; top: 0; right: 0; bottom: 0; width: 356px;
  background: var(--surface);
  border-left: 1px solid var(--bord);
  padding: 22px;
  overflow-y: auto;
  z-index: 40;
  box-shadow: -8px 0 24px rgba(15, 23, 42, .06);
}
@media (max-width: 860px) {
  .tiroir { width: 100%; top: auto; height: 72vh; border-left: 0; border-top: 1px solid var(--bord); }
}
.tiroir-entete { display: flex; align-items: center; margin-bottom: 12px; }
.tiroir-entete h2 { margin: 0; font-size: 16px; font-weight: 620; }
.tiroir-entete .fermer { margin-left: auto; }
.cible-client {
  margin: 0 0 16px; font-size: 13px; color: var(--encre-doux);
  background: var(--fond); padding: 9px 12px; border-radius: 9px;
}
.cible-client span { color: var(--encre); }
.retour { margin: 12px 0 0; font-size: 13px; }
.retour.ok { color: var(--ok); }
.retour.err { color: var(--err); }

/* --- Lot 8 : fil de discussion -------------------------------------------- */

.fil-bloc { max-height: 46vh; overflow-y: auto; }
.fil { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tour { font-size: 13.5px; line-height: 1.5; }
.tour p { margin: 0; }
.tour.user p {
  background: var(--accent-pale);
  color: var(--encre);
  padding: 8px 11px;
  border-radius: 10px 10px 10px 3px;
}
.tour.assistant p {
  color: var(--encre-doux);
  padding: 2px 11px 6px;
  font-size: 12.5px;
}
.tour.rate p { color: var(--err); }
.tour-cible {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  background: var(--surface);
  border: 1px solid var(--bord-fort);
  color: var(--encre-doux);
  padding: 1px 6px;
  border-radius: 5px;
  margin-bottom: 4px;
}
.tour-meta { color: var(--encre-pale); font-size: 11.5px; }

/* --- Lot 9 : références visuelles ----------------------------------------- */

.references { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.references li { display: flex; align-items: center; gap: 10px; }
.references img {
  width: 44px; height: 44px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--bord); display: block; background: var(--fond);
}
.ref-doc {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  border-radius: 8px; border: 1px solid var(--bord); background: var(--fond);
  font-size: 10px; font-weight: 650; color: var(--encre-doux); letter-spacing: .04em;
}
.ref-nom { font-size: 13px; line-height: 1.3; min-width: 0; }
.ref-nom em { display: block; font-style: normal; font-size: 11.5px; color: var(--encre-pale); }
.references form { margin-left: auto; }

.ajout-reference {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding-top: 10px; border-top: 1px solid var(--bord);
}
.ajout-reference input[type=file] { font-size: 12px; max-width: 100%; flex: 1 1 150px; }
.ajout-reference .interrupteur { padding: 4px 6px; }
.ajout-reference .interrupteur span { font-size: 12.5px; }

/* Bulle en cours de rédaction : le fil doit rester lisible pendant l'attente. */
.tour.assistant p:only-child { min-height: 1.2em; }
.fil-bloc { scroll-behavior: smooth; }

/* --- Atelier : discussion a gauche, design a droite ------------------------
   Disposition relevée sur Claude Design le 2026-09-09 : une colonne de
   conversation étroite et fixe, et tout le reste de l'écran pour le design.
   Le parti est net : ce qu'on regarde mérite la place, pas les réglages.
   -------------------------------------------------------------------------- */

.page.pleine { max-width: none; padding: 0; }

.atelier {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  height: calc(100vh - 61px);   /* 61px = la barre supérieure et sa bordure */
  background: var(--fond);
}
@media (max-width: 900px) {
  .atelier { grid-template-columns: 1fr; height: auto; }
  .atelier-fil { height: auto; max-height: 60vh; }
}

/* --- Colonne de conversation --------------------------------------------- */

.atelier-fil {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--bord);
  background: var(--surface);
}

.fil-entete {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--bord);
  flex: none;
}
.fil-entete strong { display: block; font-size: 14px; font-weight: 620; line-height: 1.25; }
.fil-entete em { display: block; font-style: normal; font-size: 11.5px; color: var(--encre-pale); }
.fil-retour {
  flex: none; width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 7px; color: var(--encre-doux);
  background: var(--fond); font-size: 15px; text-decoration: none;
}
.fil-retour:hover { background: var(--accent-pale); color: var(--accent-fonce); text-decoration: none; }

.avis.mince { margin: 10px 12px 0; padding: 8px 11px; font-size: 12.5px; }

.fil-defile {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 12px;
  scroll-behavior: smooth;
}

/* Panneaux replies : présents mais discrets. */
.repli { border-bottom: 1px solid var(--bord); margin-bottom: 10px; padding-bottom: 8px; }
.repli > summary {
  cursor: pointer; font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--encre-pale); padding: 4px 0; list-style: none;
}
.repli > summary::-webkit-details-marker { display: none; }
.repli > summary::before { content: '▸ '; }
.repli[open] > summary::before { content: '▾ '; }
.repli > summary:hover { color: var(--encre-doux); }
.repli .pastille { vertical-align: 1px; }

.fil-vide { padding: 20px 4px; }

/* --- Composeur, colle en bas --------------------------------------------- */

.composeur {
  flex: none;
  border-top: 1px solid var(--bord);
  padding: 10px 12px 12px;
  background: var(--surface);
}
.composeur textarea {
  width: 100%;
  border: 1px solid var(--bord-fort);
  border-radius: 10px;
  padding: 9px 11px;
  font: inherit; font-size: 13.5px; line-height: 1.5;
  background: var(--fond); color: var(--encre);
  resize: vertical; min-height: 62px;
}
.composeur textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.composeur-pied {
  display: flex; align-items: center; gap: 8px; margin-top: 8px;
}
.composeur-pied .chiffres { margin: 0; flex: 1 1 auto; font-size: 11.5px; }
.composeur .progression { margin-top: 8px; }
.composeur .couches-actives { margin-top: 6px; }

.cible-choisie {
  display: flex; align-items: center; gap: 7px;
  background: var(--accent-pale);
  border-radius: 9px; padding: 6px 8px; margin-bottom: 8px;
  font-size: 12px;
}
.cible-choisie code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px; color: var(--accent-fonce);
}
.cible-choisie .extrait {
  border: 0; padding: 0; margin: 0; flex: 1 1 auto;
  color: var(--encre-doux); font-size: 11.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cible-choisie button {
  border: 0; background: transparent; cursor: pointer;
  color: var(--accent-fonce); font-size: 16px; line-height: 1; padding: 0 2px;
}

/* --- Colonne du design ---------------------------------------------------- */

/* Sans cette règle, un `hidden` posé sur un élément en display:flex (le cadre
   de l'aperçu, par exemple) ne masquerait rien. */
[hidden] { display: none !important; }

.atelier-scene {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--fond);
}
.atelier-scene .barre-scene {
  flex: none;
  border-bottom: 1px solid var(--bord);
  background: var(--surface);
}
.nom-page { font-size: 13.5px; font-weight: 600; }
.atelier-scene .etat-scene { margin-left: 8px; }
.atelier-scene .lien-scene { margin-left: auto; }
.lien-bouton.danger { color: var(--err); }

.atelier-scene .cadre {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 auto;
  width: 100%;
  background: transparent;
  display: flex;
}
.atelier-scene .cadre iframe {
  flex: 1 1 auto;
  width: 100%; height: 100%;
  min-height: 0;
  border: 0;
  background: #fff;
}

/* Le coût annonce AU MOMENT du choix, pas sur la facture (MASTER.md 2 bis). */
.avertissement-cout {
  margin: 0 0 8px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  line-height: 1.45;
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}
.avertissement-cout.economique {
  background: var(--ok-pale);
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 30%, transparent);
}
@media (prefers-color-scheme: dark) {
  .avertissement-cout { background: #2a2413; border-color: #4d3f18; color: #fcd34d; }
}

/* --- Lot 10 : questions avant de générer ---------------------------------
   Calqué sur le formulaire observé dans Claude Design le 2026-09-10 : une
   carte centrée sur le canevas, des options en lignes cliquables, une bascule
   segmentée, trois boutons en pied. */
.questions {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px 60px;
}
.questions-carte {
  width: 100%;
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: 14px;
  box-shadow: var(--ombre);
  padding: 26px 28px 20px;
}
.questions-carte h2 { margin: 0 0 4px; font-size: 17px; font-weight: 640; letter-spacing: -.01em; }
.questions-sous {
  margin: 0 0 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--bord);
  color: var(--encre-doux);
  font-size: 13.5px;
}
.question { border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }
.question legend { padding: 0; margin-bottom: 4px; font-size: 14px; font-weight: 600; }
.question-aide { margin: 0 0 8px; color: var(--encre-pale); font-size: 12.5px; }
.question-zone { position: relative; margin-top: 6px; }
.question-zone textarea {
  width: 100%;
  padding: 10px 12px 24px;
  border: 1px solid var(--bord-fort);
  border-radius: 9px;
  background-color: var(--surface);
  color: var(--encre);
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
}
.question-zone textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.question-compte {
  position: absolute;
  right: 10px;
  bottom: 8px;
  font-size: 11px;
  color: var(--encre-pale);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.question-options { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.question-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--bord);
  border-radius: 9px;
  font-size: 13.5px;
  cursor: pointer;
  transition: border-color .12s ease, background-color .12s ease;
}
.question-option:hover { border-color: var(--bord-fort); }
.question-option:has(input:checked) {
  border-color: var(--accent);
  background-color: var(--accent-pale);
}
.question-option input { flex: none; margin: 0; accent-color: var(--accent); }
.question-bascule {
  display: flex;
  gap: 4px;
  margin-top: 6px;
  padding: 4px;
  background-color: var(--fond);
  border: 1px solid var(--bord);
  border-radius: 10px;
}
.question-bascule button {
  flex: 1 1 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--encre-doux);
  font: inherit;
  font-size: 13.5px;
  font-weight: 550;
  cursor: pointer;
}
.question-bascule button:hover { color: var(--encre); }
.question-bascule button.actif {
  background-color: var(--surface);
  color: var(--encre);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .12), 0 0 0 1px var(--bord);
}
.questions-pied {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--bord);
}
.questions-pied .lien-bouton { margin-right: auto; color: var(--encre-doux); }
@media (prefers-color-scheme: dark) {
  /* Radios et cases sont dessinées par le système : on lui dit le thème. */
  .questions-carte { color-scheme: dark; }
}

/* --- Choix du modèle, en bas de la conversation --------------------------
   Discret comme dans Claude Design : un sélecteur compact à gauche du bouton
   d'envoi, qui prend la place disponible et coupe son texte au besoin. */
.composeur-reglages { margin-top: 8px; }
.composeur-reglages .choix-modele {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 6px 30px 6px 10px;
  border-color: var(--bord);
  background-color: transparent;
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
  color: var(--encre-doux);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}
.composeur-reglages .choix-modele:hover { color: var(--encre); border-color: var(--bord-fort); }
.progression .chiffres { display: block; margin-top: 4px; }

/* --- Lot 11 : niveau d'un lien de partage --------------------------------
   Sélecteur compact dans la ligne du lien : il se lit comme une étiquette. */
.niveau-lien { margin: 0; }
.niveau-lien select {
  padding: 3px 26px 3px 9px;
  font-size: 12.5px;
  border-color: var(--bord);
  background-position: calc(100% - 13px) 50%, calc(100% - 8px) 50%;
  color: var(--encre-doux);
}

/* --- Nom de la maquette, modifiable sur place ----------------------------
   Il se lit comme un titre ; le cadre n'apparaît qu'au survol et à la saisie. */
.fil-titre { flex: 1 1 auto; min-width: 0; }
.form-nom { margin: 0; }
.form-nom input {
  display: block;
  width: 100%;
  margin: -3px 0 1px -6px;
  padding: 2px 6px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--encre);
  font: inherit;
  font-size: 14px;
  font-weight: 620;
  line-height: 1.25;
  text-overflow: ellipsis;
  cursor: text;
}
.form-nom input:hover { border-color: var(--bord); }
.form-nom input:focus {
  outline: none;
  border-color: var(--accent);
  background-color: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.form-nom input:disabled { opacity: .6; }

/* --- Navigation entre les pages ------------------------------------------
   Calquée sur Claude Design (2026-09-10) : un menu dans la barre du canevas,
   et une vue d'ensemble qui prend la place de l'aperçu. */
.pages-menu { position: relative; }
.pages-bouton {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 260px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--encre);
  font: inherit;
  cursor: pointer;
}
.pages-bouton:hover:not(:disabled) { background-color: var(--fond); border-color: var(--bord); }
.pages-bouton:disabled { opacity: .55; cursor: not-allowed; }
.pages-bouton .nom-page { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pages-bouton .chevron {
  flex: none;
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border-right: 1.5px solid var(--encre-doux);
  border-bottom: 1.5px solid var(--encre-doux);
  transform: rotate(45deg);
}
.pages-liste {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  width: 280px;
  max-height: 60vh;
  overflow: auto;
  padding: 6px;
  background-color: var(--surface);
  border: 1px solid var(--bord);
  border-radius: 10px;
  box-shadow: var(--ombre), 0 12px 32px rgba(15, 23, 42, .12);
}
.pages-titre {
  margin: 4px 8px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--encre-pale);
}
.pages-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 7px;
  color: var(--encre);
  font-size: 13.5px;
  text-decoration: none;
}
.pages-item:hover { background-color: var(--fond); text-decoration: none; }
.pages-item.actif { background-color: var(--accent-pale); color: var(--accent-fonce); font-weight: 600; }
.pages-nom { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pages-meta { flex: none; font-size: 11.5px; color: var(--encre-pale); font-weight: 400; }
.pages-actions {
  display: flex;
  flex-direction: column;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--bord);
}
.pages-actions form { margin: 0; }
.pages-action {
  display: block;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--encre-doux);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.pages-action:hover { background-color: var(--fond); color: var(--encre); }

.vue-pages {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 24px 28px 48px;
}
.vue-pages-entete {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.vue-pages-entete h2 { margin: 0 auto 0 0; font-size: 17px; font-weight: 640; }
.vue-pages-entete h2 span { margin-left: 6px; font-size: 13px; font-weight: 400; color: var(--encre-pale); }
.grille-pages {
  display: grid;
  grid-template-columns: repeat(auto-fill, 282px);
  gap: 20px;
}
.carte-page {
  display: block;
  overflow: hidden;
  background-color: var(--surface);
  border: 1px solid var(--bord);
  border-radius: 12px;
  color: var(--encre);
  text-decoration: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.carte-page:hover { border-color: var(--bord-fort); box-shadow: var(--ombre); text-decoration: none; }
.carte-page.actif { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
/* Miniature : la page rendue à 1280 px, réduite au format de la carte. */
.carte-page-apercu {
  position: relative;
  display: block;
  height: 176px;
  overflow: hidden;
  background-color: #fff;
  border-bottom: 1px solid var(--bord);
}
.carte-page-apercu iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 1280px;
  height: 805px;
  border: 0;
  transform: scale(.2203);
  transform-origin: 0 0;
  pointer-events: none;
}
.carte-page-vide {
  display: grid;
  place-items: center;
  height: 100%;
  background-color: var(--fond);
  color: var(--encre-pale);
  font-size: 13px;
}
.carte-page-pied { display: block; padding: 10px 12px 12px; }
.carte-page-pied strong { display: block; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.carte-page-pied span { display: block; margin-top: 2px; font-size: 12px; color: var(--encre-pale); }

/* --- Effort, aperçu stable, encadré qui s'efface ------------------------ */
.composeur-pied { justify-content: flex-end; }
.composeur-pied .choix-effort {
  flex: 0 1 auto;
  min-width: 0;
  margin-right: auto;
  padding: 6px 26px 6px 9px;
  border-color: var(--bord);
  background-color: transparent;
  background-position: calc(100% - 13px) 50%, calc(100% - 8px) 50%;
  color: var(--encre-doux);
  font-size: 12.5px;
}
.composeur-pied .choix-effort:hover { color: var(--encre); border-color: var(--bord-fort); }

/* Deux cadres superposés à l'aperçu : l'un s'affiche pendant que l'autre se
   prépare. `visibility`, pas `display` : un cadre caché doit continuer de
   se charger et d'exécuter son script de position. */
.atelier-scene .cadre { position: relative; }
.atelier-scene .cadre .apercu-flux {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
  visibility: hidden;
}
.atelier-scene .cadre .apercu-flux.visible { visibility: visible; z-index: 2; }

/* --- Coût : de chaque réponse, et cumulé -------------------------------- */
.fil-entete .cout-cumule {
  margin: 1px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--encre-doux);
}
.fil-entete .cout-cumule strong,
.cout-projet strong {
  /* .fil-entete strong est un bloc (le nom de l'ancien en-tête) : ici,
     les montants restent dans la ligne. */
  display: inline;
  font-size: inherit;
  line-height: inherit;
  font-weight: 650;
  color: var(--accent-fonce);
  font-variant-numeric: tabular-nums;
}
.tour-cout {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: var(--encre-pale);
  font-variant-numeric: tabular-nums;
}

/* --- Le « + » du composeur et les fichiers joints -------------------------
   Calqué sur Claude Design (2026-09-10) : menu en bas de la saisie, vignettes
   au-dessus, dépôt par glisser. */
.plus { position: relative; flex: none; }
.bouton-plus {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--bord);
  border-radius: 8px;
  background: transparent;
  color: var(--encre-doux);
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.bouton-plus:hover:not(:disabled) { color: var(--encre); border-color: var(--bord-fort); background-color: var(--fond); }
.bouton-plus:disabled { opacity: .5; cursor: not-allowed; }
.menu-plus {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  z-index: 30;
  width: 240px;
  padding: 6px;
  background-color: var(--surface);
  border: 1px solid var(--bord);
  border-radius: 10px;
  box-shadow: var(--ombre), 0 12px 32px rgba(15, 23, 42, .12);
}
.menu-plus-titre {
  margin: 6px 8px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--encre-pale);
}
.menu-plus-titre:not(:first-child) { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--bord); }
.menu-plus-item {
  display: block;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--encre);
  font: inherit;
  font-size: 13px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.menu-plus-item:hover { background-color: var(--fond); text-decoration: none; }

.pieces { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.piece {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 3px 4px 3px 3px;
  background-color: var(--fond);
  border: 1px solid var(--bord);
  border-radius: 8px;
  font-size: 12px;
}
.piece img, .piece-doc {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 5px;
  object-fit: cover;
}
.piece-doc {
  display: grid;
  place-items: center;
  background-color: var(--accent-pale);
  color: var(--accent-fonce);
  font-size: 9px;
  font-weight: 700;
}
.piece-nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--encre); }
.piece-projet { font-size: 10.5px; color: var(--encre-pale); }
.piece-retirer {
  flex: none;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--encre-pale);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.piece-retirer:hover { background-color: var(--surface); color: var(--err); }
.composeur.depot { outline: 2px dashed var(--accent); outline-offset: -4px; border-radius: 10px; }

/* --- Barres de défilement -------------------------------------------------
   Fines et sans fond, aux couleurs de l'application, partout : plus de piste
   blanche dans la conversation ni sur la page (Alexandre, 2026-09-10). */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--bord-fort) transparent;
}
*:hover { scrollbar-color: var(--encre-pale) transparent; }

/* --- Relier les pages ------------------------------------------------------
   La page ne renvoie pas vers toutes les pages du site, ou vers une page qui
   n'existe pas. Discret, à droite de la barre du canevas. */
.barre-scene .relier {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 26px; padding: 0 11px; border: 0; border-radius: 99px;
  background: var(--accent-pale); color: var(--accent-fonce);
  font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
  white-space: nowrap;
}
.barre-scene .relier:hover { background: var(--accent); color: #fff; }
.barre-scene .relier:not([hidden]) + .lien-scene { margin-left: 0; }

/* --- Planche d'écrans (mode « Écrans ») --------------------------------------
   La même page à plusieurs largeurs, côte à côte, réduites pour tenir à
   l'écran. Les dimensions sont posées par planche.js. */
.planche {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--fond);
}
.planche-barre {
  flex: none;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 8px 14px;
  border-bottom: 1px solid var(--bord);
  background: var(--surface);
  font-size: 12.5px;
}
.planche-formats {
  display: flex; gap: 3px; padding: 2px;
  background: var(--fond); border: 1px solid var(--bord-fort); border-radius: 8px;
}
.planche-format {
  display: inline-flex; align-items: baseline; gap: 5px;
  border: 0; background: transparent; color: var(--encre-doux);
  font: inherit; font-size: 12.5px; font-weight: 550;
  padding: 4px 10px; border-radius: 6px; cursor: pointer;
}
.planche-format:hover { color: var(--encre); }
.planche-format.actif { background: var(--accent); color: #fff; }
.planche-format-largeur { font-size: 11px; opacity: .72; font-variant-numeric: tabular-nums; }
.planche-zoom { padding-top: 5px; padding-bottom: 5px; font-size: 12.5px; }
.planche-aide { color: var(--encre-pale); }
.planche-detacher {
  margin-left: auto;
  border: 1px solid var(--bord-fort); background: var(--surface); color: var(--encre);
  font: inherit; font-size: 12.5px; font-weight: 550;
  padding: 5px 12px; border-radius: 8px; cursor: pointer;
}
.planche-detacher:hover { border-color: var(--accent); color: var(--accent-fonce); }

.planche-ecrans { flex: 1 1 auto; min-height: 0; overflow: auto; }
.planche-rangee {
  display: flex; align-items: flex-start;
  width: max-content; margin: 0 auto;
}
.ecran { margin: 0; flex: none; }
.ecran-titre {
  height: 28px;
  display: flex; align-items: baseline; gap: 7px;
  font-size: 12.5px; color: var(--encre-doux);
}
.ecran-titre strong { color: var(--encre); font-weight: 600; }
.ecran-titre span { font-variant-numeric: tabular-nums; }
.ecran-boite {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--bord-fort);
  border-radius: 10px;
  box-shadow: var(--ombre);
}
/* Un téléphone et une tablette se reconnaissent à leur coque. */
.ecran-mobile .ecran-boite, .ecran-tablette .ecran-boite {
  border: 5px solid #1f2937;
  border-radius: 22px;
}
.ecran-boite iframe {
  position: absolute; top: 0; left: 0;
  border: 0; background: #fff;
  transform-origin: 0 0;
}
.ecran-boite .ecran-flux { visibility: hidden; }
.ecran-boite .ecran-flux.visible { visibility: visible; z-index: 2; }
/* Avant le premier chargement d'un écran : un avis, pas un cadre blanc. */
.ecran-boite::before {
  content: "Chargement de l'aperçu…";
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #94a3b8; font-size: 12.5px;
}
.ecran:not(.charge) .ecran-page { visibility: hidden; }
.ecran.charge .ecran-boite::before { content: none; }

/* Élément choisi dans un écran étroit : la retouche ne vaudra que pour lui. */
.sel-vue {
  flex: none;
  font-size: 11.5px; font-weight: 600;
  padding: 1px 7px; border-radius: 99px;
  background: var(--accent-pale); color: var(--accent-fonce);
  white-space: nowrap;
}

/* --- Discussion repliable ---------------------------------------------------- */
.replier-fil, .deplier-fil {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  border: 0; background: transparent; color: var(--encre-doux);
  font: inherit; font-size: 12.5px; font-weight: 550;
  padding: 5px 7px; border-radius: 7px; cursor: pointer;
}
.replier-fil { margin-left: auto; }
.replier-fil:hover, .deplier-fil:hover { background: var(--fond); color: var(--encre); }
.deplier-fil { border: 1px solid var(--bord-fort); padding: 4px 10px; }
.atelier.fil-replie { grid-template-columns: 0 minmax(0, 1fr); }
.atelier.fil-replie .atelier-fil { visibility: hidden; overflow: hidden; border-right: 0; }

/* --- Fenêtre détachée ------------------------------------------------------- */
body.fenetre-ecrans { margin: 0; height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.fenetre-entete {
  flex: none;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: var(--surface); border-bottom: 1px solid var(--bord);
  font-size: 13px;
}
.fenetre-entete .marque { font-size: 14px; }
.fenetre-entete .nom { font-weight: 600; }
.fenetre-lien { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--encre-doux); }
.fenetre-lien::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--encre-pale);
}
.fenetre-lien.relie::before { background: var(--ok); }
.fenetre-ecrans .planche { flex: 1 1 auto; }
.fenetre-avis {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  padding: 9px 14px; border-radius: 10px;
  background: #0f172a; color: #f8fafc; font-size: 13px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .35);
  z-index: 50;
}

/* =========================================================================
   Modes Interagir / Commenter / Éditer (2026-09-10), repris de Claude Design
   ========================================================================= */
.barre-scene .modes { margin-left: auto; }
/* Un bouton « Relier » masqué garde sa place dans le DOM : sans :not([hidden]),
   les modes perdaient leur marge automatique et sautaient à gauche. */
.barre-scene .relier:not([hidden]) + .modes { margin-left: 8px; }
/* « Aligner l'en-tête » à côté de « Relier les pages » : une seule marge automatique. */
.barre-scene .relier:not([hidden]) + .relier { margin-left: 6px; }
/* Menu des pages : une page dont l'en-tête ou le pied diffère de l'accueil. */
.pages-ecart {
  flex: none; padding: 1px 7px; border-radius: 99px;
  background: color-mix(in srgb, #f59e0b 16%, transparent); color: #d97706;
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.barre-scene .modes + .lien-scene { margin-left: 4px; }
.modes {
  display: flex; align-items: center; gap: 2px; flex: none;
  padding: 2px; border: 1px solid var(--bord-fort); border-radius: 9px;
  background: var(--fond);
}
.mode, .mode-caret {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px; border: 0; border-radius: 7px;
  background: transparent; color: var(--encre-doux);
  font: inherit; font-size: 12.5px; font-weight: 550; cursor: pointer; white-space: nowrap;
}
.mode:hover, .mode-caret:hover { color: var(--encre); background: var(--surface); }
.mode.actif { background: var(--surface); color: var(--encre); box-shadow: 0 0 0 1px var(--bord-fort), 0 1px 2px rgba(15, 23, 42, .08); }
.mode[data-mode="commenter"].actif, .mode[data-mode="editer"].actif { color: var(--accent-fonce); }
.mode-groupe { position: relative; display: flex; align-items: center; }
.mode-groupe .mode { padding-right: 6px; }
.mode-caret { padding: 0 6px; margin-left: -2px; }
.mode-format { color: var(--accent-fonce); font-weight: 600; }
.mode .pastille { min-width: 16px; height: 16px; font-size: 10px; vertical-align: 0; }
.menu-format {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 40;
  width: 210px; padding: 6px;
  background-color: var(--surface); border: 1px solid var(--bord); border-radius: 10px;
  box-shadow: var(--ombre), 0 12px 32px rgba(15, 23, 42, .12);
}
.menu-format .menu-plus-item { display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.menu-format .menu-plus-item span { color: var(--encre-pale); font-size: 12px; font-variant-numeric: tabular-nums; }
.menu-format .menu-plus-item.actif { background: var(--accent-pale); color: var(--accent-fonce); font-weight: 600; }
.choix-format { font-size: 12.5px; padding-top: 5px; padding-bottom: 5px; }

/* --- Colonne de gauche : panneaux des modes -------------------------------- */
.panneau-mode { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; background: var(--surface); }
.panneau-mode[hidden] { display: none !important; }

.pc-entete {
  flex: none; display: flex; align-items: center; gap: 8px;
  padding: 11px 14px; border-bottom: 1px solid var(--bord);
}
.pc-entete strong { font-size: 13.5px; font-weight: 650; }
.pc-fermer, .po-fermer {
  margin-left: auto; width: 26px; height: 26px; border: 0; border-radius: 7px;
  background: transparent; color: var(--encre-doux); font-size: 18px; line-height: 1; cursor: pointer;
}
.pc-fermer:hover, .po-fermer:hover { background: var(--fond); color: var(--encre); }
.pc-liste { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 8px 12px; }
.pc-vide { margin: 14px 4px; font-size: 13px; line-height: 1.55; }
.pc-item {
  padding: 11px 10px; margin: 0 -6px; border-radius: 9px;
  border-bottom: 1px solid var(--bord); cursor: pointer;
}
.pc-item:hover { background: var(--fond); }
.pc-item:last-child { border-bottom: 0; }
.pc-item.etat-applied, .pc-item.etat-dismissed { opacity: .6; }
.pc-item.eclair { animation: annot-eclair 1.6s ease; }
.pc-tete { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 5px; font-size: 12.5px; }
.pc-tete strong { font-size: 13px; font-weight: 600; }
.pc-tete .pc-etat { margin-left: auto; }
.annot-numero.vide { background: var(--bord-fort); width: 10px; height: 10px; border-radius: 50%; }
.pc-format {
  font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px;
  background: var(--accent-pale); color: var(--accent-fonce);
}
.pc-texte { margin: 0 0 6px; font-size: 13.5px; line-height: 1.5; white-space: pre-line; }
.pc-cible { display: flex; gap: 8px; margin: 0 0 8px; font-size: 12px; color: var(--encre-pale); }
.pc-cible.orphelin { color: var(--err); }
.pc-quand { margin-left: auto; }
.pc-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pc-composeur { flex: none; border-top: 1px solid var(--bord); padding: 10px 12px 12px; }
.pc-composeur textarea, .popover-commentaire textarea {
  width: 100%; resize: vertical; min-height: 54px;
  padding: 9px 11px; border: 1px solid var(--bord-fort); border-radius: 9px;
  background-color: var(--surface); color: var(--encre); font: inherit; font-size: 13.5px; line-height: 1.5;
}
.pc-composeur textarea:focus, .popover-commentaire textarea:focus, .barre-dessin input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.pc-pied, .po-pied { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.pc-pied .btn { margin-left: auto; }

/* --- Canevas : astuce, fenêtre de commentaire, barre du dessin -------------- */
.atelier-scene { position: relative; }
.astuce-commentaire {
  position: absolute; top: 58px; left: 50%; transform: translateX(-50%); z-index: 20;
  padding: 6px 13px; border-radius: 99px;
  background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 600;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .25); pointer-events: none;
}
.popover-commentaire {
  position: fixed; z-index: 60; width: 360px;
  padding: 10px 12px 12px; border-radius: 12px;
  background-color: var(--surface); border: 1px solid var(--bord-fort);
  box-shadow: 0 16px 40px rgba(15, 23, 42, .28);
}
.po-entete { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; min-width: 0; }
.po-entete strong { font-size: 13px; font-weight: 650; flex: none; }
.po-cible { font-size: 12px; color: var(--encre-pale); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.po-pied .choix-format { margin-right: auto; min-width: 104px; }
.po-pied .btn, .pc-pied .btn, .barre-dessin .btn { white-space: nowrap; }
/* En mode Écrans, l'astuce passe sous la barre des formats. */
.atelier-scene:has(#planche:not([hidden])) .astuce-commentaire { top: 112px; }
.pc-cible .pc-quand { color: var(--encre-pale); }
.barre-dessin {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 30;
  display: flex; align-items: center; gap: 8px;
  padding: 8px; border-radius: 12px;
  background-color: var(--surface); border: 1px solid var(--bord-fort);
  box-shadow: 0 16px 40px rgba(15, 23, 42, .28);
}
.barre-dessin input {
  width: 300px; padding: 7px 11px; border: 1px solid var(--bord-fort); border-radius: 8px;
  background-color: var(--surface); color: var(--encre); font: inherit; font-size: 13px;
}
.bd-icone {
  width: 30px; height: 30px; display: grid; place-items: center;
  border: 0; border-radius: 7px; background: transparent; color: var(--encre-doux); cursor: pointer;
}
.bd-icone:hover { background: var(--fond); color: var(--encre); }

/* --- Mode Éditer : le cadre et le panneau ------------------------------------ */
.largeurs.inactif { opacity: .45; pointer-events: none; }
.atelier-scene .cadre.en-edition #apercu,
.atelier-scene .cadre.en-edition .apercu-flux { display: none; }
.atelier-scene .cadre .ed-cadre { flex: 1 1 auto; width: 100%; height: 100%; min-height: 0; border: 0; background: #fff; }

.panneau-edition { font-size: 12.5px; }
.ed-chargement { margin: 18px 14px; color: var(--encre-doux); }
.ed-entete {
  flex: none; display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-bottom: 1px solid var(--bord);
}
.ed-entete strong { font-size: 13.5px; font-weight: 650; }
.ed-titre { display: flex; flex-direction: column; margin-right: auto; min-width: 0; line-height: 1.25; }
.ed-compteur { color: var(--encre-pale); font-size: 11.5px; white-space: nowrap; }
.ed-avis {
  flex: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 8px 10px 0; padding: 8px 10px; border-radius: 9px;
  background: var(--accent-pale); color: var(--encre); font-size: 12.5px;
}
.ed-avis span { flex: 1 1 100%; }
.ed-avis.err { background: var(--err-pale); color: var(--err); }
.ed-onglets { flex: none; display: flex; gap: 2px; padding: 6px 10px; border-bottom: 1px solid var(--bord); }
.ed-onglet {
  border: 0; background: transparent; color: var(--encre-doux);
  font: inherit; font-size: 12.5px; font-weight: 550; padding: 5px 10px; border-radius: 7px; cursor: pointer;
}
.ed-onglet:hover { color: var(--encre); }
.ed-onglet.actif { background: var(--fond); color: var(--encre); font-weight: 650; }
.ed-calques {
  flex: none; max-height: 34%; overflow-y: auto; padding: 4px 0;
  border-bottom: 1px solid var(--bord);
}
.ed-calques[hidden] { display: none !important; }
.ed-arbre { list-style: none; margin: 0; padding: 0; }
.ed-calque {
  display: flex; align-items: center; gap: 5px; height: 24px; padding-right: 8px;
  cursor: pointer; white-space: nowrap; color: var(--encre-doux); font-size: 12px;
}
.ed-calque:hover, .ed-calque.survol { background: var(--fond); color: var(--encre); }
.ed-calque.choisi { background: var(--accent-pale); color: var(--accent-fonce); }
.ed-calque.cache { opacity: .45; }
.ed-chevron { width: 14px; border: 0; background: none; padding: 0; color: inherit; font-size: 10px; cursor: pointer; flex: none; }
.ed-chevron.vide { cursor: default; }
.ed-calque-nom { font-weight: 550; color: var(--encre); flex: none; }
.ed-calque.choisi .ed-calque-nom { color: var(--accent-fonce); }
.ed-calque-texte { overflow: hidden; text-overflow: ellipsis; min-width: 0; color: var(--encre-pale); }
.ed-calque-balise { margin-left: auto; font-size: 10.5px; color: var(--encre-pale); flex: none; }
.ed-oeil { border: 0; background: none; padding: 0 2px; color: var(--encre-pale); cursor: pointer; visibility: hidden; flex: none; }
.ed-calque:hover .ed-oeil, .ed-calque.cache .ed-oeil { visibility: visible; }
.ed-outils {
  flex: none; display: flex; align-items: center; gap: 2px;
  padding: 6px 8px; border-bottom: 1px solid var(--bord);
}
.ed-outils[hidden] { display: none !important; }
.ed-outil {
  width: 26px; height: 28px; flex: none; display: grid; place-items: center;
  border: 0; border-radius: 7px; background: transparent; color: var(--encre-doux); cursor: pointer;
}
.ed-outil:hover { background: var(--fond); color: var(--encre); }
.ed-outil.actif { background: var(--accent-pale); color: var(--accent-fonce); }
.ed-outil:disabled { opacity: .35; cursor: default; background: transparent; }
.ed-sep { width: 1px; height: 18px; margin: 0 2px; background: var(--bord); flex: none; }
.ed-pousse { flex: 1; }
.ed-proprietes { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 12px 16px; }
.ed-aide { margin: 12px 2px; color: var(--encre-pale); line-height: 1.55; }
.ed-choix { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }
.ed-choix strong { font-size: 13.5px; }
.ed-choix code { font-size: 11px; color: var(--encre-pale); }
.ed-note { font-size: 11.5px; color: var(--encre-pale); }
.ed-section { padding: 10px 0; border-bottom: 1px solid var(--bord); }
.ed-section:last-child { border-bottom: 0; }
.ed-section-titre {
  display: block; margin-bottom: 8px; font-size: 12px; font-weight: 650; color: var(--encre);
  border: 0; background: none; padding: 0; font-family: inherit; text-align: left;
}
button.ed-section-titre { cursor: pointer; width: 100%; }
button.ed-section-titre::after { content: " ›"; color: var(--encre-pale); }
.ed-section.ouverte button.ed-section-titre::after { content: " ⌄"; }
.ed-ligne { display: flex; gap: 6px; margin-bottom: 6px; align-items: stretch; }
.ed-ligne.deux > * { flex: 1 1 0; min-width: 0; }
.ed-ligne.taille { flex-wrap: wrap; }
.ed-ligne.taille > .ed-champ:first-child { flex: 1 1 100px; }
.ed-champ {
  position: relative; display: flex; align-items: center; gap: 6px; min-width: 0;
  height: 30px; padding: 0 8px; border: 1px solid var(--bord); border-radius: 8px;
  background-color: var(--fond);
}
.ed-champ.large { flex: 1 1 100%; }
.ed-champ:focus-within { border-color: var(--accent); }
.ed-libelle { flex: none; color: var(--encre-doux); font-size: 12px; font-weight: 550; }
.ed-entree, .ed-select {
  flex: 1 1 auto; min-width: 0; width: 100%; border: 0; background: transparent; color: var(--encre);
  font: inherit; font-size: 12px; text-align: right; padding: 0; box-shadow: none;
}
.ed-select { appearance: auto; -webkit-appearance: auto; background-image: none; padding: 0; cursor: pointer; }
.ed-entree:focus, .ed-select:focus { outline: none; box-shadow: none; }
.ed-pastille { flex: none; width: 18px; height: 18px; padding: 0; border: 1px solid var(--bord-fort); border-radius: 4px; background: none; cursor: pointer; }
.ed-pastille::-webkit-color-swatch-wrapper { padding: 0; }
.ed-pastille::-webkit-color-swatch { border: 0; border-radius: 3px; }
.ed-point {
  position: absolute; left: -4px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px;
  padding: 0; border: 0; border-radius: 50%; background: var(--accent); cursor: pointer;
}
.ed-point[hidden] { display: none !important; }
.ed-segments-bloc { height: auto; min-height: 30px; flex-wrap: wrap; padding: 3px 4px 3px 8px; margin-bottom: 6px; }
.ed-segments { display: flex; gap: 2px; margin-left: auto; flex-wrap: wrap; }
.ed-ligne .ed-segments-bloc { margin-bottom: 0; }
.ed-segment {
  min-width: 26px; height: 24px; padding: 0 7px; border: 0; border-radius: 6px;
  background: transparent; color: var(--encre-doux); font: inherit; font-size: 11.5px; font-weight: 550;
  display: inline-grid; place-items: center; cursor: pointer;
}
.ed-segment:hover { color: var(--encre); background: var(--surface); }
.ed-segment.actif { background: var(--surface); color: var(--accent-fonce); box-shadow: 0 0 0 1px var(--bord-fort); }
.ed-bascules { flex: none; align-items: center; padding: 3px; border: 1px solid var(--bord); border-radius: 8px; background: var(--fond); }
.ed-ajouts { margin: 2px 0 0; font-size: 11.5px; color: var(--encre-pale); }
.ed-lien { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; font-size: 12px; cursor: pointer; }
.ed-lien:hover { text-decoration: underline; }
.ed-texte-riche { display: block; margin-bottom: 8px; }
.ed-code {
  width: 100%; margin: 6px 0; padding: 9px 10px; border: 1px solid var(--bord-fort); border-radius: 8px;
  background-color: var(--fond); color: var(--encre); resize: vertical;
  font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.ed-export-apercu {
  display: grid; place-items: center; min-height: 90px; max-height: 180px; margin-bottom: 8px; overflow: hidden;
  border-radius: 8px; border: 1px solid var(--bord);
  background: repeating-conic-gradient(var(--fond) 0 25%, var(--surface) 0 50%) 0 0 / 14px 14px;
}
.ed-export-apercu img { max-width: 100%; max-height: 176px; }
.ed-exporter { margin-left: auto; display: flex; }
.ed-debug {
  margin: 0; padding: 8px; border-radius: 8px; background: var(--fond);
  font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-all;
}
.ed-interrupteur { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 2px; font-size: 12.5px; cursor: pointer; }
.ed-menu {
  position: fixed; z-index: 70; min-width: 230px; padding: 5px;
  background-color: var(--surface); border: 1px solid var(--bord-fort); border-radius: 10px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .28);
}
.ed-menu hr { margin: 4px 6px; border: 0; border-top: 1px solid var(--bord); }
.ed-menu-item {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%;
  padding: 6px 9px; border: 0; border-radius: 7px; background: transparent; color: var(--encre);
  font: inherit; font-size: 12.5px; cursor: pointer; text-align: left;
}
.ed-menu-item:hover { background: var(--fond); }
.ed-menu-item:disabled { opacity: .4; cursor: default; background: transparent; }
.ed-menu-item kbd { font: 11px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--encre-pale); }

/* =========================================================================
   Listes déroulantes (public/assets/selects.js), 2026-09-10
   Le <select> natif reste dans la page, invisible ; on affiche un bouton et
   une liste flottante dans l'esprit de Claude Design.
   ========================================================================= */
.bd-select-natif {
  position: absolute !important; width: 1px !important; height: 1px !important;
  margin: 0 !important; padding: 0 !important; border: 0 !important;
  opacity: 0 !important; pointer-events: none !important;
  overflow: hidden !important; clip-path: inset(50%) !important;
}
.bd-select {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-width: 0;
  height: 34px; padding: 0 10px 0 12px;
  border: 1px solid var(--bord-fort); border-radius: 9px;
  background-color: var(--surface); color: var(--encre);
  font: inherit; font-size: 14px; line-height: 1.2; text-align: left; cursor: pointer;
  transition: border-color .12s ease, box-shadow .12s ease, background-color .12s ease, color .12s ease;
}
.bd-select:hover { border-color: var(--encre-pale); }
.bd-select:focus-visible, .bd-select.ouvert {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}
.bd-select:disabled { opacity: .5; cursor: not-allowed; }
.bd-select[hidden] { display: none !important; }
.bd-select-valeur { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-select-chevron { flex: none; color: var(--encre-pale); transition: transform .15s ease; }
.bd-select.ouvert .bd-select-chevron { transform: rotate(180deg); color: var(--accent); }

/* Formulaires : même hauteur que les champs voisins. */
.champ .bd-select { display: flex; width: 100%; height: 42px; padding: 0 12px 0 13px; font-size: 14.5px; }
.ligne-creation .bd-select { height: 38px; }

/* Composeur de l'éditeur : discrets, ils se lisent comme des réglages. */
.bd-select-choix-modele, .bd-select-choix-effort {
  height: 30px; font-size: 12.5px; border-color: var(--bord);
  background-color: transparent; color: var(--encre-doux);
}
.bd-select-choix-modele { display: flex; width: 100%; }
.bd-select-choix-effort { flex: 0 1 auto; margin-right: auto; }
.bd-select-choix-modele:hover, .bd-select-choix-effort:hover { color: var(--encre); border-color: var(--bord-fort); }

/* Petits sélecteurs : format d'un commentaire, zoom des écrans. */
.bd-select-choix-format, .bd-select-planche-zoom { height: 30px; padding: 0 8px 0 10px; font-size: 12.5px; }
.po-pied .bd-select-choix-format { margin-right: auto; min-width: 112px; }
.barre-dessin .bd-select-choix-format { min-width: 108px; }

/* Niveau d'un lien de partage : se lit comme une étiquette. */
.niveau-lien .bd-select {
  height: 26px; padding: 0 7px 0 9px; font-size: 12.5px;
  border-color: var(--bord); color: var(--encre-doux);
}

/* Panneau d'édition : nu, aligné à droite dans son champ. */
.bd-select-ed-select {
  flex: 1 1 auto; justify-content: flex-end; gap: 4px;
  height: auto; padding: 0; border: 0; border-radius: 0;
  background: transparent; font-size: 12px; color: var(--encre);
}
.bd-select-ed-select .bd-select-valeur { flex: 0 1 auto; text-align: right; }
.bd-select-ed-select:hover { color: var(--accent-fonce); }
.bd-select-ed-select:focus-visible, .bd-select-ed-select.ouvert { box-shadow: none; color: var(--accent-fonce); }

/* La liste flottante. */
.bd-liste {
  position: fixed; z-index: 1000; overflow-y: auto; padding: 5px;
  max-width: min(420px, calc(100vw - 16px));
  background-color: var(--surface); border: 1px solid var(--bord-fort); border-radius: 11px;
  box-shadow: 0 14px 38px rgba(15, 23, 42, .18), 0 2px 6px rgba(15, 23, 42, .08);
  color: var(--encre); font-size: 13px; line-height: 1.3;
  scrollbar-width: thin; animation: bd-liste-entree .12s ease;
}
.bd-liste.en-haut { animation-name: bd-liste-entree-haut; }
@keyframes bd-liste-entree { from { opacity: 0; transform: translateY(-4px); } }
@keyframes bd-liste-entree-haut { from { opacity: 0; transform: translateY(4px); } }
.bd-liste-groupe {
  padding: 8px 10px 4px 30px; font-size: 10.5px; font-weight: 650;
  letter-spacing: .06em; text-transform: uppercase; color: var(--encre-pale);
}
.bd-liste-groupe:not(:first-child) { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--bord); }
.bd-liste-option {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px 7px 8px; border-radius: 7px;
  cursor: pointer; white-space: nowrap;
}
.bd-liste-option.active { background-color: color-mix(in srgb, var(--accent) 10%, transparent); }
.bd-liste-option.choisie { font-weight: 600; }
.bd-liste-option.desactivee { opacity: .45; cursor: default; }
.bd-coche { flex: none; color: var(--accent); visibility: hidden; }
.bd-liste-option.choisie .bd-coche { visibility: visible; }
.bd-liste-texte { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.bd-liste-detail { flex: none; margin-left: 14px; color: var(--encre-pale); font-size: 12px; font-weight: 400; font-variant-numeric: tabular-nums; }

/* --- Cases à cocher et boutons radio (2026-09-10) ----------------------------
   Même esprit que les listes : les contrôles natifs, bleu vif et carrés,
   détonnaient sur le thème sombre. Dessinés à la main, partout dans
   l'application (les maquettes, dans leurs cadres, ne sont pas touchées). */
input[type="checkbox"], input[type="radio"] {
  -webkit-appearance: none; appearance: none;
  flex: none; width: 16px; height: 16px; margin: 0; padding: 0;
  display: inline-grid; place-content: center; vertical-align: -3px;
  border: 1.5px solid var(--bord-fort); border-radius: 5px;
  background: var(--surface); cursor: pointer;
  transition: background-color .12s ease, border-color .12s ease, box-shadow .12s ease;
}
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]::before {
  content: ""; width: 9px; height: 9px;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
  background: #fff; transform: scale(0); transition: transform .12s ease;
}
input[type="radio"]::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: #fff; transform: scale(0); transition: transform .12s ease;
}
input[type="checkbox"]:checked, input[type="radio"]:checked { background: var(--accent); border-color: var(--accent); }
input[type="checkbox"]:checked::before, input[type="radio"]:checked::before { transform: scale(1); }
input[type="checkbox"]:hover:not(:disabled), input[type="radio"]:hover:not(:disabled) { border-color: var(--accent); }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible {
  outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent);
}
input[type="checkbox"]:disabled, input[type="radio"]:disabled { opacity: .45; cursor: default; }
.interrupteur input[type="checkbox"] { margin-top: 3px; }

/* Message d'un lien de partage, dans sa section : l'adresse et « Copier ». */
.avis-partage { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.avis-partage a { color: inherit; font-weight: 600; overflow-wrap: anywhere; }
.avis-partage .btn { margin-left: auto; }
