/* ╔══════════════════════════════════════════════════════════════╗
   ║   BOUTIQUE — admin/css/admin.css                             ║
   ║   Le back-office de la boutique. Aucune bibliothèque,        ║
   ║   aucune police distante, aucune image : tout est dessiné.   ║
   ╚══════════════════════════════════════════════════════════════╝
   Écrite en « mobile d'abord » : ce qui suit vaut à 375 px, et les media
   queries n'ajoutent que ce qu'un grand écran permet en plus. Sur un
   téléphone, la colonne de menu se replie derrière le bouton ☰ de
   l'en-tête et glisse par-dessus la page.
   Les couleurs de la boutique sont posées par le JavaScript sur l'élément
   racine (--principale, --secondaire) ; ici, des valeurs de repli. */

:root {
  --principale: #1f2a44;
  --secondaire: #e07a2f;

  --encre: #1c1f2a;
  --encre-douce: #626878;
  --fond: #f3f4f7;
  --carte: #ffffff;
  --trait: #e2e4ea;
  --trait-fort: #c9cdd8;

  --vert: #237a4d;      --vert-clair: #e4f4ea;
  --rouge: #b3261e;     --rouge-clair: #fbe9e7;
  --bleu: #2d5fa8;      --bleu-clair: #e7eefa;
  --orange: #9a5b0c;    --orange-clair: #fbefdb;
  --violet: #5b3fa8;    --violet-clair: #ece7f8;
  --gris-clair: #eceef2;

  --rayon: 14px;
  --rayon-s: 9px;
  --ombre: 0 1px 2px rgba(20, 24, 40, .05), 0 8px 24px rgba(20, 24, 40, .06);
  --ombre-forte: 0 2px 6px rgba(20, 24, 40, .1), 0 18px 40px rgba(20, 24, 40, .18);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.22; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 1.4rem; }
h2 { font-size: 1.12rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .8rem; }
a { color: var(--principale); text-underline-offset: 2px; }
img { max-width: 100%; display: block; }
.discret { color: var(--encre-douce); font-size: .87rem; }
.cache { display: none !important; }
.centre { text-align: center; }
.n { text-align: right; white-space: nowrap; }
.rien { color: var(--encre-douce); font-style: italic; padding: 1rem 0; }
.rouge { color: var(--rouge); }
.vert { color: var(--vert); }
kbd {
  font: inherit; font-size: .72rem; border: 1px solid var(--trait-fort); border-bottom-width: 2px;
  border-radius: 5px; padding: 0 .3rem; background: var(--fond); color: var(--encre-douce);
}
code {
  background: var(--fond); border: 1px solid var(--trait); border-radius: 6px;
  padding: .05rem .35rem; font-size: .9em;
}
@media (max-width: 640px) { .entete-appli .txt-long { display: none; } }

/* ── Écran de connexion ───────────────────────────────────────── */
.connexion { min-height: 100vh; display: grid; place-items: center; padding: 1.2rem; }
.connexion .boite {
  background: var(--carte); border: 1px solid var(--trait); border-radius: 18px;
  box-shadow: var(--ombre); padding: 1.6rem; width: min(420px, 100%);
}
.connexion .logo {
  width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--principale), var(--secondaire));
  color: #fff; font-size: 1.4rem; margin-bottom: .9rem;
}
.connexion h1 { margin-bottom: .1rem; }

/* ── Ossature ─────────────────────────────────────────────────── */
.appli { display: block; min-height: 100vh; }
.entete-appli {
  position: sticky; top: 0; z-index: 45;
  display: flex; align-items: center; gap: .6rem; flex-wrap: nowrap;
  padding: .6rem 16px; background: var(--carte); border-bottom: 1px solid var(--trait);
}
.entete-appli .marque { display: flex; align-items: center; gap: .5rem; font-weight: 700; min-width: 0; }
.entete-appli .marque > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entete-appli .rond {
  width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(135deg, var(--principale), var(--secondaire)); color: #fff;
  flex: 0 0 auto;
}
.entete-appli .rond img { width: 100%; height: 100%; object-fit: cover; }
.entete-appli .droite { margin-left: auto; display: flex; gap: .4rem; align-items: center; flex-wrap: nowrap; }
.entete-appli .burger { font-size: 1.15rem; padding: .3rem .55rem; }

