/* =========================================================
   Le back-office. Même univers que le site, mais réglé pour
   être opéré : tout se lit d'un coup d'œil, rien ne surprend.
   ========================================================= */

:root {
  --encre: #322619;
  --encre-lueur: #4a3826;
  --bande-haut: #6d5238;
  --bande-bas: #543e29;
  --encre-2: #3d2f20;
  --laiton: #a9762f;
  --or: #d8a75f;
  --or-clair: #f0cf94;
  --papier: #f7f0e3;
  --papier-2: #fcf7ee;
  --carte: #fffdf7;
  --texte: #3f362d;
  --texte-mute: #7c6f62;
  --ligne: #e3d7c2;
  --ligne-fine: #efe7d8;
  --sauge: #7a8f61;
  --praline: #a9605a;
  --ombre: rgba(63, 44, 22, 0.13);
  --titre: 'Pacifico', 'Brush Script MT', cursive;
  --sans: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--papier);
  color: var(--texte);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-family: var(--titre); font-weight: 400; line-height: 1.3; color: var(--encre); }
p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--laiton); outline-offset: 2px; border-radius: 3px; }

/* --- structure --------------------------------------------- */

.appli {
  display: grid;
  grid-template-columns: 232px 1fr;
  min-height: 100vh;
}

.rail {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 14px;
  background: linear-gradient(180deg, var(--bande-haut), var(--bande-bas));
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.rail__logo {
  width: 76px;
  height: 76px;
  margin: 0 auto 6px;
  background: url('/logo/mm-logo.png') center / contain no-repeat;
}

.rail__qui {
  margin-bottom: 14px;
  text-align: center;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c2ae91;
}

/* Le rail est rangé en trois groupes : ce qu'on ouvre tous les matins,
   les pages du site, et ce qui n'appartient qu'à la personne connectée. */
.rail__groupe { display: flex; flex-direction: column; gap: 4px; }
.rail__groupe + .rail__groupe { margin-top: 18px; }

.rail__titre {
  margin: 0 0 4px 12px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9a8a73;
}

.rail__item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 3px;
  color: #e0cfb4;
  font-size: 15.5px;
  text-align: left;
}

