/* ============================================================
   ACUPUNK — socle technique : styles de base (CSS vanilla)
   ============================================================ */
:root {
  --bg: #f4f1ec;
  --panel: #fff;
  --ink: #2b2b2b;
  --muted: #6b6b6b;
  --line: #e3ddd3;
  --accent: #b9512f;
  --accent-dk: #973f23;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(0,0,0,.08);
}
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  display: flex; flex-direction: column; min-height: 100vh;
}

/* Barre de navigation */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.6rem; background: var(--panel); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; font-size: 1.2rem; color: var(--ink); text-decoration: none; letter-spacing: .02em; }
.topnav { display: flex; gap: .8rem; align-items: center; }
.topnav a { color: var(--ink); text-decoration: none; font-size: .9rem; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; gap: .4em;
  padding: .55em .9em; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); color: var(--ink); font-size: .9rem; cursor: pointer; text-decoration: none;
}
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dk); border-color: var(--accent-dk); }
.btn--ghost { background: transparent; }

/* Contenu */
.container { flex: 1; max-width: 980px; width: 100%; margin: 0 auto; padding: 2rem 1.6rem; }
.footer { padding: 1.2rem 1.6rem; color: var(--muted); font-size: .82rem; border-top: 1px solid var(--line); }

/* Hero / accueil */
.hero h1 { font-size: 2rem; margin: 0 0 .4rem; }
.lead { color: var(--muted); max-width: 60ch; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 1.6rem 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 .4rem; font-size: 1rem; }
.card p { margin: 0; color: var(--muted); font-size: .88rem; }
.cta { margin-top: 1rem; }

