/* ============================================================================
   Villas Victoria — Prototype  ·  style.css
   Système de design "concierge haut de gamme" (Méditerranée)
============================================================================ */

:root {
  /* Palette */
  --brand:        #1C3A2E;   /* vert profond (cyprès) */
  --brand-700:    #244a3a;
  --brand-600:    #2f5d49;
  --brand-300:    #7fa090;
  --brand-50:     #eef3ef;
  --brass:        #b08d57;   /* laiton / or */
  --brass-soft:   #c8a877;
  --ink:          #1b231e;
  --ink-soft:     #5a655d;
  --line:         #e6e0d4;
  --line-soft:    #efe9dd;
  --paper:        #f7f3ea;   /* fond crème */
  --paper-2:      #fbf8f2;
  --white:        #ffffff;

  /* Statuts missions */
  --st-available: #6b7b70;
  --st-booked:    #1C3A2E;
  --st-pending:   #b8860b;
  --st-pending-bg:#fbf1d8;
  --st-completed: #2f7d5b;
  --st-completed-bg:#e3f1e8;
  --st-anomaly:   #b4452f;
  --st-anomaly-bg:#fbe7e1;

  /* Bande réservation */
  --res-bg:       #efe7d6;
  --res-bd:       #e0d3b8;
  --res-ink:      #6f6147;
  --res-direct-bg:#e7e9f1;
  --res-direct-bd:#cfd4e6;
  --res-direct-ink:#4a517a;

  /* Mesures planning */
  --col: 96px;
  --villa-col: 184px;
  --row-h: 78px;
  --band-area: 38px;

  /* UI */
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 7px;
  --shadow-1: 0 1px 2px rgba(27,35,30,.06), 0 2px 8px rgba(27,35,30,.05);
  --shadow-2: 0 6px 24px rgba(27,35,30,.10), 0 2px 6px rgba(27,35,30,.06);
  --shadow-pop: 0 18px 50px rgba(27,35,30,.22);
  --font-ui: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  --font-display: 'Fraunces', 'Constantia', Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }

/* Taille PAR DÉFAUT des icônes inline : sans elle, un SVG hors contexte dimensionné
   (hint, cellule de tableau, carte…) s'affiche en pleine largeur. Les contextes
   spécifiques (.btn .ic, .empty .ic…) continuent de surcharger cette base. */
svg.ic { width: 16px; height: 16px; flex: 0 0 auto; vertical-align: -3px; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 80% -10%, #ffffff 0%, rgba(255,255,255,0) 60%),
    var(--paper);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; margin: 0; color: var(--ink); }
a { color: inherit; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; border-radius: 6px; }

/* ============================ App shell ============================ */
.app { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 18px;
  padding: 0 22px; height: 64px;
  background: rgba(247,243,234,.86);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--brand-600), var(--brand));
  color: var(--brass-soft);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), var(--shadow-1);
}
.brand__mark svg { width: 20px; height: 20px; }
.brand__name { font-family: var(--font-display); font-size: 18px; font-weight: 600; line-height: 1; }
.brand__name small { display: block; font-family: var(--font-ui); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--brass); margin-top: 3px; font-weight: 600; }

.topbar__spacer { flex: 1; }

/* Bascule de rôle */
.roleswitch { display: inline-flex; background: var(--paper-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; box-shadow: var(--shadow-1); }
.roleswitch button {
  border: 0; background: transparent; cursor: pointer;
  padding: 7px 15px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft);
  display: inline-flex; align-items: center; gap: 7px; transition: .15s;
}
.roleswitch button .ic { width: 15px; height: 15px; }
.roleswitch button[aria-pressed="true"] { background: var(--brand); color: #fff; box-shadow: var(--shadow-1); }

/* Sélecteur d'utilisateur (équipe) */
.userpick { display: inline-flex; align-items: center; gap: 9px; }
.userpick__label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.userpick select {
  appearance: none; border: 1px solid var(--line); background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235a655d' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  padding: 8px 30px 8px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; box-shadow: var(--shadow-1);
}

/* Cloche notifications */
.bell { position: relative; }
.bell__btn {
  border: 1px solid var(--line); background: var(--white); width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center; cursor: pointer; color: var(--ink); box-shadow: var(--shadow-1);
}
.bell__btn svg { width: 19px; height: 19px; }
.bell__dot { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--st-anomaly); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--paper); }

