@charset "UTF-8";
/* planv2.mazzeriniere.com — one stylesheet for the whole app.
 *
 * No build step, no preprocessor, no external font, no CDN. The app sets a
 * strict Content-Security-Policy (style-src 'self'), so nothing here may be
 * moved into a style="" attribute: dynamic values arrive as classes.
 *
 * Palette: lake teal, slate, warm paper — Annecy. Every text/background pair
 * below is >= 4.5:1 (WCAG AA); most are above 6:1. Ratios are noted inline.
 */

/* ==========================================================================
   1. Tokens
   ========================================================================== */

:root {
  color-scheme: light dark;

  /* Surfaces */
  --paper: #FAF9F6;
  --surface: #FFFFFF;
  --surface-2: #F1EFEA;
  --line: #D8D4CC;

  /* Text */
  --ink: #20303B;        /* 12.89:1 on paper */
  --ink-muted: #54656F;  /*  5.75:1 on paper */

  /* Brand */
  --brand: #0E5E68;         /* 7.07:1 on paper; white on it 7.45:1 */
  --brand-strong: #0A4A52;  /* 9.43:1 */
  --brand-tint: #E2EEEF;

  /* Text ON a filled button. These MUST flip with the scheme: in dark mode the
     brand and danger colours become light, so white on them measures ~2:1. */
  --on-brand: #FFFFFF;      /* on --brand 7.45:1, on --brand-strong 9.93:1 */
  --on-danger: #FFFFFF;     /* on --danger 6.54:1 */

  /* Semantic */
  --danger: #B3261E;      /* 6.21:1 */
  --danger-tint: #F9E5E4;
  --warn-ink: #5F4200;    /* 8.17:1 on warn tint */
  --warn-tint: #FBF0D3;
  --ok: #1E6B3C;          /* 6.19:1 */
  --ok-tint: #E1F0E6;

  /* Channels — always paired with a shape and a word, never colour alone */
  --ch-booking: #1D4E9E;      /* 7.57:1 */
  --ch-booking-tint: #E3EBF8;
  --ch-direct: #1E6B3C;
  --ch-direct-tint: #E1F0E6;
  --ch-airbnb: #A63A1B;       /* 6.15:1 */
  --ch-airbnb-tint: #F7E7E1;
  --ch-blocked: #54656F;
  --ch-blocked-tint: #ECEAE4;

  /* Type — 1.2 minor third */
  --fs--1: 0.8125rem;
  --fs-0: 1rem;
  --fs-1: 1.1875rem;
  --fs-2: 1.4375rem;
  --fs-3: 1.75rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;

  /* Spacing — 4px base */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-12: 3rem;

  /* Shape and elevation */
  --r-s: 4px;
  --r-m: 8px;
  --r-full: 999px;
  --shadow-1: 0 1px 3px rgb(32 48 59 / 0.12);
  --shadow-2: 0 4px 16px rgb(32 48 59 / 0.16);

  /* Motion */
  --t-fast: 120ms ease-out;
  --t-med: 200ms ease-out;

  --focus-ring: 0 0 0 2px var(--paper), 0 0 0 4px var(--brand);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161D22;
    --surface: #1F2830;
    --surface-2: #26313A;
    --line: #3A4650;
    --ink: #E7E9E5;        /* 13.94:1 */
    --ink-muted: #9DAAB2;  /*  7.16:1 */
    --brand: #5BC0CB;      /*  7.99:1 */
    --brand-strong: #83D2DA;
    --brand-tint: #123C42;
    --on-brand: #161D22;   /* on --brand 7.99:1, on --brand-strong 9.89:1 */
    --on-danger: #161D22;  /* on --danger 9.98:1 */
    --danger: #F2B8B5;     /*  9.98:1 */
    --danger-tint: #3A2223;
    --warn-ink: #F0D48A;
    --warn-tint: #38300F;
    --ok: #7CC99A;         /*  8.66:1 */
    --ok-tint: #1C3326;
    --ch-booking: #8FB4EF; /*  8.06:1 */
    --ch-booking-tint: #1D2B45;
    --ch-direct: #7CC99A;
    --ch-direct-tint: #1C3326;
    --ch-airbnb: #F0967A;  /*  7.58:1 */
    --ch-airbnb-tint: #3C241C;
    --ch-blocked: #9DAAB2;
    --ch-blocked-tint: #26313A;
    --shadow-1: 0 1px 3px rgb(0 0 0 / 0.5);
    --shadow-2: 0 4px 16px rgb(0 0 0 / 0.6);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   2. Base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-0);
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3 { line-height: 1.25; margin: 0 0 var(--sp-3); font-weight: 650; }
h1 { font-size: var(--fs-3); }
h2 { font-size: var(--fs-2); }
h3 { font-size: var(--fs-1); }
p { margin: 0 0 var(--sp-3); }