/* Colonne de menu : tiroir sur mobile, colonne fixe sur grand écran. */
.cote {
  position: fixed; top: 0; bottom: 0; left: 0; width: min(280px, 86vw); z-index: 60;
  display: flex; flex-direction: column; gap: .1rem; overflow-y: auto; padding: 1rem .7rem;
  background: var(--carte); border-right: 1px solid var(--trait); box-shadow: var(--ombre-forte);
  transform: translateX(-105%); transition: transform .2s ease;
}
.cote.ouvert { transform: none; }
.voile-menu { position: fixed; inset: 0; background: rgba(28, 31, 42, .45); z-index: 55; }
.cote .titre { display: flex; align-items: center; gap: .55rem; font-weight: 700; padding: .2rem .6rem 1rem; }
.cote .titre .rond {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
  background: var(--fond); border: 1px solid var(--trait);
}
.cote .groupe { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--encre-douce); padding: .7rem .7rem .2rem; font-weight: 700; }
.cote button {
  position: relative; flex: 0 0 auto; display: flex; flex-direction: row; justify-content: flex-start;
  align-items: center; gap: .6rem; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: .95rem; color: var(--encre-douce); width: 100%;
  padding: .5rem .7rem; border-radius: 10px; white-space: nowrap; text-align: left;
}
.cote button .pict { font-size: 1.05rem; line-height: 1; width: 1.4rem; text-align: center; }
.cote button:hover { background: var(--fond); color: var(--encre); }
.cote button.actif { background: var(--principale); color: #fff; font-weight: 600; }
.cote button.actif:hover { background: var(--principale); color: #fff; }
.cote .pastille {
  margin-left: auto; background: var(--rouge); color: #fff;
  border-radius: 999px; font-size: .66rem; font-weight: 700; padding: .05rem .4rem;
}
.cote .bas { display: block; margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--trait); }
.principal { padding: 1rem 16px 3rem; min-width: 0; }

@media (min-width: 960px) {
  .appli { display: grid; grid-template-columns: 236px 1fr; }
  .entete-appli { grid-column: 1 / -1; padding: .6rem 1.4rem; }
  .entete-appli .burger { display: none; }
  .voile-menu { display: none !important; }
  .cote {
    position: sticky; top: 57px; left: auto; bottom: auto; width: auto;
    height: calc(100vh - 57px); transform: none; transition: none; box-shadow: none; z-index: 40;
  }
  .principal { padding: 1.4rem 1.8rem 4rem; }
}

/* ── Blocs ────────────────────────────────────────────────────── */
.carte {
  background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon);
  box-shadow: var(--ombre); padding: 1rem; margin-bottom: 1rem;
}
.carte > h2:first-child, .carte > h3:first-child { margin-top: 0; }
.grille { display: grid; gap: .9rem; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); }
.ligne { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.ligne.fin { justify-content: flex-end; }
.ligne.entre { justify-content: space-between; }
.entete-page { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: .9rem; }
.entete-page h1 { margin: 0; }
.entete-page .droite { margin-left: auto; display: flex; gap: .45rem; flex-wrap: wrap; }

.chiffre {
  background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon);
  padding: .85rem .95rem; box-shadow: var(--ombre);
}
.chiffre .valeur { font-size: 1.6rem; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.chiffre .libelle { color: var(--encre-douce); font-size: .82rem; margin-top: .15rem; }
.chiffre .detail { color: var(--encre-douce); font-size: .78rem; margin-top: .3rem; }
.chiffre.vedette { border-color: var(--trait-fort); background: linear-gradient(180deg, #fff, var(--fond)); }
.chiffre.alerte .valeur { color: var(--rouge); }
.chiffre.cliquable { cursor: pointer; }
.chiffre.cliquable:hover { border-color: var(--principale); }

/* Onglets (catégories / marques / attributs, fiche produit, contenu). */
.onglets { display: flex; gap: .25rem; border-bottom: 1px solid var(--trait); margin-bottom: 1rem; overflow-x: auto; }
.onglets button {
  background: none; color: var(--encre-douce); border: 0; border-bottom: 2px solid transparent;
  border-radius: 0; padding: .5rem .8rem; font-weight: 600; white-space: nowrap; margin-bottom: -1px;
}
.onglets button:hover { filter: none; color: var(--encre); }
.onglets button.actif { color: var(--principale); border-bottom-color: var(--principale); }

/* ── Boutons et formulaires ───────────────────────────────────── */
button, .bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  background: var(--principale); color: #fff; border: 0; border-radius: var(--rayon-s);
  padding: .55rem 1rem; font: inherit; font-weight: 600; cursor: pointer;
  text-decoration: none; line-height: 1.3;
}
button:hover, .bouton:hover { filter: brightness(1.08); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--secondaire); outline-offset: 2px;
}
button[disabled] { opacity: .45; cursor: not-allowed; filter: none; }
.clair { background: var(--carte); color: var(--encre); border: 1px solid var(--trait-fort); }
.clair:hover { background: var(--fond); filter: none; }
.danger { background: var(--rouge-clair); color: var(--rouge); border: 1px solid #edcdc6; }
.danger:hover { background: #f6ded9; filter: none; }
.petit { padding: .32rem .65rem; font-size: .84rem; border-radius: 8px; }
.lien { background: none; border: 0; color: var(--principale); padding: 0; font-weight: 600; text-decoration: underline; }
.lien:hover { filter: none; color: var(--secondaire); }

label { display: block; font-size: .84rem; font-weight: 600; margin: .7rem 0 .22rem; color: var(--encre-douce); }
input:not([type]), input[type=text], input[type=tel], input[type=email], input[type=date],
input[type=time], input[type=number], input[type=password], input[type=search], input[type=url],
input[type=datetime-local], input[type=color], select, textarea {
  width: 100%; padding: .52rem .65rem; border: 1px solid var(--trait-fort);
  border-radius: var(--rayon-s); font: inherit; background: var(--carte); color: var(--encre);
}
input[type=color] { padding: .12rem; height: 38px; width: 60px; }
input[type=file] { font: inherit; font-size: .88rem; }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--principale); }
input.invalide, select.invalide, textarea.invalide { border-color: var(--rouge); }
.case { display: flex; gap: .5rem; align-items: flex-start; margin: .45rem 0; font-weight: 400; font-size: .92rem; color: var(--encre); }
.case input { width: auto; margin-top: .22rem; flex: 0 0 auto; }
.champ-court { max-width: 180px; }
fieldset { border: 1px solid var(--trait); border-radius: var(--rayon-s); padding: .7rem .9rem; margin: 0 0 .9rem; min-width: 0; }
legend { font-weight: 700; font-size: .92rem; padding: 0 .3rem; }
.aide { color: var(--encre-douce); font-size: .78rem; margin: .2rem 0 0; }

/* Filtres en tête de liste : les champs se mettent côte à côte. */
.filtres { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; }
.filtres label { margin-top: 0; }
.filtres > div { min-width: 0; }

/* ── Tableaux ─────────────────────────────────────────────────── */
.tableau-defile { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 700px) { .tableau-defile table { min-width: 560px; } }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: .5rem .45rem; text-align: left; border-bottom: 1px solid var(--trait); vertical-align: middle; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--encre-douce); font-weight: 700; }
th[data-tri] { cursor: pointer; user-select: none; white-space: nowrap; }
th[data-tri]:hover { color: var(--encre); }
th .fleche { font-size: .7rem; margin-left: .2rem; }
tbody tr:hover td { background: var(--fond); }
tr.cliquable { cursor: pointer; }
td .sous { display: block; color: var(--encre-douce); font-size: .84rem; }
td input[type=number], td input[type=text] { padding: .3rem .45rem; font-size: .88rem; }
td input.court { width: 92px; }
.vignette { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; background: var(--fond); border: 1px solid var(--trait); }
.vignette.vide { display: grid; place-items: center; color: var(--encre-douce); font-size: 1rem; }
.tableau-compact td, .tableau-compact th { padding: .35rem .4rem; }