/* ============================ Navigation ============================ */
.tabs { display: flex; gap: 4px; padding: 10px 22px 0; border-bottom: 1px solid var(--line); background: rgba(247,243,234,.6); position: sticky; top: 64px; z-index: 30; }
.tabs button {
  border: 0; background: transparent; cursor: pointer; padding: 10px 14px 13px; font-size: 13.5px; font-weight: 600;
  color: var(--ink-soft); border-bottom: 2.5px solid transparent; display: inline-flex; align-items: center; gap: 8px; position: relative;
}
.tabs button .ic { width: 16px; height: 16px; }
.tabs button[aria-current="true"] { color: var(--brand); border-bottom-color: var(--brand); }
.tabs button .pill-count { background: var(--st-anomaly); color: #fff; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 999px; }

.view { padding: 22px; flex: 1; }
.view__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.view__title { font-size: 25px; }
.view__subtitle { color: var(--ink-soft); font-size: 13.5px; margin-top: 3px; }

/* ============================ Boutons ============================ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--white); color: var(--ink); padding: 10px 16px; border-radius: 11px; font-size: 13.5px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-1); transition: .15s; white-space: nowrap; }
.btn:hover { border-color: var(--brand-300); }
.btn .ic { width: 16px; height: 16px; }
.btn--primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn--primary:hover { background: var(--brand-700); border-color: var(--brand-700); }
.btn--brass { background: var(--brass); color: #fff; border-color: var(--brass); }
.btn--brass:hover { background: #9d7c49; }
.btn--danger { background: #fff; color: var(--st-anomaly); border-color: #e9c7bd; }
.btn--danger:hover { background: var(--st-anomaly-bg); }
.btn--ghost { background: transparent; box-shadow: none; }
.btn--sm { padding: 7px 12px; font-size: 12.5px; border-radius: 9px; }
.btn--lg { padding: 13px 22px; font-size: 15px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ============================ Filtres planning ============================ */
.planbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.chipset { display: inline-flex; gap: 6px; }
.fchip { border: 1px solid var(--line); background: var(--white); padding: 7px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); cursor: pointer; display: inline-flex; gap: 7px; align-items: center; box-shadow: var(--shadow-1); }
.fchip[aria-pressed="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }
.fchip .dot { width: 8px; height: 8px; border-radius: 50%; }

.toggle { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; color: var(--ink-soft); cursor: pointer; user-select: none; }
.toggle input { display: none; }
.toggle .track { width: 38px; height: 22px; border-radius: 999px; background: #d8d0c0; position: relative; transition: .15s; }
.toggle .track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-1); transition: .15s; }
.toggle input:checked + .track { background: var(--brand); }
.toggle input:checked + .track::after { transform: translateX(16px); }

/* ============================ Planning ============================ */
.planning {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--white);
  overflow: auto; box-shadow: var(--shadow-1); max-height: calc(100vh - 250px);
  position: relative;
}
.pgrid { min-width: max-content; }