/* Panneaux / formulaires */
.panel, .auth {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.6rem; max-width: 460px;
}
.panel { max-width: 720px; }
.form { display: flex; flex-direction: column; gap: .9rem; margin-top: 1rem; }
.form label { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; color: var(--muted); }
.form input { padding: .6em; border: 1px solid var(--line); border-radius: 8px; font-size: 1rem; }
.muted { color: var(--muted); font-size: .85rem; }
.alert { padding: .7em .9em; border-radius: 8px; margin: 0 0 .4rem; font-size: .9rem; }
.alert--error { background: #fdecea; border: 1px solid #f5c6c0; color: #8a2c20; }
code { background: #efeae1; padding: .1em .35em; border-radius: 5px; font-size: .85em; }

/* ============================================================
   Cartographie des points
   ============================================================ */
.no-scroll { overflow: hidden; }
.section-title { font-size: 1.05rem; margin: 1.6rem 0 .6rem; }

/* Landing : grille des zones */
.zone-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}
.zone-grid .zone-card {
  flex: 0 1 220px;
}

/* Séparateur décoratif : trait fin terracotta court centré,
   cohérent avec le trait au-dessus de la citation sur la page login. */
hr.separator {
  border: none;
  border-top: 1px solid var(--accent);
  width: 60px;
  margin: 2rem auto;
}
.zone-card {
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem; text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
  transition: transform .08s, border-color .15s;
}
.zone-card:hover { transform: translateY(-2px); border-color: #cfc6b8; }
.zone-card__thumb {
  width: 100%; aspect-ratio: 1 / 1.6; background: #fbf8f4 center/contain no-repeat;
  border-radius: 8px;
}
.zone-card__name { font-weight: 600; font-size: .95rem; }

/* En-tete de carte */
.carto-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.carto-head h1 { margin: 0; font-size: 1.5rem; }
.carto-head__nav { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

.chip {
  display: inline-flex; align-items: center; padding: .4em .8em; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  text-decoration: none; font-size: .85rem;
}
.chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Filtres */
.carto-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.2rem 0; }
.fchip {
  display: inline-flex; align-items: center; gap: .45em; padding: .4em .9em; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-size: .85rem; color: var(--ink);
}
.fchip__dot { width: 11px; height: 11px; border-radius: 50%; background: var(--c, #888); }
.fchip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Scene */
.carto-stage-wrap { display: flex; justify-content: center; }
.carto-stage {
  position: relative; width: 100%; max-width: 460px;
  background: #fbf8f4 center/contain no-repeat;
  border-radius: var(--radius); box-shadow: var(--shadow);
}

/* Pastilles */
.point {
  position: absolute; width: 10px; height: 10px; padding: 0;
  transform: translate(-50%, -50%); border-radius: 50%;
  border: 2px solid #fff; background: var(--c, #F39C12);
  box-shadow: 0 1px 4px rgba(0,0,0,.35); cursor: pointer;
  transition: transform .1s, box-shadow .1s, opacity .15s;
}
.point:hover, .point:focus {
  transform: translate(-50%, -50%) scale(1.35); outline: none; z-index: 5;
  box-shadow: 0 0 0 4px rgba(255,255,255,.6), 0 2px 6px rgba(0,0,0,.4);
}
.point.is-hidden { opacity: 0; pointer-events: none; transform: translate(-50%,-50%) scale(.3); }
.point--edit { width: 10px; height: 10px; cursor: grab; }
.point--edit.is-dragging { cursor: grabbing; transform: translate(-50%,-50%) scale(1.25); z-index: 10; }
.point--edit.is-selected { animation: blink .7s steps(1) infinite; z-index: 9; }
@keyframes blink {
  0%,49%   { box-shadow: 0 0 0 4px #ffd400, 0 1px 4px rgba(0,0,0,.4); border-color: #ffd400; }
  50%,100% { box-shadow: 0 0 0 4px rgba(255,212,0,0), 0 1px 4px rgba(0,0,0,.4); border-color: #fff; }
}

/* Infobulle */
.tooltip {
  position: absolute; z-index: 50; max-width: 260px; padding: .5em .7em; border-radius: 8px;
  background: rgba(30,30,30,.95); color: #fff; font-size: .8rem; line-height: 1.3;
  pointer-events: none; box-shadow: 0 4px 14px rgba(0,0,0,.3);
}

/* Modale */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.modal__card {
  position: relative; z-index: 1; width: min(440px, 92vw); max-height: 88vh; overflow: auto;
  background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.6rem;
}
.modal__card--wide { width: min(720px, 94vw); }
.modal__close { position: absolute; top: .6rem; right: .8rem; border: none; background: none; font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--muted); }
.modal__badge { display: inline-block; padding: .2em .7em; border-radius: 999px; color: #fff; font-size: .72rem; font-weight: 600; }
.modal__card h3 { margin: .6rem 0 .2rem; font-size: 1.3rem; }
.modal__sub { color: var(--muted); margin: 0 0 1rem; font-size: .85rem; }
.modal__block { margin-bottom: 1rem; }
.modal__block h4 { margin: 0 0 .25rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); }
.modal__block p { margin: 0; line-height: 1.5; }

/* ============================================================
   Editeur
   ============================================================ */
.editor__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap; padding: .7rem 0; border-bottom: 1px solid var(--line); margin-bottom: 1rem;
}
.editor__bar-grp { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.editor__zones { display: flex; gap: .4rem; flex-wrap: wrap; }
.counter { font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }

.editor__layout { display: flex; gap: 1.2rem; align-items: flex-start; }
.editor__canvas { flex: 1 1 60%; min-width: 0; }
.editor__stage { cursor: crosshair; touch-action: none; max-width: 420px; margin: 0 auto; }
.editor__help { text-align: center; margin: .8rem 0 0; }

.editor__form {
  flex: 0 0 38%; max-width: 38%; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem; position: sticky; top: 1rem;
}
.editor__form h2 { margin: 0 0 1rem; font-size: 1.1rem; }
.editor__form label { display: flex; flex-direction: column; gap: .3rem; font-size: .82rem; color: var(--muted); margin-bottom: .8rem; }
.editor__form input[type=text], .editor__form textarea {
  padding: .55em; border: 1px solid var(--line); border-radius: 8px; font: inherit; color: var(--ink);
}
.editor__form input[readonly] { background: #f4f1ec; color: var(--muted); }
.editor__form input[type=color] { width: 56px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: none; }
.editor__form textarea { resize: vertical; }
.row2 { display: flex; gap: .8rem; }
.row2 > label { flex: 1; }
.editor__actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .3rem; }
.btn--danger { background: #e74c3c; border-color: #e74c3c; color: #fff; }
.btn--danger:disabled { opacity: .45; cursor: not-allowed; }
.form-msg { font-size: .82rem; margin: .7rem 0 0; min-height: 1.1em; }
.form-msg.is-ok { color: #1e8449; }
.form-msg.is-err { color: #c0392b; }
.sqlout { width: 100%; font-family: ui-monospace, Menlo, monospace; font-size: .78rem; border: 1px solid var(--line); border-radius: 8px; padding: .7em; margin: .6rem 0; }

@media (max-width: 820px) {
  .editor__layout { flex-direction: column; }
  .editor__canvas, .editor__form { flex: 1 1 100%; max-width: 100%; width: 100%; }
  .editor__form { position: static; }
}

/* --- Editeur : panneau de reference cote a cote --- */
.editor__layout { flex-wrap: wrap; }
.editor__canvas { flex: 1 1 320px; }
.editor__ref {
  flex: 1 1 280px; min-width: 240px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1rem; align-self: flex-start;
}
.editor__ref[hidden] { display: none; }
.editor__ref-title { margin: 0 0 .3rem; font-size: 1rem; }
.editor__ref-img {
  width: 100%; height: auto; border-radius: 8px; margin-top: .6rem;
  border: 1px solid var(--line); background: #fff;
}
#btnRef[aria-pressed="false"] { opacity: .6; }

/* ============================================================
   Patients (liste, formulaire, fiche)
   ============================================================ */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1, .page-head h2 { margin: 0; }
.page-head__actions { display: flex; gap: .5rem; }

.search { display: flex; gap: .5rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.search input[type=search] { flex: 1 1 260px; padding: .55em .7em; border: 1px solid var(--line); border-radius: 8px; font-size: 1rem; }
.empty { padding: 2rem; text-align: center; }

.table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { padding: .6em .8em; text-align: left; border-bottom: 1px solid var(--line); font-size: .9rem; }
.table thead th { background: #f0ebe2; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.row-link { cursor: pointer; }
.row-link:hover { background: #faf7f1; }
.table tbody tr:last-child td { border-bottom: none; }

/* Formulaire patient */
.pform { display: flex; flex-direction: column; gap: 1.2rem; }
.pfieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; background: var(--panel); }
.pfieldset legend { font-weight: 600; padding: 0 .4em; font-size: .9rem; }
.pfieldset > label, .grid2 > label { display: flex; flex-direction: column; gap: .3rem; font-size: .82rem; color: var(--muted); margin-bottom: .7rem; }
.pfieldset input, .pfieldset select, .pfieldset textarea {
  padding: .5em; border: 1px solid var(--line); border-radius: 8px; font: inherit; color: var(--ink);
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.grid2 .col2 { grid-column: 1 / -1; }
.check { flex-direction: row !important; align-items: center; gap: .5em !important; color: var(--ink) !important; }
.field-err { color: #c0392b; font-size: .78rem; }
.pform__actions { display: flex; gap: .6rem; }

/* Fiche patient */
.cards2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: .3em 1em; margin: 0; }
.dl dt { color: var(--muted); font-size: .82rem; }
.dl dd { margin: 0; }
.notes { margin-top: .8rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.alert--warn { background: #fff4e5; border: 1px solid #ffd9a0; color: #8a5a00; }
.seances { margin-top: 1.6rem; }
.seance-list { list-style: none; padding: 0; margin: 0; }
.seance-list li { border-bottom: 1px solid var(--line); }
.seance-list a { display: block; padding: .7em .2em; text-decoration: none; color: var(--ink); }
.seance-list a:hover { background: #faf7f1; }
.danger-zone { margin-top: 2rem; padding-top: 1rem; border-top: 1px dashed var(--line); }
@media (max-width: 700px) { .grid2, .cards2 { grid-template-columns: 1fr; } }

/* ============================================================
   Séance (sélection des points travaillés)
   ============================================================ */
.seance { display: flex; flex-direction: column; gap: 1rem; }
.seance__infos .grid2 { margin-bottom: .6rem; }
.seance__infos label { display: flex; flex-direction: column; gap: .3rem; font-size: .82rem; color: var(--muted); margin-bottom: .7rem; }
.seance__infos input, .seance__infos textarea {
  padding: .5em; border: 1px solid var(--line); border-radius: 8px; font: inherit; color: var(--ink);
}

.seance__map-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.seance__map-head h3 { margin: 0; }
.seance__zones { display: flex; gap: .4rem; flex-wrap: wrap; }
.seance__zones .chip { cursor: pointer; }
.seance__hint { margin: .5rem 0 1rem; }
.seance__stage-wrap { display: flex; justify-content: center; }
.seance__stage { max-width: 440px; width: 100%; cursor: pointer; }

/* Pastilles en mode selection : estompees par defaut, vives si choisies */
.point--pick {
  opacity: .42; filter: grayscale(.3);
  transition: opacity .12s, transform .1s, box-shadow .12s;
}
.point--pick:hover { opacity: .85; transform: translate(-50%,-50%) scale(1.3); z-index: 5; }
.point--pick.is-picked {
  opacity: 1; filter: none;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--c, #F39C12), 0 2px 6px rgba(0,0,0,.4);
  z-index: 6;
}

/* Recap des points choisis */
.recap-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.recap-item { display: flex; align-items: center; gap: .6rem; padding: .35rem 0; border-bottom: 1px solid var(--line); }
.recap-dot { width: 13px; height: 13px; border-radius: 50%; flex: 0 0 auto; }
.recap-label { flex: 1; font-size: .9rem; }
.recap-cote { padding: .25em .4em; border: 1px solid var(--line); border-radius: 6px; font-size: .8rem; }
.recap-del { border: none; background: none; color: #c0392b; font-size: 1.2rem; line-height: 1; cursor: pointer; padding: 0 .3em; }

/* ============================================================
   Page de connexion (/login)
   Mise en page 2 colonnes : à gauche un visuel (oreille + citation),
   à droite le formulaire de connexion. Sur mobile, la colonne visuel
   passe au-dessus en plus petit pour libérer la zone tactile.
   ============================================================ */

.login {
  display: grid;
  grid-template-columns: auto auto;   /* colonnes adaptées au contenu */
  gap: 2rem 4rem;                     /* row-gap puis column-gap */
  align-items: end;                   /* bas de l'oreille aligné avec bas du panneau */
  justify-content: center;            /* l'ensemble du grid centré dans la page */
  margin: 1.5rem 0 2rem;
}

/* ---------- Colonne de gauche : visuel (oreille seule) ---------- */
.login__visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-self: center;   /* explicitement centré dans la colonne */
}

.login__image {
  display: block;
  width: 100%;
  max-width: 210px;
  height: auto;
  /* Petit ancrage visuel discret : ombre douce sous l'oreille */
  filter: drop-shadow(0 8px 16px rgba(43, 43, 43, 0.12));
}

.login__quote {
  grid-column: 1 / -1;       /* pleine largeur sous les 2 colonnes */
  margin: 1rem auto 0;
  text-align: center;
  max-width: none;           /* pas de limite : la phrase tient sur une ligne */
  position: relative;
}

/* Trait fin terracotta au-dessus de la citation : marque de séparation
   entre le haut (oreille + panneau) et le pied (citation). */
.login__quote::before {
  content: "";
  display: block;
  width: 80px;
  height: 1px;
  background: var(--accent);
  margin: 0 auto 1.4rem;
}

.login__blockquote {
  font-family: Georgia, "Cormorant Garamond", serif;
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--ink);
  margin: 0 0 0.75rem;
  font-weight: 400;
}

.login__attribution {
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* Idéogramme final : 耳 (oreille) en accent terracotta,
   façon sceau d'encre clôturant la page. */
.login__ideogram {
  display: block;
  margin: 1.2rem auto 0;
  font-family: "Songti SC", "Noto Serif CJK SC", "PingFang SC",
               "Hiragino Sans GB", serif;
  font-size: 2.5rem;
  line-height: 1;
  color: var(--accent);
  user-select: none;
}

/* ---------- Colonne de droite : panneau formulaire ---------- */
.login__panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.8rem;
  max-width: 420px;
  width: 100%;
  justify-self: center;   /* explicitement centré dans la colonne */
}

.login__title {
  font-family: Georgia, "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: 1.8rem;
  margin: 0 0 1.2rem;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.login__form button[type="submit"] {
  width: 100%;
  justify-content: center;
  padding: 0.8em 1em;
  font-size: 0.95rem;
  margin-top: 0.3rem;
}

.login__hint {
  margin: 1.4rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
}

/* ---------- Mobile : 1 colonne, visuel plus discret ---------- */
@media (max-width: 720px) {
  .login {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Ordre mobile : panneau en haut, oreille au milieu, citation en bas */
  .login__panel {
    order: 1;
    justify-self: stretch;
    max-width: 100%;
  }

  .login__visual {
    order: 2;
  }

  .login__quote {
    order: 3;
  }

  .login__image {
    max-width: 160px;
  }

  .login__blockquote {
    font-size: 1.05rem;
  }
}

/* ============================================================
   Menu burger responsive (< 800px)
   Visible uniquement sur mobile via CSS.
   JS associé : public/assets/js/topnav.js
   ============================================================ */

/* Bouton burger : caché par défaut (desktop), affiché en mobile */
.topnav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  cursor: pointer;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
}

.topnav-toggle:hover {
  background: var(--bg);
}

.topnav-toggle__bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Animation : 3 traits → croix (X) quand le menu est ouvert */
.topnav-toggle[aria-expanded="true"] .topnav-toggle__bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.topnav-toggle[aria-expanded="true"] .topnav-toggle__bar:nth-child(2) {
  opacity: 0;
}
.topnav-toggle[aria-expanded="true"] .topnav-toggle__bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Sous 800px : on bascule en mode mobile (burger + menu déroulant) */
@media (max-width: 800px) {

  /* La topbar doit être en position relative pour servir d'ancre
     au menu déroulant positionné en absolute. */
  .topbar {
    position: relative;
  }

  /* On affiche le bouton burger */
  .topnav-toggle {
    display: flex;
  }

  /* On cache le menu par défaut. Il devient un déroulant absolu
     sous le header, qui s'affiche en classe .is-open. */
  .topnav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    flex-direction: column;
    padding: 0.6rem 1rem 1rem;
    gap: 0.2rem;
    z-index: 100;
  }

  .topnav.is-open {
    display: flex;
  }

  /* Chaque lien prend toute la largeur, plus aéré */
  .topnav a {
    padding: 0.7rem 0.8rem;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
    font-size: 1rem;
  }

  .topnav a:hover {
    background: var(--bg);
  }
}



/* ============================================================
   Disponibilites (palier P6c)
   Grille des creneaux hebdomadaires + formulaire d'ajout.
   Utilise les variables de theme definies dans :root plus haut.
   ============================================================ */

/* Petite alerte de succes, pendant verte du .alert--error existant. */
.alert--ok {
  background: #eaf5ec;
  border: 1px solid #bfe0c6;
  color: #1e6b34;
}

.dispo-head {
  margin: 1rem 0 1.4rem;
}

/* Grille responsive : une carte par jour, qui s'adapte a la largeur. */
.dispo-grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.dispo-jour {
  padding: 1rem 1.1rem;
}

.dispo-jour__titre {
  margin: 0 0 .6rem;
  font-size: 1rem;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-bottom: .4rem;
}

/* Liste des creneaux d'un jour. */
.dispo-liste {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.dispo-creneau {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
}

.dispo-creneau__heures {
  font-variant-numeric: tabular-nums;
  font-size: .95rem;
  color: var(--ink);
}

/* Bouton supprimer compact, pour ne pas dominer la ligne. */
.dispo-creneau__suppr {
  padding: .3em .6em;
  font-size: .78rem;
}

/* Carte du formulaire d'ajout. */
.dispo-ajout {
  padding: 1.2rem 1.4rem;
}

/* Champs du formulaire alignes en ligne, qui passent en colonne sur mobile. */
.dispo-form__champs {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: .4rem;
}

.dispo-form__champs label {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  font-size: .85rem;
  color: var(--muted);
}

.dispo-form__champs select,
.dispo-form__champs input[type="time"] {
  padding: .55em;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 1rem;
  color: var(--ink);
  background: var(--panel);
}

.dispo-form__actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: .8rem;
}


/* ============================================================
   Agenda des rendez-vous (palier P6d)
   ============================================================ */

.agenda-head {
  margin: 1rem 0 1.4rem;
}

/* Barre de navigation entre les jours. */
.agenda-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: .6rem;
}

.agenda-nav__date {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.35rem;
  color: var(--ink);
  text-align: center;
  flex: 1;
  min-width: 12ch;
}

.agenda-today {
  margin: .6rem 0 0;
  font-size: .85rem;
}

.agenda-today a {
  color: var(--accent);
  text-decoration: none;
}

.agenda-today a:hover {
  text-decoration: underline;
}

/* Carte contenant la liste des RDV du jour. */
.agenda-jour {
  padding: 1rem 1.2rem;
}

.agenda-liste {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* Une ligne de rendez-vous : heure a gauche, infos a droite. */
.agenda-rdv {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: .8rem 0;
  border-bottom: 1px solid var(--line);
}

.agenda-rdv:last-child {
  border-bottom: none;
}

.agenda-rdv__heure {
  font-variant-numeric: tabular-nums;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  min-width: 4.5ch;
}

.agenda-rdv__corps {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}

.agenda-rdv__patient {
  font-size: 1rem;
  color: var(--ink);
}

.agenda-rdv__meta {
  font-size: .85rem;
  color: var(--muted);
}



/* --- Agenda : actions et formulaire de prise de RDV (P6d incrément 2) --- */
.agenda-actions {
  margin: 1rem 0 0;
}

.agenda-form-wrap {
  padding: 1.4rem 1.5rem;
  max-width: 560px;
}

/* Ligne date / heure / durée côte à côte, qui passe en colonne sur mobile. */
.agenda-form__ligne {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.agenda-form__ligne label {
  flex: 1;
  min-width: 120px;
}

.agenda-form__actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}


/* --- Agenda : bouton annuler sur une ligne de RDV (P6d incrément 3) --- */
.agenda-rdv {
  /* le corps prend l'espace, le bouton annuler reste à droite */
  justify-content: flex-start;
}

.agenda-rdv__corps {
  flex: 1;
}

.agenda-rdv__annuler {
  margin-left: auto;
}


/* --- Agenda : vue semaine (P6d incrément 4) --- */
.agenda-semaine {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
}

.agenda-semaine__jour {
  padding: 1rem 1.1rem;
}

/* Le jour courant est mis en évidence par un liseré accent. */
.agenda-semaine__jour.is-today {
  border-left: 3px solid var(--accent);
}

.agenda-semaine__titre {
  margin: 0 0 .6rem;
  font-size: .95rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: .4rem;
}

.agenda-semaine__titre a {
  color: var(--ink);
  text-decoration: none;
}

.agenda-semaine__titre a:hover {
  color: var(--accent);
}

/* Dans la vue semaine, les lignes de RDV sont plus compactes. */
.agenda-semaine .agenda-rdv {
  padding: .5rem 0;
}

.agenda-semaine .agenda-rdv__heure {
  font-size: .95rem;
  min-width: 4ch;
}



/* ============================================================
   Fiche point — refonte visuelle (palier P2d)
   En-tête sobre encre/papier, couleur réservée au badge,
   sections Description / Indications bien délimitées.
   Surcharge les règles .modal__* définies plus haut.
   ============================================================ */

/* Carte de la fiche : un peu plus large, padding retiré au profit
   d'un padding interne par zone (en-tête vs corps). */
.modal--fiche {
  width: min(480px, 92vw);
  padding: 0;
  overflow: hidden;            /* pour que l'en-tête épouse les coins arrondis */
}

/* --- En-tête sobre --- */
.fiche__head {
  padding: 1.6rem 1.6rem 1.2rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg);        /* léger contraste papier vs panel */
}

/* Badge de catégorie : seul élément coloré (couleur posée par le JS). */
.modal--fiche .modal__badge {
  margin-bottom: .7rem;
}

/* Titre du point en Cormorant (police de titres du projet). */
.modal--fiche #mTitle {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.7rem;
  line-height: 1.15;
  margin: 0 0 .15rem;
  color: var(--ink);
}

.modal--fiche .modal__sub {
  margin: 0;
  font-size: .9rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* --- Corps : sections délimitées --- */
.fiche__body {
  padding: 1.2rem 1.6rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Chaque section = une carte distincte, avec liseré accent à gauche. */
.fiche__section {
  background: var(--bg);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: .9rem 1.1rem;
}

.fiche__label {
  margin: 0 0 .35rem;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
  font-weight: 600;
}

.fiche__text {
  margin: 0;
  line-height: 1.55;
  color: var(--ink);
  font-size: .95rem;
}

/* Bouton fermer : repositionné pour le nouvel en-tête. */
.modal--fiche .modal__close {
  top: .8rem;
  right: 1rem;
  z-index: 2;
}


/* ============================================================
   Menu déroulant méridien dans l'éditeur (palier cartographie main)
   Contraint le <select> à la largeur de son conteneur, aligné
   avec les <input> du formulaire.
   ============================================================ */
.editor__form select[data-field="meridien_id"] {
  display: block;
  width: 100%;
  box-sizing: border-box;
  max-width: 100%;
  padding: .5rem .6rem;
  margin-top: .3rem;
  font: inherit;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}



/* ============================================================
   Menu déroulant de sélection de zone (cartographie + éditeur)
   Remplace les anciens "chips" de navigation entre zones.
   ============================================================ */
.zone-select {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.zone-select__label {
  font-size: .85rem;
  color: var(--muted);
  white-space: nowrap;
}
.zone-select__input {
  font: inherit;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .45rem 1rem;
  cursor: pointer;
  max-width: 16rem;
}
.zone-select__input:hover {
  border-color: var(--accent);
}

/* ============================================================
   Logo image dans la barre du haut (remplace le texte ACUPUNK)
   ============================================================ */
.brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.brand__logo {
  height: 40px !important;
  max-height: 40px !important;
  width: auto !important;
  display: block;
}

/* ============================================================
   Logo bord-à-bord : remplit toute la hauteur de la topbar.
   Ce bloc surcharge les règles .brand / .brand__logo ci-dessus.
   ============================================================ */
.brand {
  display: inline-flex !important;
  align-items: center !important;
  align-self: stretch !important;
  line-height: 0 !important;
  margin: -1rem 0 !important;
}
.brand__logo {
  height: 100% !important;
  max-height: none !important;
  width: auto !important;
  display: block !important;
}


/* ============================================================
   Cartographie (page d'accueil UNIQUEMENT, via .page-carto) :
   grille des zones + titres + intro centrés au milieu de la page.
   ============================================================ */
.page-carto .hero {
  text-align: center;
}
.page-carto .section-title {
  text-align: center;
}
.page-carto .zone-grid {
  max-width: 480px;
  width: auto;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}

/* ============================================================
   Éditeur : agrandir l'image pour les zones CORPS uniquement
   (image très verticale 1024x1536). Cible via data-zone, donc
   sans impact sur les oreilles / mains. Le système center/contain
   garde la coïncidence clics <-> points.
   ============================================================ */
.editor[data-zone="corps-avant"] .editor__stage,
.editor[data-zone="corps-dos"] .editor__stage {
  max-width: 760px;
}