/* ── Jetons de statut ─────────────────────────────────────────── */
.jeton {
  display: inline-block; border-radius: 999px; padding: .1rem .55rem;
  font-size: .74rem; font-weight: 700; white-space: nowrap;
}
.jeton::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: .35rem; vertical-align: 1px; }
.jeton.en_attente, .jeton.attente   { background: var(--orange-clair); color: var(--orange); }
.jeton.payee, .jeton.paye           { background: var(--bleu-clair); color: var(--bleu); }
.jeton.preparation, .jeton.a_preparer { background: var(--violet-clair); color: var(--violet); }
.jeton.expediee                     { background: var(--bleu-clair); color: var(--bleu); }
.jeton.livree, .jeton.publie, .jeton.oui, .jeton.ok { background: var(--vert-clair); color: var(--vert); }
.jeton.annulee, .jeton.refuse, .jeton.non, .jeton.rupture, .jeton.alerte { background: var(--rouge-clair); color: var(--rouge); }
.jeton.remboursee, .jeton.rembourse, .jeton.rembourse_partiel { background: var(--gris-clair); color: var(--encre-douce); }
.jeton.brouillon, .jeton.gris       { background: var(--gris-clair); color: var(--encre-douce); }
.jeton.promo                        { background: var(--rouge-clair); color: var(--rouge); }
.jeton.nouveau                      { background: var(--bleu-clair); color: var(--bleu); }
.jeton.regulier                     { background: var(--vert-clair); color: var(--vert); }
.jeton.vip                          { background: var(--orange-clair); color: var(--orange); }
.jeton.inactif                      { background: var(--gris-clair); color: var(--encre-douce); }
.jeton.sans::before { display: none; }

