/* CA Conciergerie — espace propriétaire. Couleurs et polices du site (assets/css/site.css). */

@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("/assets/fonts/cormorant-garamond-latin.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/assets/fonts/outfit-latin.woff2") format("woff2"); }

:root {
  --navy: #0B1F33;
  --navy-deep: #081627;
  --paper: #F6F1E8;
  --ivory: #F3EBDD;
  --sand: #D9CDB8;
  --sea: #3D5A6C;
  --ink: #0B1F33;
  --ink-soft: rgba(11, 31, 51, .74);
  --ink-faint: rgba(11, 31, 51, .66);   /* textes secondaires : 5,02:1 au moins sur les fonds clairs (#ECE8E1 à blanc), 4,5 exigé */
  --card: #FCFAF6;
  --ok: #2E6A4E;
  --ok-bg: #E3EEE6;
  --warn: #8A5A12;
  --warn-bg: #F5EAD3;
  --err: #9B2C2C;
  --err-bg: #F6E2DE;
  --hatch: #E9E2D4;

  --line: #E2D8C6;
  --line-soft: #EDE5D7;

  --font-display: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --font-body: "Outfit", "Helvetica Neue", Arial, system-ui, sans-serif;
  --radius: 8px;        /* champs, étiquettes, cases du calendrier */
  --r: 16px;            /* cartes */
  --hair: 1px solid var(--line);
  --max: 1200px;
  --tabbar-h: 72px;
  --chat-form-h: 120px;   /* formulaire collant de Messages (champ, aide, marges), pour la marge de défilement */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.55 var(--font-body);
}
/* Sans cela, le menu (qui défile) élargirait toute la page sur téléphone. */
body > * { min-width: 0; }
img { max-width: 100%; height: auto; }
a { color: var(--navy); text-underline-offset: .18em; }
a:hover { color: var(--sea); }
:focus-visible { outline: 2px solid var(--sea); outline-offset: 2px; }
/* Sur le bleu nuit, l'anneau bleu-gris ne ressort pas (2,3:1) : anneau sable (10,6:1). */
.top :focus-visible, .adm__side :focus-visible, .adm__top :focus-visible { outline-color: var(--sand); }
/* Avatar de la page en cours : l'anneau passe au-delà de son liseré sable. */
.avatar[aria-current="page"]:focus-visible { outline-offset: 6px; }
p { margin: 0 0 .8em; }
strong { font-weight: 600; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 32px; } }

.sr-only, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; top: 8px; left: 8px; z-index: 10; padding: 8px 12px; background: var(--ivory); color: var(--navy); }

/* ---------------------------------------------------------------- en-tête : bandeau marine */
.top { background: var(--navy); color: var(--ivory); }
.top__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 68px; padding-top: 10px; padding-bottom: 10px; }
.top__brand { display: flex; align-items: center; gap: 10px; margin-right: auto; color: var(--ivory); text-decoration: none; }
.top__brand:hover { color: var(--ivory); }
.top__brand > img { width: 30px; height: 26px; }
.top__name { display: flex; flex-direction: column; gap: 5px; }
.top__name img { width: 148px; height: auto; }
.top__name span { font-size: .58rem; letter-spacing: .22em; text-transform: uppercase; color: rgba(243, 235, 221, .75); }
.top__me { display: flex; align-items: center; gap: 10px; }
.avatar {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; flex: none;
  background: var(--ivory); color: var(--navy); font-size: .9rem; font-weight: 500; letter-spacing: .02em; text-decoration: none;
}
.avatar:hover { background: #fff; color: var(--navy); }
.avatar[aria-current="page"] { box-shadow: 0 0 0 2px var(--navy), 0 0 0 4px var(--sand); }
.top__out { margin: 0; }
.top__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 0;
  font: inherit; font-size: .85rem; color: var(--ivory); background: transparent; cursor: pointer;
  border: 1px solid rgba(243, 235, 221, .4); border-radius: 999px;
}
.top__btn:hover { background: rgba(243, 235, 221, .12); }
.top__btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.top__btn-label { display: none; }
@media (min-width: 700px) {
  .top__brand > img { width: 34px; height: 29px; }
  .top__name img { width: 214px; }
  .top__name span { font-size: .62rem; letter-spacing: .24em; }
  .top__btn { padding: 0 16px; }
  .top__btn-label { display: inline; }
}

/* Menu : des pastilles dans le bandeau, sur leur propre ligne (qui défile) quand la place manque.
   position: relative : les textes masqués des pastilles (.sr-only, en position absolue) restent dans la liste
   qui défile ; sans cela, ils élargissaient la page et la faisaient glisser de côté sur téléphone. */
.menu { order: 3; flex: 1 1 100%; min-width: 0; margin: 0 -16px; }
.menu__list {
  position: relative; display: flex; gap: 4px; margin: 0; padding: 2px 16px 4px; list-style: none;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.menu__list::-webkit-scrollbar { display: none; }
.menu__link {
  display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px;
  white-space: nowrap; text-decoration: none; font-size: .95rem; font-weight: 500; color: rgba(243, 235, 221, .82);
}
.menu__link:hover { color: var(--ivory); background: rgba(243, 235, 221, .1); }
.menu__link[aria-current="page"] { background: var(--ivory); color: var(--navy); }
@media (min-width: 700px) {
  .menu { margin: 0 -32px; }
  .menu__list { padding: 2px 32px 4px; }
}
/* Propriétaire : le menu tient dans le bandeau sur grand écran ; sur téléphone, il passe en bas de l'écran. */
@media (min-width: 1100px) {
  .top--owner .top__brand { margin-right: 0; }
  .top--owner .menu { order: 0; flex: 0 1 auto; margin: 0 auto; }
  .top--owner .menu__list { padding: 0; justify-content: center; }
}
.badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--navy); color: var(--ivory); font-family: var(--font-body); font-size: .7rem; font-weight: 600; letter-spacing: 0;
  font-style: normal; line-height: 1;
}
.menu .badge { background: var(--sand); color: var(--navy); }
.menu__link[aria-current="page"] .badge { background: var(--navy); color: var(--ivory); }

/* Barre d'onglets du propriétaire, en bas de l'écran du téléphone. */
.tabbar { display: none; }
.tabbar__list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); height: var(--tabbar-h); margin: 0; padding: 6px 4px 8px; list-style: none; }
.tabbar__link {
  position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--ink-soft); text-decoration: none; font-size: .7rem; font-weight: 500;
}
.tabbar__link:hover { color: var(--navy); }
.tabbar__icon { display: grid; place-items: center; width: 52px; height: 30px; border-radius: 15px; }
.tabbar__icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabbar__link[aria-current="page"] { color: var(--navy); font-weight: 600; }
.tabbar__link[aria-current="page"] .tabbar__icon { background: var(--navy); color: var(--ivory); }
.tabbar .badge { position: absolute; top: 2px; left: calc(50% + 8px); min-width: 18px; height: 18px; padding: 0 5px; font-size: .62rem; background: var(--warn); color: #fff; }
@media (max-width: 699px) {
  .top--owner .menu { display: none; }
  .tabbar {
    display: block; position: fixed; z-index: 20; left: 0; right: 0; bottom: 0;
    background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
  }
  .has-tabbar { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  .has-tabbar .chat__form { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  /* L'élément qui reçoit le focus ne s'arrête pas sous la barre d'onglets (ni sous le formulaire de Messages). */
  html:has(> body.has-tabbar) { scroll-padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px); }
  html:has(> body.has-tabbar .chat__form) { scroll-padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + var(--chat-form-h) + 12px); }
}

/* ---------------------------------------------------------------- page */
.main { flex: 1; padding-top: 32px; padding-bottom: 64px; }
.foot { border-top: var(--hair); padding: 20px 0 28px; font-size: .85rem; color: var(--ink-faint); }
.foot__inner { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot a { color: var(--ink-soft); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.12; margin: 0 0 .5em; color: var(--navy); }
h1 { font-size: clamp(2.1rem, 6vw, 2.9rem); }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.3rem; }
.h-small { font-size: 1.25rem; }
.eyebrow { margin: 0 0 8px; font-size: .7rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-faint); }
.eyebrow a { color: inherit; }
.lede { font-size: 1.1rem; color: var(--ink-soft); max-width: 44em; }
.muted { color: var(--ink-faint); }
.small { font-size: .88rem; }
.warn { color: var(--warn); }
.nowrap { white-space: nowrap; }
.narrow { max-width: 560px; }
.page-head { margin-bottom: 20px; }
.page-head--row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }

.card { background: var(--card); border: var(--hair); border-radius: var(--r); padding: 20px; margin-bottom: 20px; }
.card--soft { background: transparent; border: 1px dashed var(--sand); }
.card > :last-child { margin-bottom: 0; }
@media (min-width: 700px) { .card { padding: 26px 28px; } }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); margin-bottom: 20px; }
.grid > .card { margin-bottom: 0; }
/* RDV prospect (outil interne) */
.rdv-steps { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 0; margin-bottom: 14px; background: var(--paper); }
.rdv-steps a { padding: 6px 12px; border: var(--hair); border-radius: 999px; background: var(--card); color: var(--navy); font-size: .88rem; text-decoration: none; }
.rdv-state { min-height: 1.3em; margin: 0 0 8px; }
.rdv-objection { padding: 8px 0; border-bottom: var(--hair); }
.rdv-objection summary { cursor: pointer; font-weight: 500; }
.rdv-thumbs { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0 0 16px; list-style: none; }
.rdv-thumbs img { display: block; width: 104px; height: 78px; object-fit: cover; border-radius: var(--radius); }
.rdv-etats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.rdv-etat { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 6px; border: var(--hair); border-radius: var(--radius); background: #fff; text-align: center; font-size: .9rem; cursor: pointer; }
.rdv-etat input { position: absolute; opacity: 0; }
.rdv-etat:has(input:checked) { background: var(--navy); color: var(--ivory); border-color: var(--navy); }
.rdv-etat:has(input:focus-visible) { outline: 2px solid var(--sea); outline-offset: 2px; }
.rdv-piece { min-width: 0; max-width: 100%; }
.rdv-piece legend { padding: 0 6px; }
.rdv-piece input[type="file"] { max-width: 100%; }
.rdv-send { width: 100%; }

.ecran-page { min-height: 100vh; margin: 0; display: flex; flex-direction: column; background: var(--navy); color: var(--ivory); }
.ecran-top { display: flex; align-items: center; justify-content: space-between; padding: 22px 40px; }
.ecran-exit { color: var(--sand); font-size: 1.5rem; text-decoration: none; }
.ecran-main { flex: 1; width: 100%; max-width: 980px; margin: 0 auto; padding: 0 40px 40px; }
.ecran { padding: 40px 0; border-bottom: 1px solid rgba(217, 205, 184, .25); }
.ecran h1, .ecran h2 { margin: 0 0 24px; font-family: var(--font-display); font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 500; color: var(--ivory); }
.ecran-lead { font-size: clamp(1.25rem, 2.4vw, 1.65rem); line-height: 1.5; }
.ecran-note { color: var(--sand); }
.ecran-list { padding-left: 1.2em; font-size: clamp(1.15rem, 2.2vw, 1.45rem); line-height: 1.6; }
.ecran-list--small { font-size: 1.05rem; columns: 2; }
.ecran-table { width: 100%; border-collapse: collapse; font-size: clamp(1.05rem, 2vw, 1.3rem); }
.ecran-table th, .ecran-table td { padding: 10px 0; border-bottom: 1px solid rgba(217, 205, 184, .25); text-align: left; font-weight: 400; }
.ecran-table td { text-align: right; white-space: nowrap; }
.ecran-total th, .ecran-total td { font-weight: 600; color: #fff; }
.ecran-table + .ecran-note { margin-top: 18px; }
.ecran-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 0; margin: 0 0 24px; list-style: none; }
.ecran-cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ecran-cards li { display: flex; flex-direction: column; gap: 6px; padding: 20px; border: 1px solid rgba(217, 205, 184, .35); border-radius: var(--r); }
.ecran-cards strong { font-size: 1.3rem; font-weight: 500; }
.ecran-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 0; margin: 0; list-style: none; }
.ecran-photos img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.ecran-nav { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: center; gap: 24px; padding: 16px; background: var(--navy-deep); }
.ecran-nav[hidden] { display: none; }
.ecran-nav button { padding: 10px 20px; border: 1px solid var(--sand); border-radius: var(--radius); background: transparent; color: var(--ivory); font: inherit; cursor: pointer; }
.ecran-nav button:disabled { opacity: .4; cursor: default; }
.ecran-page.is-slides .ecran { display: none; padding: 20px 0; border: 0; }
.ecran-page.is-slides .ecran.is-on { display: block; }
@media (max-width: 699px) {
  .ecran-top, .ecran-main { padding-left: 16px; padding-right: 16px; }
  .ecran-cards, .ecran-cards--3, .ecran-photos { grid-template-columns: 1fr; }
  .ecran-list--small { columns: 1; }
}
@media print { .rdv-steps, .ecran-nav { display: none; } }