/* En-tête de dates */
.phead { display: flex; position: sticky; top: 0; z-index: 6; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.phead__corner {
  width: var(--villa-col); flex: 0 0 var(--villa-col); position: sticky; left: 0; z-index: 7;
  background: var(--paper-2); border-right: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 16px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600;
}
.phead__day { width: var(--col); flex: 0 0 var(--col); text-align: center; padding: 9px 0; border-right: 1px solid var(--line-soft); }
.phead__day.is-weekend { background: #f3efe5; }
.phead__day.is-today { background: var(--brand-50); }
.phead__day .dow { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
.phead__day .num { font-family: var(--font-display); font-size: 17px; font-weight: 600; line-height: 1.1; }
.phead__day.is-today .num { color: var(--brand); }
.phead__day .mon { font-size: 10px; color: var(--brass); text-transform: uppercase; letter-spacing: .05em; }
.phead__day .todaytag { font-size: 9px; font-weight: 700; color: #fff; background: var(--brand); border-radius: 999px; padding: 1px 6px; letter-spacing: .04em; }

/* Lignes villas */
.prow { display: flex; border-bottom: 1px solid var(--line-soft); min-height: var(--row-h); }
.prow:last-child { border-bottom: 0; }
.prow__villa {
  width: var(--villa-col); flex: 0 0 var(--villa-col); position: sticky; left: 0; z-index: 5;
  background: var(--white); border-right: 1px solid var(--line); padding: 12px 16px;
  display: flex; flex-direction: column; justify-content: center; gap: 3px;
}
.prow:hover .prow__villa { background: var(--paper-2); }
.prow__villa .vname { font-family: var(--font-display); font-size: 15px; font-weight: 600; }
.prow__villa .vmeta { font-size: 11px; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; }
.prow__villa .vmeta .key { display: inline-flex; align-items: center; gap: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-weight: 600; }
.prow__villa .vmeta .key svg { width: 11px; height: 11px; color: var(--brass); }

/* Piste (jours) */
.prow__track { position: relative; flex: 1; }
.ptrack__grid { position: absolute; inset: 0; display: flex; }
.ptrack__cell { width: var(--col); flex: 0 0 var(--col); border-right: 1px solid var(--line-soft); }
.ptrack__cell.is-weekend { background: #faf7f0; }
.ptrack__cell.is-today { background: var(--brand-50); }

/* Bandes de réservation */
.resband {
  position: absolute; top: 7px; height: 26px; border-radius: 999px;
  background: var(--res-bg); border: 1px solid var(--res-bd);
  display: flex; align-items: center; gap: 7px; padding: 0 12px; overflow: hidden;
  font-size: 11.5px; color: var(--res-ink); font-weight: 600; cursor: default; z-index: 2;
}
.resband.is-direct { background: var(--res-direct-bg); border-color: var(--res-direct-bd); color: var(--res-direct-ink); }
.resband .guests { display: inline-flex; align-items: center; gap: 3px; opacity: .85; }
.resband .guests svg { width: 12px; height: 12px; }
.resband .arrow { opacity: .6; }
.resband.clip-start { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.resband.clip-end { border-top-right-radius: 0; border-bottom-right-radius: 0; }

/* Couche pastilles missions (grille par jour) */
.pmissions { position: absolute; left: 0; right: 0; top: var(--band-area); bottom: 4px; display: grid; pointer-events: none; }
.pmcell { padding: 0 4px; display: flex; flex-direction: column; gap: 3px; align-items: stretch; justify-content: flex-start; }

.mpill {
  pointer-events: auto; cursor: pointer; border: 1px solid transparent; border-radius: 8px;
  padding: 4px 7px; min-height: 26px; font-size: 11.5px; font-weight: 700; line-height: 1.1;
  display: flex; align-items: center; gap: 4px; box-shadow: var(--shadow-1); transition: transform .1s, box-shadow .1s;
  background: #fff; white-space: nowrap; overflow: hidden;
}
.mpill:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); z-index: 3; }
.mpill .code { font-size: 10px; }
.mpill .ini { font-weight: 800; letter-spacing: .02em; }
.mpill .av { width: 14px; height: 14px; border-radius: 50%; display: grid; place-items: center; font-size: 8px; color: #fff; font-weight: 800; flex: 0 0 auto; }
.mpill .sdot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto; }

/* variantes statut */
.mpill--available { background: #fff; border-color: #cdd5cd; color: var(--st-available); border-style: dashed; }
.mpill--available::before { content: '+'; font-weight: 800; color: var(--st-available); margin-right: 1px; }
.mpill--booked { background: var(--brand); color: #fff; border-color: var(--brand); }
.mpill--mine { background: linear-gradient(180deg, #2a5644, var(--brand)); color: #fff; border-color: var(--brass); box-shadow: 0 0 0 1.5px var(--brass-soft), var(--shadow-1); }
.mpill--pending { background: var(--st-pending-bg); color: #8a6608; border-color: #ecd9a3; }
.mpill--completed { background: var(--st-completed-bg); color: var(--st-completed); border-color: #bfe0cd; }
.mpill--anomaly { background: var(--st-anomaly-bg); color: var(--st-anomaly); border-color: #eec3b8; }
.mpill.is-dim { opacity: .28; filter: grayscale(.3); }

/* Légende */
.legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 14px; padding: 14px 16px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); }
.legend__group { display: flex; flex-direction: column; gap: 8px; }
.legend__group h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); font-family: var(--font-ui); font-weight: 700; }
.legend__items { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.legend__item { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-soft); }
.legend__swatch { width: 22px; height: 16px; border-radius: 6px; border: 1px solid transparent; }

/* ============================ Cartes / listes ============================ */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-1); }
.card--click { cursor: pointer; transition: .15s; }
.card--click:hover { box-shadow: var(--shadow-2); border-color: var(--brand-300); transform: translateY(-1px); }

.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 16px; box-shadow: var(--shadow-1); }
.stat__label { font-size: 11.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.stat__value { font-family: var(--font-display); font-size: 27px; font-weight: 600; margin-top: 4px; }
.stat__value small { font-size: 13px; color: var(--ink-soft); font-family: var(--font-ui); }
.stat--accent .stat__value { color: var(--brand); }

/* ============================ Badges ============================ */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; letter-spacing: .01em; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; }
.badge--available { background: #eef1ee; color: var(--st-available); }
.badge--booked { background: var(--brand-50); color: var(--brand); }
.badge--pending { background: var(--st-pending-bg); color: #8a6608; }
.badge--completed { background: var(--st-completed-bg); color: var(--st-completed); }
.badge--anomaly { background: var(--st-anomaly-bg); color: var(--st-anomaly); }
.badge--type { background: var(--paper); border: 1px solid var(--line); color: var(--ink-soft); }

.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 800; flex: 0 0 auto; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.18); }
.avatar--sm { width: 22px; height: 22px; font-size: 9.5px; }
.avatar--lg { width: 40px; height: 40px; font-size: 14px; }

/* ============================ Modale ============================ */
.scrim { position: fixed; inset: 0; background: rgba(20,28,23,.46); backdrop-filter: blur(2px); z-index: 60; display: flex; align-items: flex-end; justify-content: center; padding: 0; opacity: 0; animation: fade .18s forwards; }
@keyframes fade { to { opacity: 1; } }
@media (min-width: 720px) { .scrim { align-items: center; padding: 24px; } }

.sheet {
  background: var(--paper-2); width: 100%; max-width: 560px; max-height: 94vh; overflow: auto;
  border-radius: 22px 22px 0 0; box-shadow: var(--shadow-pop); transform: translateY(18px); animation: rise .22s forwards;
}
@keyframes rise { to { transform: translateY(0); } }
@media (min-width: 720px) { .sheet { border-radius: 20px; max-width: 600px; } }
.sheet--wide { max-width: 860px; }

.sheet__head { position: sticky; top: 0; z-index: 2; background: var(--paper-2); padding: 18px 22px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; gap: 14px; }
.sheet__grip { display: none; }
@media (max-width: 719px) { .sheet__grip { display: block; width: 42px; height: 4px; border-radius: 999px; background: #d8d0c0; margin: 8px auto 2px; } .sheet__head { padding-top: 4px; } }
.sheet__title { font-size: 20px; }
.sheet__sub { color: var(--ink-soft); font-size: 13px; margin-top: 2px; }
.sheet__close { margin-left: auto; border: 1px solid var(--line); background: #fff; width: 40px; height: 40px; border-radius: 10px; cursor: pointer; display: grid; place-items: center; color: var(--ink-soft); flex: 0 0 auto; }
.sheet__body { padding: 18px 22px; }
.sheet__foot { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--paper-2) 22%); padding: 16px 22px 20px; display: flex; gap: 10px; }
.sheet__foot .btn { flex: 1; }

/* ============================ Détail mission ============================ */
.mhero { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--radius); background: linear-gradient(150deg, var(--brand-600), var(--brand)); color: #fff; margin-bottom: 16px; }
.mhero__type { width: 52px; height: 52px; border-radius: 14px; background: rgba(255,255,255,.14); display: grid; place-items: center; font-family: var(--font-display); font-size: 20px; font-weight: 700; flex: 0 0 auto; box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); }
.mhero__t { font-size: 12px; opacity: .8; text-transform: uppercase; letter-spacing: .08em; }
.mhero__v { font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.mhero__pay { margin-left: auto; text-align: right; }
.mhero__pay .amt { font-family: var(--font-display); font-size: 26px; font-weight: 600; color: var(--brass-soft); }
.mhero__pay .lbl { font-size: 11px; opacity: .8; text-transform: uppercase; letter-spacing: .06em; }

.infolist { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.infolist .row { background: var(--white); padding: 12px 14px; }
.infolist .row.full { grid-column: 1 / -1; }
.infolist .k { font-size: 11px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; display: flex; align-items: center; gap: 6px; }
.infolist .k svg { width: 13px; height: 13px; color: var(--brass); }
.infolist .val { font-size: 15px; font-weight: 600; margin-top: 3px; }
.infolist .val.mono { font-family: 'SFMono-Regular', ui-monospace, Menlo, Consolas, monospace; letter-spacing: .08em; }

.keybox { display: inline-flex; align-items: center; gap: 8px; background: var(--brand-50); border: 1px dashed var(--brand-300); color: var(--brand); padding: 6px 12px; border-radius: 10px; font-weight: 800; font-size: 18px; letter-spacing: .14em; font-family: 'SFMono-Regular', ui-monospace, monospace; }

.assignee-banner { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-radius: 12px; margin-top: 14px; font-size: 13px; }
.assignee-banner--mine { background: var(--brand-50); border: 1px solid var(--brand-300); }
.assignee-banner--other { background: var(--paper); border: 1px solid var(--line); }

/* ============================ Formulaires & rapports ============================ */
.field { margin-bottom: 15px; }
.field > label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.field .hint { font-size: 12px; color: var(--ink-soft); margin-top: 5px; }
.input, .textarea, .select { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 11px; padding: 11px 13px; font-size: 14px; font-family: inherit; color: var(--ink); box-shadow: var(--shadow-1); }
.textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--brand-300); outline: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.section-title { display: flex; align-items: center; gap: 10px; margin: 22px 0 12px; }
.section-title h3 { font-size: 16px; }
.section-title .ic { width: 18px; height: 18px; color: var(--brand); }
.section-title .count { margin-left: auto; font-size: 12px; color: var(--ink-soft); font-weight: 600; }
.section-title .line { flex: 1; height: 1px; background: var(--line); }

/* Checklist oui/non */
.checklist { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-1); }
.checkrow { display: flex; align-items: center; gap: 12px; padding: 11px 15px; border-bottom: 1px solid var(--line-soft); }
.checkrow:last-child { border-bottom: 0; }
.checkrow__label { flex: 1; font-size: 14px; font-weight: 500; }
.yesno { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; flex: 0 0 auto; }
.yesno button { border: 0; background: #fff; padding: 6px 14px; font-size: 12.5px; font-weight: 700; cursor: pointer; color: var(--ink-soft); }
.yesno button + button { border-left: 1px solid var(--line); }
.yesno button.on-yes[aria-pressed="true"] { background: var(--st-completed-bg); color: var(--st-completed); }
.yesno button.on-no[aria-pressed="true"] { background: var(--st-anomaly-bg); color: var(--st-anomaly); }
.group-sub { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--brass); padding: 12px 15px 4px; background: var(--paper-2); border-bottom: 1px solid var(--line-soft); }

/* Photos */
.photogrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.photoslot { aspect-ratio: 4/3; border-radius: 12px; border: 1.5px dashed var(--line); background: var(--paper-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; color: var(--ink-soft); position: relative; overflow: hidden; transition: .15s; }
.photoslot:hover { border-color: var(--brand-300); color: var(--brand); }
.photoslot .ic { width: 22px; height: 22px; }
.photoslot .lbl { font-size: 12px; font-weight: 600; }
.photoslot .req { position: absolute; top: 6px; right: 6px; font-size: 9px; font-weight: 800; color: var(--st-anomaly); background: #fff; padding: 1px 6px; border-radius: 999px; border: 1px solid #eec3b8; }
.photoslot.is-filled { border-style: solid; border-color: var(--brand-300); color: #fff; }
.photoslot.is-filled .fill { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; }
.photoslot.is-filled .check { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--st-completed); color: #fff; display: grid; place-items: center; }

/* Anomalies */
.anomaly-card { border: 1px solid #eec3b8; background: var(--st-anomaly-bg); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; display: flex; gap: 11px; align-items: flex-start; }
.anomaly-card .ic { width: 18px; height: 18px; color: var(--st-anomaly); flex: 0 0 auto; margin-top: 2px; }
.anomaly-card .t { font-weight: 700; font-size: 13.5px; }
.anomaly-card .c { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.anomaly-card .ph { font-size: 11px; color: var(--st-anomaly); font-weight: 700; margin-top: 6px; display: inline-flex; gap: 5px; align-items: center; }
.anomaly-card .rm { margin-left: auto; border: 0; background: transparent; cursor: pointer; color: var(--st-anomaly); min-width: 30px; min-height: 30px; border-radius: 8px; display: grid; place-items: center; }
.anomaly-card .rm:hover { background: #fff; }

/* Bandeau de progression rapport */
.reqbar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--paper-2); border: 1px solid var(--line); margin-bottom: 16px; font-size: 13px; }
.reqbar .ic { width: 18px; height: 18px; }
.reqbar.ok { background: var(--st-completed-bg); border-color: #bfe0cd; color: var(--st-completed); }
.reqbar.ko { background: #fff; color: var(--ink-soft); }

/* ============================ Validation admin ============================ */
.vsplit { display: grid; grid-template-columns: 320px 1fr; gap: 16px; align-items: start; }
@media (max-width: 880px) { .vsplit { grid-template-columns: 1fr; } }
.vlist { display: flex; flex-direction: column; gap: 8px; }
.vlist__item { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 12px 13px; cursor: pointer; display: flex; gap: 11px; align-items: center; box-shadow: var(--shadow-1); transition: .12s; }
.vlist__item:hover { border-color: var(--brand-300); }
.vlist__item[aria-selected="true"] { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow-1); }
.vlist__item .meta { flex: 1; min-width: 0; }
.vlist__item .meta .v { font-weight: 700; font-size: 13.5px; }
.vlist__item .meta .s { font-size: 12px; color: var(--ink-soft); }

.review { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); overflow: hidden; }
.review__head { padding: 18px 20px; border-bottom: 1px solid var(--line); background: var(--paper-2); }
.review__body { padding: 20px; }
.review__photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px,1fr)); gap: 8px; }
.thumb { aspect-ratio: 4/3; border-radius: 10px; background: linear-gradient(135deg, var(--brand-300), var(--brand-600)); display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 600; text-align: center; padding: 6px; box-shadow: var(--shadow-1); }

.empty { text-align: center; padding: 48px 20px; color: var(--ink-soft); }
.empty .ic { width: 40px; height: 40px; color: var(--brand-300); margin-bottom: 12px; }

/* ============================ Table villas ============================ */
.vtable { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-1); }
.vtable th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--paper-2); font-weight: 700; }
.vtable td { padding: 13px 14px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; vertical-align: middle; }
.vtable tr:last-child td { border-bottom: 0; }
.vtable tr.click { cursor: pointer; }
.vtable tr.click:hover td { background: var(--paper-2); }
.vtable .vn { font-weight: 700; font-family: var(--font-display); font-size: 15px; }
.vtable .addr { color: var(--ink-soft); font-size: 12px; }
.tarif { display: inline-flex; gap: 4px; align-items: baseline; }
.tarif b { font-weight: 700; }
.ical-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--st-completed); background: var(--st-completed-bg); border: 1px solid #bfe0cd; padding: 2px 8px; border-radius: 999px; font-weight: 700; }

/* ============================ Notifications panel ============================ */
.notifpanel { position: fixed; top: 70px; right: 18px; width: 360px; max-width: calc(100vw - 28px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-pop); z-index: 70; overflow: hidden; }
.notifpanel__head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.notifpanel__head h3 { font-size: 15px; flex: 1; }
.notifpanel__list { max-height: 380px; overflow: auto; }
.notif { display: flex; gap: 11px; padding: 13px 16px; border-bottom: 1px solid var(--line-soft); }
.notif:last-child { border-bottom: 0; }
.notif.unread { background: var(--brand-50); }
.notif__ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto; }
.notif__ic svg { width: 16px; height: 16px; }
.notif__ic.new { background: var(--brand-50); color: var(--brand); }
.notif__ic.booked { background: var(--brand-50); color: var(--brand); }
.notif__ic.report { background: var(--st-pending-bg); color: #8a6608; }
.notif__ic.alert { background: var(--st-anomaly-bg); color: var(--st-anomaly); }
.notif__ic.cancel { background: var(--st-anomaly-bg); color: var(--st-anomaly); }
.notif__t { font-size: 13px; line-height: 1.4; }
.notif__time { font-size: 11px; color: var(--ink-soft); margin-top: 3px; }

/* ============================ Toasts ============================ */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-pop); display: flex; align-items: center; gap: 10px; animation: toastin .25s; max-width: 90vw; }
.toast svg { width: 17px; height: 17px; flex: 0 0 auto; }
.toast--ok { background: #1f4d39; }
.toast--info { background: var(--brand); }
.toast--warn { background: #7a5a16; }
.toast--err { background: #7d2f20; }
@keyframes toastin { from { transform: translateY(12px); opacity: 0; } }

/* ============================ Helpers ============================ */
.muted { color: var(--ink-soft); }
.brass { color: var(--brass); }
.flex { display: flex; }
.between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.wrap { flex-wrap: wrap; }
.hide-mobile { }
@media (max-width: 760px) {
  .topbar { gap: 10px; padding: 0 14px; }
  .brand__name small { display: none; }
  .userpick__label { display: none; }
  .view { padding: 14px; }
  .tabs { padding: 8px 12px 0; overflow-x: auto; }
  .infolist { grid-template-columns: 1fr; }
  .hide-mobile { display: none !important; }
  .vsplit { grid-template-columns: 1fr; }
}

/* ============================ Page villa / journal / tableaux ============================ */
.tlink { color: var(--brand); font-weight: 700; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; white-space: nowrap; }
.vtable--tight td { padding: 9px 12px; font-size: 13px; }
.vtable th.sortable { cursor: pointer; user-select: none; }
.vtable th.sortable:hover { color: var(--brand); }
.select--inline { width: auto; padding: 8px 34px 8px 12px; font-size: 13px; }
.vlog { border: 1px solid var(--line); border-left: 3px solid var(--brass); background: var(--paper-2); border-radius: 10px; padding: 11px 14px; margin-bottom: 8px; }
.vlog__meta { display: flex; align-items: center; gap: 9px; margin-bottom: 5px; font-size: 12px; }
.vlog__text { font-size: 13.5px; line-height: 1.5; }
.prow__villa .vmeta svg { width: 12px; height: 12px; color: var(--brass); }

/* Marqueurs du calendrier propriétaire */
.mcal--panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-1); max-width: 760px; }
.mtag { font-size: 10px; font-weight: 800; border-radius: 4px; padding: 0 3px; line-height: 1.4; }
.mtag--in { color: var(--st-completed); background: var(--st-completed-bg); }
.mtag--out { color: var(--st-anomaly); background: var(--st-anomaly-bg); }
.mtype { font-size: 9px; font-weight: 800; color: var(--brand); background: var(--brand-50); border-radius: 4px; padding: 0 3px; line-height: 1.5; }

/* ============================ Calendrier mensuel (mobile) ============================ */
.mcal__nav { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.mcal__nav .title { font-family: var(--font-display); font-size: 19px; font-weight: 600; text-transform: capitalize; flex: 1; }
.mcal__nav .nbtn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--ink); box-shadow: var(--shadow-1); }
.mcal__nav .nbtn svg { width: 18px; height: 18px; }
.mcal__dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-bottom: 5px; }
.mcal__dow span { text-align: center; font-size: 10.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); font-weight: 700; }
.mcal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.mcal__day { position: relative; min-height: 54px; border: 1px solid var(--line); background: #fff; border-radius: 11px; display: flex; flex-direction: column; align-items: center; padding: 5px 2px 8px; cursor: pointer; gap: 3px; overflow: hidden; transition: .12s; }
.mcal__day:active { transform: scale(.97); }
.mcal__day .dnum { font-size: 13px; font-weight: 600; line-height: 1; width: 22px; height: 22px; display: grid; place-items: center; }
.mcal__day.is-outside { background: var(--paper-2); opacity: .5; }
.mcal__day.is-weekend { background: #faf7f0; }
.mcal__day.is-today .dnum { background: var(--brand); color: #fff; border-radius: 50%; }
.mcal__day.is-selected { border-color: var(--brand); box-shadow: 0 0 0 1.5px var(--brand); }
.mcal__day .mind { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; justify-content: center; }
.mcal__day .mavail { font-size: 10px; font-weight: 800; color: #fff; background: var(--brand); border-radius: 999px; padding: 1px 6px; line-height: 1.4; }
.mcal__day .mdot { width: 6px; height: 6px; border-radius: 50%; }
.mdot--booked { background: var(--st-booked); }
.mdot--pending { background: var(--st-pending); }
.mdot--completed { background: var(--st-completed); }
.mdot--anomaly { background: var(--st-anomaly); }
.mcal__day .mocc { position: absolute; left: 6px; right: 6px; bottom: 3px; height: 3px; border-radius: 2px; background: var(--res-bd); }
.mcal__day .mocc.is-direct { background: var(--res-direct-bd); }

.mcal-legend { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 12px; padding: 11px 13px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; font-size: 11.5px; color: var(--ink-soft); }
.mcal-legend .li { display: inline-flex; align-items: center; gap: 6px; }

.agenda { margin-top: 18px; }
.agenda__date { font-family: var(--font-display); font-size: 18px; font-weight: 600; text-transform: capitalize; margin-bottom: 4px; }
.agenda__sub { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 12px; }
.agenda__gt { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--brass); font-weight: 800; margin: 14px 0 8px; }
.ag-res { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border: 1px solid var(--line); border-left: 3px solid var(--res-bd); border-radius: 10px; background: var(--paper-2); margin-bottom: 8px; }
.ag-res.is-direct { border-left-color: var(--res-direct-bd); }
.ag-res .v { font-weight: 700; font-size: 13.5px; }
.ag-res .g { font-size: 12px; color: var(--ink-soft); }
.ag-res .tag { margin-left: auto; font-size: 10.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .02em; }
.ag-res .tag--in { background: var(--st-completed-bg); color: var(--st-completed); }
.ag-res .tag--out { background: var(--st-anomaly-bg); color: var(--st-anomaly); }
.ag-res .tag--stay { background: var(--brand-50); color: var(--brand); }
.ag-item { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 8px; cursor: pointer; box-shadow: var(--shadow-1); transition: .12s; }
.ag-item:active { transform: scale(.99); }
.ag-item .code { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 14px; flex: 0 0 auto; color: #fff; background: linear-gradient(150deg, var(--brand-600), var(--brand)); }
.ag-item .code.t-M { background: linear-gradient(150deg, #7a8a5a, #5f6f3f); }
.ag-item .code.t-CO { background: linear-gradient(150deg, #9a6b2f, #7a5320); }
.ag-item .meta { flex: 1; min-width: 0; }
.ag-item .meta .v { font-weight: 700; font-size: 13.5px; }
.ag-item .meta .s { font-size: 12px; color: var(--ink-soft); }
.ag-item .right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ag-item .pay { font-family: var(--font-display); font-weight: 600; font-size: 14px; }

/* ============================ Impression rapport propriétaire ============================ */
.owner { background: #fff; }
@media print {
  .topbar, .tabs, .sheet__foot, .no-print { display: none !important; }
  body { background: #fff; }
  .scrim { position: static; background: #fff; padding: 0; }
  .sheet { box-shadow: none; max-width: 100%; max-height: none; border-radius: 0; }
}
.owner-doc { max-width: 720px; margin: 0 auto; background: #fff; color: #1b231e; }
.owner-doc__head { display: flex; align-items: center; gap: 16px; padding-bottom: 18px; border-bottom: 2px solid var(--brand); }
.owner-doc__logo { width: 50px; height: 50px; border-radius: 12px; background: linear-gradient(150deg, var(--brand-600), var(--brand)); color: var(--brass-soft); display: grid; place-items: center; }
.owner-doc__logo svg { width: 26px; height: 26px; }
.owner-doc h1 { font-size: 24px; }
.owner-doc__meta { margin-left: auto; text-align: right; font-size: 12px; color: var(--ink-soft); }
.owner-doc__section { margin-top: 22px; }
.owner-doc__section h2 { font-size: 15px; color: var(--brand); border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 10px; }
.owner-doc__list { columns: 2; font-size: 13px; }
.owner-doc__list .li { display: flex; gap: 7px; align-items: center; margin-bottom: 5px; break-inside: avoid; }
.owner-doc__list .li svg { width: 14px; height: 14px; color: var(--st-completed); flex: 0 0 auto; }
.owner-doc__concl { background: var(--paper-2); border-left: 3px solid var(--brass); padding: 14px 16px; border-radius: 0 10px 10px 0; font-style: italic; font-size: 14px; }
.owner-doc__sign { margin-top: 26px; display: flex; justify-content: space-between; align-items: flex-end; font-size: 12px; color: var(--ink-soft); }

/* ============================ Extensions avenant §7 — factures, propriétaire, voyageur ============================ */
/* Sélecteur de rôle à 4 entrées : libellés masqués quand l'espace manque (icônes seules) */
.roleswitch--4 button .rlbl { white-space: nowrap; }
@media (max-width: 1150px) {
  .roleswitch--4 button .rlbl { display: none; }
  .roleswitch--4 button { padding: 8px 11px; }
}

/* Badges de statut facture (mêmes tonalités que les statuts mission) */
.badge--inv-submitted { background: var(--st-pending-bg); color: #8a6608; }
.badge--inv-approved  { background: var(--brand-50); color: var(--brand); }
.badge--inv-paid      { background: var(--st-completed-bg); color: var(--st-completed); }
.badge--inv-rejected  { background: var(--st-anomaly-bg); color: var(--st-anomaly); }
.badge--gap { background: var(--st-pending-bg); color: #8a6608; border: 1px dashed #ecd9a3; }
.badge--gap svg { width: 12px; height: 12px; }

/* Rapprochement factures (admin) */
.inv-actions { min-width: 220px; }
.inv-actions .btn { margin: 2px 6px 2px 0; }
.rejectbox { min-width: 250px; }
.rejectbox .textarea { min-height: 60px; }

/* Espace voyageur — carte de séjour */
.guesthero {
  background: linear-gradient(135deg, var(--brand-600), var(--brand));
  color: #fff; border-radius: 18px; padding: 22px 24px;
  display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between;
  box-shadow: var(--shadow-1); margin-bottom: 20px;
}
.guesthero__name { font-size: 22px; font-weight: 700; }
.guesthero__addr { opacity: .88; font-size: 13px; display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.guesthero__addr svg { width: 14px; height: 14px; }
.guesthero__dates { display: flex; gap: 16px; align-items: center; background: rgba(255,255,255,.13); padding: 12px 18px; border-radius: 14px; }
.guesthero__dates small { display: block; text-transform: uppercase; letter-spacing: .09em; font-size: 10px; opacity: .8; }
.guesthero__dates b { display: block; font-size: 14.5px; margin-top: 2px; }
.guesthero__dates span { display: block; font-size: 11px; opacity: .8; margin-top: 1px; }
.guesthero__dates .sep { font-size: 18px; opacity: .7; }
.guesthero__meta { font-size: 13px; opacity: .92; }

.guestactions { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-top: 24px; }
.guestpromo { display: flex; gap: 12px; align-items: center; background: var(--paper-2); border: 1px dashed var(--brass); border-radius: 14px; padding: 12px 16px; max-width: 540px; }
.guestpromo svg { width: 22px; height: 22px; color: var(--brass); flex: 0 0 auto; }

/* Tables : défilement interne sur petit écran (jamais de scroll horizontal de page) */
@media (max-width: 760px) {
  .vtable { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .inv-actions { min-width: 170px; }
}

/* Gestion de l'équipe (§3) */
.vtable tr.is-inactive td { opacity: .55; }
.colorpick { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.colorpick .swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; box-shadow: var(--shadow-1); }
.colorpick .swatch.is-on { border-color: var(--brass); transform: scale(1.12); }