a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-strong); }

/* One focus treatment for everything. The inner ring is paper-coloured so the
   outer brand ring stays visible on any background, including coloured bars. */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--r-s);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--sp-2);
  top: -4rem;
  z-index: 100;
  padding: var(--sp-2) var(--sp-4);
  background: var(--brand);
  color: #fff;
  border-radius: var(--r-m);
  transition: top var(--t-fast);
}
.skip-link:focus { top: var(--sp-2); color: #fff; }

/* ==========================================================================
   3. Shell — header, nav, main
   ========================================================================== */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.wordmark {
  font-weight: 700;
  font-size: var(--fs-1);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark:hover { color: var(--brand); }

.site-nav { display: flex; gap: var(--sp-1); align-items: center; margin-inline-start: auto; flex-wrap: wrap; }

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--sp-3);
  border-radius: var(--r-m);
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 550;
}
.site-nav a:hover { background: var(--surface-2); color: var(--ink); }
.site-nav a[aria-current="page"] {
  color: var(--brand);
  background: var(--brand-tint);
}

/* A button inside the nav keeps its own colours.
 *
 * `.site-nav a` is (0,1,1) and `.btn--primary` is (0,1,0), so without this the
 * generic nav-link colour won and "+ Réserver" rendered --ink-muted on --brand:
 * 1.23:1, and 1.82:1 on hover. Unreadable, and the reason this rule exists. */
.site-nav a.btn--primary,
.site-nav a.btn--primary:hover { color: var(--on-brand); background: var(--brand); }
.site-nav a.btn--primary:hover { background: var(--brand-strong); }
.site-nav a.btn--ghost,
.site-nav a.btn--ghost:hover { color: var(--brand); }

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-4) var(--sp-12);
}

.site-footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--sp-4) var(--sp-8);
  color: var(--ink-muted);
  font-size: var(--fs--1);
}

/* ==========================================================================
   4. Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 44px;
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid transparent;
  border-radius: var(--r-m);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
}

.btn--primary { background: var(--brand); color: var(--on-brand); }
.btn--primary:hover { background: var(--brand-strong); color: var(--on-brand); }

.btn--ghost { background: transparent; color: var(--brand); border-color: var(--line); }
.btn--ghost:hover { background: var(--surface-2); color: var(--brand-strong); }

.btn--danger { background: var(--danger); color: var(--on-danger); }
.btn--danger:hover { filter: brightness(0.92); color: var(--on-danger); }

.btn[disabled], .btn[aria-disabled="true"] {
  background: var(--surface-2);
  color: var(--ink-muted);
  border-color: var(--line);
  cursor: not-allowed;
}

/* ==========================================================================
   5. Forms
   ========================================================================== */

.field { margin-bottom: var(--sp-4); }

.field > label,
.fieldset > legend {
  display: block;
  font-weight: 600;
  margin-bottom: var(--sp-1);
}

.field__hint { color: var(--ink-muted); font-size: var(--fs--1); margin: var(--sp-1) 0 0; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
input[type="password"],
input[type="search"],
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: var(--sp-2) var(--sp-3);
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-s);
}