/* Liste d'adresses de l'Estimateur (comme le simulateur du site) */
.adresse { position: relative; }
.adresse__liste { position: absolute; z-index: 20; top: calc(100% - 2px); left: 0; right: 0; max-height: 300px; margin: 0; padding: 6px 0; overflow: auto; list-style: none; background: #fff; border: var(--hair); border-radius: var(--radius); box-shadow: 0 10px 28px rgba(11, 31, 51, .14); }
.adresse__liste li { padding: 10px 14px; cursor: pointer; }
.adresse__liste li[aria-selected="true"], .adresse__liste li:hover { background: var(--ivory); }
.adresse__liste .adresse__vide { cursor: default; color: var(--ink-faint); }
.adresse__liste .adresse__vide:hover { background: none; }

.plain { list-style: none; margin: 0 0 .8em; padding: 0; }
.plain li { padding: 6px 0; }
/* Sommaire d'une longue page (« Mon bien ») : liens vers ses rubriques. */
.toc ul { display: flex; flex-wrap: wrap; gap: 4px 18px; list-style: none; margin: -8px 0 20px; padding: 0; font-size: .95rem; }
.toc a { display: inline-block; padding: 6px 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0 8px; }
.actions form { margin: 0; }
.more { margin-top: 14px; }
.more summary { cursor: pointer; color: var(--navy); font-weight: 500; padding: 6px 0; }
.more[open] summary { margin-bottom: 8px; }

/* ---------------------------------------------------------------- messages */
.alert { padding: 12px 18px; border-radius: 12px; border: 1px solid; margin: 0 0 20px; }
.alert--ok { background: var(--ok-bg); border-color: rgba(46, 106, 78, .35); }
.alert--info { background: var(--warn-bg); border-color: rgba(138, 90, 18, .35); }
.alert--error { background: var(--err-bg); border-color: rgba(155, 44, 44, .35); }

.tag {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-family: var(--font-body); font-size: .8rem; font-weight: 500; line-height: 1.35;
  font-style: normal; letter-spacing: 0; text-transform: none;
  vertical-align: middle; white-space: nowrap; background: var(--ivory); color: var(--ink-soft);
}
.tag--confirmed { background: var(--ok-bg); color: var(--ok); }
.tag--pending { background: var(--warn-bg); color: var(--warn); }
.tag--refused { background: var(--err-bg); color: var(--err); }
.tag--cancelled { background: #ECE8E1; color: var(--ink-faint); }
.tag--in { background: var(--sea); color: var(--ivory); }
.tag--out { background: var(--sand); color: var(--navy); }

/* ---------------------------------------------------------------- boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 10px 22px; border: 1px solid var(--navy); border-radius: 999px;
  background: var(--navy); color: var(--ivory); cursor: pointer; text-decoration: none; text-align: center;
  font: 500 .95rem/1.2 var(--font-body);
  transition: background .25s, color .25s, border-color .25s;
}
.btn:hover { background: var(--navy-deep); color: var(--ivory); }
.btn--ghost { background: transparent; color: var(--navy); }
.btn--ghost:hover { background: var(--navy); color: var(--ivory); }
.btn--small { min-height: 40px; padding: 8px 16px; font-size: .88rem; }
.btn--block { width: 100%; }
.btn--danger { color: var(--err); border-color: var(--err); background: transparent; }
.btn--danger:hover { background: var(--err); color: #fff; border-color: var(--err); }
.linkbtn { font: inherit; color: var(--navy); background: none; border: 0; padding: 4px 0; text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }
.linkbtn.small { font-size: .88rem; }
.linkbtn.muted { color: var(--ink-faint); }

/* ---------------------------------------------------------------- formulaires */
.form { max-width: 480px; }
.form--wide { max-width: 720px; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 18px; border: 0; padding: 0; min-width: 0; }
.field > label, .field > legend { font-weight: 500; font-size: .95rem; padding: 0; }
.field > legend { margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="url"], input[type="tel"],
input[type="search"], input[type="month"], input[type="number"], input:not([type]), select, textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; font: inherit; color: var(--ink);
  background: #fff; border: 1px solid #CBBFA9; border-radius: var(--radius); appearance: none;
}
select { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230B1F33' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 14px center; padding-right: 40px; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--sea); outline-offset: 0; border-color: var(--sea); }
input[type="file"] { max-width: 100%; font: inherit; font-size: .9rem; color: var(--ink-soft); }
input[type="file"]::file-selector-button {
  min-height: 40px; margin-right: 12px; padding: 8px 16px; cursor: pointer;
  font: 500 .88rem/1.2 var(--font-body);
  color: var(--navy); background: transparent; border: 1px solid var(--navy); border-radius: 999px;
  transition: background .25s, color .25s;
}
input[type="file"]::file-selector-button:hover { background: var(--navy); color: var(--ivory); }
[aria-invalid="true"] { border-color: var(--err); }
.field__error { color: var(--err); font-size: .9rem; margin: 0; }
.hint { font-size: .88rem; color: var(--ink-faint); margin: 0; }
/* Rédaction assistée : « Mettre au propre » sous un texte (ajouté par espace.js), version anglaise sous une entrée */
.ia { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin: 0; font-size: .9rem; }
.ia[hidden] { display: none; }
.chat__form .ia { margin-top: 6px; }
.msg__more { margin-top: 6px; font-size: .85rem; }
.msg__more summary { cursor: pointer; color: inherit; opacity: .75; }
.msg__more p { margin: 4px 0 0; }
.msg__tr { margin: 8px 0 0; padding-top: 6px; border-top: 1px solid rgba(11, 31, 51, .12); font-size: .9rem; }
.msg__tr span { color: var(--ink-faint); }
.ia .linkbtn:disabled { opacity: .5; cursor: progress; }
.ia__status { color: var(--ink-faint); }
.english { margin-top: 6px; }
/* Assistant (administration) : demandes, réponses, propositions à valider */
.assistant__thread { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.as { max-width: 40rem; padding: 12px 16px; border: var(--hair); border-radius: var(--r) var(--r) var(--r) 4px; background: var(--card); }
.as p { margin: 0; }
.as--user { align-self: flex-end; background: var(--navy); border-color: var(--navy); color: var(--ivory); border-radius: var(--r) var(--r) 4px var(--r); }
.as--bot { align-self: flex-start; }
.as--wait { color: var(--ink-faint); }
.as--wait form { margin-top: 2px; }
.as-card { max-width: 40rem; padding: 14px 16px; border: var(--hair); border-left: 4px solid var(--navy); border-radius: var(--radius); background: #fff; }
.as-card--done { border-left-color: var(--ok); }
.as-card--failed { border-left-color: var(--err); }
.as-card--discarded { border-left-color: var(--sand); opacity: .75; }
.as-card__kicker { margin: 0; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
.as-card__title { margin: 4px 0 6px; font-weight: 600; }
.as-card__line { margin: 0 0 4px; }
.as-card .actions { margin-top: 10px; align-items: center; }
.as-card__result { margin: 10px 0 0; }
.assistant__intro ul { margin: 6px 0 10px; }
.input--code { font-size: 1.5rem; letter-spacing: .3em; max-width: 240px; font-variant-numeric: tabular-nums; }
.check { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 18px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 3px 0 0; flex: none; accent-color: var(--navy); }
.row { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.pw { display: flex; }
.pw input { flex: 1; min-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.pw__toggle {
  flex: none; font: inherit; font-size: .85rem; padding: 0 14px; cursor: pointer; color: var(--navy);
  background: var(--ivory); border: 1px solid #CBBFA9; border-left: 0; border-radius: 0 var(--radius) var(--radius) 0;
}

/* ---------------------------------------------------------------- connexion */
.auth { max-width: 440px; margin: 12px auto 0; }
.auth__more { margin: 18px 0; }
.auth__lang { margin: 0 0 4px; text-align: right; font-size: .9rem; }
/* Clé d'accès : « ou », puis le bouton, sous le formulaire de connexion */
.passkey { margin: 18px 0 0; }
.passkey .hint { margin: 8px 0 0; }
.passkey .alert { margin: 12px 0 0; }
.passkey__or { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; color: var(--ink-faint); font-size: .9rem; }
.passkey__or::before, .passkey__or::after { content: ""; flex: 1; border-top: var(--hair); }

/* ---------------------------------------------------------------- tableau de bord */
.prop__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.prop__head h2 { margin: 0; }
.prop__head p { margin: 0; }
.prop__now { font-family: var(--font-display); font-size: 1.45rem; line-height: 1.25; margin: 10px 0 18px; }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 0 0 20px; }
.stat { padding: 14px 16px; background: var(--paper); border: var(--hair); border-radius: 12px; }
.stat dt { font-size: .82rem; color: var(--ink-soft); }
.stat dd { margin: 4px 0 0; font-size: 1.45rem; font-weight: 500; line-height: 1.2; }
.stat small { font-family: var(--font-body); font-size: .85rem; color: var(--ink-faint); }
.events { list-style: none; margin: 0 0 12px; padding: 0; }
.events__item { display: flex; flex-direction: column; gap: 2px 16px; padding: 10px 0; border-bottom: 1px solid rgba(217, 205, 184, .6); }
.events__item:last-child { border-bottom: 0; }
.events__dates { font-weight: 500; }
.events__what { color: var(--ink-soft); }
@media (min-width: 700px) {
  .events__item { flex-direction: row; align-items: baseline; }
  .events__dates { flex: none; width: 250px; }
}

/* ---------------------------------------------------------------- calendrier */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tabs__item {
  display: inline-flex; align-items: center; min-height: 40px; padding: 6px 16px; border: var(--hair); border-radius: 999px;
  text-decoration: none; background: var(--card); font-weight: 500;
}
.tabs__item[aria-current="page"] { background: var(--navy); border-color: var(--navy); color: var(--ivory); }
.tabs__item[aria-current="page"] .muted { color: var(--sand); }   /* nombre de l'onglet actif : 10,6:1 sur le bleu nuit */
.calbox { background: var(--card); border: var(--hair); border-radius: var(--r); padding: 14px 10px 16px; margin-bottom: 20px; }
@media (min-width: 700px) { .calbox { padding: 24px 28px; } }
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.cal-nav__title { margin: 0; font-size: 1.7rem; }
.cal-nav__btn {
  display: grid; place-items: center; width: 44px; height: 44px; border: var(--hair); border-radius: 50%;
  text-decoration: none; font-size: 1.2rem; background: #fff;
}
.cal-nav__btn:hover { background: var(--navy); color: var(--ivory); border-color: var(--navy); }
.cal-today { text-align: center; margin: 0 0 8px; font-size: .9rem; }
.cal { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 3px; margin: 8px 0 12px; }
.cal th { font-size: .7rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); padding: 4px 0; }
.day {
  position: relative; height: 54px; padding: 4px 5px; vertical-align: top; overflow: hidden;
  background: #fff; border: 1px solid rgba(217, 205, 184, .8); border-radius: 6px;
}
@media (min-width: 700px) { .day { height: 76px; padding: 6px 8px; } }
.day--none { background: transparent; border-color: transparent; }
.day__n { display: block; font-size: .9rem; font-weight: 500; font-variant-numeric: tabular-nums; position: relative; }
/* Étiquette en bas à droite : c'est la moitié « arrivée » des cases en diagonale (jamais sur le bleu du départ). */
.day__tag { position: absolute; left: 2px; right: 3px; bottom: 3px; font-size: .62rem; letter-spacing: -.01em; line-height: 1.1; text-align: right; overflow: hidden; white-space: nowrap; text-overflow: clip; }
@media (min-width: 700px) { .day__tag { left: 6px; right: 6px; bottom: 6px; font-size: .72rem; } }
/* Sur petit téléphone, trop petites pour être lues : la légende et la liste du mois disent la même chose. */
@media (max-width: 499px) { .day__tag { display: none; } }
.day--res { background: var(--sea); border-color: var(--sea); color: var(--ivory); }
.day--own { background: var(--sand); border-color: var(--sand); }
.day--block { background: repeating-linear-gradient(135deg, var(--hatch) 0 5px, #F7F3EC 5px 10px); color: var(--ink-faint); }
.day--pending { border: 2px dashed #C9A865; }
/* Arrivée : la nuit commence l'après-midi (diagonale bas-droite). Départ : le matin (diagonale haut-gauche). */
.day--res.day--in { background: linear-gradient(135deg, #fff 0 50%, var(--sea) 50%); color: var(--navy); border-color: rgba(217, 205, 184, .8); }
.day--res.day--in .day__tag { color: var(--ivory); }
.day--out:not(.day--res) { color: var(--ivory); }
.day--out.day--free, .day--out.day--pending { background: linear-gradient(135deg, var(--sea) 0 50%, #fff 50%); }
.day--out.day--own { background: linear-gradient(135deg, var(--sea) 0 50%, var(--sand) 50%); }
.day--out.day--block { background: linear-gradient(135deg, var(--sea) 0 50%, var(--hatch) 50%); }
.day--out:not(.day--res) .day__tag { color: var(--navy); }
.day--res.day--in.day--out { background: linear-gradient(135deg, var(--sea) 0 47%, #fff 47% 53%, var(--sea) 53%); color: var(--ivory); border-color: var(--sea); }
/* Jour passé : seul le fond s'estompe (voile clair) ; chiffre et étiquette en bleu nuit, 4,5:1 au moins sur chaque fond estompé. */
.day--past::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: rgba(252, 250, 246, .45); pointer-events: none; }
.day.day--past .day__n, .day.day--past .day__tag { color: var(--navy); }
.day--today { box-shadow: inset 0 0 0 2px var(--navy); }
.day--today.day--res { box-shadow: inset 0 0 0 2px var(--ivory), 0 0 0 1px var(--navy); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; margin: 0; padding: 0; font-size: .85rem; color: var(--ink-soft); }
.legend li { display: flex; align-items: center; gap: 8px; }
.swatch { width: 18px; height: 18px; border-radius: 4px; border: 1px solid rgba(217, 205, 184, .9); background: #fff; }
.swatch--res { background: var(--sea); border-color: var(--sea); }
.swatch--own { background: var(--sand); border-color: var(--sand); }
.swatch--pending { border: 2px dashed #C9A865; }
.swatch--block { background: repeating-linear-gradient(135deg, var(--hatch) 0 3px, #F7F3EC 3px 6px); }
.totals { font-size: 1.05rem; }

/* ---------------------------------------------------------------- demandes */
.reqs { list-style: none; margin: 0; padding: 0; }
.req { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding: 14px 0; border-bottom: 1px solid rgba(217, 205, 184, .6); }
.req:last-child { border-bottom: 0; }
.req__main { flex: 1 1 280px; min-width: 0; }
.req__main p { margin: 0 0 4px; }
.req__dates { font-weight: 500; }
.req__side { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.req__side form { margin: 0; }
@media (min-width: 700px) { .req__side { flex-direction: column; align-items: flex-end; } }
.req__reply { margin-top: 8px !important; padding: 8px 12px; background: var(--paper); border-left: 2px solid var(--sand); }
.req--past { opacity: .75; }
.req--admin { display: grid; gap: 12px; grid-template-columns: 1fr; padding: 18px 0; }
@media (min-width: 900px) { .req--admin { grid-template-columns: 1.2fr 1fr; } }
.req__form { max-width: none; }
.req__form .field { margin-bottom: 10px; }
.req__form .actions { margin: 0; }

/* ---------------------------------------------------------------- compte */
.devices { list-style: none; margin: 0 0 14px; padding: 0; }
.devices__item { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid rgba(217, 205, 184, .6); }
.devices__item .muted { flex-basis: 100%; }
.devices__action { margin: 0 0 0 auto; }
.steps { margin: 0; padding-left: 1.4em; }
.steps > li { margin-bottom: 24px; }
.steps > li::marker { font-family: var(--font-display); font-size: 1.4rem; color: var(--ink-faint); }
.steps h2 { font-size: 1.35rem; }
.qr-row { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.qr { width: 196px; height: 196px; padding: 8px; background: #fff; border: var(--hair); }
.qr svg { display: block; width: 100%; height: 100%; }
.secret { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 1.05rem; letter-spacing: .06em; word-break: break-all; background: #fff; border: var(--hair); padding: 10px 12px; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; list-style: none; padding: 16px; margin: 0 0 20px; background: #fff; border: var(--hair);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 1.1rem; }

/* ---------------------------------------------------------------- tableaux */
/* Tableau plus large que l'écran : une ombre apparaît du côté où il reste des colonnes à faire défiler. */
.scroll {
  overflow-x: auto; margin-bottom: 20px; border: var(--hair); border-radius: var(--r);
  background:
    linear-gradient(to right, var(--card) 30%, rgba(252, 250, 246, 0)) left center / 32px 100% no-repeat local,
    linear-gradient(to left, var(--card) 30%, rgba(252, 250, 246, 0)) right center / 32px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(11, 31, 51, .2), rgba(11, 31, 51, 0)) left center / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(11, 31, 51, .2), rgba(11, 31, 51, 0)) right center / 12px 100% no-repeat scroll,
    var(--card);
}
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th { text-align: left; font-size: .7rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); padding: 12px 14px; border-bottom: var(--hair); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid rgba(217, 205, 184, .5); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
/* En-tête de ligne (nom du bien) : même trait que les cellules voisines, en texte normal. */
.table tbody th { border-bottom: 1px solid rgba(217, 205, 184, .5); vertical-align: top; text-transform: none; letter-spacing: 0; font-size: .95rem; color: var(--ink); }
.table tbody tr:last-child th { border-bottom: 0; }
.table--dense td { padding: 8px 12px; font-size: .88rem; }
.is-off td { opacity: .6; }
.is-bad td { background: #FBF1EF; }
.moves { display: grid; gap: 4px 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.moves__day h3 { margin: 10px 0 4px; }

/* ---------------------------------------------------------------- messages */
.card--link { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.card--link:hover { border-color: var(--navy); color: var(--ink); }
.card--news { background: #fff; border-color: var(--navy); }
.chat { display: flex; flex-direction: column; background: var(--card); border: var(--hair); border-radius: var(--r); }
.chat__list { padding: 14px 10px 6px; min-height: 220px; }
@media (min-width: 700px) { .chat__list { padding: 24px 28px 10px; } }
.chat__empty { color: var(--ink-faint); text-align: center; padding: 48px 12px; margin: 0; }
.chat__day { display: flex; align-items: center; gap: 12px; margin: 14px 0 12px; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }
.chat__day::before, .chat__day::after { content: ""; flex: 1; border-top: 1px solid rgba(217, 205, 184, .8); }
.msg { display: flex; flex-direction: column; align-items: flex-start; margin: 0 0 10px; }
.msg--mine { align-items: flex-end; }
.msg__who { font-size: .78rem; color: var(--ink-faint); margin: 4px 6px 3px; }
.msg__bubble {
  max-width: min(560px, 88%); padding: 10px 14px; background: #fff; border: 1px solid rgba(217, 205, 184, .9);
  border-radius: 16px 16px 16px 4px; overflow-wrap: anywhere;
}
.msg--mine .msg__bubble { background: var(--navy); border-color: var(--navy); color: var(--ivory); border-radius: 16px 16px 4px 16px; }
.msg--mine .msg__bubble a { color: var(--ivory); }
.msg__text { margin: 0; }
.msg__meta { margin: 3px 8px 0; font-size: .72rem; color: var(--ink-faint); }
.msg__photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin: 2px -8px; }
.msg__photos--one { grid-template-columns: minmax(0, 1fr); }
.msg__text + .msg__photos, .msg__text + .msg__docs { margin-top: 10px; }
.msg__photos a { display: block; }
.msg__photos img { display: block; width: 100%; height: auto; max-height: 300px; object-fit: cover; border-radius: 10px; background: var(--paper); }
.msg__docs { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; min-width: min(220px, 60vw); }
.doc { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--paper); color: var(--navy); text-decoration: none; }
.msg--mine .doc { background: rgba(243, 235, 221, .14); color: var(--ivory); }
.doc__icon { flex: none; padding: 5px 5px 4px; border-radius: 3px; background: var(--err); color: #fff; font-size: .6rem; font-weight: 600; letter-spacing: .06em; }
.doc__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc__size { flex: none; font-size: .78rem; opacity: .75; }
.chat__form {
  position: sticky; bottom: 0; z-index: 2; background: var(--ivory); border-top: var(--hair); border-radius: 0 0 var(--r) var(--r);
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
}
.has-tabbar .chat__form { padding-bottom: 10px; }
/* Le formulaire colle au bas de l'écran : un lien de la conversation qui reçoit le focus s'arrête au-dessus. */
html:has(.chat__form) { scroll-padding-bottom: calc(var(--chat-form-h) + 12px); }
@media (min-width: 700px) { .chat__form { padding: 14px 28px 16px; } }
.chat__form .alert { margin-bottom: 8px; }
.chat__form .hint { margin-top: 6px; }
.chat__row { display: flex; align-items: flex-end; gap: 8px; }
.chat__row textarea { flex: 1; min-width: 0; min-height: 48px; max-height: 40vh; padding: 12px 16px; border-radius: 24px; resize: none; line-height: 1.4; }
.chat__attach {
  flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; cursor: pointer;
  background: #fff; border: 1px solid #CBBFA9; color: var(--navy);
}
.chat__attach:hover { border-color: var(--navy); }
.chat__attach:focus-within { outline: 2px solid var(--sea); outline-offset: 2px; }
.chat__send { flex: none; border-radius: 24px; padding: 12px 18px; }
.chat.is-sending .chat__send { opacity: .6; cursor: progress; }
.chat__files { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 8px; padding: 0; }
.chat__file { display: flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 4px 4px 6px; background: #fff; border: var(--hair); border-radius: 18px; font-size: .82rem; }
.chat__file img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.chat__file span { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat__file button { width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--paper); color: var(--ink-soft); font-size: 1rem; line-height: 1; cursor: pointer; }
.convs { list-style: none; margin: 0 0 20px; padding: 0; background: var(--card); border: var(--hair); border-radius: var(--r); overflow: hidden; }
.conv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 14px 18px; border-bottom: 1px solid rgba(217, 205, 184, .6); color: var(--ink); text-decoration: none; }
.convs li:last-child .conv { border-bottom: 0; }
.conv:hover { background: #fff; color: var(--ink); }
.conv__name { font-weight: 500; }
.conv__time { font-size: .8rem; color: var(--ink-faint); text-align: right; white-space: nowrap; }
.conv__last { grid-column: 1 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; color: var(--ink-soft); }
/* Relevés : les montants passent à la ligne au lieu d'être coupés. */
.conv__last--wrap { white-space: normal; overflow: visible; }
.conv--unread { background: #fff; }
.conv--unread .conv__name, .conv--unread .conv__last { font-weight: 600; color: var(--navy); }
.conv--off { opacity: .6; }

/* ---------------------------------------------------------------- relevés */
.stats--wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); margin-bottom: 16px; }
.stats--wide .stat { background: var(--card); }
/* Sur téléphone : une ligne par chiffre (intitulé à gauche, valeur à droite), jamais une case seule sur sa ligne. */
@media (max-width: 559px) {
  .stats, .stats--wide { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .stat { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 14px; }
  .stat dd { margin: 0; flex: none; font-size: 1.45rem; text-align: right; }
}
.cal-nav--left { justify-content: flex-start; gap: 16px; margin: 4px 0 10px; }
.cal-nav--left .cal-nav__title { font-size: clamp(1.8rem, 5vw, 2.4rem); }
.scroll--flat { border: 0; background: transparent; margin-bottom: 12px; }
.table--money td, .table--money th { white-space: nowrap; }
.table--money td:first-child { white-space: normal; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table tfoot th, .table tfoot td { border-top: var(--hair); border-bottom: 0; font-weight: 600; padding-top: 12px; }
.table tr.is-alert, .table tr.is-alert td { background: var(--err-bg); }
.table--inputs input { min-width: 64px; padding-left: 8px; padding-right: 8px; }
/* Sur téléphone, un séjour = une petite fiche (intitulé à gauche, montant à droite). */
@media (max-width: 699px) {
  .table--money thead { display: none; }
  .table--money, .table--money tbody, .table--money tfoot, .table--money tr { display: block; width: 100%; }
  .table--money tr { padding: 10px 0; border-bottom: 1px solid rgba(217, 205, 184, .6); }
  .table--money td, .table--money tfoot th { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; border: 0; white-space: normal; }
  .table--money td::before { content: attr(data-label); color: var(--ink-faint); font-size: .88rem; font-weight: 400; }
  .table--money td:first-child { display: block; font-weight: 500; padding-bottom: 4px; }
  .table--money td:first-child::before { content: none; }
  .table--money tfoot tr { border-bottom: 0; }
  .table--money tfoot th, .table--money tfoot td { border-top: 0; padding-top: 2px; }
}
.card h3 { margin-top: 20px; }
.table--grid th[scope="row"] { font-weight: 500; white-space: nowrap; }
.table--grid td { min-width: 120px; }
/* Mois vide (« — ») : toute la case est cliquable, pas seulement le tiret. */
.table--grid td > a.muted { display: block; margin: -12px -14px; padding: 12px 14px; }
.indy { margin: 0 0 12px; padding-left: 1.3em; }
.indy__line { padding: 10px 0; border-bottom: 1px solid rgba(217, 205, 184, .6); }
.indy__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 4px; }
.indy__row > .small { min-width: 0; overflow-wrap: anywhere; }   /* adresse d'abonnement de l'agenda (Réglages) : coupée au téléphone */
.indy__label { font-weight: 500; }
.indy__total { font-size: 1.1rem; }
.copy {
  flex: none; font: inherit; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
  padding: 4px 10px; color: var(--navy); background: #fff; border: 1px solid #CBBFA9; border-radius: 14px;
}
.copy:hover { border-color: var(--navy); }
.copy.is-done { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.inline-form input[type="date"] { width: auto; min-height: 40px; padding: 6px 10px; }
.lines { margin: 0 0 8px; }
.lines__item { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0 !important; border-bottom: 1px solid rgba(217, 205, 184, .6); }
.lines__item strong { white-space: nowrap; font-variant-numeric: tabular-nums; }
.lines__total { border-bottom: 0; font-size: 1.1rem; }
.invoice { margin-top: 18px; padding: 16px; background: var(--paper); border: var(--hair); border-radius: 12px; }
.invoice p:last-child { margin-bottom: 0; }

.log { white-space: pre-wrap; word-break: break-all; max-height: 320px; overflow: auto; margin: 0 0 8px; padding: 12px;
  font: .78rem/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: #fff; border: var(--hair); }
code { font: .9em ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--paper); padding: 1px 5px; border-radius: 2px; }

.fields { margin: 0 0 16px; }
.fields__row { display: grid; grid-template-columns: minmax(120px, 200px) minmax(0, 1fr); gap: 2px 16px; padding: 10px 0; border-bottom: 1px solid rgba(217, 205, 184, .6); }
.fields__row dt { color: var(--ink-faint); font-size: .9rem; }
.fields__row dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 599px) { .fields__row { grid-template-columns: minmax(0, 1fr); } }

.debug { white-space: pre-wrap; font-size: .75rem; background: #fff; padding: 12px; border: var(--hair); }

/* Suivi du bien (photos, PDF), documents, bilan annuel */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; margin: 10px 0 4px; }
.gallery a { display: block; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.pres { max-width: 780px; margin: 0 auto; }
.pres__notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pres__notes li { display: grid; grid-template-columns: minmax(0, 13em) minmax(0, 1fr) auto; align-items: center; gap: 4px 14px; }
.pres__notes svg { display: block; width: 100%; height: 12px; border-radius: 4px; }
@media (max-width: 560px) {
  .pres__notes li { grid-template-columns: minmax(0, 1fr) auto; }
  .pres__notes svg { grid-column: 1 / -1; grid-row: 2; }
}
.pres__fond { fill: var(--sand); opacity: .45; }
.pres__barre { fill: var(--navy); }
body:has(.pres) .adm__side, body:has(.pres) .adm__top, body:has(.pres) .bubble, body:has(.pres) .adm__footer { display: none; }
@media print {
  body:has(.pres) .adm__main { padding: 0; }
  .pres .card { border: 0; padding: 0 0 12px; margin-bottom: 8px; break-inside: avoid; }
  .pres__outils { display: none !important; }
}
.gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: var(--paper); }
.docs { display: grid; gap: 6px; margin: 8px 0 0; max-width: 520px; }
.docline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 8px; }
.docline .doc { flex: 1 1 260px; min-width: 0; max-width: min(100%, 520px); }
.table tr.sub th, .table tr.sub td { padding-top: 6px; padding-bottom: 6px; color: var(--ink-soft); font-size: .88rem; }
.table tr.sub th { padding-left: 28px; }
.table tr.total th, .table tr.total td { border-top: var(--hair); font-weight: 600; }
.table--recap td.num { white-space: nowrap; }
.table--recap th, .table--recap td { padding-left: 0; }
.table--recap tr.sub th { padding-left: 16px; }
@media (max-width: 359px) { .table--recap th, .table--recap td { padding-right: 8px; } }
.inline-date { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.inline-date input { width: auto; }

/* ---------------------------------------------------------------- tableau de bord du propriétaire */
.hello h1 { margin: 0; }
.hello .lede { margin: 4px 0 0; }
.hello__actions { margin: 0; }
.btn svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.hero-row { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 20px; }
/* Photo du bien en grand (déposée par la conciergerie), ou le monogramme sur fond marine. */
/* Aussi haute que la colonne voisine (devis, message), jamais moins de 300 à 400 px. */
.hero { position: relative; flex: 3 1 520px; min-width: 0; min-height: clamp(300px, 32vw, 400px); margin: 0; border-radius: 20px; overflow: hidden; background: var(--sand); }
.hero__img { position: absolute; top: 0; left: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.hero--blank { background: var(--navy); }
.hero__mark { position: absolute; top: 38%; left: 50%; width: 120px; height: auto; transform: translate(-50%, -50%); opacity: .22; }
.hero__chip {
  position: absolute; top: 16px; left: 16px; display: flex; align-items: center; gap: 8px; margin: 0; padding: 7px 14px;
  border-radius: 999px; background: var(--card); font-size: .88rem; font-weight: 500;
}
.dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--sand); }
.dot--busy { background: var(--ok); }
.dot--own { background: #B08A3E; }
.hero__panel {
  position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 16px; padding: 14px 20px; border-radius: 14px; background: var(--card);
}
.hero__panel h2 { margin: 0; font-size: 2rem; line-height: 1.05; }
.hero__panel p { margin: 2px 0 0; font-size: .88rem; color: var(--ink-soft); }
@media (max-width: 699px) {
  .hero { flex-basis: 100%; min-height: 320px; border-radius: var(--r); }
  .hero__chip { top: 12px; left: 12px; }
  .hero__panel { left: 10px; right: 10px; bottom: 10px; padding: 12px 14px; }
  .hero__panel h2 { font-size: 1.6rem; }
  .hero__panel .btn { width: 100%; }
}
.todo { flex: 2 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.todo > .card { margin: 0; }
.todo > .card:last-child { flex: 1 1 auto; }
.kicker { margin: 0 0 6px; font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--sea); }
.card--quote { background: var(--warn-bg); border-color: #E8D6B2; }
.card--quote .kicker { color: var(--warn); }
.card--quote h2 { margin: 0 0 6px; font-size: 1.6rem; }
.card--quote .actions { margin: 12px 0 0; }
.amount { margin: 0; font-size: 1.85rem; font-weight: 500; line-height: 1.2; font-variant-numeric: tabular-nums; }
.amount small { font-size: .85rem; font-weight: 400; color: var(--ink-soft); }
.card--msg { display: flex; flex-direction: column; gap: 12px; }
.card--msg > * { margin: 0; }
.card--msg .push { margin-top: auto; font-weight: 500; }
.who { display: flex; align-items: center; gap: 12px; }
.who__mark { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--navy); }
.who__mark img { width: 22px; height: 19px; }
.who__text { display: flex; flex-direction: column; margin: 0; line-height: 1.35; }
.who__text span { font-size: .82rem; color: var(--ink-soft); }

.tiles { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); margin: 0 0 24px; }
.tile { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 18px 20px; background: var(--card); border: var(--hair); border-radius: var(--r); }
.tile dt { font-size: .88rem; color: var(--ink-soft); }
.tile dd { margin: 0; }
.tile__value { font-size: 1.45rem; font-weight: 500; line-height: 1.25; font-variant-numeric: tabular-nums; }
.tile__value small { font-size: .9rem; font-weight: 400; color: var(--ink-soft); }
.tile__sub { font-size: .88rem; color: var(--ink-soft); }
.tile .tag { white-space: normal; }
@media (max-width: 559px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 14px; }
  .tile__value { font-size: 1.2rem; }
}
.bar { display: block; width: 100%; height: 8px; margin-top: 6px; border: 0; border-radius: 4px; background: #EDE3D1; color: var(--navy); overflow: hidden; -webkit-appearance: none; appearance: none; }
.bar::-webkit-progress-bar { background: #EDE3D1; border-radius: 4px; }
.bar::-webkit-progress-value { background: var(--navy); border-radius: 4px; }
.bar::-moz-progress-bar { background: var(--navy); border-radius: 4px; }

.split { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 20px; }
.split > .card { margin: 0; min-width: 0; }
.split__main { flex: 3 1 480px; }
.split__side { flex: 2 1 320px; }
.card__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 6px; }
.card__head h2 { margin: 0; }
.stays, .items { list-style: none; margin: 0; padding: 0; }
.stay, .item { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.stay { align-items: center; }
.stay:last-child, .item:last-child { border-bottom: 0; }
.datebox {
  display: flex; flex-direction: column; align-items: center; justify-content: center; width: 52px; height: 52px; flex: none;
  border-radius: 12px; background: var(--navy); color: var(--ivory); line-height: 1.1;
}
.datebox__m { font-size: .6rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.datebox__d { font-size: 1.2rem; font-weight: 500; }
.datebox--own { background: var(--warn-bg); color: var(--warn); border: 1px solid #E8D6B2; }
.stay__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.stay__text span:first-child { font-weight: 500; }
.stay__text span + span { font-size: .88rem; color: var(--ink-soft); }
.item { padding: 14px 0; }
.icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; }
.icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon--err { background: var(--err-bg); color: var(--err); }
.icon--warn { background: var(--warn-bg); color: var(--warn); }
.icon--ok { background: var(--ok-bg); color: var(--ok); }
.photo-thumb { display: block; width: 240px; max-width: 100%; height: 160px; object-fit: cover; border-radius: 12px; }

/* ---------------------------------------------------------------- statistiques (graphiques en SVG) */
.chart { margin: 8px 0 12px; }
.chart__plot { position: relative; height: 200px; border-bottom: 1px solid var(--line); }
.chart__svg { display: block; width: 100%; height: 100%; }
.chart__grid { stroke: var(--line-soft); stroke-width: 1; }
.chart__max { position: absolute; top: -2px; left: 0; font-size: .75rem; color: var(--ink-soft); background: var(--card); padding-right: 6px; }
.chart__x { display: flex; margin-top: 6px; }
.chart__x > span { flex: 1 1 0; text-align: center; font-size: .75rem; color: var(--ink-soft); }
.chart__sm { display: none; }
.chart__legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; font-size: .85rem; color: var(--ink-soft); }
.chart__legend > span { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 559px) {
  .chart__plot { height: 150px; }
  .chart__lg { display: none; }
  .chart__sm { display: inline; }
}
.bar-cur { fill: var(--navy); }
.bar-ahead { fill: #7D97AA; }
.bar-prev { fill: #A38C60; }
.key { display: inline-block; width: 12px; height: 12px; flex: none; border-radius: 3px; background: var(--navy); }
.item > .key { margin-top: 5px; }
.key--cur, .key--0 { background: var(--navy); }
.key--ahead, .key--3 { background: #7D97AA; }
.key--prev, .key--2 { background: #A38C60; }
.key--1 { background: var(--sea); }
.stack { display: block; width: 100%; height: 14px; margin: 6px 0 8px; border-radius: 7px; overflow: hidden; }
.stack--0 { fill: var(--navy); }
.stack--1 { fill: var(--sea); }
.stack--2 { fill: #A38C60; }
.stack--3 { fill: #7D97AA; }
.delta { font-weight: 600; white-space: nowrap; }
.delta--up { color: var(--ok); }
.delta--down { color: var(--warn); }

/* Rapport d'estimation (simulateur du site) */
.grid-2 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); margin-bottom: 20px; }
.grid-2 > .card { margin-bottom: 0; }
.table-wrap { overflow-x: auto; }
.table .is-real { background: var(--paper); }
.table thead .is-real { color: var(--navy); }
.estimate__net th, .estimate__net td { font-size: 1.12rem; }
.card--cta { border-color: var(--navy); }
.adjust { display: grid; gap: 4px 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); margin: 0 0 16px; }
.adjust__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.adjust__row input { width: 5.5em; text-align: right; }

@media print {
  .top, .menu, .tabbar, .foot, .actions, .skip, .tabs, .welcome { display: none !important; }
  body { background: #fff; padding-bottom: 0; }
}

/* Tableau de bord du propriétaire : carte « Bienvenue » des premiers pas, fermée une fois pour toutes */
.welcome__steps { margin: 0 0 14px; padding-left: 1.25em; display: grid; gap: 8px; }
.welcome__steps li { padding-left: 4px; }

/* Étude du bien : photos de la visite */
.study-photos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.study-photos li { display: flex; flex-direction: column; gap: 6px; }
.study-photos img { display: block; width: 100%; height: 160px; object-fit: cover; border-radius: 8px; }
.study-rows .row { align-items: end; }
@media print { .study-photos { grid-template-columns: repeat(3, 1fr); } }

/* Étude du bien : le dossier envoyé (interrupteur par document) et, côté propriétaire, les documents à télécharger */
.dossier__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.dossier { list-style: none; margin: 8px 0 12px; padding: 0; }
.dossier__item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 6px 14px; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.dossier__item:first-child { border-top: 0; }
.dossier__item.is-off .dossier__body > label, .dossier__item.is-off .dossier__body > span { opacity: .55; }
.dossier__body { display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.dossier__body label { margin: 0; }
.dossier__body input[type="file"] { margin-top: 4px; }
.dossier__select { max-width: 420px; }
.switch { -webkit-appearance: none; appearance: none; flex: none; width: 42px; height: 24px; margin: 2px 0 0; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--sand) radial-gradient(circle, var(--card) 8px, transparent 9px) no-repeat 0 50% / 24px 24px;
  transition: background-color .15s, background-position .15s; }
.switch:checked { background-color: var(--navy); background-position: 100% 50%; }
.switch:disabled { cursor: not-allowed; background-color: var(--line-soft); }
.switch:focus-visible { outline: 2px solid var(--sea); outline-offset: 2px; }
.switch--locked { display: block; background-color: var(--ink-faint); background-position: 100% 50%; cursor: default; }
@media (max-width: 560px) {
  .dossier__item { grid-template-columns: auto minmax(0, 1fr); }
  .dossier__item > .tag { grid-column: 2; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) { .switch { transition: none; } }
.dossier-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 10px; margin: 0 0 16px; }
.dossier-files .doc { min-width: 0; }
.dossier-files button.doc { font: inherit; border: 0; cursor: pointer; text-align: left; width: 100%; }
.dossier-files .doc--page { background: var(--navy); color: var(--ivory); }
.dossier-files .doc--page .doc__icon { background: var(--ivory); color: var(--navy); }

/* ---------------------------------------------------------------- administration : « Poste de pilotage » (12/10/2026)
   Barre latérale marine par thèmes ; sur téléphone, un bandeau et le menu en plein écran (lien #menu-admin, sans JavaScript). */
.is-admin { display: block; }
.adm { display: flex; min-height: 100vh; }
.adm__side {
  flex: none; width: 252px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 18px; padding: 24px 16px 18px; background: var(--navy); color: var(--ivory);
}
.adm__brand { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 0 10px; }
.adm__brand img { width: 168px; height: auto; display: block; }
.adm__brand > span { font-size: .6rem; letter-spacing: .24em; text-transform: uppercase; color: rgba(243, 235, 221, .75); }
.adm__close { display: none; }
.adm__search { position: relative; margin: 0; }
.adm__search svg { position: absolute; left: 12px; top: 50%; width: 17px; height: 17px; margin-top: -8.5px; fill: none; stroke: rgba(243, 235, 221, .8); stroke-width: 1.8; }
.adm__search input {
  width: 100%; min-height: 42px; padding: 8px 12px 8px 36px; border: 1px solid rgba(243, 235, 221, .25); border-radius: 999px;
  background: rgba(243, 235, 221, .08); color: var(--ivory); font: inherit; font-size: .9rem; appearance: none;
}
.adm__search input::placeholder { color: rgba(243, 235, 221, .7); }
.adm__search input:focus { outline: 2px solid var(--sand); outline-offset: 0; border-color: transparent; }
.adm__nav ul { margin: 0 0 14px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.adm__group { margin: 0 0 4px; padding: 0 12px; font-size: .66rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--sand); }
.adm__link {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 10px;
  color: rgba(243, 235, 221, .88); text-decoration: none; font-size: .95rem; font-weight: 500;
}
.adm__link:hover { color: var(--ivory); background: rgba(243, 235, 221, .1); }
.adm__link[aria-current="page"] { background: var(--ivory); color: var(--navy); }
.adm__link .badge { background: var(--sand); color: var(--navy); }
.adm__link[aria-current="page"] .badge { background: var(--navy); color: var(--ivory); }
.adm__icon { display: inline-flex; align-items: center; gap: 10px; }
.adm__icon > svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.avatar--small { width: 24px; height: 24px; font-size: .62rem; }
.adm__foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding-top: 14px; border-top: 1px solid rgba(243, 235, 221, .18); }
.adm__out { margin: 6px 12px 0; }
.adm__out .top__btn { width: 100%; justify-content: flex-start; padding: 0 14px; }
.adm__out .top__btn-label { display: inline; }
.adm__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.adm__top { display: none; }
.adm__main { width: 100%; max-width: 1180px; padding: 32px 40px 120px; }
.adm__footer { padding: 18px 40px 24px; }

@media (max-width: 899px) {
  .adm { display: block; }
  .adm__top {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 8px 12px 8px 16px;
    position: sticky; top: 0; z-index: 15; background: var(--navy); color: var(--ivory);
  }
  .adm__top-brand { display: flex; flex-direction: column; gap: 5px; text-decoration: none; color: var(--ivory); }
  .adm__top-brand img { width: 150px; height: auto; display: block; }
  .adm__top-brand span { font-size: .56rem; letter-spacing: .22em; text-transform: uppercase; color: rgba(243, 235, 221, .75); }
  .adm__burger {
    position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
    border: 1px solid rgba(243, 235, 221, .4); color: var(--ivory);
  }
  .adm__burger svg, .adm__close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
  .adm__dot { position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--sand); }
  .adm__side { display: none; position: fixed; inset: 0; z-index: 40; width: auto; height: auto; padding: 18px 16px 24px; }
  .adm__side:target { display: flex; }
  .adm__close {
    display: grid; place-items: center; position: absolute; top: -4px; right: 0; width: 44px; height: 44px; border-radius: 50%;
    border: 1px solid rgba(243, 235, 221, .4); color: var(--ivory);
  }
  .adm__main { padding: 22px 16px 110px; }
  .adm__footer { padding: 16px; }
}

/* Aperçu : « À faire » et la semaine à gauche, les biens et le mois à droite. */
.dash { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.dash__main { flex: 2 1 460px; min-width: 0; }
.dash__side { flex: 1 1 280px; min-width: 0; }
.todo__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.todo__head h2 { margin: 0; }
.todo__group { margin: 18px 0 2px; font-family: var(--font-body); font-size: .7rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); }
.todo__list { margin: 0; padding: 0; list-style: none; }
.todo__row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.todo__text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: .95rem; }
.todo__text strong { font-weight: 500; }
.todo__text .muted { font-size: .88rem; }
.todo__row .btn { flex: none; }
.dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--sand); }
.dot--err { background: var(--err); }
.dot--warn { background: var(--warn); }
.dot--info { background: var(--sea); }
.dot--ok { background: var(--ok); }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.week__day { display: flex; flex-direction: column; gap: 6px; min-height: 120px; padding: 10px 8px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line-soft); }
.week__day.is-today { background: #fff; border-color: var(--navy); }
.week__name { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.week__num { font-size: 1.2rem; font-weight: 500; line-height: 1; }
.week__move { display: block; padding: 4px 6px; border-radius: 6px; font-size: .74rem; line-height: 1.3; }
.week__move--in { background: var(--ok-bg); color: var(--ok); }
.week__move--out { background: var(--warn-bg); color: var(--warn); }
@media (max-width: 699px) {
  .week { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .week__day { min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .week__num { font-size: 1rem; margin-right: 6px; }
  .todo__row { flex-wrap: wrap; }
  .todo__row .btn { margin-left: 22px; }
}
.homes { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.homes__row { display: flex; gap: 12px; align-items: flex-start; }
.homes__row .dot { margin-top: 8px; }
.homes__text { display: flex; flex-direction: column; }
.homes__text a { font-weight: 500; text-decoration: none; }
.kpis .kpis__row { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 10px; font-size: .95rem; }
.kpis__row strong { white-space: nowrap; }
.kpis__bar { display: block; width: 100%; height: 8px; margin: 0 0 14px; }
.kpis__track { fill: var(--hatch); }
.kpis__fill { fill: var(--sea); }

/* Bulle de l'assistant : bouton en bas à droite, panneau par-dessus la page (plein écran sur téléphone). */
.bubble__btn {
  position: fixed; right: 28px; bottom: 28px; z-index: 30; display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 22px 0 18px;
  border-radius: 28px; background: var(--navy); color: var(--ivory); text-decoration: none; font-weight: 500; font-size: .95rem;
  box-shadow: 0 10px 30px rgba(11, 31, 51, .28);
}
.bubble__btn:hover { color: var(--ivory); background: var(--navy-deep); }
.bubble__btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.is-admin:has([data-chat]) .bubble__btn { bottom: 120px; }   /* messagerie : au-dessus de la zone de saisie */
.bubble.is-open .bubble__btn { display: none; }
.bubble__panel {
  position: fixed; right: 28px; bottom: 28px; z-index: 35; width: 420px; height: min(680px, calc(100vh - 56px));
  display: flex; flex-direction: column; overflow: hidden; border-radius: 20px; background: var(--card); border: var(--hair);
  box-shadow: 0 24px 60px rgba(11, 31, 51, .28);
}
.bubble__panel[hidden] { display: none; }
.bubble__head { display: flex; align-items: center; gap: 4px; padding: 12px 10px 12px 18px; background: var(--navy); color: var(--ivory); }
.bubble__head form { margin: 0; }
.bubble__title { flex: 1; display: flex; flex-direction: column; gap: 2px; font-family: var(--font-display); font-size: 1.35rem; line-height: 1.1; }
.bubble__title span { font-family: var(--font-body); font-size: .72rem; color: var(--sand); }
.bubble__icon {
  display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--ivory); cursor: pointer;
}
.bubble__icon:hover { background: rgba(243, 235, 221, .12); color: var(--ivory); }
.bubble__icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bubble__thread { flex: 1; overflow-y: auto; margin: 0; padding: 16px; background: var(--paper); }
.bubble__thread .as, .bubble__thread .as-card { max-width: 100%; }
.bubble__ask { margin: 0; padding: 10px 12px 12px; border-top: var(--hair); background: var(--card); display: flex; flex-direction: column; gap: 8px; }
.bubble__ask .alert { margin: 0; font-size: .9rem; }
.bubble__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid #CBBFA9; background: #fff; color: var(--navy); font: inherit; font-size: .8rem; cursor: pointer; }
.chip:hover { border-color: var(--navy); }
.bubble__row { display: flex; align-items: flex-end; gap: 8px; }
.bubble__row textarea { flex: 1; min-height: 48px; max-height: 160px; padding: 12px 14px; border-radius: 16px; resize: none; font-size: .95rem; }
.bubble__send {
  flex: none; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--navy); color: var(--ivory); cursor: pointer;
}
.bubble__send:disabled { opacity: .5; cursor: progress; }
.bubble__send svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 699px) {
  .bubble__btn { right: 16px; bottom: 18px; width: 60px; height: 60px; padding: 0; justify-content: center; border-radius: 50%; }
  .bubble__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .is-admin:has([data-chat]) .bubble__btn { bottom: 130px; }
  .bubble__panel { inset: 0; right: 0; bottom: 0; width: auto; height: auto; border-radius: 0; border: 0; }
}

/* Certificat de signature : libellés à gauche, valeurs à droite ; l'empreinte se coupe où elle peut. */
.cert { display: grid; grid-template-columns: minmax(0, 12em) minmax(0, 1fr); gap: 8px 16px; margin: 0; }
.cert dt { color: var(--ink-faint); font-size: .86rem; }
.cert dd { margin: 0; min-width: 0; }
.hash { word-break: break-all; font-size: .82rem; }
@media (max-width: 560px) { .cert { grid-template-columns: 1fr; } .cert dd { margin-bottom: 6px; } }

/* ---------------------------------------------------------------- administration : outil « Classement » (31/10/2026)
   Formulaire, résultat et mode présentation (vue épurée, imprimable sans le menu de l'espace). */
.cls-source { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin-bottom: 8px; }
.cls-source .field { margin: 0; min-width: min(100%, 280px); }
.cls-verdict { margin: 0 0 10px; font-family: var(--font-display); font-size: 1.9rem; font-weight: 500; line-height: 1.15; }
.cls-verdict--oui { color: var(--ok); }
.cls-verdict--non { color: var(--err); }
.cls-verdict--etudier { color: var(--warn); }
.cls-key { font-size: 1.08rem; }
.cls-key strong { font-size: 1.12em; }
.cls-why li { padding: 5px 0; }
.cls-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px 10px; }
.cls-months .field { margin: 0; }
.cls-months input { padding-left: 10px; padding-right: 10px; }
.table tr.is-gain td, .table tr.is-gain th { background: var(--ok-bg); }
.cls-chart { display: block; width: 100%; max-width: 440px; height: auto; margin: 8px 0 12px; }
.cls-chart text { font-family: var(--font-body); font-size: 14px; fill: var(--ink); }
.cls-chart .cls-chart__nc { fill: var(--sand); }
.cls-chart .cls-chart__c { fill: var(--navy); }
.cls-chart .cls-chart__axis { stroke: var(--line); }
.cls-presentation { max-width: 780px; margin: 0 auto; }
.cls-presentation .cls-verdict { font-size: 2.2rem; }
.cls-presentation .cls-why li { font-size: 1.05rem; }
.cls-hyp { font-size: .9rem; color: var(--ink-faint); }
body:has(.cls-presentation) .adm__side, body:has(.cls-presentation) .adm__top, body:has(.cls-presentation) .bubble, body:has(.cls-presentation) .adm__footer { display: none; }
@media print {
  .adm__side, .adm__top, .adm__footer, .bubble, .cls-noprint, .cls-source { display: none !important; }
  .adm__main { padding: 0; }
  .cls-presentation .card { border: 0; padding: 0 0 14px; margin-bottom: 8px; break-inside: avoid; }
  .cls-presentation .cls-verdict { font-size: 1.8rem; }
}