.rail__item:hover { background: rgba(255, 244, 224, 0.10); color: #e9d9be; }
.rail__item[aria-current='true'] { background: rgba(255, 244, 224, 0.16); color: #e9d9be; }

.rail__item svg { flex: none; width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.4; }

.rail__pied {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(240, 216, 174, 0.24);
  font-size: 13px;
  color: #c2ae91;
}

.rail__pied a { color: var(--or); text-decoration: none; }
.rail__pied a:hover { color: var(--or-clair); }

.ecran { padding: 26px 30px 60px; min-width: 0; }

/* Un écran peut porter plusieurs parties : le trait et le titre plus petit
   disent qu'on reste sur le même écran, on ne change pas de sujet. */
.ecran__section {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 40px 0 6px;
  padding-top: 20px;
  border-top: 1px solid var(--ligne);
}

.ecran__section h2 { font-size: 20px; }

.ecran__tete {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.ecran__tete h1 { font-size: 24px; }
.ecran__aide { max-width: 66ch; margin-bottom: 24px; color: var(--texte-mute); font-size: 15.5px; }

/* --- sélecteur de maison ------------------------------------ */

.maisons-bascule { display: flex; gap: 7px; margin-bottom: 22px; flex-wrap: wrap; }

.bascule {
  padding: 8px 16px;
  border: 1px solid var(--ligne);
  border-radius: 22px;
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--texte-mute);
}

.bascule:hover { border-color: var(--laiton); color: var(--laiton); }
.bascule[aria-pressed='true'] { background: var(--encre); border-color: var(--encre); color: #f0e5d3; }


/* --- l'etat d'un element date --------------------------------- */

.jeton {
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.jeton--enligne { background: var(--sauge); color: #fff; }
.jeton--programme { background: #f0e2c6; color: #7a5a22; }
.jeton--termine { background: var(--papier); color: var(--texte-mute); border: 1px solid var(--ligne); }
.jeton--toujours { background: var(--papier); color: var(--texte-mute); border: 1px solid var(--ligne); }
/* --- boutons ------------------------------------------------- */

.bt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 3px;
  background: var(--sauge);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: filter 0.15s ease;
}

a.bt { text-decoration: none; }
.bt:hover { filter: brightness(1.08); }
.bt[disabled] { opacity: 0.45; cursor: default; filter: none; }

.bt--fantome {
  background: #fff;
  border: 1px solid var(--ligne);
  color: #5c5145;
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  font-weight: 400;
  padding: 8px 14px;
}

.bt--fantome:hover { border-color: var(--laiton); color: var(--laiton); filter: none; }
.bt--danger { color: var(--praline); }
.bt--danger:hover { border-color: var(--praline); color: var(--praline); }

.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* --- cartes et champs ---------------------------------------- */

.bloc {
  position: relative;
  padding: 22px 24px;
  margin-bottom: 18px;
  background: var(--carte);
  border: 1px solid var(--ligne-fine);
  border-radius: 4px;
}

.bloc__tete {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.bloc__tete h3 { font-size: 18px; }
.bloc__num { font-family: var(--titre); font-size: 14px; color: var(--laiton); letter-spacing: 0.1em; }

.colonnes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 26px;
  align-items: start;
}

/* Un élément masqué reste masqué, même s'il est en flex ou en grille. */
[hidden] { display: none !important; }

.champ { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }

.champ label {
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a7c6b;
}

.champ input,
.champ select,
.champ textarea {
  width: 100%;
  padding: 9px 11px;
  background: #fff;
  border: 1px solid var(--ligne);
  border-radius: 3px;
  font-family: var(--sans);
  font-size: 15.5px;
  font-weight: 300;
  color: #2c251e;
}

.champ textarea { min-height: 84px; resize: vertical; }
.champ input:focus, .champ select:focus, .champ textarea:focus { border-color: var(--laiton); outline: none; }
.champ .aide { font-size: 12.5px; color: #9a8b78; }

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.case { display: flex; align-items: center; gap: 9px; font-size: 15px; color: #5c5145; }
.case input { width: auto; }

/* --- l'aperçu du bandeau ------------------------------------- */

.apercu-titre {
  margin-bottom: 8px;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--laiton);
}

.apercu {
  position: relative;
  overflow: hidden;
  padding: 44px 22px 28px;
  border-radius: 4px 4px 0 0;
  background:
    radial-gradient(520px 360px at 8% -10%, rgba(255, 240, 210, 0.12), transparent 62%),
    linear-gradient(180deg, var(--h-haut) 0%, var(--h-milieu) 18%, var(--h-bas) 46%);
  color: var(--h-texte);
}

/* La dentelle de l'entête, telle qu'elle tombera sur ce fond. */
.apercu__dentelle-haut {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 26px;
  background: var(--h-dentelle);
  -webkit-mask: var(--motif-apercu) 0 0 / 54px 26px repeat-x;
  mask: var(--motif-apercu) 0 0 / 54px 26px repeat-x;
  opacity: 0.9;
}

.apercu__grille { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: center; }
.apercu--photos .apercu__grille { grid-template-columns: minmax(0, 1fr) auto; }

.apercu__surtitre { font-family: 'Petit Formal Script', cursive; font-size: 15px; color: var(--h-accent); }
.apercu__titre { margin: 6px 0 10px; font-family: var(--titre); font-size: 20px; font-weight: 400; line-height: 1.3; color: var(--h-titre); }
.apercu__titre em { font-style: normal; color: var(--h-accent); }
.apercu__texte { font-size: 13px; color: var(--h-texte); }
.apercu__quand { display: flex; align-items: flex-start; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--h-accent); }
.apercu__quand svg { flex: none; width: 13px; height: 13px; margin-top: 2px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.apercu__boutons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

.apercu__bt {
  padding: 7px 13px;
  border-radius: 2px;
  background: var(--laiton);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.apercu__bt--fantome { background: transparent; border: 1px solid var(--h-fantome-bord); color: var(--h-fantome-texte); }

/* Les tirages, en 9/16, comme sur le site. */
.apercu__tirages { display: flex; align-items: center; padding: 0 6px 0 4px; }

.apercu__tirage {
  display: block;
  width: 72px;
  aspect-ratio: 9 / 16;
  border-radius: 2px;
  background: #6e5238 center / cover no-repeat;
  outline: 1px solid var(--h-filet);
  outline-offset: 3px;
  box-shadow: 0 10px 18px -8px rgba(20, 12, 6, 0.55);
}

.apercu__tirages--duo .apercu__tirage { width: 64px; }
.apercu__tirages--duo .apercu__tirage:first-child { position: relative; z-index: 2; transform: rotate(-2deg) translateY(-5px); }
.apercu__tirages--duo .apercu__tirage:last-child { margin-left: -12px; transform: rotate(2.5deg) translateY(7px); }

/* Les pastilles de couleur. */
.pastilles { display: flex; flex-wrap: wrap; gap: 8px; }

.pastille {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px 6px 7px;
  border: 1px solid var(--ligne);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: 13.5px;
  color: var(--texte);
  cursor: pointer;
}

.pastille:hover { border-color: var(--laiton); }
.pastille[aria-pressed='true'] { border-color: #3f362d; background: #3f362d; color: #fbf4e8; }
.pastille i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.15); }
.pastille:focus-visible { outline: 2px solid var(--laiton); outline-offset: 2px; }

/* --- la dentelle du bas d'aperçu ------------------------------ */

.apercu-dentelle {
  height: 48px;
  margin-top: -1px;
  -webkit-mask: var(--motif-apercu) 0 0 / 100px 48px repeat-x;
  mask: var(--motif-apercu) 0 0 / 100px 48px repeat-x;
}

/* --- dépôt de photo ------------------------------------------ */

.depot {
  padding: 18px;
  border: 1.5px dashed #d6c6ac;
  border-radius: 4px;
  background: #fbf6ec;
  text-align: center;
  font-size: 13.5px;
  color: #8a7c6b;
  cursor: pointer;
}

.depot:hover, .depot.survol { border-color: var(--laiton); background: #f8f0e2; }
.depot b { display: block; margin-bottom: 3px; font-size: 15px; font-weight: 500; color: #4a4038; }

.vignette {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--ligne);
  border-radius: 3px;
  overflow: hidden;
  background: var(--papier-2) center / cover no-repeat;
}

.vignette__nom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 5px 8px;
  background: rgba(23, 19, 16, 0.78);
  color: #e9dbc2;
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.galerie-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

/* Le message d'attente n'est pas une vignette : il prend toute la ligne. */
.galerie-photos .vide { grid-column: 1 / -1; }

/* Où vont les photos : une vignette, un libellé, une liste. */
.emplacements {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.emplacement { display: flex; gap: 14px; align-items: flex-start; }

.emplacement__vue {
  flex: 0 0 96px;
  height: 72px;
  display: grid;
  place-items: center;
  background: #f2ece1 center / cover no-repeat;
  border: 1px solid var(--ligne-fine);
  border-radius: 3px;
  font-size: 11px;
  letter-spacing: .04em;
  text-align: center;
  color: #b3a594;
}

button.emplacement__vue { padding: 0; cursor: pointer; }
button.emplacement__vue:hover { border-color: var(--laiton); }

/* Le choix d'une photo : un bouton, et la fenêtre qu'il ouvre. */
.choix-photo { display: block; }

/* Bandeau : la vignette de la photo choisie, à côté du bouton. Photos verticales, d'où le format. */
.photo-bandeau { display: flex; align-items: center; gap: 12px; }
.photo-bandeau .choix-photo { flex: 1; }
.photo-bandeau__vue { flex: 0 0 60px; height: 80px; }
button.photo-bandeau__vue:disabled { opacity: .45; cursor: default; border-color: var(--ligne-fine); }
.bt--petit { padding: 7px 13px; font-size: 13.5px; }
.zone-photo { border-radius: 4px; transition: box-shadow .15s; }
.zone-photo--survol { box-shadow: 0 0 0 2px var(--laiton); background: #f8f0e2; }

.fenetre-photos { width: min(680px, calc(100vw - 32px)); }
.fenetre-photos .depot { display: block; margin-top: 14px; }
.fenetre-photos__titre { margin: 16px 0 8px; }
.fenetre-photos__galerie {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  max-height: min(46vh, 420px);
  overflow-y: auto;
  padding: 3px;
}
.vignette--choix { padding: 0; cursor: pointer; }
.vignette--choix:hover { outline: 2px solid var(--laiton); outline-offset: 1px; }
.vignette--actuelle { outline: 3px solid var(--sauge); outline-offset: 1px; }
.fenetre-photos .actions:empty { display: none; }
.fenetre-photos .aide--erreur { color: var(--praline); }

.emplacement__bd { flex: 1 1 auto; min-width: 0; }
.emplacement__bd label { display: block; margin-bottom: 5px; font-size: 13.5px; color: var(--texte); }
.emplacement__bd select { width: 100%; }

.vignette__x {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(23, 19, 16, 0.75);
  color: #f0e2cb;
  font-size: 15.5px;
  line-height: 1;
}

.vignette__x:hover { background: var(--praline); }

/* --- lignes de plats ----------------------------------------- */

.plat-ligne {
  display: grid;
  grid-template-columns: 1.1fr 2fr 80px auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--ligne-fine);
}

.plat-ligne:last-of-type { border-bottom: 0; }
.plat-ligne .poignee { color: #b8a68f; cursor: grab; font-size: 16px; user-select: none; }

.x {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #b8a68f;
  font-size: 16px;
  line-height: 1;
}

.x:hover { background: #f6ece2; color: var(--praline); }

/* --- calendrier ---------------------------------------------- */

.mois { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.mois h4 { font-size: 16px; text-transform: capitalize; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; font-size: 13.5px; }
.cal__jour { padding: 4px 0; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: #a9998a; }

.cal__case {
  padding: 8px 0;
  border: 1px solid var(--ligne-fine);
  border-radius: 3px;
  background: #fff;
  color: #4a4038;
  font-variant-numeric: tabular-nums;
}

.cal__case:hover { border-color: var(--laiton); }
.cal__case.hors { visibility: hidden; }
.cal__case.repos { background: #f2ece1; border-style: dashed; color: #b3a594; }
.cal__case.fermee { background: var(--praline); border-color: var(--praline); color: #fff; }
.cal__case.ouverte { background: #6f8556; border-color: #6f8556; color: #fff; }

/* Jour férié : un point de laiton dans le coin, quel que soit l'état. */
.cal__case.ferie { position: relative; font-weight: 600; }
.cal__case.ferie::after {
  content: '';
  position: absolute;
  top: 3px;
  right: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--laiton);
}
.cal__case.modifiee { background: #b8873e; border-color: #b8873e; color: #fff; }
.cal__case.choisi { outline: 2px solid #4a4038; outline-offset: 1px; }
.cal__case.ferie.fermee::after, .cal__case.ferie.ouverte::after, .cal__case.ferie.modifiee::after { background: #fff; }

/* Le jour cliqué, et ce qu'on peut en faire. */
.choix-jour { margin-top: 14px; padding: 14px 16px; border: 1px solid var(--ligne-fine); border-radius: 4px; background: #fbf8f2; font-size: 14px; }
.choix-jour__tete { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.choix-jour__tete strong::first-letter { text-transform: uppercase; }
.choix-jour p { margin: 6px 0 10px; color: var(--texte-mute); }
.choix-jour__heures { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.choix-jour__heures input { width: 108px; }
.choix-jour__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ferie-ligne { cursor: pointer; }
.ferie-ligne:hover span:first-child { text-decoration: underline; }
.legende i.legende__ferie { width: 6px; height: 6px; border-radius: 50%; background: var(--laiton); margin: 0 3px; }

.feries { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--ligne-fine); }
.feries h4 { margin: 0 0 10px; font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--texte-mute); }
.ferie-ligne { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 14px; color: var(--texte-mute); }
.ferie-ligne + .ferie-ligne { border-top: 1px dashed var(--ligne-fine); }
.ferie-ligne span:first-child::first-letter { text-transform: uppercase; }
.ferie-ligne--ouvert { color: #4a4038; }
.ferie-ligne--ouvert span:last-child { font-weight: 600; }

.exceptions { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--ligne-fine); }
.exceptions h4 { margin: 0 0 10px; font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--texte-mute); }
.exception { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 14px; }
.exception + .exception { border-top: 1px dashed var(--ligne-fine); }
.exception__jour { flex: 1 1 auto; min-width: 150px; }
.exception input { width: 108px; }

.legende { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; color: var(--texte-mute); }
.legende span { display: flex; align-items: center; gap: 7px; }
.legende i { width: 12px; height: 12px; border-radius: 2px; display: block; }

/* --- barre d'enregistrement ---------------------------------- */

.barre {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 22px -30px -60px;
  padding: 14px 30px;
  background: var(--papier-2);
  border-top: 1px solid var(--ligne);
}

.barre__etat { font-size: 14px; color: var(--texte-mute); }
.barre__etat.modifie { color: var(--praline); }
.barre__etat.enregistre { color: var(--sauge); }

/* --- message flottant ---------------------------------------- */

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  max-width: 340px;
  padding: 13px 18px;
  border-radius: 4px;
  background: var(--encre);
  color: #f0e4d0;
  font-size: 15.5px;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.toast.visible { opacity: 1; transform: none; }
.toast.erreur { background: var(--praline); }

.vide { padding: 30px; text-align: center; color: var(--texte-mute); font-size: 15.5px; }

/* --- le menu en image ------------------------------------------ */

.fenetre-image {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 20px 22px;
  border: 1px solid var(--ligne);
  border-radius: 6px;
  background: var(--carte);
  color: var(--texte);
  box-shadow: 0 18px 50px var(--ombre);
}

.fenetre-image::backdrop { background: rgba(50, 38, 25, 0.45); }
/* L'A4 à l'horizontale : une fenêtre plus large pour le voir en grand. */
.fenetre-image--large { width: min(860px, calc(100vw - 32px)); }

.fenetre-image__tete { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.fenetre-image__tete h2 { font-size: 21px; }
.fenetre-image__formats { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 8px; }

.fenetre-image__apercu {
  display: grid;
  place-items: center;
  aspect-ratio: 1080 / 1350;
  max-height: calc(100vh - 280px);
  margin: 12px auto 0;
  border: 1px solid var(--ligne);
  background: var(--papier);
}

.fenetre-image__apercu img { width: 100%; height: 100%; object-fit: contain; display: block; }
.fenetre-image .aide { font-size: 13.5px; color: #9a8b78; }
.fenetre-image [data-message]:empty { display: none; }
.fenetre-image [data-message] { margin-top: 10px; }

/* --- les textes des pages, avec l'aperçu de la page à côté ---- */

.textes-apercu {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 22px;
  align-items: start;
}

.textes-apercu > .bloc { margin-bottom: 0; }

/* L'aperçu reste sous les yeux pendant qu'on descend dans les champs. */
.apercu-page { position: sticky; top: 16px; }

.apercu-page__tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.apercu-page__tete .apercu-titre { margin: 0; }
.apercu-page__vues { display: flex; gap: 6px; }
.apercu-page__vues .bascule { padding: 5px 11px; font-size: 11px; }

.apercu-page__cadre {
  position: relative;
  overflow: hidden;
  height: max(420px, calc(100vh - 200px));
  background: var(--papier-2);
  border: 1px solid var(--ligne);
  border-radius: 4px;
}

.apercu-page__cadre iframe {
  position: absolute;
  top: 0;
  left: 0;
  border: 0;
  transform-origin: 0 0;
  background: #fff;
}

.apercu-page__vide { padding: 40px 20px; text-align: center; color: var(--texte-mute); }
.apercu-page__etat { min-height: 1.4em; margin: 6px 0 0; font-size: 13.5px; color: var(--texte-mute); }

@media (max-width: 1100px) {
  .textes-apercu { grid-template-columns: minmax(0, 1fr); }
  /* Sur un écran étroit, l'aperçu passe au-dessus des champs. */
  .apercu-page { position: static; order: -1; }
  .apercu-page__cadre { height: 55vh; }
}

@media (max-width: 860px) {
  .appli { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; flex-direction: row; overflow-x: auto; align-items: center; }
  .rail__logo, .rail__qui, .rail__pied, .rail__titre { display: none; }
  .rail__item { white-space: nowrap; }
  .rail__groupe { flex-direction: row; align-items: center; }
  .rail__groupe + .rail__groupe {
    margin: 0 0 0 4px;
    padding-left: 8px;
    border-left: 1px solid rgba(240, 216, 174, 0.24);
  }
  .ecran { padding: 20px 18px 60px; }
  .barre { margin: 22px -18px -60px; padding: 14px 18px; }
  .plat-ligne { grid-template-columns: 1fr auto; }
}

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

/* Le motif de dentelle, partagé par la dentelle du haut et du bas d'aperçu. */
:root { --motif-apercu: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 283 136' preserveAspectRatio='none'%3E%3Cdefs%3E%3Cmask id='d'%3E%3Crect width='283' height='7' fill='%23fff'/%3E%3Cg fill='%23fff'%3E%3Ccircle cx='-141.5' cy='-8' r='117'/%3E%3Ccircle cx='-27.5' cy='-8' r='25'/%3E%3Ccircle cx='-36.18' cy='35.63' r='25'/%3E%3Ccircle cx='-60.89' cy='72.61' r='25'/%3E%3Ccircle cx='-97.87' cy='97.32' r='25'/%3E%3Ccircle cx='-141.5' cy='106' r='25'/%3E%3Ccircle cx='-185.13' cy='97.32' r='25'/%3E%3Ccircle cx='-222.11' cy='72.61' r='25'/%3E%3Ccircle cx='-246.82' cy='35.63' r='25'/%3E%3Ccircle cx='-255.5' cy='-8' r='25'/%3E%3Ccircle cx='141.5' cy='-8' r='117'/%3E%3Ccircle cx='255.5' cy='-8' r='25'/%3E%3Ccircle cx='246.82' cy='35.63' r='25'/%3E%3Ccircle cx='222.11' cy='72.61' r='25'/%3E%3Ccircle cx='185.13' cy='97.32' r='25'/%3E%3Ccircle cx='141.5' cy='106' r='25'/%3E%3Ccircle cx='97.87' cy='97.32' r='25'/%3E%3Ccircle cx='60.89' cy='72.61' r='25'/%3E%3Ccircle cx='36.18' cy='35.63' r='25'/%3E%3Ccircle cx='27.5' cy='-8' r='25'/%3E%3Ccircle cx='424.5' cy='-8' r='117'/%3E%3Ccircle cx='538.5' cy='-8' r='25'/%3E%3Ccircle cx='529.82' cy='35.63' r='25'/%3E%3Ccircle cx='505.11' cy='72.61' r='25'/%3E%3Ccircle cx='468.13' cy='97.32' r='25'/%3E%3Ccircle cx='424.5' cy='106' r='25'/%3E%3Ccircle cx='380.87' cy='97.32' r='25'/%3E%3Ccircle cx='343.89' cy='72.61' r='25'/%3E%3Ccircle cx='319.18' cy='35.63' r='25'/%3E%3Ccircle cx='310.5' cy='-8' r='25'/%3E%3C/g%3E%3Cg fill='%23000' stroke='%23000' stroke-width='1.6' stroke-linejoin='round'%3E%3Ccircle cx='-20.5' cy='-8' r='3.4'/%3E%3Ccircle cx='-29.71' cy='38.3' r='3.4'/%3E%3Ccircle cx='-55.94' cy='77.56' r='3.4'/%3E%3Ccircle cx='-95.2' cy='103.79' r='3.4'/%3E%3Ccircle cx='-141.5' cy='113' r='3.4'/%3E%3Ccircle cx='-187.8' cy='103.79' r='3.4'/%3E%3Ccircle cx='-227.06' cy='77.56' r='3.4'/%3E%3Ccircle cx='-253.29' cy='38.3' r='3.4'/%3E%3Ccircle cx='-262.5' cy='-8' r='3.4'/%3E%3Cellipse cx='-115.09' cy='-2.39' rx='3.3' ry='7.5' transform='rotate(-78 -115.09 -2.39)'/%3E%3Cellipse cx='-120.22' cy='8.62' rx='3.3' ry='7.5' transform='rotate(-52 -120.22 8.62)'/%3E%3Cellipse cx='-129.66' cy='16.27' rx='3.3' ry='7.5' transform='rotate(-26 -129.66 16.27)'/%3E%3Cellipse cx='-141.5' cy='19' rx='3.3' ry='7.5' transform='rotate(0 -141.5 19)'/%3E%3Cellipse cx='-153.34' cy='16.27' rx='3.3' ry='7.5' transform='rotate(26 -153.34 16.27)'/%3E%3Cellipse cx='-162.78' cy='8.62' rx='3.3' ry='7.5' transform='rotate(52 -162.78 8.62)'/%3E%3Cellipse cx='-167.91' cy='-2.39' rx='3.3' ry='7.5' transform='rotate(78 -167.91 -2.39)'/%3E%3Ccircle cx='-141.5' cy='-8' r='44' fill='none' stroke='%23000' stroke-width='1.8'/%3E%3Cpath d='M-89.6 -4.75L-59.56 -4.75A82 82 0 0 1 -61.52 10.07L-90.53 2.29A52 52 0 0 0 -89.6 -4.75Z'/%3E%3Cpath d='M-92.21 8.57L-63.2 16.35A82 82 0 0 1 -68.92 30.15L-94.93 15.13A52 52 0 0 0 -92.21 8.57Z'/%3E%3Cpath d='M-98.18 20.76L-72.17 35.78A82 82 0 0 1 -81.26 47.64L-102.5 26.4A52 52 0 0 0 -98.18 20.76Z'/%3E%3Cpath d='M-107.1 31L-85.86 52.24A82 82 0 0 1 -97.72 61.33L-112.74 35.32A52 52 0 0 0 -107.1 31Z'/%3E%3Cpath d='M-118.37 38.57L-103.35 64.58A82 82 0 0 1 -117.15 70.3L-124.93 41.29A52 52 0 0 0 -118.37 38.57Z'/%3E%3Cpath d='M-131.21 42.97L-123.43 71.98A82 82 0 0 1 -138.25 73.94L-138.25 43.9A52 52 0 0 0 -131.21 42.97Z'/%3E%3Cpath d='M-144.75 43.9L-144.75 73.94A82 82 0 0 1 -159.57 71.98L-151.79 42.97A52 52 0 0 0 -144.75 43.9Z'/%3E%3Cpath d='M-158.07 41.29L-165.85 70.3A82 82 0 0 1 -179.65 64.58L-164.63 38.57A52 52 0 0 0 -158.07 41.29Z'/%3E%3Cpath d='M-170.26 35.32L-185.28 61.33A82 82 0 0 1 -197.14 52.24L-175.9 31A52 52 0 0 0 -170.26 35.32Z'/%3E%3Cpath d='M-180.5 26.4L-201.74 47.64A82 82 0 0 1 -210.83 35.78L-184.82 20.76A52 52 0 0 0 -180.5 26.4Z'/%3E%3Cpath d='M-188.07 15.13L-214.08 30.15A82 82 0 0 1 -219.8 16.35L-190.79 8.57A52 52 0 0 0 -188.07 15.13Z'/%3E%3Cpath d='M-192.47 2.29L-221.48 10.07A82 82 0 0 1 -223.44 -4.75L-193.4 -4.75A52 52 0 0 0 -192.47 2.29Z'/%3E%3Ccircle cx='-44.71' cy='-1.66' r='2.5'/%3E%3Ccircle cx='-46.36' cy='10.92' r='2.5'/%3E%3Ccircle cx='-49.65' cy='23.18' r='2.5'/%3E%3Ccircle cx='-54.5' cy='34.9' r='2.5'/%3E%3Ccircle cx='-60.85' cy='45.89' r='2.5'/%3E%3Ccircle cx='-68.57' cy='55.96' r='2.5'/%3E%3Ccircle cx='-77.54' cy='64.93' r='2.5'/%3E%3Ccircle cx='-87.61' cy='72.65' r='2.5'/%3E%3Ccircle cx='-98.6' cy='79' r='2.5'/%3E%3Ccircle cx='-110.32' cy='83.85' r='2.5'/%3E%3Ccircle cx='-122.58' cy='87.14' r='2.5'/%3E%3Ccircle cx='-135.16' cy='88.79' r='2.5'/%3E%3Ccircle cx='-147.84' cy='88.79' r='2.5'/%3E%3Ccircle cx='-160.42' cy='87.14' r='2.5'/%3E%3Ccircle cx='-172.68' cy='83.85' r='2.5'/%3E%3Ccircle cx='-184.4' cy='79' r='2.5'/%3E%3Ccircle cx='-195.39' cy='72.65' r='2.5'/%3E%3Ccircle cx='-205.46' cy='64.93' r='2.5'/%3E%3Ccircle cx='-214.43' cy='55.96' r='2.5'/%3E%3Ccircle cx='-222.15' cy='45.89' r='2.5'/%3E%3Ccircle cx='-228.5' cy='34.9' r='2.5'/%3E%3Ccircle cx='-233.35' cy='23.18' r='2.5'/%3E%3Ccircle cx='-236.64' cy='10.92' r='2.5'/%3E%3Ccircle cx='-238.29' cy='-1.66' r='2.5'/%3E%3Ccircle cx='262.5' cy='-8' r='3.4'/%3E%3Ccircle cx='253.29' cy='38.3' r='3.4'/%3E%3Ccircle cx='227.06' cy='77.56' r='3.4'/%3E%3Ccircle cx='187.8' cy='103.79' r='3.4'/%3E%3Ccircle cx='141.5' cy='113' r='3.4'/%3E%3Ccircle cx='95.2' cy='103.79' r='3.4'/%3E%3Ccircle cx='55.94' cy='77.56' r='3.4'/%3E%3Ccircle cx='29.71' cy='38.3' r='3.4'/%3E%3Ccircle cx='20.5' cy='-8' r='3.4'/%3E%3Cellipse cx='167.91' cy='-2.39' rx='3.3' ry='7.5' transform='rotate(-78 167.91 -2.39)'/%3E%3Cellipse cx='162.78' cy='8.62' rx='3.3' ry='7.5' transform='rotate(-52 162.78 8.62)'/%3E%3Cellipse cx='153.34' cy='16.27' rx='3.3' ry='7.5' transform='rotate(-26 153.34 16.27)'/%3E%3Cellipse cx='141.5' cy='19' rx='3.3' ry='7.5' transform='rotate(0 141.5 19)'/%3E%3Cellipse cx='129.66' cy='16.27' rx='3.3' ry='7.5' transform='rotate(26 129.66 16.27)'/%3E%3Cellipse cx='120.22' cy='8.62' rx='3.3' ry='7.5' transform='rotate(52 120.22 8.62)'/%3E%3Cellipse cx='115.09' cy='-2.39' rx='3.3' ry='7.5' transform='rotate(78 115.09 -2.39)'/%3E%3Ccircle cx='141.5' cy='-8' r='44' fill='none' stroke='%23000' stroke-width='1.8'/%3E%3Cpath d='M193.4 -4.75L223.44 -4.75A82 82 0 0 1 221.48 10.07L192.47 2.29A52 52 0 0 0 193.4 -4.75Z'/%3E%3Cpath d='M190.79 8.57L219.8 16.35A82 82 0 0 1 214.08 30.15L188.07 15.13A52 52 0 0 0 190.79 8.57Z'/%3E%3Cpath d='M184.82 20.76L210.83 35.78A82 82 0 0 1 201.74 47.64L180.5 26.4A52 52 0 0 0 184.82 20.76Z'/%3E%3Cpath d='M175.9 31L197.14 52.24A82 82 0 0 1 185.28 61.33L170.26 35.32A52 52 0 0 0 175.9 31Z'/%3E%3Cpath d='M164.63 38.57L179.65 64.58A82 82 0 0 1 165.85 70.3L158.07 41.29A52 52 0 0 0 164.63 38.57Z'/%3E%3Cpath d='M151.79 42.97L159.57 71.98A82 82 0 0 1 144.75 73.94L144.75 43.9A52 52 0 0 0 151.79 42.97Z'/%3E%3Cpath d='M138.25 43.9L138.25 73.94A82 82 0 0 1 123.43 71.98L131.21 42.97A52 52 0 0 0 138.25 43.9Z'/%3E%3Cpath d='M124.93 41.29L117.15 70.3A82 82 0 0 1 103.35 64.58L118.37 38.57A52 52 0 0 0 124.93 41.29Z'/%3E%3Cpath d='M112.74 35.32L97.72 61.33A82 82 0 0 1 85.86 52.24L107.1 31A52 52 0 0 0 112.74 35.32Z'/%3E%3Cpath d='M102.5 26.4L81.26 47.64A82 82 0 0 1 72.17 35.78L98.18 20.76A52 52 0 0 0 102.5 26.4Z'/%3E%3Cpath d='M94.93 15.13L68.92 30.15A82 82 0 0 1 63.2 16.35L92.21 8.57A52 52 0 0 0 94.93 15.13Z'/%3E%3Cpath d='M90.53 2.29L61.52 10.07A82 82 0 0 1 59.56 -4.75L89.6 -4.75A52 52 0 0 0 90.53 2.29Z'/%3E%3Ccircle cx='238.29' cy='-1.66' r='2.5'/%3E%3Ccircle cx='236.64' cy='10.92' r='2.5'/%3E%3Ccircle cx='233.35' cy='23.18' r='2.5'/%3E%3Ccircle cx='228.5' cy='34.9' r='2.5'/%3E%3Ccircle cx='222.15' cy='45.89' r='2.5'/%3E%3Ccircle cx='214.43' cy='55.96' r='2.5'/%3E%3Ccircle cx='205.46' cy='64.93' r='2.5'/%3E%3Ccircle cx='195.39' cy='72.65' r='2.5'/%3E%3Ccircle cx='184.4' cy='79' r='2.5'/%3E%3Ccircle cx='172.68' cy='83.85' r='2.5'/%3E%3Ccircle cx='160.42' cy='87.14' r='2.5'/%3E%3Ccircle cx='147.84' cy='88.79' r='2.5'/%3E%3Ccircle cx='135.16' cy='88.79' r='2.5'/%3E%3Ccircle cx='122.58' cy='87.14' r='2.5'/%3E%3Ccircle cx='110.32' cy='83.85' r='2.5'/%3E%3Ccircle cx='98.6' cy='79' r='2.5'/%3E%3Ccircle cx='87.61' cy='72.65' r='2.5'/%3E%3Ccircle cx='77.54' cy='64.93' r='2.5'/%3E%3Ccircle cx='68.57' cy='55.96' r='2.5'/%3E%3Ccircle cx='60.85' cy='45.89' r='2.5'/%3E%3Ccircle cx='54.5' cy='34.9' r='2.5'/%3E%3Ccircle cx='49.65' cy='23.18' r='2.5'/%3E%3Ccircle cx='46.36' cy='10.92' r='2.5'/%3E%3Ccircle cx='44.71' cy='-1.66' r='2.5'/%3E%3Ccircle cx='545.5' cy='-8' r='3.4'/%3E%3Ccircle cx='536.29' cy='38.3' r='3.4'/%3E%3Ccircle cx='510.06' cy='77.56' r='3.4'/%3E%3Ccircle cx='470.8' cy='103.79' r='3.4'/%3E%3Ccircle cx='424.5' cy='113' r='3.4'/%3E%3Ccircle cx='378.2' cy='103.79' r='3.4'/%3E%3Ccircle cx='338.94' cy='77.56' r='3.4'/%3E%3Ccircle cx='312.71' cy='38.3' r='3.4'/%3E%3Ccircle cx='303.5' cy='-8' r='3.4'/%3E%3Cellipse cx='450.91' cy='-2.39' rx='3.3' ry='7.5' transform='rotate(-78 450.91 -2.39)'/%3E%3Cellipse cx='445.78' cy='8.62' rx='3.3' ry='7.5' transform='rotate(-52 445.78 8.62)'/%3E%3Cellipse cx='436.34' cy='16.27' rx='3.3' ry='7.5' transform='rotate(-26 436.34 16.27)'/%3E%3Cellipse cx='424.5' cy='19' rx='3.3' ry='7.5' transform='rotate(0 424.5 19)'/%3E%3Cellipse cx='412.66' cy='16.27' rx='3.3' ry='7.5' transform='rotate(26 412.66 16.27)'/%3E%3Cellipse cx='403.22' cy='8.62' rx='3.3' ry='7.5' transform='rotate(52 403.22 8.62)'/%3E%3Cellipse cx='398.09' cy='-2.39' rx='3.3' ry='7.5' transform='rotate(78 398.09 -2.39)'/%3E%3Ccircle cx='424.5' cy='-8' r='44' fill='none' stroke='%23000' stroke-width='1.8'/%3E%3Cpath d='M476.4 -4.75L506.44 -4.75A82 82 0 0 1 504.48 10.07L475.47 2.29A52 52 0 0 0 476.4 -4.75Z'/%3E%3Cpath d='M473.79 8.57L502.8 16.35A82 82 0 0 1 497.08 30.15L471.07 15.13A52 52 0 0 0 473.79 8.57Z'/%3E%3Cpath d='M467.82 20.76L493.83 35.78A82 82 0 0 1 484.74 47.64L463.5 26.4A52 52 0 0 0 467.82 20.76Z'/%3E%3Cpath d='M458.9 31L480.14 52.24A82 82 0 0 1 468.28 61.33L453.26 35.32A52 52 0 0 0 458.9 31Z'/%3E%3Cpath d='M447.63 38.57L462.65 64.58A82 82 0 0 1 448.85 70.3L441.07 41.29A52 52 0 0 0 447.63 38.57Z'/%3E%3Cpath d='M434.79 42.97L442.57 71.98A82 82 0 0 1 427.75 73.94L427.75 43.9A52 52 0 0 0 434.79 42.97Z'/%3E%3Cpath d='M421.25 43.9L421.25 73.94A82 82 0 0 1 406.43 71.98L414.21 42.97A52 52 0 0 0 421.25 43.9Z'/%3E%3Cpath d='M407.93 41.29L400.15 70.3A82 82 0 0 1 386.35 64.58L401.37 38.57A52 52 0 0 0 407.93 41.29Z'/%3E%3Cpath d='M395.74 35.32L380.72 61.33A82 82 0 0 1 368.86 52.24L390.1 31A52 52 0 0 0 395.74 35.32Z'/%3E%3Cpath d='M385.5 26.4L364.26 47.64A82 82 0 0 1 355.17 35.78L381.18 20.76A52 52 0 0 0 385.5 26.4Z'/%3E%3Cpath d='M377.93 15.13L351.92 30.15A82 82 0 0 1 346.2 16.35L375.21 8.57A52 52 0 0 0 377.93 15.13Z'/%3E%3Cpath d='M373.53 2.29L344.52 10.07A82 82 0 0 1 342.56 -4.75L372.6 -4.75A52 52 0 0 0 373.53 2.29Z'/%3E%3Ccircle cx='521.29' cy='-1.66' r='2.5'/%3E%3Ccircle cx='519.64' cy='10.92' r='2.5'/%3E%3Ccircle cx='516.35' cy='23.18' r='2.5'/%3E%3Ccircle cx='511.5' cy='34.9' r='2.5'/%3E%3Ccircle cx='505.15' cy='45.89' r='2.5'/%3E%3Ccircle cx='497.43' cy='55.96' r='2.5'/%3E%3Ccircle cx='488.46' cy='64.93' r='2.5'/%3E%3Ccircle cx='478.39' cy='72.65' r='2.5'/%3E%3Ccircle cx='467.4' cy='79' r='2.5'/%3E%3Ccircle cx='455.68' cy='83.85' r='2.5'/%3E%3Ccircle cx='443.42' cy='87.14' r='2.5'/%3E%3Ccircle cx='430.84' cy='88.79' r='2.5'/%3E%3Ccircle cx='418.16' cy='88.79' r='2.5'/%3E%3Ccircle cx='405.58' cy='87.14' r='2.5'/%3E%3Ccircle cx='393.32' cy='83.85' r='2.5'/%3E%3Ccircle cx='381.6' cy='79' r='2.5'/%3E%3Ccircle cx='370.61' cy='72.65' r='2.5'/%3E%3Ccircle cx='360.54' cy='64.93' r='2.5'/%3E%3Ccircle cx='351.57' cy='55.96' r='2.5'/%3E%3Ccircle cx='343.85' cy='45.89' r='2.5'/%3E%3Ccircle cx='337.5' cy='34.9' r='2.5'/%3E%3Ccircle cx='332.65' cy='23.18' r='2.5'/%3E%3Ccircle cx='329.36' cy='10.92' r='2.5'/%3E%3Ccircle cx='327.71' cy='-1.66' r='2.5'/%3E%3C/g%3E%3C/mask%3E%3C/defs%3E%3Crect width='283' height='136' fill='%23fff' mask='url(%23d)'/%3E%3C/svg%3E"); }

/* ---------------------------------------------------------
   Les commandes et les gâteaux
   --------------------------------------------------------- */

.ecran__tete { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.pastille-rail {
  margin-left: auto;
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #a9605a;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.nas-ok {
  margin: 0 0 18px;
  padding: 12px 16px;
  border-left: 3px solid var(--sauge);
  background: var(--papier);
  font-size: 14px;
}

.alerte {
  margin: 0 0 18px;
  padding: 12px 16px;
  border-left: 3px solid #d8a75f;
  background: #fbf3e3;
  color: #6b5132;
  font-size: 14px;
}

.filtres { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 20px; margin-bottom: 14px; }
.filtres .maisons-bascule { margin: 0; }
.bascule .compte { margin-left: 4px; opacity: 0.65; font-variant-numeric: tabular-nums; }

.jeton--en-attente { background: #f6e3c4; color: #7a5212; }
.jeton--validee { background: var(--sauge); color: #fff; }
.jeton--retiree { background: var(--papier); color: var(--texte-mute); border: 1px solid var(--ligne); }
.jeton--refusee,
.jeton--annulee { background: #f3dcd9; color: #8e4540; }

.jeton--a-payer { background: var(--papier); color: var(--texte-mute); border: 1px solid var(--ligne); }
.jeton--non-payee { background: var(--papier); color: #8e4540; border: 1px dashed #d9b3ae; }
/* --- les e-mails envoyés ------------------------------------ */

.envois { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--ligne); font-size: 14.5px; }
.envois th { padding: 10px 12px; border-bottom: 1px solid var(--ligne); text-align: left; font-size: 11.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--texte-mute); }
.envois td { padding: 10px 12px; border-top: 1px solid var(--ligne-fine); vertical-align: top; }
.envois__quand { white-space: nowrap; color: var(--texte-mute); font-variant-numeric: tabular-nums; }
.envois__type { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--papier); border: 1px solid var(--ligne); font-size: 12px; white-space: nowrap; }
.envois__a { min-width: 200px; overflow-wrap: anywhere; }
.envois__sujet { color: var(--texte); }
.envois__raison { display: block; margin-top: 3px; font-size: 12.5px; color: #8e4540; }
.envois tr[data-ouvrir-commande] { cursor: pointer; }
.envois tr[data-ouvrir-commande]:hover td { background: #fbf6ec; }
.envois__lien { font-size: 12.5px; color: var(--laiton); white-space: nowrap; }
.jeton--envoye, .jeton--differe { background: var(--papier); color: var(--texte-mute); border: 1px solid var(--ligne); }
.jeton--delivre { background: #e4ead8; color: #3f4b26; }
.jeton--ouvert { background: var(--sauge); color: #fff; }
.jeton--non-parti, .jeton--rejete, .jeton--bloque, .jeton--indesirables, .jeton--erreur { background: #f3dcd9; color: #8e4540; }
/* --- paramétrage ------------------------------------------ */

.param-tableau { width: 100%; border-collapse: collapse; font-size: 14.5px; margin-bottom: 10px; }
.param-tableau th { padding: 8px 10px 8px 0; text-align: left; font-weight: 500; vertical-align: middle; }
.param-tableau thead th { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--texte-mute); }
.param-tableau td { padding: 6px 6px 6px 0; }
.param-tableau input { width: 100%; min-width: 170px; }
.param-sans { color: var(--texte-mute); text-align: center; }
.param-test { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--ligne-fine); }
.param-test .champ { margin: 0; min-width: 220px; }
.param-service { margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--ligne); border-radius: 4px; }
.param-service legend { padding: 0 6px; font-weight: 500; }
.param-cle { display: grid; grid-template-columns: minmax(240px, auto) minmax(150px, auto) 1fr auto auto; align-items: center; gap: 10px; padding: 6px 0; }
.param-cle code, .param-hebergement code { font-size: 12.5px; }
.jeton--ici { background: #e4ead8; color: #3f4b26; }
.jeton--cpanel { background: var(--papier); color: var(--texte-mute); border: 1px solid var(--ligne); }
.jeton--vide { background: #f6e3c4; color: #7a5212; }
.param-hebergement summary { cursor: pointer; font-weight: 500; }

@media (max-width: 760px) {
  .param-tableau thead { display: none; }
  .param-tableau, .param-tableau tbody, .param-tableau tr, .param-tableau th, .param-tableau td { display: block; width: 100%; }
  .param-tableau tr { padding: 10px 0; border-top: 1px solid var(--ligne-fine); }
  .param-tableau input { min-width: 0; }
  .param-tableau td[data-colonne]::before { content: attr(data-colonne); display: block; margin: 6px 0 3px; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--texte-mute); }
  .param-sans { display: none !important; }
  .param-cle { grid-template-columns: 1fr; }
}

.commande--reperee { outline: 3px solid #d8a75f; outline-offset: 3px; transition: outline-color 1.5s ease; }

@media (max-width: 760px) {
  .envois thead { display: none; }
  .envois, .envois tbody, .envois tr, .envois td { display: block; width: 100%; }
  .envois tr { padding: 10px 12px; border-top: 1px solid var(--ligne-fine); }
  .envois td { padding: 2px 0; border: 0; }
}

.jeton--test { margin-left: 6px; padding: 1px 8px; background: #efe6f7; color: #5b3f78; font-size: 11px; }

.commande--en-attente { border-left: 3px solid #d8a75f; }
.commande--non-payee { opacity: .75; }

/* Ce qui est payé en ligne, et ce qu'il reste à encaisser au comptoir. */
.commande__paiement { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin: 0 0 12px; padding: 10px 12px; background: #eef1e7; border-left: 3px solid var(--sauge); font-size: 14.5px; }
.commande__paiement b { font-weight: 600; font-variant-numeric: tabular-nums; }
.commande__paiement--attente { background: var(--papier); border-left-color: var(--ligne); color: var(--texte-mute); }
.commande__solde { color: #7a5212; }
.commande__solde--rien { color: var(--texte-mute); }
.commande__rembourse { color: #8e4540; font-weight: 500; }

.commande__retrait { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 10px; font-size: 15.5px; }
.commande__retrait b { font-weight: 500; }
.commande__charge { font-size: 13px; color: var(--texte-mute); font-variant-numeric: tabular-nums; }
.commande__charge.plein { color: #a9605a; font-weight: 500; }

.commande__lignes { width: 100%; border-collapse: collapse; margin: 4px 0 12px; font-size: 14.5px; }
.commande__lignes td { padding: 6px 8px 6px 0; border-top: 1px solid var(--ligne-fine); vertical-align: top; }
.commande__lignes td:first-child { width: 42px; color: var(--texte-mute); font-variant-numeric: tabular-nums; }
.commande__detail { display: block; font-size: 13px; color: var(--texte-mute); }
.commande__prix { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.commande__total td { font-weight: 600; border-top: 1px solid var(--ligne); }

.commande__client { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--texte-mute); }
.commande__client a { color: var(--laiton); }
.commande__message { margin: 10px 0 0; padding: 10px 12px; background: var(--papier); font-size: 14px; font-style: italic; }

.cases-ligne { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-top: 4px; }
.bloc--retire { opacity: 0.6; }

/* Les sortes d'un gâteau */
.sortes { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--ligne); }
.sortes__tete { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.sortes__tete h4 { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--texte); }
.sorte { padding: 8px 0; border-top: 1px solid var(--ligne-fine); }
.sorte--pause .sorte__nom { color: var(--texte-mute); text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }
.sorte__ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.sorte__ligne .case { min-width: 96px; font-size: 13px; }
.sorte__nom { flex: 1 1 220px; min-width: 0; }
.sorte__prix { display: inline-flex; align-items: center; gap: 6px; }
.sorte__prix input { width: 72px; }
.sorte__plus { margin: 6px 0 0 108px; }
.sorte__plus summary { cursor: pointer; font-size: 13px; color: var(--laiton); }
.sorte__plus .duo { margin-top: 8px; }
.commande__sorte { font-weight: 500; }

/* Les goûts d'une sorte : ce qu'ils cochent devient un filtre du site. */
.sorte__gouts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 8px 0 0 108px; }
.sorte--pause .sorte__gouts { opacity: .55; }
.gouts-choix { display: flex; flex-wrap: wrap; gap: 6px; }
.gout-choix {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px 3px 8px;
  border: 1px dashed var(--ligne); border-radius: 999px;
  background: transparent;
  font-size: 13px; color: var(--texte-mute);
}
.gout-choix:hover { border-color: var(--c); }
.gout-choix__point { width: 8px; height: 8px; border-radius: 50%; background: var(--c); opacity: .35; }
.gout-choix[aria-pressed='true'] {
  border-style: solid; border-color: var(--c);
  background: color-mix(in srgb, var(--c) 13%, var(--carte));
  color: var(--encre); font-weight: 500;
}
.gout-choix[aria-pressed='true'] .gout-choix__point { opacity: 1; }
@media (max-width: 700px) { .sorte__gouts { margin-left: 0; } }
@media (max-width: 700px) { .sorte__plus { margin-left: 0; } }

/* Les champs d'une sorte prennent le même habit que les autres. */
.sorte__ligne input[type='text'] {
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--ligne);
  border-radius: 3px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 300;
  color: #2c251e;
}
.sorte__ligne input[type='text']:focus-visible { outline: 2px solid var(--laiton); outline-offset: 1px; }

/* Ouvrir ou fermer les commandes, adresse par adresse. */
.ventes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.vente { display: grid; gap: 12px; align-content: start; padding: 16px 18px; border: 1px solid var(--ligne); border-radius: 4px; background: var(--papier-2); }
.vente--fermee { border-color: var(--praline); background: color-mix(in srgb, var(--praline) 6%, var(--carte)); }
.vente__tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vente__tete h4 { font-size: 21px; }
.vente .actions { margin: 0; }
.vente__jours { display: grid; gap: 8px; padding-top: 12px; border-top: 1px dashed var(--ligne); }
.vente__jours > label { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--texte); }
.vente__ajout { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.vente__ajout input[type='date'], .vente input[type='date'] { font: inherit; font-size: 15px; padding: 7px 10px; border: 1px solid var(--ligne); border-radius: 3px; background: var(--carte); color: var(--texte); }
.jours-complets { display: flex; flex-wrap: wrap; gap: 6px; }
.jour-complet { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 11px; border-radius: 999px; background: var(--encre); color: var(--sur-bande, #f8f0e1); font-size: 13.5px; }
.jour-complet .x { color: var(--or-clair); }

/* ---------------------------------------------------------
   Les comptes, la connexion et le répondeur
   --------------------------------------------------------- */

.rail__sortant { margin-left: auto; font-size: 13px; opacity: 0.7; }
a.rail__item { text-decoration: none; }

/* Centrée, mais sans jamais couper le haut de la carte sur un petit écran. */
.connexion { display: flex; min-height: 100vh; padding: 24px; background: linear-gradient(180deg, var(--bande-haut), var(--bande-bas)); }
.connexion__carte { margin: auto; width: 100%; max-width: 400px; padding: 30px 30px 26px; background: var(--carte); border-radius: 5px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.55); }
.connexion__logo { width: 92px; height: 92px; margin-bottom: 10px; }
.connexion h1 { margin-bottom: 18px; text-align: center; font-size: 24px; }
.connexion__intro { margin: -6px 0 18px; color: var(--texte-mute); font-size: 15px; }
.connexion__erreur { min-height: 22px; margin: 10px 0 4px; color: var(--praline); font-size: 14.5px; }
.connexion__bouton { justify-content: center; width: 100%; padding: 13px 18px; }
.connexion__aide { margin-top: 16px; text-align: center; color: var(--texte-mute); font-size: 13.5px; }

.courriel { border: 1px solid var(--ligne); border-radius: 4px; background: #fff; font-size: 14.5px; }
.courriel__tete { padding: 12px 16px; border-bottom: 1px solid var(--ligne-fine); color: #5c5145; overflow-wrap: anywhere; }
.courriel__tete span:first-child { display: inline-block; min-width: 50px; color: var(--texte-mute); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }
.courriel__tete b { font-weight: 500; }
.courriel__corps { min-height: 160px; padding: 16px; white-space: pre-wrap; color: #2c251e; }
.courriel__corps:empty::before, .courriel__tete b:empty::before { content: '…'; color: var(--texte-mute); }

.compte__tete { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 14px; }
.compte__tete h3 { font-size: 18px; }
.compte__identifiant { font-size: 14px; color: var(--texte-mute); }
.compte__provisoire { margin: 14px 0 0; }
.compte__provisoire code { padding: 2px 8px; background: #fff; border: 1px solid var(--ligne); border-radius: 3px; font-size: 16px; font-weight: 500; letter-spacing: 0.02em; user-select: all; }

@media (max-width: 860px) {
  .rail__sortant { margin-left: 4px; }
}
/* --- l'écran « Ma boîte mail » ------------------------------- */

.bloc__aide { max-width: 70ch; margin: -6px 0 16px; color: var(--texte-mute); font-size: 14.5px; }
.bloc__aide b { font-weight: 500; color: var(--texte); }
.bloc__pied { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--ligne-fine); }

.espace { max-width: 520px; }
.espace__chiffres { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; font-size: 15px; font-variant-numeric: tabular-nums; }
.espace__chiffres b { font-weight: 500; }
.espace__jauge { height: 10px; border-radius: 5px; background: var(--ligne-fine); overflow: hidden; }
.espace__plein { height: 100%; border-radius: 5px; background: var(--sauge); }
.espace--haut .espace__plein { background: #d8a75f; }
.espace--critique .espace__plein { background: var(--praline); }
.espace__conseil { margin-top: 12px; }
/* Le compte rendu du mur Instagram : une ligne par compte, qui
   passe au rouge le jour où le jeton ne répond plus. */
.ligne-info {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  padding: 10px 0;
  border-top: 1px solid var(--ligne);
  font-size: 15px;
}

.ligne-info:first-child { border-top: 0; }
.ligne-info span { color: var(--texte-mute); }

.ligne-info--alerte span { color: #8e4540; }

/* ---------------------------------------------------------
   Le mode d'emploi
   --------------------------------------------------------- */

/* Le titre à gauche, tout le reste (Rafraîchir, Aide…) groupé à droite. */
.ecran__tete > h1 { margin-right: auto; }

.aide-recherche { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.aide-recherche input {
  flex: 1 1 320px;
  max-width: 560px;
  padding: 11px 14px;
  background: #fff;
  border: 1px solid var(--ligne);
  border-radius: 3px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 300;
  color: #2c251e;
}
.aide-recherche input:focus { border-color: var(--laiton); outline: none; }
.aide-recherche__compte { font-size: 13.5px; color: var(--texte-mute); }

.aide-sommaire { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 26px; }

.aide-chapitre { scroll-margin-top: 16px; transition: box-shadow 0.3s ease; }
.aide-chapitre .bloc__tete { margin-bottom: 8px; }
.aide-chapitre h2 { font-size: 21px; }
.aide-chapitre--repere { box-shadow: 0 0 0 2px var(--or); }

.question-aide { border-top: 1px solid var(--ligne-fine); }
.question-aide summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 0;
  cursor: pointer;
  list-style: none;
  font-size: 16px;
  font-weight: 400;
  color: var(--encre);
}
.question-aide summary::-webkit-details-marker { display: none; }
.question-aide summary::before {
  content: '+';
  flex: none;
  width: 14px;
  color: var(--laiton);
  font-weight: 500;
}
.question-aide[open] summary::before { content: '–'; }
.question-aide summary:hover { color: var(--laiton); }

.question-aide__corps { padding: 0 0 18px 24px; max-width: 70ch; font-size: 15px; }
.question-aide__sert {
  margin-bottom: 12px;
  padding: 10px 14px;
  border-left: 3px solid var(--sauge);
  background: #f3f5ee;
  color: #4a5240;
}
.question-aide__titre {
  margin-bottom: 4px;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a7c6b;
}
.question-aide__etapes { margin: 0 0 12px; padding-left: 22px; }
p.question-aide__etapes { padding-left: 0; }
.question-aide__etapes li + li { margin-top: 4px; }
.question-aide__savoir {
  padding: 10px 14px;
  border-left: 3px solid var(--or);
  background: #fbf3e3;
  color: #6b5132;
  font-size: 14px;
}
.question-aide__savoir ul { margin: 4px 0 0; padding-left: 18px; }

@media (max-width: 860px) {
  .question-aide__corps { padding-left: 0; }
}

/* Les bandeaux des jours fériés, écrits tout seuls : un filet doré les distingue. */
.bloc--ferie { border-left: 3px solid var(--laiton); }
/* La phrase automatique, en attente dans la case : elle ne doit pas passer pour du texte saisi. */
.bloc--ferie ::placeholder { color: #a9998a; font-style: italic; opacity: 1; }

/* =========================================================
   Les nouvelles (nouvelles.js) : la liste, écrire, envoyer.
   L'aperçu de la lettre reprend les couleurs du site, pas
   celles du back-office : c'est l'e-mail tel qu'il arrivera.
   ========================================================= */

.nv-fil { margin-bottom: 4px; font-size: 13.5px; color: var(--texte-mute); }
.nv-fil button, .nv-lien { color: var(--laiton); text-decoration: underline; text-underline-offset: 3px; }
.nv-etiquette { font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: #8a7c6b; }
.nv-petit { font-size: 13.5px; color: var(--texte-mute); }
.nv-rappel { margin-top: 24px; font-size: 14px; color: var(--texte-mute); }
.nv-bascules { display: flex; gap: 6px; flex-wrap: wrap; }

/* --- la liste --- */
.nv-lettres { display: grid; gap: 12px; }
.nv-lettre { display: grid; grid-template-columns: 74px 1fr auto; gap: 18px; align-items: center; padding: 16px 18px; background: var(--carte); border: 1px solid var(--ligne-fine); border-radius: 4px; }
.nv-lettre__vignette { width: 74px; height: 74px; border-radius: 3px; background: var(--papier) url('/illustrations/cupcake.webp') center / 60% no-repeat; border: 1px solid var(--ligne-fine); }
.nv-lettre__vignette[style] { background-size: cover; }
.nv-lettre__titre { font-weight: 500; color: var(--encre); font-size: 16.5px; }
.nv-lettre__meta { font-size: 13.5px; color: var(--texte-mute); }
.nv-lettre__chiffres { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 6px; font-size: 13.5px; color: var(--texte-mute); }
.nv-lettre__chiffres b { font-weight: 500; color: var(--encre); }
.nv-lettre__droite { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.nv-lettre__droite .actions { margin: 0; justify-content: flex-end; }

/* --- écrire --- */
.nv-ecrire { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 26px; align-items: start; }
.nv-apercu-col { position: sticky; top: 16px; }
.nv-apercu-barre { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.nv-themes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.nv-theme { display: flex; flex-direction: column; gap: 6px; padding: 6px; background: #fff; border: 1px solid var(--ligne); border-radius: 4px; font-size: 12.5px; color: #5c5145; text-align: center; }
.nv-theme:hover { border-color: var(--laiton); }
.nv-theme[aria-pressed='true'] { border-color: var(--encre); box-shadow: 0 0 0 1px var(--encre); color: var(--encre); font-weight: 500; }
.nv-theme__bande { position: relative; display: block; height: 34px; border-radius: 2px; overflow: hidden; }
.nv-theme__bande .nv-semis { opacity: 0.75 !important; }
.nv-theme__papier { display: block; height: 8px; margin-top: -6px; border-radius: 0 0 2px 2px; }

/* Le thème perso : ses réglages, sous les thèmes. */
.nv-perso { margin: -4px 0 18px; padding: 14px 14px 2px; background: #fbf7f0; border: 1px solid var(--ligne); border-radius: 4px; }
.nv-perso input[type='color'] { width: 100%; height: 40px; padding: 2px; border: 1px solid var(--ligne); border-radius: 4px; background: #fff; cursor: pointer; }
.nv-perso__image { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.nv-perso__vignette { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 4px; font-size: 11px; color: #fff; text-align: center; }
.nv-perso__vignette img { max-width: 56px; max-height: 56px; }
.nv-perso__dessins { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 6px; }
.nv-perso__dessin { position: relative; display: grid; place-items: center; height: 54px; padding: 4px; background: #fff; border: 1px solid var(--ligne); border-radius: 4px; cursor: pointer; }
.nv-perso__dessin img { max-width: 100%; max-height: 44px; }
.nv-perso__dessin input { position: absolute; top: 3px; left: 3px; margin: 0; }
.nv-perso__dessin:has(input:checked) { border-color: var(--encre); box-shadow: 0 0 0 1px var(--encre); }
.nv-perso__dessin:has(input:disabled) { opacity: 0.4; cursor: not-allowed; }
.nv-perso input[type='checkbox'] { width: auto; padding: 0; accent-color: var(--encre); }
.champ .nv-perso__couleurs { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13.5px; letter-spacing: 0; text-transform: none; color: #5c5145; cursor: pointer; }
.nv-morceaux { display: grid; gap: 12px; }
.nv-morceau { padding: 12px 14px 14px; background: #fff; border: 1px solid var(--ligne); border-radius: 4px; }
.nv-morceau__tete { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.nv-morceau__tete .nv-etiquette { margin-right: auto; color: var(--laiton); }
.nv-morceau__tete button { width: 28px; height: 28px; border: 1px solid var(--ligne); border-radius: 3px; color: #7c6f62; font-size: 14px; line-height: 1; }
.nv-morceau__tete button:hover { border-color: var(--laiton); color: var(--laiton); }
.nv-morceau__tete button[disabled] { opacity: 0.35; cursor: default; }
.nv-barre-texte { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 6px; }
.nv-barre-texte__groupe { display: inline-flex; align-items: center; gap: 3px; }
.nv-barre-texte button, .nv-barre-texte select { min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid var(--ligne); border-radius: 3px; background: #fff; font: inherit; font-size: 13.5px; color: #5c5145; }
.nv-barre-texte button { display: inline-grid; place-items: center; }
.nv-barre-texte button small { font-size: 11px; }
.nv-barre-texte button:hover, .nv-barre-texte__couleur:hover { border-color: var(--laiton); color: var(--laiton); }
.nv-barre-texte__couleur { position: relative; display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px 4px; border: 1px solid var(--ligne); border-radius: 3px; background: #fff; font-size: 14px; font-weight: 500; color: #5c5145; cursor: pointer; }
.nv-barre-texte__couleur input { position: absolute; left: 4px; right: 4px; bottom: 3px; width: auto; height: 5px; padding: 0; border: 0; cursor: pointer; }
.nv-barre-texte__couleur input::-webkit-color-swatch-wrapper { padding: 0; }
.nv-barre-texte__couleur input::-webkit-color-swatch { border: 0; border-radius: 1px; }
.nv-barre-texte__couleur--surligne { font-style: italic; }
.nv-redaction { min-height: 92px; padding: 9px 11px; background: #fff; border: 1px solid var(--ligne); border-radius: 3px; font-size: 15.5px; line-height: 1.55; color: #2c251e; }
.nv-redaction:focus { border-color: var(--laiton); outline: none; }
.nv-redaction a { color: #8f3d18; }
.nv-photo { display: flex; gap: 12px; align-items: center; }
.nv-photo__img { flex: none; display: grid; place-items: center; width: 92px; height: 70px; border-radius: 3px; background: var(--papier) center / cover; border: 1px dashed var(--ligne); font-size: 12px; line-height: 1.3; color: #9a8b78; text-align: center; }
.nv-photo__img--pleine { border-style: solid; }
.nv-photo__choix { max-width: 230px; padding: 7px 9px; border: 1px solid var(--ligne); border-radius: 3px; background: #fff; font: inherit; font-size: 14px; color: #5c5145; }
.nv-photo label { cursor: pointer; }
.nv-ajouter { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding: 14px; border: 1px dashed var(--ligne); border-radius: 4px; background: var(--papier-2); }
.nv-marqueurs { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; width: 100%; }
.nv-marqueur { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px 8px; background: #fff; border: 1px solid var(--ligne); border-radius: 4px; font-size: 12.5px; line-height: 1.25; color: #5c5145; text-align: center; transition: border-color 0.15s, color 0.15s; }
.nv-marqueur:hover { border-color: var(--laiton); color: var(--laiton); }
.nv-marqueur svg { width: 52px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.nv-marqueur svg .plein { fill: currentColor; fill-opacity: 0.14; }
.nv-enregistre { min-height: 1.4em; margin-top: 10px; font-size: 13px; color: var(--sauge); }
.nv-enregistre--erreur { color: var(--praline); }

/* --- envoyer --- */
.nv-envoyer { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 26px; align-items: start; }
.nv-listes { display: grid; gap: 8px; }
.nv-liste { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--ligne); border-radius: 4px; background: #fff; cursor: pointer; }
.nv-liste:has(input:checked) { border-color: var(--sauge); background: #f3f6ee; }
.nv-liste input { flex: none; width: 18px; height: 18px; accent-color: var(--sauge); }
.nv-liste span { flex: 1; }
.nv-liste small { font-size: 13.5px; color: var(--texte-mute); white-space: nowrap; }
.nv-total { margin-top: 12px; font-size: 15px; }
.nv-total b { font-weight: 500; color: var(--encre); }
.nv-ligne { display: flex; flex-wrap: wrap; gap: 8px; }
.nv-ligne input { flex: 1 1 240px; }
.nv-quand { display: grid; gap: 8px; }
.nv-quand label { display: flex; gap: 10px; align-items: center; font-size: 15px; }
.nv-quand input[type='radio'] { accent-color: var(--sauge); }
.nv-quand__date { margin-left: 26px; }
.nv-resume { position: sticky; top: 16px; }
.nv-resume dl { margin: 0; font-size: 14.5px; }
.nv-resume dt { margin-top: 10px; font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: #8a7c6b; }
.nv-resume dt:first-child { margin-top: 0; }
.nv-resume dd { margin: 2px 0 0; color: var(--encre); font-weight: 400; overflow-wrap: anywhere; }
.nv-gros { width: 100%; justify-content: center; padding: 14px 18px; font-size: 14px; }
.nv-voir { max-width: 720px; }

/* --- la boîte de réception et la lettre --- */
.nv-boite { overflow: hidden; background: #fff; border-radius: 8px; box-shadow: 0 14px 30px -20px rgba(69, 40, 26, 0.6); }
.nv-boite__tete { padding: 10px 14px; background: #f3f3f3; border-bottom: 1px solid #e3e3e3; font-size: 13px; line-height: 1.5; color: #555; }
.nv-boite__tete b { color: #222; font-weight: 600; }
.nv-boite__defile { max-height: 680px; overflow-x: hidden; overflow-y: auto; }
.nv-boite--telephone { max-width: 380px; margin: 0 auto; border: 10px solid #222; border-radius: 26px; }

.nv-mail {
  --m-carte: #faf1e0; --m-encre: #45281a; --m-laiton: #8f3d18; --m-texte: #3b2a1f;
  --m-mute: #664832; --m-ligne: #dcc093; --m-parchemin: #efdcb5; --m-ivoire: #f6e3bd;
  padding: 0 0 26px;
  background-color: var(--nv-fond);
  background-size: 360px 360px;
  background-repeat: repeat;
  background-position: center top;
  font-family: var(--sans);
  font-weight: 400;
}
.nv-mail__cadre { max-width: 600px; margin: 0 auto; }
.nv-mail__bande { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 30px 16px; background: var(--nv-bande); }
.nv-mail__bande img { position: relative; flex: none; width: 84px; height: 84px; }
.nv-semis { position: absolute; inset: 0; width: 100%; height: 100%; }
.nv-mail__date { position: relative; margin: 0; font: 400 22px/1.4 'Petit Formal Script', cursive; color: var(--nv-date); text-align: right; }
.nv-mail__dentelle { height: 28px; background: var(--nv-bande); -webkit-mask: var(--motif-apercu) 0 0 / 58px 28px repeat-x; mask: var(--motif-apercu) 0 0 / 58px 28px repeat-x; }
.nv-mail__carte { position: relative; margin: 6px 20px 0; padding: 30px 32px; background: var(--m-carte); box-shadow: 0 18px 30px -24px rgba(69, 40, 26, 0.7); }
.nv-mail__dessin { position: absolute; top: -30px; right: -14px; width: 88px; transform: rotate(12deg); pointer-events: none; }
.nv-mail__quand { margin: 0; font: 400 21px/1.3 'Petit Formal Script', cursive; color: var(--m-laiton); text-align: center; }
.nv-mail__titre { margin: 4px 0 14px; font: 400 34px/1.25 var(--titre); color: var(--m-encre); text-align: center; overflow-wrap: anywhere; }
.nv-mail__chapo { max-width: 34ch; margin: 0 auto 26px; font-size: 18px; line-height: 1.55; color: var(--m-mute); text-align: center; }
.nv-mail__texte { margin: 0 0 18px; font-size: 16px; line-height: 1.65; color: var(--m-texte); overflow-wrap: anywhere; }
.nv-mail__texte b, .nv-mail__texte strong { font-weight: 600; }
.nv-mail__texte a { color: var(--m-laiton); }
.nv-mail__texte div, .nv-mail__texte p { margin: 0; }
.nv-mail__intertitre { margin: 26px 0 10px; font: 400 26px/1.3 var(--titre); color: var(--m-encre); overflow-wrap: anywhere; }
.nv-mail__photo { margin: 4px -32px 26px; }
.nv-mail__photo img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.nv-mail__photo figcaption { margin-top: 8px; padding: 0 32px; font: 400 17px/1.35 'Petit Formal Script', cursive; color: var(--m-mute); text-align: center; }
.nv-mail__vide { display: grid; place-items: center; aspect-ratio: 3 / 2; border: 2px dashed var(--m-ligne); font-size: 13px; font-style: italic; color: var(--m-mute); }
.nv-mail__duo img, .nv-mail__trio img, .nv-mail__cote img { border: 6px solid #fff; box-shadow: 0 10px 20px -14px rgba(69, 40, 26, 0.8); }
.nv-mail__duo { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 4px 0 26px; }
.nv-mail__trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 4px 0 26px; }
.nv-mail__duo img, .nv-mail__duo .nv-mail__vide, .nv-mail__trio img, .nv-mail__trio .nv-mail__vide { display: grid; width: 100%; aspect-ratio: 1; object-fit: cover; }
.nv-mail__trio .nv-mail__vide { font-size: 11px; }
.nv-mail__cote { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: center; margin: 4px 0 26px; }
.nv-mail__cote--gauche .nv-mail__cote-photo { order: -1; }
.nv-mail__cote img, .nv-mail__cote .nv-mail__vide { display: grid; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.nv-mail__cote .nv-mail__texte { margin: 0; }
.nv-mail__encadre { margin: 6px 0 26px; padding: 18px 20px; background: var(--m-parchemin); border: 2px dashed var(--m-laiton); text-align: center; }
.nv-mail__encadre .nv-mail__texte { margin: 0; }
.nv-mail__bouton { display: table; margin: 8px auto 26px; padding: 16px 30px; background: var(--nv-bande); color: var(--nv-date); font-size: 15px; font-weight: 500; letter-spacing: 0.06em; text-decoration: none; border-radius: 2px; }
.nv-mail__signe { margin: 10px 0 0; font: 400 24px/1.3 'Petit Formal Script', cursive; color: var(--m-encre); text-align: center; }
.nv-mail__pied { padding: 22px 30px 0; font-size: 13px; line-height: 1.6; color: #6b4a30; text-align: center; }
.nv-mail__pied a { color: var(--m-laiton); }
.nv-mail__pied p { margin-top: 10px; font-size: 12px; }
/* Sur le papier cadeau, le pied se lit sur une étiquette crème. */
.nv-mail__etiquette { display: inline-block; padding: 14px 22px; background: var(--m-carte); }
.nv-mail--etroit .nv-mail__bande { padding: 16px 18px 12px; }
.nv-mail--etroit .nv-mail__bande img { width: 62px; height: 62px; }
.nv-mail--etroit .nv-mail__date { font-size: 17px; }
.nv-mail--etroit .nv-mail__dentelle { height: 22px; -webkit-mask-size: 46px 22px; mask-size: 46px 22px; }
.nv-mail--etroit .nv-mail__carte { margin: 6px 10px 0; padding: 26px 18px; }
.nv-mail--etroit .nv-mail__dessin { width: 58px; top: -34px; right: -6px; }
.nv-mail--etroit .nv-mail__titre { font-size: 28px; }
.nv-mail--etroit .nv-mail__chapo { font-size: 17px; }
.nv-mail--etroit .nv-mail__photo { margin: 4px -18px 22px; }
.nv-mail--etroit .nv-mail__photo figcaption { padding: 0 18px; }
.nv-mail--etroit .nv-mail__cote, .nv-mail--etroit .nv-mail__duo { grid-template-columns: 1fr; gap: 12px; }
.nv-mail--etroit .nv-mail__cote .nv-mail__cote-photo { order: -1; }
.nv-mail--etroit .nv-mail__cote img, .nv-mail--etroit .nv-mail__cote .nv-mail__vide,
.nv-mail--etroit .nv-mail__duo img, .nv-mail--etroit .nv-mail__duo .nv-mail__vide { aspect-ratio: 4 / 3; }

@media (max-width: 1180px) {
  .nv-ecrire, .nv-envoyer { grid-template-columns: 1fr; }
  .nv-apercu-col, .nv-resume { position: static; }
}

@media (max-width: 760px) {
  .nv-lettre { grid-template-columns: 56px 1fr; }
  .nv-lettre__vignette { width: 56px; height: 56px; }
  .nv-lettre__droite { grid-column: 1 / -1; align-items: flex-start; }
  .nv-themes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* --- le retrait convenu avec le client --------------------- */

.commande__tete-droite { display: flex; align-items: center; gap: 10px; }
.commande__convenu { font-size: 13px; color: var(--laiton); font-weight: 500; }
.commande__choix { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-right: 4px; }
.commande__champ { display: flex; flex-direction: column; gap: 4px; }
.commande__champ label { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--texte-mute); font-weight: 500; }
.commande__champ input,
.commande__champ select { padding: 8px 10px; border: 1px solid var(--ligne); border-radius: 3px; background: #fff; font: inherit; font-size: 14.5px; color: var(--texte); }
.commande__champ select { min-width: 250px; }
.commande__champ input:focus, .commande__champ select:focus { border-color: var(--laiton); outline: none; }
.commande--en-attente .actions { align-items: flex-end; }
.commande__retrait-mail { flex-basis: 100%; margin: 2px 0 0; font-size: 13.5px; color: #7a5212; }
.commande__retrait-mail b { font-weight: 500; }
.commande__retrait-mail--ferme { color: #8e4540; }
.dernier-retrait { display: flex; align-items: center; gap: 10px; }
.dernier-retrait input { width: auto; min-width: 0; }
.dernier-retrait .aide { white-space: nowrap; }

/* --- la fiche imprimée --------------------------------------
   Une demi-page A4 (210 × 148,5 mm), noir sur blanc, des filets
   fins et aucun aplat : c'est l'encre qu'on économise. Elle
   n'existe qu'à l'impression ; le reste de l'admin disparaît. */

#impression { display: none; }

@media print {
  @page { size: A4 portrait; margin: 0; }
  body > *:not(#impression) { display: none !important; }
  body { background: #fff; }
  #impression { display: block; }
}

.fiche { position: relative; display: flex; flex-direction: column; min-height: 148.5mm; padding: 9mm 11mm 8mm; border-bottom: 1px dashed #999; color: #000; font-family: var(--sans); font-weight: 400; font-size: 10pt; line-height: 1.35; }
.fiche::after { content: "✂"; position: absolute; bottom: -7px; left: 4mm; padding: 0 3px; background: #fff; font-size: 11px; color: #777; }
.fiche__haut { display: flex; justify-content: space-between; align-items: flex-start; gap: 6mm; padding-bottom: 3mm; border-bottom: 1.5pt solid #000; }
.fiche__quand { font-size: 17pt; font-weight: 500; line-height: 1.15; text-transform: uppercase; letter-spacing: .02em; }
.fiche__heure { font-size: 14pt; text-transform: none; letter-spacing: 0; }
.fiche__ou { margin-top: 1mm; font-size: 10.5pt; }
.fiche__numero { text-align: right; font-size: 9pt; }
.fiche__numero b { display: block; font-size: 17pt; font-weight: 500; letter-spacing: .03em; }
.fiche__client { display: flex; flex-wrap: wrap; gap: 1mm 7mm; padding: 2.5mm 0; border-bottom: .5pt solid #000; }
.fiche__client b { font-size: 12pt; font-weight: 500; }
.fiche__lignes { width: 100%; border-collapse: collapse; margin-top: 1mm; }
.fiche__lignes td { padding: 2mm 2mm 2mm 0; border-bottom: .5pt solid #bbb; vertical-align: top; }
.fiche__q { width: 10mm; font-size: 12pt; font-weight: 500; }
.fiche__g { font-size: 11.5pt; font-weight: 500; }
.fiche__chiffres { font-size: 12pt; font-weight: 500; }
.fiche__p { width: 18mm; text-align: right; white-space: nowrap; }
.fiche__plaque { display: inline-block; margin-top: 1mm; padding: .6mm 2.5mm; border: 1pt solid #000; font-size: 11pt; font-weight: 500; }
.fiche__plaque i,
.fiche__message i { margin-right: 2mm; font-style: normal; font-weight: 400; font-size: 8.5pt; text-transform: uppercase; letter-spacing: .08em; }
.fiche__message { margin: 2.5mm 0 0; font-size: 9.5pt; }
.fiche__bas { display: flex; justify-content: space-between; align-items: flex-end; gap: 6mm; margin-top: auto; padding-top: 2.5mm; border-top: 1.5pt solid #000; }
.fiche__argent { font-size: 9.5pt; line-height: 1.5; }
.fiche__reste { display: inline-block; margin-top: 1mm; padding: 1mm 3mm; border: 1.5pt solid #000; font-size: 13pt; font-weight: 500; }
.fiche__reste--rien { font-size: 11pt; border-width: 1pt; }
.fiche__suivi { text-align: right; font-size: 8.5pt; line-height: 1.5; }
.fiche__case { display: inline-block; margin-bottom: 2mm; font-size: 12pt; font-weight: 500; }
.fiche__case::before { content: ""; display: inline-block; width: 4.2mm; height: 4.2mm; margin-right: 2mm; border: 1pt solid #000; vertical-align: -.6mm; }