textarea { min-height: 5rem; resize: vertical; }

input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] {
  border-color: var(--danger);
  border-width: 2px;
}

.field__error {
  display: flex;
  gap: var(--sp-1);
  margin: var(--sp-1) 0 0;
  color: var(--danger);
  font-size: var(--fs--1);
  font-weight: 600;
}

.fieldset {
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--surface);
  padding: var(--sp-4);
  margin: 0 0 var(--sp-6);
}
.fieldset > legend { padding: 0 var(--sp-2); font-size: var(--fs-1); }

.field-row { display: grid; gap: var(--sp-4); }
@media (min-width: 37.5rem) { .field-row--2 { grid-template-columns: 1fr 1fr; } }

/* ==========================================================================
   6. Cards, tiles, callouts
   ========================================================================== */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  box-shadow: var(--shadow-1);
  padding: var(--sp-4);
}

.tiles { display: grid; gap: var(--sp-3); grid-template-columns: repeat(2, 1fr); margin-bottom: var(--sp-6); }
@media (min-width: 37.5rem) { .tiles { grid-template-columns: repeat(4, 1fr); } }

.tile__label {
  font-size: var(--fs--1);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  margin: 0 0 var(--sp-1);
}
.tile__value { font-size: var(--fs-2); font-weight: 650; font-variant-numeric: tabular-nums; }

.callout {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-m);
  border-inline-start: 4px solid;
  margin: 0 0 var(--sp-4);
}
.callout--warn { background: var(--warn-tint); color: var(--warn-ink); border-color: currentColor; }
.callout--danger { background: var(--danger-tint); color: var(--danger); border-color: currentColor; }
.callout--ok { background: var(--ok-tint); color: var(--ok); border-color: currentColor; }
.callout--info { background: var(--brand-tint); color: var(--brand-strong); border-color: currentColor; }
.callout a { color: inherit; }

.empty {
  text-align: center;
  padding: var(--sp-8) var(--sp-4);
  color: var(--ink-muted);
  border: 1px dashed var(--line);
  border-radius: var(--r-m);
}

/* ==========================================================================
   7. Channel badges — colour + shape + letter + word
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 2px var(--sp-2);
  border-radius: var(--r-full);
  font-size: var(--fs--1);
  font-weight: 650;
  white-space: nowrap;
}
.badge__glyph {
  display: inline-grid;
  place-items: center;
  width: 1.1em; height: 1.1em;
  font-size: 0.75em;
  font-weight: 800;
  color: #fff;
}

.badge--booking { background: var(--ch-booking-tint); color: var(--ch-booking); }
.badge--booking .badge__glyph { background: var(--ch-booking); }         /* square */

.badge--direct { background: var(--ch-direct-tint); color: var(--ch-direct); }
.badge--direct .badge__glyph { background: var(--ch-direct); border-radius: 50%; }  /* circle */

.badge--airbnb { background: var(--ch-airbnb-tint); color: var(--ch-airbnb); }
.badge--airbnb .badge__glyph {
  background: var(--ch-airbnb);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);                          /* triangle */
}

.badge--closed { background: var(--ch-blocked-tint); color: var(--ch-blocked); }
.badge--closed .badge__glyph { background: var(--ch-blocked); }

/* ==========================================================================
   8. Tables
   ========================================================================== */

.table-wrap { overflow-x: auto; }

table.data {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  overflow: hidden;
}