/* ── Messages ─────────────────────────────────────────────────── */
.avis { padding: .6rem .85rem; border-radius: var(--rayon-s); margin: .6rem 0; font-size: .9rem; }
.avis.ok { background: var(--vert-clair); color: var(--vert); }
.avis.erreur { background: var(--rouge-clair); color: var(--rouge); }
.avis.info { background: var(--bleu-clair); color: var(--bleu); }
.avis:empty { display: none; }

.flash {
  position: fixed; top: .7rem; left: 50%; transform: translateX(-50%); z-index: 90;
  background: var(--encre); color: #fff; padding: .55rem 1rem; border-radius: 999px;
  box-shadow: var(--ombre-forte); font-size: .9rem; font-weight: 600; max-width: 92vw;
}
.flash.erreur { background: var(--rouge); }
.flash.ok { background: var(--vert); }

/* Chargement : trois points qui respirent. */
.chargement { color: var(--encre-douce); font-style: italic; padding: 1.2rem 0; display: flex; align-items: center; gap: .5rem; }
.chargement::before {
  content: ''; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--trait-fort);
  border-top-color: var(--principale); animation: tourne .8s linear infinite;
}
@keyframes tourne { to { transform: rotate(360deg); } }
.vide {
  text-align: center; color: var(--encre-douce); padding: 2rem 1rem;
  border: 1px dashed var(--trait-fort); border-radius: var(--rayon);
}
.vide .pict { font-size: 2rem; display: block; margin-bottom: .4rem; }

/* ── Barres horizontales (meilleures ventes) ───────────────────── */
.barre { display: grid; grid-template-columns: minmax(90px, 1.3fr) 1fr auto; gap: .55rem; align-items: center; margin: .35rem 0; font-size: .88rem; }
.barre .nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barre .piste { background: var(--gris-clair); border-radius: 999px; height: 9px; overflow: hidden; }
.barre .remplie { display: block; background: var(--principale); height: 100%; border-radius: 999px; }
.barre .val { font-weight: 700; white-space: nowrap; font-size: .85rem; }

/* ── Graphiques SVG ────────────────────────────────────────────── */
.graphique { position: relative; }
.graphique svg { display: block; width: 100%; height: auto; overflow: visible; }
.graphique .bulle {
  position: absolute; display: none; pointer-events: none; background: var(--carte);
  border: 1px solid var(--trait-fort); border-radius: 8px; padding: .4rem .6rem; font-size: .82rem;
  box-shadow: var(--ombre-forte); min-width: 140px; z-index: 2;
}
.graphique .zone-survol { fill: transparent; cursor: crosshair; }
.graphique .zone-survol:hover, .graphique .zone-survol:focus { fill: rgba(31, 42, 68, .06); outline: none; }
.graphique .point { fill: var(--carte); stroke: var(--principale); stroke-width: 2; }
.legende-graphe { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .84rem; margin-top: .5rem; }
.legende-graphe span::before { content: ''; display: inline-block; width: 11px; height: 11px; border-radius: 3px; background: var(--c, var(--principale)); margin-right: .35rem; vertical-align: -1px; }

/* ── Fenêtre modale ───────────────────────────────────────────── */
.voile {
  position: fixed; inset: 0; background: rgba(28, 31, 42, .5); z-index: 80;
  display: grid; place-items: end center; padding: 0;
}
.modale {
  background: var(--carte); border-radius: 18px 18px 0 0; width: 100%;
  max-height: 92vh; overflow: auto; padding: 1.1rem 16px 1.4rem; position: relative;
  box-shadow: var(--ombre-forte);
}
.modale h2 { margin-top: 0; padding-right: 2.2rem; }
.modale .fermer {
  position: absolute; top: .55rem; right: .6rem; background: var(--fond); color: var(--encre);
  border: 1px solid var(--trait); width: 32px; height: 32px; padding: 0; border-radius: 50%;
  font-size: 1.1rem; line-height: 1;
}
.modale .pied-modale { display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--trait); position: sticky; bottom: -1.4rem; background: var(--carte); padding-bottom: .2rem; }
@media (min-width: 700px) {
  .voile { place-items: center; padding: 1.2rem; }
  .modale { border-radius: 18px; width: min(700px, 100%); padding: 1.4rem; }
  .modale.large { width: min(1040px, 100%); }
}

/* Palette de recherche globale (Ctrl+K). */
.voile.palette { place-items: start center; padding-top: 8vh; }
.palette .modale { max-height: 80vh; }
.resultats-palette { margin-top: .6rem; }
.resultats-palette h3 { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--encre-douce); margin: .7rem 0 .2rem; }
.resultats-palette button { display: flex; width: 100%; text-align: left; justify-content: flex-start; gap: .6rem; background: none; color: var(--encre); border: 0; border-radius: 8px; padding: .4rem .6rem; font-weight: 500; }
.resultats-palette button:hover, .resultats-palette button:focus { background: var(--fond); filter: none; }
.resultats-palette .sous { color: var(--encre-douce); font-size: .82rem; margin-left: auto; white-space: nowrap; }

/* ── Détail d'une commande ────────────────────────────────────── */
.recap { border-top: 1px solid var(--trait); margin-top: .7rem; padding-top: .6rem; }
.recap .l { display: flex; justify-content: space-between; gap: 1rem; padding: .12rem 0; }
.recap .l.total { font-size: 1.15rem; font-weight: 700; border-top: 1px solid var(--trait); margin-top: .35rem; padding-top: .45rem; }
.option-ligne { font-size: .85rem; color: var(--encre-douce); }
.suivi { list-style: none; margin: .4rem 0 0; padding: 0; font-size: .86rem; }
.suivi li { padding: .2rem 0 .2rem .9rem; border-left: 2px solid var(--trait); }
.suivi li:first-child { border-left-color: var(--principale); font-weight: 600; }
.adresse { white-space: pre-line; font-size: .92rem; }
.etapes { display: flex; gap: .3rem; flex-wrap: wrap; }