table.data th, table.data td {
  text-align: left;
  padding: var(--sp-3);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.data thead th {
  font-size: var(--fs--1);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  white-space: nowrap;
}
table.data tbody tr:hover { background: var(--surface-2); }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data tfoot th, table.data tfoot td {
  border-top: 2px solid var(--ink);
  border-bottom: none;
  font-weight: 700;
}

/* ==========================================================================
   9. Print
   ========================================================================== */

@page { margin: 15mm; }

@media print {
  :root { --paper: #fff; --surface: #fff; --surface-2: #fff; --ink: #000; --ink-muted: #333; --line: #999; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .site-nav, .skip-link, .no-print, .btn, form.filters { display: none !important; }
  main { max-width: none; padding: 0; }
  a { color: #000; text-decoration: none; }
  .card, table.data { box-shadow: none; border-color: #999; }
  table.data thead { display: table-header-group; }
  table.data tfoot { display: table-footer-group; }
  table.data tr { break-inside: avoid; }
  h2 { break-after: avoid; }
}

/* ==========================================================================
   10. Login
   ========================================================================== */

.login { max-width: 26rem; margin: var(--sp-12) auto; }
.login h1 { text-align: center; }
.login .field__hint { text-align: center; margin-bottom: var(--sp-6); }
.login .btn { width: 100%; }

/* ==========================================================================
   11. Planning — head, month navigation, search
   ========================================================================== */

.planning-head { margin-bottom: var(--sp-6); }
.planning-head h1 { margin-bottom: var(--sp-4); }

.month-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
}
.month-nav__current {
  font-size: var(--fs-2);
  margin: 0 var(--sp-2);
  flex: 1 1 auto;
  text-align: center;
  min-width: 10ch;
}

.search { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.search input { flex: 1 1 16rem; }

.result-count { color: var(--ink-muted); margin-bottom: var(--sp-4); }

ul.plain { list-style: none; margin: var(--sp-1) 0 0; padding: 0; }
ul.plain li + li { margin-top: var(--sp-1); }

/* ==========================================================================
   12. The month grid
   --------------------------------------------------------------------------
   Each week row is 14 columns — two half-days per day. A stay's bar starts at
   the middle of its arrival cell and ends at the middle of its departure cell,
   so a 10:00 checkout and an 18:00 check-in on the same date each occupy their
   own half and never look like a double booking.

   Dynamic positions arrive as gs-/ge-/ln- classes because the CSP forbids
   inline style attributes.
   ========================================================================== */

.calendars { display: grid; gap: var(--sp-8); margin-bottom: var(--sp-8); }

.calendar__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-2);
}
.calendar__head h2 { margin: 0; }
.calendar__free { color: var(--ink-muted); font-size: var(--fs--1); margin: 0; }

.cal-headers {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 2px;
}
.cal-headers span {
  font-size: var(--fs--1);
  font-weight: 600;
  color: var(--ink-muted);
  text-align: center;
  padding: var(--sp-1) 0;
}

.cal-week {
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  column-gap: 0;
  row-gap: 2px;
  margin-bottom: 2px;
}

/* One row for the date numbers, then one per lane. */
.cal-week.lanes-1 { grid-template-rows: auto repeat(1, minmax(1.5rem, auto)); }
.cal-week.lanes-2 { grid-template-rows: auto repeat(2, minmax(1.5rem, auto)); }
.cal-week.lanes-3 { grid-template-rows: auto repeat(3, minmax(1.5rem, auto)); }
.cal-week.lanes-4 { grid-template-rows: auto repeat(4, minmax(1.5rem, auto)); }

.cal-day {
  grid-row: 1 / -1;          /* the cell backs the whole week row */
  min-height: 4rem;
  padding: var(--sp-1);
  border: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-1);
}
.cal-day.is-weekend { background: var(--surface-2); }
.cal-day.is-outside { background: transparent; border-color: transparent; opacity: 0.45; }
.cal-day.is-past    { opacity: 0.65; }
.cal-day.is-today {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
  background: var(--brand-tint);
  opacity: 1;
}

.cal-day__num { font-size: var(--fs--1); font-weight: 600; color: var(--ink-muted); }
.cal-day.is-today .cal-day__num { color: var(--brand); }

/* The "Libre" affordance, kept from the old planning: click a free night to
   create a booking already dated. Now a visible gap rather than a word. */
.cal-day__add {
  display: inline-grid;
  place-items: center;
  width: 1.4rem; height: 1.4rem;
  border-radius: var(--r-s);
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 700;
  line-height: 1;
  opacity: 0;
  transition: opacity var(--t-fast), background var(--t-fast);
}
.cal-day:hover .cal-day__add { opacity: 1; background: var(--brand-tint); color: var(--brand); }
.cal-day__add:focus-visible { opacity: 1; }

/* --- bars --- */

.bar {
  z-index: 1;
  align-self: center;
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  min-height: 1.4rem;
  padding: 0 var(--sp-1);
  margin: 0 1px;
  border-radius: var(--r-s);
  border-inline-start: 3px solid;
  font-size: var(--fs--1);
  font-weight: 600;
  text-decoration: none;
  overflow: hidden;
  white-space: nowrap;
}
.bar__glyph { font-weight: 800; flex: none; }
.bar__name { overflow: hidden; text-overflow: ellipsis; }
.bar__warn { flex: none; margin-inline-start: auto; }

.bar--booking { background: var(--ch-booking-tint); color: var(--ch-booking); border-color: var(--ch-booking); }
.bar--direct  { background: var(--ch-direct-tint);  color: var(--ch-direct);  border-color: var(--ch-direct);
                border-inline-start-style: double; border-inline-start-width: 4px; }
.bar--airbnb  { background: var(--ch-airbnb-tint);  color: var(--ch-airbnb);  border-color: var(--ch-airbnb); }

/* A blocage is hatched, so it reads as "not merchandise" in colour, in
   greyscale, in print and in dark mode — never by colour alone. */
.bar--closed {
  color: var(--ch-blocked);
  border: 1px dashed var(--ch-blocked);
  background: repeating-linear-gradient(
    45deg,
    var(--ch-blocked-tint) 0 4px,
    transparent 4px 8px
  );
}

.bar.continues-left  { border-start-start-radius: 0; border-end-start-radius: 0; border-inline-start-width: 0; }
.bar.continues-right { border-start-end-radius: 0; border-end-end-radius: 0; }
.bar.has-conflict    { box-shadow: inset 0 0 0 2px var(--danger); }
.bar.is-archived     { opacity: 0.5; filter: grayscale(1); pointer-events: none; }

/* --- grid placement (generated, 14 half-day columns + 4 lanes) --- */
.gs-1 { grid-column-start: 1; }
.gs-2 { grid-column-start: 2; }
.gs-3 { grid-column-start: 3; }
.gs-4 { grid-column-start: 4; }
.gs-5 { grid-column-start: 5; }
.gs-6 { grid-column-start: 6; }
.gs-7 { grid-column-start: 7; }
.gs-8 { grid-column-start: 8; }
.gs-9 { grid-column-start: 9; }
.gs-10 { grid-column-start: 10; }
.gs-11 { grid-column-start: 11; }
.gs-12 { grid-column-start: 12; }
.gs-13 { grid-column-start: 13; }
.gs-14 { grid-column-start: 14; }
.gs-15 { grid-column-start: 15; }
.ge-2 { grid-column-end: 2; }
.ge-3 { grid-column-end: 3; }
.ge-4 { grid-column-end: 4; }
.ge-5 { grid-column-end: 5; }
.ge-6 { grid-column-end: 6; }
.ge-7 { grid-column-end: 7; }
.ge-8 { grid-column-end: 8; }
.ge-9 { grid-column-end: 9; }
.ge-10 { grid-column-end: 10; }
.ge-11 { grid-column-end: 11; }
.ge-12 { grid-column-end: 12; }
.ge-13 { grid-column-end: 13; }
.ge-14 { grid-column-end: 14; }
.ge-15 { grid-column-end: 15; }
.ge-16 { grid-column-end: 16; }
.ln-1 { grid-row: 2; }
.ln-2 { grid-row: 3; }
.ln-3 { grid-row: 4; }
.ln-4 { grid-row: 5; }

/* ==========================================================================
   13. Agenda list
   --------------------------------------------------------------------------
   The accessible, printable, mobile-first view of the same data. The grid above
   is aria-hidden; this list is what a screen reader reads and what the printer
   gets, so every stay carries its full information here.
   ========================================================================== */

.agenda__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.agenda__count { color: var(--ink-muted); font-weight: 400; }
.agenda__tools { margin: 0; font-size: var(--fs--1); }

.stay-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--surface);
  overflow: hidden;
}
.stay + .stay { border-top: 1px solid var(--line); }