/* ── Images d'un produit ──────────────────────────────────────── */
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .6rem; margin: .5rem 0; }
.galerie .image { position: relative; border: 1px solid var(--trait); border-radius: var(--rayon-s); overflow: hidden; background: var(--fond); }
.galerie .image.principale { border-color: var(--principale); box-shadow: 0 0 0 2px var(--principale); }
.galerie .image img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.galerie .image .outils { display: flex; gap: .15rem; justify-content: center; padding: .25rem; background: var(--carte); }
.galerie .image .outils button { padding: .15rem .4rem; font-size: .8rem; }
.galerie .image .etoile { position: absolute; top: .3rem; left: .3rem; background: var(--principale); color: #fff; font-size: .68rem; padding: .05rem .4rem; border-radius: 999px; }
.galerie .image.glisse { opacity: .4; }
.depot {
  border: 2px dashed var(--trait-fort); border-radius: var(--rayon); padding: 1rem; text-align: center;
  color: var(--encre-douce); font-size: .9rem; background: var(--fond); cursor: pointer;
}
.depot.survol { border-color: var(--principale); background: var(--bleu-clair); }
.apercu-photo {
  width: 100%; max-width: 220px; aspect-ratio: 1; object-fit: contain;
  border-radius: var(--rayon-s); border: 1px solid var(--trait); background: var(--fond);
}
.sans-photo {
  width: 100%; max-width: 220px; aspect-ratio: 1; border-radius: var(--rayon-s);
  border: 1px dashed var(--trait-fort); display: grid; place-items: center;
  color: var(--encre-douce); font-size: .85rem; background: var(--fond); text-align: center; padding: .5rem;
}

/* Lignes répétables (caractéristiques, paliers, questions FAQ, menus). */
.ligne-rep { display: grid; grid-template-columns: 1fr 1fr auto; gap: .35rem; align-items: center; margin: .3rem 0; }
.ligne-rep input { padding: .38rem .5rem; font-size: .9rem; }
.ligne-rep button { padding: .3rem .5rem; }
.bloc { border: 1px solid var(--trait); border-radius: var(--rayon-s); padding: .7rem .8rem; margin-bottom: .6rem; background: var(--fond); }
.puces { display: flex; flex-wrap: wrap; gap: .3rem; margin: .3rem 0; }
.puce { display: inline-flex; align-items: center; gap: .3rem; background: var(--gris-clair); border-radius: 999px; padding: .1rem .3rem .1rem .6rem; font-size: .84rem; }
.puce button { background: none; border: 0; color: var(--encre-douce); padding: 0 .3rem; font-size: .9rem; }
.puce button:hover { color: var(--rouge); filter: none; }

/* Arbre des catégories. */
.arbre ul { list-style: none; margin: 0; padding-left: 1.3rem; }
.arbre > ul { padding-left: 0; }
.arbre li > .noeud { display: flex; align-items: center; gap: .5rem; padding: .35rem .5rem; border-radius: 8px; border: 1px solid transparent; }
.arbre li > .noeud:hover { background: var(--fond); border-color: var(--trait); }
.arbre .noeud .nom { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arbre .noeud .outils { display: flex; gap: .15rem; }
.arbre .noeud .outils button { padding: .15rem .45rem; font-size: .8rem; }
.arbre-cases ul { list-style: none; margin: 0; padding-left: 1.2rem; }
.arbre-cases > ul { padding-left: 0; }
.arbre-cases label.case { margin: .2rem 0; }

/* Éditeur riche maison. */
.editeur { border: 1px solid var(--trait-fort); border-radius: var(--rayon-s); background: var(--carte); }
.editeur .outils { display: flex; flex-wrap: wrap; gap: .15rem; padding: .3rem; border-bottom: 1px solid var(--trait); background: var(--fond); border-radius: var(--rayon-s) var(--rayon-s) 0 0; position: sticky; top: 0; z-index: 1; }
.editeur .outils button { background: none; color: var(--encre); border: 1px solid transparent; padding: .25rem .5rem; font-size: .88rem; border-radius: 6px; min-width: 32px; }
.editeur .outils button:hover { background: var(--carte); border-color: var(--trait-fort); filter: none; }
.editeur .outils .sep { width: 1px; background: var(--trait-fort); margin: .2rem .25rem; }
.editeur .zone { min-height: 180px; padding: .7rem .8rem; outline: none; line-height: 1.6; }
.editeur .zone:focus { box-shadow: inset 0 0 0 2px var(--bleu-clair); }
.editeur .zone img { max-width: 100%; height: auto; border-radius: 6px; }
.editeur .zone h2 { font-size: 1.25rem; margin: .8rem 0 .4rem; }
.editeur .zone h3 { font-size: 1.05rem; margin: .7rem 0 .3rem; }
.editeur .zone p { margin: 0 0 .6rem; }
.editeur .zone a { color: var(--bleu); }
.editeur .source { display: none; width: 100%; min-height: 180px; border: 0; padding: .7rem .8rem; font: 13px/1.5 ui-monospace, Consolas, monospace; }
.editeur.mode-source .zone { display: none; }
.editeur.mode-source .source { display: block; }

/* Aperçu Google (SEO). */
.apercu-google { border: 1px solid var(--trait); border-radius: var(--rayon-s); padding: .7rem .9rem; background: #fff; font-family: Arial, sans-serif; max-width: 600px; }
.apercu-google .url { color: #202124; font-size: .8rem; }
.apercu-google .titre { color: #1a0dab; font-size: 1.1rem; margin: .1rem 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apercu-google .desc { color: #4d5156; font-size: .85rem; }

/* Variantes. */
.tableau-variantes td { padding: .3rem .35rem; }
.tableau-variantes input { padding: .3rem .4rem; font-size: .86rem; }
.tableau-variantes .vignette { width: 34px; height: 34px; }

/* Sections ordonnables (accueil), bannières. */
.ordonnable { list-style: none; margin: 0; padding: 0; }
.ordonnable li { display: flex; align-items: center; gap: .5rem; padding: .45rem .6rem; border: 1px solid var(--trait); border-radius: 8px; margin-bottom: .35rem; background: var(--carte); }
.ordonnable li .nom { flex: 1; }
.ordonnable li .outils button { padding: .15rem .45rem; font-size: .8rem; }

/* Journal, historique. */
.trace { display: grid; grid-template-columns: 1fr; gap: .1rem; padding: .5rem 0; border-bottom: 1px solid var(--trait); font-size: .9rem; }
.trace .quand, .trace .par { color: var(--encre-douce); font-size: .8rem; }
@media (min-width: 700px) { .trace { grid-template-columns: 170px 150px 1fr; align-items: baseline; } }

/* Pagination. */
.pages { display: flex; gap: .4rem; align-items: center; justify-content: center; margin-top: .9rem; flex-wrap: wrap; }
.pages .ou { color: var(--encre-douce); font-size: .86rem; }

/* Palette de couleurs des réglages. */
.couleur { display: flex; align-items: center; gap: .5rem; }
.couleur input[type=text] { max-width: 120px; }

/* Impression d'une commande : seule la fenêtre reste. */
@media print {
  .entete-appli, .cote, #flash, .modale .fermer, .pied-modale, .voile-menu, .no-print, .onglets { display: none !important; }
  .voile { position: static; background: none; display: block; padding: 0; }
  .modale { box-shadow: none; max-height: none; width: 100%; border-radius: 0; }
  .appli { display: block; }
  .principal { padding: 0; }
  .carte { box-shadow: none; break-inside: avoid; }
  body { background: #fff; }
}

/* L'encadré « c'est une démonstration » sur la page de connexion */
.boite-demo { margin: .4rem 0 1.1rem; padding: .8rem 1rem; border: 1px solid var(--trait);
  border-left: 4px solid var(--principale); border-radius: 10px;
  background: var(--fond-doux, #f7faff); text-align: left; font-size: .9rem; }
.boite-demo p { margin: 0 0 .4rem; }
.boite-demo dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0 0 .6rem; }
.boite-demo dt { color: var(--encre-doux, #5b6472); }
.boite-demo dd { margin: 0; }
.boite-demo code { user-select: all; word-break: break-all; }

/* Modes d'emploi repliés (comptes transporteurs) */
.mode-emploi { margin: .6rem 0 0; padding: .5rem .8rem; border: 1px solid var(--trait);
  border-radius: 10px; background: var(--fond-doux, #f7faff); font-size: .9rem; }
.mode-emploi > summary { cursor: pointer; font-weight: 600; list-style: none; }
.mode-emploi > summary::-webkit-details-marker { display: none; }
.mode-emploi[open] > summary { margin-bottom: .5rem; }
.mode-emploi ol { margin: 0; padding-left: 1.3rem; }
.mode-emploi li { margin-bottom: .45rem; line-height: 1.45; }
.mode-emploi p { margin: .5rem 0 0; }

/* Recherche de nom de domaine (Mon abonnement) */
.dom-choix { display: grid; gap: .1rem; margin: .2rem 0 .4rem; }
.dom-res { display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 8px 12px; border: 1px solid var(--trait); border-radius: 10px; margin-top: 6px; }
.dom-sienne { border-color: var(--principale); background: var(--fond-doux, #f7faff); }
.dom-libre { color: #1a7f4b; font-weight: 600; }
.dom-pris { color: #b3261e; font-weight: 600; }
.dom-doute { color: #8a6d1f; font-weight: 600; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