.stay__link {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 44px;
  padding: var(--sp-3);
  color: inherit;
  text-decoration: none;
}
.stay__link:hover { background: var(--surface-2); color: inherit; }

.stay__badge { flex: none; }
.stay__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.stay__name { font-weight: 650; }
.stay__dates, .stay__contact { color: var(--ink-muted); font-size: var(--fs--1); }
.stay__contact { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.stay__price {
  flex: none;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stay__flag {
  margin: 0;
  padding: 0 var(--sp-3) var(--sp-3);
  font-size: var(--fs--1);
  color: var(--ink-muted);
}
.stay__flag--warn { color: var(--danger); font-weight: 600; }

.stay--conflict { box-shadow: inset 3px 0 0 var(--danger); }
.stay--archived .stay__link { opacity: 0.6; }
.stay--archived .stay__link:hover { background: transparent; }

/* ==========================================================================
   14. Responsive
   --------------------------------------------------------------------------
   Content-driven breakpoints in rem, so browser zoom re-triggers them. Base is
   the mobile layout, which is also what 400 % zoom gets — that is how reflow
   works without a horizontal scrollbar.
   ========================================================================== */

/* Base (<600px): bars become glyph-only strips; the list carries the names. */
.bar__name { display: none; }
.cal-day { min-height: 3rem; }
.month-nav .btn { flex: 1 1 auto; }

@media (min-width: 37.5rem) {          /* 600px — room for names and columns */
  .bar__name { display: inline; }
  .cal-day { min-height: 4.5rem; }
  .stay__link { align-items: center; }
  .stay__main { flex-direction: row; align-items: baseline; gap: var(--sp-3); }
  .stay__dates { white-space: nowrap; }
  .month-nav .btn { flex: 0 0 auto; }
}

@media (min-width: 56.25rem) {         /* 900px — grid and list side by side in the flow */
  .calendars { grid-template-columns: 1fr; gap: var(--sp-12); }
  .cal-day { min-height: 5rem; }
}

/* ==========================================================================
   15. Print — the agenda list IS the printout
   ========================================================================== */

@media print {
  .calendars, .search, .month-nav, .agenda__tools { display: none !important; }
  .stay-list { border-color: #999; }
  .stay { break-inside: avoid; }
  .stay__link { padding: 4pt 0; }
  .stay__contact { white-space: normal; }
  .badge { border: 1pt solid #000; background: none !important; color: #000 !important; }
  .badge__glyph { background: #000 !important; color: #fff !important; }
}

/* ==========================================================================
   16. Structural hooks that only need spacing
   ========================================================================== */

.calendar { margin: 0; }
.agenda { margin-top: var(--sp-8); }

/* The logout control is a POST form so it carries a CSRF token; strip the
   form's own box so it sits in the nav flex row like the links beside it. */
.site-nav__logout { margin: 0; display: inline-flex; }

/* ==========================================================================
   17. Reservation form
   ========================================================================== */

.reservation-form, .confirm-page, .danger-zone { max-width: 40rem; }
.back-link { font-size: var(--fs--1); margin-bottom: var(--sp-2); }

.pseudo-label { display: block; font-weight: 600; margin-bottom: var(--sp-1); }

/* --- choice cards (type, channel) --- */

.choice-row { display: grid; gap: var(--sp-3); }
@media (min-width: 37.5rem) { .choice-row { grid-template-columns: 1fr 1fr; } }

.choice-row--compact { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.choice-row--compact .choice { flex: 0 1 auto; }

.choice {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  padding: var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--surface);
  cursor: pointer;
}
.choice:hover { border-color: var(--brand); }
.choice__body { display: flex; flex-direction: column; gap: 2px; }
.choice__title { font-weight: 650; }
.choice__hint { color: var(--ink-muted); font-size: var(--fs--1); }

/* The native radio stays in the accessibility tree and keeps arrow-key group
   navigation; only the card around it is restyled. */
.choice input[type="radio"] { margin-top: 0.2em; accent-color: var(--brand); }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.choice:has(input:focus-visible) { box-shadow: var(--focus-ring); }

/* --- blocage collapses the client and price sections, with CSS alone, so it
       works with JavaScript disabled --- */

.reservation-form:has(#type-blocage:checked) .grp-client,
.reservation-form:has(#type-blocage:checked) .grp-tarif { display: none; }

/* --- price --- */

.price-input { position: relative; display: flex; align-items: center; max-width: 14rem; }
.price-input input { padding-inline-end: 2rem; }
.price-input__unit {
  position: absolute;
  inset-inline-end: var(--sp-3);
  color: var(--ink-muted);
  pointer-events: none;
}

.btn--small { min-height: 32px; padding: var(--sp-1) var(--sp-3); font-size: var(--fs--1); }

.confirm-line {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
  font-weight: 600;
}
.confirm-line input { accent-color: var(--danger); }

.form-actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-6); }
@media (max-width: 37.4375rem) { .form-actions .btn { flex: 1 1 100%; } }

.flash-undo { display: inline; margin: 0; }

/* --- danger zone --- */

.danger-zone {
  margin-top: var(--sp-12);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
}
.danger-zone h2 { font-size: var(--fs-1); color: var(--danger); }

dialog {
  max-width: 30rem;
  padding: var(--sp-6);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-2);
}
dialog::backdrop { background: rgb(32 48 59 / 0.5); }

.confirm-page__subject { font-size: var(--fs-1); }

/* ==========================================================================
   18. Revenue report
   ========================================================================== */

.filters {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: var(--sp-6);
}
.filters .field { margin: 0; flex: 1 1 8rem; }
.filters .btn { flex: 0 0 auto; }

.channel-strip {
  list-style: none;
  margin: 0 0 var(--sp-6);
  padding: 0;
  display: grid;
  gap: var(--sp-2);
}
.channel-strip li {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  font-size: var(--fs--1);
  color: var(--ink-muted);
}

table.data th[scope="row"] { font-weight: 600; }
table.data th[scope="row"] a { color: inherit; }

/* Below 600px the date columns fold into the client cell rather than forcing a
   horizontal scroll — the money view should never need one. */
@media (max-width: 37.4375rem) {
  table.data thead th:nth-child(2),
  table.data thead th:nth-child(3),
  table.data tbody td:nth-child(2),
  table.data tbody td:nth-child(3) {
    display: block;
    border-bottom: none;
    padding-block: 0;
    font-size: var(--fs--1);
    color: var(--ink-muted);
  }
  table.data thead th:nth-child(2),
  table.data thead th:nth-child(3) { display: none; }
}

@media print {
  .filters { display: none !important; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .card { border: 1px solid #999; box-shadow: none; }
}

/* ==========================================================================
   19. Settings
   ========================================================================== */

.setting {
  max-width: 46rem;
  margin-bottom: var(--sp-12);
  padding-bottom: var(--sp-6);
  border-bottom: 1px solid var(--line);
}
.setting:last-of-type { border-bottom: none; }
.setting h2 { margin-bottom: var(--sp-2); }
.setting h3 { margin-top: var(--sp-6); }

.rate-form {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-end;
  flex-wrap: wrap;
}
.rate-form .field { margin: 0; flex: 1 1 8rem; }
.rate-form .field--grow { flex: 2 1 14rem; }
.rate-form .btn { flex: 0 0 auto; }

.rate-note { color: var(--ink-muted); font-size: var(--fs--1); }

.tag {
  display: inline-block;
  padding: 1px var(--sp-2);
  border-radius: var(--r-full);
  font-size: var(--fs--1);
  font-weight: 650;
  background: var(--surface-2);
  color: var(--ink-muted);
  white-space: nowrap;
}
.tag--current { background: var(--ok-tint); color: var(--ok); }
.tag--future  { background: var(--warn-tint); color: var(--warn-ink); }
.tag--bad     { background: var(--danger-tint); color: var(--danger); }

.steps { padding-inline-start: 1.2em; }
.steps li { margin-bottom: var(--sp-3); }

pre {
  overflow-x: auto;
  padding: var(--sp-3);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  font-size: var(--fs--1);
}
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; }
pre code { font-size: inherit; }

.copyable { width: 100%; font-family: ui-monospace, Menlo, monospace; font-size: var(--fs--1); }

.aside {
  margin-top: var(--sp-6);
  padding: var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--surface-2);
  font-size: var(--fs--1);
}
.aside summary { cursor: pointer; font-weight: 650; }
.aside > *:not(summary) { margin-top: var(--sp-3); }

/* ==========================================================================
   20. Period jump — reach any month in two clicks
   --------------------------------------------------------------------------
   A <details> disclosure of plain links. No JavaScript, keyboard-operable by
   default, and it collapses back out of the way once you have jumped.
   ========================================================================== */

.jump { margin: 0; flex: 0 0 auto; position: relative; }

.jump > summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--surface);
  color: var(--brand);
  font-size: var(--fs--1);
  font-weight: 600;
  cursor: pointer;
}
.jump > summary:hover { background: var(--surface-2); }
.jump[open] > summary { border-end-start-radius: 0; border-end-end-radius: 0; }

.jump__panel {
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--surface);
  box-shadow: var(--shadow-2);
}

/* From 600px the panel floats over the page, so opening it does not push the
   month title and the next/previous buttons around. Below that it just stacks,
   which is the better behaviour on a narrow screen. */
@media (min-width: 37.5rem) {
  .jump__panel {
    position: absolute;
    z-index: 20;
    inset-inline-start: 0;
    top: calc(100% + var(--sp-1));
    min-width: 32rem;
  }
}

.jump__years {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.jump__year { font-size: var(--fs-2); font-variant-numeric: tabular-nums; }

.jump__months {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-2);
}
@media (min-width: 37.5rem) { .jump__months { grid-template-columns: repeat(6, 1fr); } }
@media (min-width: 56.25rem) { .jump__months { grid-template-columns: repeat(12, 1fr); } }

.jump__month {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 44px;
  padding: var(--sp-2) var(--sp-1);
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  color: var(--ink);
  text-decoration: none;
  font-size: var(--fs--1);
}
.jump__month:hover { background: var(--brand-tint); border-color: var(--brand); color: var(--ink); }
.jump__month-name { font-weight: 600; }

/* The count is the point of the grid: it shows where the history actually is,
   so you are not clicking blindly through empty months. */
.jump__count { color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.jump__month.is-empty { opacity: 0.55; }
.jump__month.is-current {
  border-color: var(--brand);
  background: var(--brand-tint);
  font-weight: 700;
}

.jump__hint { margin: var(--sp-4) 0 0; font-size: var(--fs--1); color: var(--ink-muted); }

@media print { .jump { display: none !important; } }

/* ==========================================================================
   21. Interface toggle — lives in the menu bar
   --------------------------------------------------------------------------
   Labelled with the interface it takes you TO. Shown only on pages that have
   both layouts; the form and the settings page have one each.
   ========================================================================== */

a.view-toggle {
  min-height: 34px;
  padding: 0 var(--sp-3);
  font-size: var(--fs--1);
  color: var(--brand);
  border-color: var(--line);
  white-space: nowrap;
}
a.view-toggle:hover { background: var(--surface-2); color: var(--brand-strong); }
