/* ==========================================================================
   Espace Formateurs — Physio Medic Formation
   Design system. Jetons issus du site public (thème Drupal « physio »).
   Aucun style inline n'est utilisé (CSP stricte).
   ========================================================================== */

@font-face { font-family: "Source Sans 3"; src: url("../fonts/sourcesans3.var.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("../fonts/sourcesans3-italic.var.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/sourceserif4.var.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/sourceserif4-italic.var.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }

:root {
  /* Marque */
  --green-950: #0E271A;
  --green-900: #132F21;
  --green-800: #173B29;
  --green: #1D4630;
  --green-600: #2A5C41;
  --green-500: #3D7457;
  --green-300: #A9C7B6;
  --green-200: #CFE0D6;
  --green-100: #E4EEE8;
  --green-50: #F1F6F3;
  --gold: #DCAE49;
  --gold-700: #715410;
  --gold-600: #B38A2E;
  --gold-200: #EFD9A3;
  --gold-100: #F7EDD5;
  --gold-50: #FBF6EA;

  /* Neutres chauds (site public) */
  --sand-50: #FAF8F5;
  --sand-100: #F5F3EE;
  --sand-200: #ECE7DF;
  --sand-300: #DFD6C9;
  --sand-400: #C3BAAD;
  --sand-600: #A89C8B;
  --sand-800: #6F604B;
  --ink: #1E2320;
  --ink-2: #2F2F2F;
  --ink-soft: #545854;
  --ink-mute: #767a76;
  --line: #E6E1D9;
  --line-strong: #D6CFC4;
  --white: #FFFFFF;

  /* Sémantique */
  --danger: #9A2B1E;
  --danger-bg: #FBEDEA;
  --danger-line: #EBC3BC;
  --info: #2D4868;
  --info-bg: #EDF2F8;
  --info-line: #C9D6E6;
  --warn: #75560F;
  --warn-bg: #FBF3E0;
  --warn-line: #EAD7A6;
  --orange: #8A4A12;
  --orange-bg: #FBEEE2;
  --orange-line: #EDCDAE;

  /* Formes */
  --r-xs: 4px;
  --r-sm: 6px;
  --r: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-pill: 999px;
  --shadow-1: 0 1px 2px rgb(24 32 28 / 6%);
  --shadow-card: 0 1px 2px rgb(24 32 28 / 5%), 0 3px 10px rgb(24 32 28 / 5%);
  --shadow-pop: 0 12px 32px rgb(18 28 22 / 16%), 0 2px 8px rgb(18 28 22 / 8%);
  --focus: 0 0 0 3px rgb(29 70 48 / 28%);

  /* Typographie */
  --font-sans: "Source Sans 3", "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;

  /* Mise en page */
  --w-text: 40rem;
  --w-content: 72rem;
  --w-wide: 84rem;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-2);
  background: var(--sand-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green-600); }
h1, h2, h3, h4 { font-family: var(--font-serif); color: var(--green); font-weight: 700; line-height: 1.15; margin: 0; letter-spacing: -0.005em; }
h1 { font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 1.15rem + 0.5vw, 1.6rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
::selection { background: var(--green-200); }

:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 3px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--green); color: #fff; padding: 10px 16px; border-radius: var(--r-xs); font-weight: 600; }
.skip-link:focus { top: 12px; color: #fff; }

.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }
.i-sm { width: 15px; height: 15px; }
.i-lg { width: 22px; height: 22px; }
.i-xl { width: 28px; height: 28px; }

/* --------------------------------------------------------------------------
   Utilitaires
   -------------------------------------------------------------------------- */
.muted { color: var(--ink-mute); }
.soft { color: var(--ink-soft); }
.small { font-size: 0.875rem; }
.xsmall { font-size: 0.8125rem; }
.nowrap { white-space: nowrap; }
.strong { font-weight: 600; }
.serif { font-family: var(--font-serif); }
.center { text-align: center; }
.right { text-align: right; }
.row { display: flex; align-items: center; gap: 12px; }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }
.stack-lg > * + * { margin-top: 28px; }
.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.grow { flex: 1 1 auto; min-width: 0; }
.hide { display: none !important; }
.eyebrow { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; color: var(--sand-800); }
.tagline { font-family: var(--font-serif); font-style: italic; color: var(--gold-700); }
.divider-gold { width: 40px; height: 2px; background: var(--gold); border: 0; margin: 14px 0 0; }

/* --------------------------------------------------------------------------
   Boutons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: var(--r-xs);
  border: 1px solid transparent; background: none; color: var(--green);
  font: 600 0.975rem/1.2 var(--font-sans); text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
  -webkit-tap-highlight-color: transparent; white-space: nowrap;
}
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn[disabled], .btn.is-disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--green); color: #fff; border-color: var(--green); }
.btn-primary:hover { background: var(--green-800); border-color: var(--green-800); color: #fff; }
.btn-secondary { background: #fff; color: var(--green); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--green); color: var(--green); background: var(--green-50); }
.btn-ghost { color: var(--ink-soft); padding-inline: 12px; }
.btn-ghost:hover { background: var(--sand-100); color: var(--ink); }
.btn-danger { background: #fff; color: var(--danger); border-color: var(--danger-line); }
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.btn-gold { background: var(--gold); color: var(--green-950); border-color: var(--gold); }
.btn-gold:hover { background: #E3BB60; border-color: #E3BB60; color: var(--green-950); }
.btn-lg { min-height: 52px; padding: 14px 28px; font-size: 1.05rem; }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: 0.9rem; }
.btn-xs { min-height: 30px; padding: 4px 10px; font-size: 0.85rem; gap: 6px; }
.btn-block { display: flex; width: 100%; }
.btn-icon { width: 40px; min-height: 40px; padding: 0; }
.link-btn { background: none; border: 0; padding: 0; color: var(--green); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--green-600); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* --------------------------------------------------------------------------
   Formulaires
   -------------------------------------------------------------------------- */
.field { display: block; }
.field + .field { margin-top: 18px; }
.label { display: block; font-weight: 600; font-size: 0.925rem; color: var(--ink); margin-bottom: 6px; }
.label .opt { font-weight: 400; color: var(--ink-mute); font-size: 0.85rem; }
.hint { display: block; font-size: 0.85rem; color: var(--ink-mute); margin-top: 6px; }
.input, .select, .textarea {
  display: block; width: 100%; min-height: 46px; padding: 10px 14px;
  font: 400 1rem/1.4 var(--font-sans); color: var(--ink);
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--r-xs);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--sand-600); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--green); box-shadow: var(--focus); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.textarea { min-height: 110px; resize: vertical; }
.select { appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%231D4630' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--green); flex: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .field + .field { margin-top: 0; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.password-wrap { position: relative; }
.password-wrap .input { padding-right: 52px; }
.password-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }

/* Choix sous forme de pastilles (villes, lieux) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 16px;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: #fff; color: var(--ink);
  font: 600 0.95rem/1.2 var(--font-sans); cursor: pointer; transition: all .15s ease;
}
.chip:hover { border-color: var(--green); color: var(--green); }
.chip[aria-pressed="true"], .chip.is-active { background: var(--green); border-color: var(--green); color: #fff; }
.chip .count { font-weight: 400; opacity: .75; font-size: .85rem; }
.chip-group-label { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--sand-800); font-weight: 600; margin: 14px 0 8px; }
.chip-group-label:first-child { margin-top: 0; }

/* --------------------------------------------------------------------------
   Alertes / messages
   -------------------------------------------------------------------------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); border: 1px solid; font-size: .95rem; }
.alert .i { margin-top: 2px; }
.alert-success { background: var(--green-50); border-color: var(--green-200); color: var(--green-800); }
.alert-error { background: var(--danger-bg); border-color: var(--danger-line); color: var(--danger); }
.alert-info { background: var(--info-bg); border-color: var(--info-line); color: var(--info); }
.alert-warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.alert p:last-child { margin-bottom: 0; }
.toast { position: fixed; left: 50%; top: 88px; transform: translateX(-50%); z-index: 60; box-shadow: var(--shadow-pop); max-width: min(560px, calc(100vw - 32px)); animation: toast-in .25s ease; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* --------------------------------------------------------------------------
   Cartes & surfaces
   -------------------------------------------------------------------------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-card); }
.card-pad { padding: 24px; }
.card-pad-lg { padding: 32px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { font-size: 1.1rem; }
.card-body { padding: 24px; }
.card-foot { padding: 16px 24px; border-top: 1px solid var(--line); background: var(--sand-50); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.surface-soft { background: var(--sand-100); border-radius: var(--r-lg); }
.empty { text-align: center; padding: 48px 24px; color: var(--ink-soft); }
.empty .i-xl { color: var(--sand-600); margin: 0 auto 12px; display: block; }
.empty h3 { color: var(--ink); font-family: var(--font-sans); font-weight: 600; font-size: 1.05rem; margin-bottom: 6px; }

.dl { display: grid; grid-template-columns: minmax(110px, 160px) 1fr; gap: 10px 20px; margin: 0; }
.dl dt { color: var(--ink-mute); font-size: .9rem; }
.dl dd { margin: 0; font-weight: 600; color: var(--ink); }
.dl dd .soft { font-weight: 400; }

/* --------------------------------------------------------------------------
   Statuts : couleur + icône + texte, jamais la couleur seule
   -------------------------------------------------------------------------- */
.status {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border-radius: var(--r-pill);
  font: 600 0.8125rem/1.25 var(--font-sans); border: 1px solid; white-space: nowrap;
}
.status .i { width: 14px; height: 14px; stroke-width: 2.1; }
.status-lg { padding: 6px 14px 6px 11px; font-size: .9rem; }
.status-lg .i { width: 16px; height: 16px; }
.st-available { background: #fff; color: var(--green); border-color: var(--green-200); }
.st-submitted { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.st-in_review { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.st-changes_requested { background: var(--orange-bg); color: var(--orange); border-color: var(--orange-line); }
.st-approved { background: var(--gold-100); color: var(--gold-700); border-color: var(--gold-200); }
.st-confirmed { background: var(--green); color: #fff; border-color: var(--green); }
.st-refused { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); }
.st-cancelled, .st-expired { background: #F1F0EE; color: #686868; border-color: #E0DEDA; }
.st-unavailable { background: #ECEAE6; color: #545454; border-color: #D9D5CF; }
.st-booked { background: #F0EEEA; color: #5f5f5f; border-color: #DEDAD3; }
.st-pending { background: #fff; color: var(--sand-800); border-color: var(--sand-300); border-style: dashed; }

/* --------------------------------------------------------------------------
   En-tête formateur
   -------------------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgb(255 255 255 / 96%); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header-inner { max-width: var(--w-wide); margin: 0 auto; height: var(--header-h); padding: 0 28px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; flex: none; }
.brand img { height: 46px; width: auto; }
.brand-label { display: flex; flex-direction: column; line-height: 1.15; padding-left: 14px; border-left: 1px solid var(--line); }
.brand-label strong { font-family: var(--font-serif); color: var(--green); font-size: 1rem; }
.brand-label span { font-size: .78rem; color: var(--ink-mute); letter-spacing: .02em; }
.main-nav { display: flex; gap: 4px; align-items: center; height: 100%; }
.main-nav a { position: relative; display: flex; align-items: center; height: 100%; padding: 0 12px; color: var(--ink-soft); font-weight: 600; font-size: .95rem; text-decoration: none; }
.main-nav a:hover { color: var(--green); }
.main-nav a[aria-current="page"] { color: var(--green); }
.main-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; background: var(--gold); border-radius: 2px 2px 0 0; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.menu { position: relative; }
.menu-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 8px 4px 4px; border: 1px solid transparent; border-radius: var(--r-pill); background: none; cursor: pointer; color: var(--ink); font: 600 .95rem var(--font-sans); }
.menu-btn:hover, .menu-btn[aria-expanded="true"] { background: var(--sand-100); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--green-100); color: var(--green); font: 700 .85rem var(--font-sans); letter-spacing: .02em; flex: none; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.3rem; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); padding: 8px; z-index: 50; }
.menu-panel a, .menu-panel button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; background: none; border: 0; font: 500 .95rem var(--font-sans); cursor: pointer; text-align: left; }
.menu-panel a:hover, .menu-panel button:hover { background: var(--sand-100); }
.menu-panel .menu-meta { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-panel .menu-meta strong { display: block; color: var(--ink); }
.menu-panel .menu-meta span { font-size: .85rem; color: var(--ink-mute); }
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-pill); padding: 2px; }
.lang-switch button, .lang-switch a { border: 0; background: none; padding: 4px 10px; border-radius: var(--r-pill); font: 600 .8rem var(--font-sans); color: var(--ink-mute); cursor: pointer; text-decoration: none; }
.lang-switch [aria-current="true"] { background: var(--green); color: #fff; }
.nav-toggle { display: none; }

/* --------------------------------------------------------------------------
   Page
   -------------------------------------------------------------------------- */
.page { max-width: var(--w-content); margin: 0 auto; padding: 40px 28px 80px; }
.page-wide { max-width: var(--w-wide); }
.page-narrow { max-width: 860px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 32px; }
.page-head .lead { color: var(--ink-soft); font-size: 1.05rem; margin: 10px 0 0; max-width: 46rem; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .9rem; color: var(--ink-mute); margin-bottom: 14px; }
.breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--green); text-decoration: underline; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 44px 0 16px; }
.section-title h2 { font-size: 1.35rem; }
.site-footer { border-top: 1px solid var(--line); background: #fff; }
.site-footer-inner { max-width: var(--w-wide); margin: 0 auto; padding: 24px 28px; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; font-size: .875rem; color: var(--ink-mute); }
.site-footer a { color: var(--ink-soft); }

/* --------------------------------------------------------------------------
   Authentification
   -------------------------------------------------------------------------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: #fff; }
.auth-aside { position: relative; background: var(--green-900); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; isolation: isolate; }
.auth-aside::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(1200px 600px at 110% -10%, rgb(220 174 73 / 16%), transparent 60%),
  radial-gradient(900px 500px at -20% 120%, rgb(61 116 87 / 45%), transparent 60%); }
.auth-aside::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border: 1px solid rgb(220 174 73 / 22%); border-radius: 50%; z-index: -1; }
.auth-brand img { height: 64px; width: auto; }
.auth-quote h1 { color: #fff; font-size: clamp(2rem, 1.5rem + 1.6vw, 3rem); max-width: 14ch; }
.auth-quote h1 em { color: var(--gold); font-style: italic; font-weight: 600; }
.auth-quote p { color: rgb(255 255 255 / 78%); max-width: 32rem; font-size: 1.05rem; margin-top: 18px; }
.auth-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; color: rgb(255 255 255 / 86%); }
.auth-points li { display: flex; gap: 12px; align-items: center; }
.auth-points .i { color: var(--gold); }
.auth-aside small { color: rgb(255 255 255 / 55%); }
.auth-main { display: flex; flex-direction: column; padding: 48px clamp(24px, 6vw, 96px); } /* centrage par marges auto : jamais de contenu coupé en haut sur petit écran */
.auth-card { width: 100%; max-width: 420px; margin: 0 auto; }
.auth-card h2 { font-size: 1.9rem; margin-bottom: 8px; }
.auth-card .lead { color: var(--ink-soft); margin-bottom: 28px; }
.auth-top { display: flex; justify-content: flex-end; margin-bottom: auto; padding-bottom: 32px; }
.auth-bottom { margin-top: auto; padding-top: 32px; font-size: .85rem; color: var(--ink-mute); text-align: center; }
.auth-mobile-brand { display: none; }
.or-sep { display: flex; align-items: center; gap: 12px; color: var(--ink-mute); font-size: .85rem; margin: 22px 0; }
.or-sep::before, .or-sep::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.pw-meter { height: 4px; background: var(--sand-200); border-radius: 4px; margin-top: 8px; overflow: hidden; }
.pw-meter span { display: block; height: 100%; width: 0; background: var(--danger); transition: width .2s ease, background-color .2s ease; }

/* --------------------------------------------------------------------------
   Tableau de bord formateur
   -------------------------------------------------------------------------- */
.hello { margin-bottom: 28px; }
.hello h1 { font-size: clamp(1.9rem, 1.5rem + 1.3vw, 2.6rem); }
.hello p { color: var(--ink-soft); font-size: 1.08rem; margin: 8px 0 0; }
.next-action { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 20px 24px; align-items: center; padding: 28px 32px; border-radius: var(--r-xl); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-card); overflow: hidden; }
.next-action::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--green); }
.next-action.tone-gold::before { background: var(--gold); }
.next-action.tone-orange::before { background: #C98A45; }
.next-action.tone-info::before { background: #6D8BB0; }
.next-action .na-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--green-50); color: var(--green); }
.next-action.tone-gold .na-icon { background: var(--gold-100); color: var(--gold-700); }
.next-action.tone-orange .na-icon { background: var(--orange-bg); color: var(--orange); }
.next-action.tone-info .na-icon { background: var(--info-bg); color: var(--info); }
.next-action .na-icon .i { width: 26px; height: 26px; }
.next-action h2 { font-size: 1.35rem; margin: 4px 0 6px; }
.next-action p { margin: 0; color: var(--ink-soft); }
.new-request-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 32px; border-radius: var(--r-xl); background: var(--green); color: #fff; text-decoration: none; margin-top: 20px; position: relative; overflow: hidden; isolation: isolate; transition: background-color .2s ease; }
.new-request-cta::after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; border: 1px solid rgb(220 174 73 / 35%); z-index: -1; }
.new-request-cta:hover { background: var(--green-800); color: #fff; }
.new-request-cta strong { display: block; font-family: var(--font-serif); font-size: 1.4rem; }
.new-request-cta span { color: rgb(255 255 255 / 78%); }
.new-request-cta .plus { width: 56px; height: 56px; border-radius: 50%; background: var(--gold); color: var(--green-950); display: grid; place-items: center; flex: none; }
.new-request-cta .plus .i { width: 26px; height: 26px; stroke-width: 2.2; }

.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.res-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-card); text-decoration: none; color: inherit; transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease; overflow: hidden; }
.res-card:hover { box-shadow: 0 2px 6px rgb(0 0 0 / 7%), 0 12px 24px rgb(0 0 0 / 8%); transform: translateY(-1px); border-color: var(--line-strong); color: inherit; }
.res-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 0; }
.res-date { display: flex; align-items: baseline; gap: 8px; }
.res-date .rd-day { font-family: var(--font-serif); font-weight: 700; font-size: 2rem; line-height: 1; color: var(--green); }
.res-date .rd-month { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; color: var(--sand-800); }
.res-card-body { padding: 14px 22px 20px; flex: 1; }
.res-card-body h3 { font-size: 1.1rem; margin-bottom: 10px; color: var(--ink); }
.meta { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .925rem; color: var(--ink-soft); }
.meta li { display: flex; gap: 8px; align-items: flex-start; }
.meta .i { width: 16px; height: 16px; margin-top: 3px; color: var(--sand-600); }
.res-card-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; font-size: .9rem; font-weight: 600; color: var(--green); }

/* --------------------------------------------------------------------------
   Nouvelle demande : panneau + calendrier
   -------------------------------------------------------------------------- */
.booking { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 28px; align-items: start; }
.booking-side { position: sticky; top: calc(var(--header-h) + 20px); }
.step { padding: 22px 24px; border-bottom: 1px solid var(--line); }
.step:last-of-type { border-bottom: 0; }
.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.step-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--sand-100); color: var(--ink-soft); font: 700 .85rem var(--font-sans); flex: none; transition: all .2s ease; }
.step.is-done .step-num { background: var(--green); color: #fff; }
.step.is-current .step-num { background: var(--gold); color: var(--green-950); }
.step-title { font-weight: 700; color: var(--ink); font-size: 1rem; }
.step-value { margin-left: auto; font-size: .85rem; color: var(--ink-mute); text-align: right; }
.selection-summary { background: var(--green-50); border: 1px solid var(--green-200); border-radius: var(--r); padding: 14px 16px; }
.selection-summary strong { display: block; color: var(--green); font-size: 1.05rem; }
.selection-summary .soft { font-size: .9rem; }
.side-foot { padding: 20px 24px 24px; border-top: 1px solid var(--line); background: var(--sand-50); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.inline-training { margin-top: 12px; padding: 16px; border: 1px dashed var(--line-strong); border-radius: var(--r); background: var(--sand-50); }

.room-list { display: grid; gap: 10px; }
.room-option { position: relative; display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease; text-align: left; width: 100%; font: inherit; color: inherit; }
.room-option:hover { border-color: var(--green-300); }
.room-option[aria-pressed="true"] { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); background: var(--green-50); }
.room-option[aria-disabled="true"] { opacity: .55; cursor: not-allowed; background: var(--sand-50); }
.room-thumb { width: 64px; height: 48px; border-radius: var(--r-sm); background: var(--sand-100) center/cover no-repeat; display: grid; place-items: center; color: var(--sand-600); overflow: hidden; }
.room-thumb img { width: 100%; height: 100%; object-fit: cover; }
.room-option .rname { display: block; font-weight: 700; color: var(--ink); line-height: 1.25; }
.room-option .rmeta { display: block; font-size: .85rem; color: var(--ink-mute); margin-top: 2px; }
.room-option .ravail { font-size: .8rem; font-weight: 600; display: flex; color: var(--ink-mute); gap: 4px; align-items: center; margin-top: 3px; }
.ravail.ok { color: var(--green); }
.ravail.warn { color: var(--warn); }
.ravail.ko { color: var(--danger); }

/* Barre d'outils du calendrier */
.cal-shell { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-card); }
/* délai minimum de réservation formateur (J + n mois) */
.cal-lead { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 20px; border-bottom: 1px solid var(--line);
  background: var(--sand-50, #faf8f4); color: var(--ink-soft); font-size: .875rem; }
.cal-lead[hidden] { display: none; }
.cal-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.segmented { display: inline-flex; background: var(--sand-100); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 4px; gap: 4px; }
.segmented button { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 8px 16px; border-radius: 6px; font: 600 .95rem/1.2 var(--font-sans); color: var(--ink); cursor: pointer; min-height: 40px; transition: background-color .15s ease, color .15s ease; }
.segmented button .i { width: 18px; height: 18px; }
.segmented button:hover { background: #fff; color: var(--green); }
.segmented button[aria-selected="true"] { background: var(--green); color: #fff; box-shadow: var(--shadow-1); }
.cal-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.cal-nav .cal-title { min-width: 180px; text-align: center; font-family: var(--font-serif); font-weight: 700; font-size: 1.15rem; color: var(--green); }
.cal-nav .btn-icon { border: 1px solid var(--line); background: #fff; color: var(--ink-soft); border-radius: var(--r-sm); }
.cal-nav .btn-icon:hover { border-color: var(--green); color: var(--green); }
.cal-body { padding: 16px 20px 20px; position: relative; min-height: 360px; }
.cal-loading { position: absolute; inset: 0; background: rgb(255 255 255 / 65%); display: grid; place-items: center; z-index: 5; border-radius: 0 0 var(--r-lg) var(--r-lg); }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--green-100); border-top-color: var(--green); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 14px 20px; border-top: 1px solid var(--line); font-size: .825rem; color: var(--ink-soft); align-items: center; }
.legend .status { font-size: .78rem; }
.legend-title { font-weight: 600; color: var(--ink-mute); margin-right: 4px; }

/* Vue mois */
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.month-grid .dow { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; color: var(--ink-mute); text-align: left; padding: 0 8px 6px; }
.day {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; align-items: stretch;
  min-height: 92px; padding: 8px; border: 1px solid var(--line); border-radius: var(--r); background: #fff;
  font: inherit; color: var(--ink); text-align: left; cursor: pointer; transition: border-color .12s ease, background-color .12s ease, box-shadow .12s ease;
}
.day:hover { border-color: var(--green-300); background: var(--green-50); }
.day.is-weekend { background: var(--sand-50); }
.day.is-other { visibility: hidden; }
.day.is-past, .day[aria-disabled="true"] { cursor: not-allowed; }
.day.is-past { background: transparent; border-color: transparent; color: var(--sand-400); }
.day.is-past:hover { background: transparent; }
.day.is-today .dnum { background: var(--ink); color: #fff; }
.day .dnum { font-weight: 700; font-size: .95rem; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; margin: -2px 0 0 -2px; }
.day .dstate { display: flex; align-items: center; gap: 5px; font-size: .76rem; font-weight: 600; line-height: 1.2; }
.day .dstate .i { width: 13px; height: 13px; stroke-width: 2.2; }
.day .dfree { color: var(--green-500); }
.day .dfew { color: var(--warn); }
.day.s-booked, .day.s-unavailable { background-image: repeating-linear-gradient(135deg, transparent 0 7px, rgb(0 0 0 / 3.5%) 7px 8px); background-color: #F4F2EE; color: var(--ink-mute); }
.day.s-booked:hover, .day.s-unavailable:hover { border-color: var(--line); background-color: #F4F2EE; }
.day.s-booked .dstate, .day.s-unavailable .dstate { color: #6a6a6a; }
.day.s-pending .dstate { color: var(--sand-800); }
.day.s-mine { border-color: var(--gold-200); }
.day.s-mine .dstate { color: var(--gold-700); }
.day.s-mine-confirmed { background: var(--green-50); border-color: var(--green-200); }
.day.s-mine-confirmed .dstate { color: var(--green); }
.day.is-selected { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 2px 8px rgb(29 70 48 / 25%); }
.day.is-selected .dstate, .day.is-selected .dfree { color: rgb(255 255 255 / 85%); }
.day.is-selected .dnum { color: #fff; }
.day.is-selected.is-today .dnum { background: #fff; color: var(--green); }
.day.is-preview { border-color: var(--green); background: var(--green-100); }
.day.is-conflict { box-shadow: inset 0 0 0 2px var(--danger); }

/* Vue année */
.year-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 26px; user-select: none; -webkit-user-select: none; }
.ym h4 { font-family: var(--font-sans); font-weight: 700; font-size: .9rem; color: var(--ink); margin-bottom: 8px; display: flex; justify-content: space-between; align-items: baseline; }
.ym h4 button { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.ym h4 button:hover { color: var(--green); text-decoration: underline; }
.ym h4 .ym-count { font-weight: 600; font-size: .75rem; color: var(--green-500); }
.ym-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.ym-grid .ydow { font-size: .62rem; color: var(--ink-mute); text-align: center; font-weight: 600; }
.yd { aspect-ratio: 1; border: 0; border-radius: 5px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); font: 600 .72rem var(--font-sans); color: var(--ink); cursor: pointer; padding: 0; display: grid; place-items: center; position: relative; }
.yd:hover { box-shadow: inset 0 0 0 1.5px var(--green); }
.yd.is-other { visibility: hidden; }
.yd.is-past { color: var(--sand-400); box-shadow: none; background: transparent; cursor: not-allowed; }
.yd.is-weekend { background: var(--sand-50); }
.yd.s-booked, .yd.s-unavailable { background: #E9E6E0; color: #8a8a8a; box-shadow: none; }
.yd.s-pending { box-shadow: inset 0 0 0 1px var(--sand-400); background: #fff; }
.yd.s-pending::after { content: ""; position: absolute; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--sand-600); }
.yd.s-mine { background: var(--gold-100); box-shadow: inset 0 0 0 1px var(--gold-200); color: var(--gold-700); }
.yd.s-mine-confirmed { background: var(--green-100); color: var(--green); box-shadow: inset 0 0 0 1px var(--green-200); }
.yd.is-selected { background: var(--green); color: #fff; box-shadow: none; }
.yd.is-today { outline: 2px solid var(--ink); outline-offset: -2px; }
.year-switch { display: flex; gap: 6px; }
.year-switch button { border: 1px solid var(--line); background: #fff; border-radius: var(--r-sm); padding: 6px 12px; font: 600 .9rem var(--font-sans); color: var(--ink-soft); cursor: pointer; min-height: 36px; }
.year-switch button[aria-current="true"] { background: var(--green); border-color: var(--green); color: #fff; }

/* Vue planning des salles */
.planning-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); -webkit-overflow-scrolling: touch; }
.planning { border-collapse: separate; border-spacing: 0; min-width: 100%; user-select: none; -webkit-user-select: none; }
.planning th, .planning td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--sand-200); padding: 0; }
.planning thead th { position: sticky; top: 0; background: #fff; z-index: 2; font-weight: 600; }
.planning .pl-room { position: sticky; left: 0; z-index: 3; background: #fff; min-width: 230px; max-width: 260px; text-align: left; padding: 10px 14px; border-right: 1px solid var(--line-strong); }
.planning thead .pl-room { z-index: 4; vertical-align: bottom; font-size: .8rem; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .06em; }
.pl-room .rn { display: flex; align-items: center; gap: 10px; }
.pl-room .rn .room-thumb { width: 40px; height: 32px; flex: none; }
.pl-room strong { display: block; font-size: .925rem; color: var(--ink); line-height: 1.2; }
.pl-room span { display: block; font-size: .78rem; color: var(--ink-mute); line-height: 1.3; }
.pl-month { font-size: .8rem; text-align: left; padding: 8px 10px; color: var(--green); font-family: var(--font-serif); font-weight: 700; border-right: 1px solid var(--line-strong) !important; }
.pl-day { min-width: 46px; width: 46px; text-align: center; padding: 6px 0; font-size: .72rem; color: var(--ink-mute); line-height: 1.2; }
.pl-day b { display: block; font-size: .95rem; color: var(--ink); }
.pl-day.is-weekend { background: var(--sand-50); }
.pl-day.is-today b { color: #fff; background: var(--ink); border-radius: 50%; width: 24px; height: 24px; display: grid; place-items: center; margin: 0 auto; }
.pl-cell { width: 46px; height: 54px; padding: 3px !important; }
.pl-cell button { width: 100%; height: 100%; border: 0; border-radius: 6px; background: #fff; cursor: pointer; display: grid; place-items: center; color: var(--green-500); padding: 0; transition: background-color .1s ease; }
.pl-cell button:hover { background: var(--green-50); box-shadow: inset 0 0 0 1px var(--green-300); }
.pl-cell.is-weekend button { background: var(--sand-50); }
.pl-cell button .i { width: 14px; height: 14px; stroke-width: 2.2; }
.pl-cell.s-booked button, .pl-cell.s-unavailable button { background: #EEEBE6 repeating-linear-gradient(135deg, transparent 0 6px, rgb(0 0 0 / 4%) 6px 7px); color: #7b7b7b; cursor: not-allowed; }
.pl-cell.s-pending button, .pl-cell.s-submitted button, .pl-cell.s-in_review button, .pl-cell.s-changes_requested button { background: #fff; box-shadow: inset 0 0 0 1px var(--sand-300); color: var(--sand-800); }
.pl-cell.s-approved button { background: var(--gold-100); color: var(--gold-700); }
.pl-cell.s-confirmed button { background: var(--green); color: #fff; }
.pl-cell.s-past button { background: transparent; color: transparent; cursor: not-allowed; box-shadow: none; }
.pl-cell.is-selected button { background: var(--green) !important; color: #fff !important; box-shadow: 0 1px 4px rgb(29 70 48 / 30%) !important; }
.pl-cell .who { font-size: .62rem; line-height: 1.1; font-weight: 700; overflow: hidden; max-width: 42px; text-overflow: ellipsis; white-space: nowrap; }
.planning tr.is-row-selected .pl-room { background: var(--green-50); box-shadow: inset 3px 0 0 var(--green); }
.planning tbody tr:last-child td, .planning tbody tr:last-child th { border-bottom: 0; }
.planning-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; font-size: .85rem; color: var(--ink-mute); }

/* Liste mobile du planning */
.day-list { display: none; }

/* Popover d'information sur une cellule */
.cell-tip { position: fixed; z-index: 70; max-width: 280px; background: var(--ink); color: #fff; font-size: .82rem; line-height: 1.4; padding: 8px 12px; border-radius: var(--r-sm); pointer-events: none; box-shadow: var(--shadow-pop); }
.cell-tip strong { display: block; }

/* --------------------------------------------------------------------------
   Page réservation (formateur)
   -------------------------------------------------------------------------- */
.res-hero { background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-card); overflow: hidden; }
.res-hero-top { padding: 32px 36px 28px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: start; }
.res-hero h1 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.2rem); margin: 10px 0 8px; }
.res-hero .when { font-size: 1.15rem; color: var(--ink); font-weight: 600; }
.res-hero-band { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; padding: 20px 36px; border-top: 1px solid var(--line); }
.res-hero-band.tone-gold { background: var(--gold-50); border-top-color: var(--gold-200); }
.res-hero-band.tone-green { background: var(--green-50); border-top-color: var(--green-200); }
.res-hero-band.tone-info { background: var(--info-bg); border-top-color: var(--info-line); }
.res-hero-band.tone-orange { background: var(--orange-bg); border-top-color: var(--orange-line); }
.res-hero-band.tone-muted { background: var(--sand-100); }
.res-hero-band .band-text { flex: 1 1 320px; }
.res-hero-band .band-text strong { display: block; color: var(--ink); font-size: 1.02rem; }
.res-hero-band .band-text span { color: var(--ink-soft); font-size: .95rem; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 24px; }
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 20px 34px; }
.timeline li::before { content: ""; position: absolute; left: 11px; top: 26px; bottom: 0; width: 2px; background: var(--sand-200); }
.timeline li:last-child::before { display: none; }
.timeline .tl-dot { position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--sand-100); color: var(--ink-mute); }
.timeline .tl-dot .i { width: 13px; height: 13px; stroke-width: 2.4; }
.timeline li.is-done .tl-dot { background: var(--green); color: #fff; }
.timeline li.is-current .tl-dot { background: var(--gold); color: var(--green-950); box-shadow: 0 0 0 4px var(--gold-100); }
.timeline li.is-bad .tl-dot { background: var(--danger); color: #fff; }
.timeline strong { display: block; color: var(--ink); font-size: .95rem; }
.timeline span { font-size: .85rem; color: var(--ink-mute); }
.gallery { display: grid; grid-template-columns: 2fr 1fr; grid-auto-rows: 120px; gap: 8px; border-radius: var(--r); overflow: hidden; }
.gallery a, .gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery a:first-child { grid-row: span 2; }
.gallery-single { grid-template-columns: 1fr; grid-auto-rows: 220px; }
.gallery-single a:first-child { grid-row: auto; }
.photo-missing { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: var(--r); background: var(--sand-100); color: var(--ink-mute); font-size: .9rem; }
.messages { display: grid; gap: 12px; }
.msg { padding: 12px 14px; border-radius: var(--r); background: var(--sand-100); }
.msg.from-staff { background: var(--green-50); border: 1px solid var(--green-100); }
.msg-meta { font-size: .8rem; color: var(--ink-mute); margin-bottom: 4px; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Confirmation finale */
.success-hero { text-align: center; padding: 56px 32px 40px; }
.success-mark { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 22px; display: grid; place-items: center; background: var(--green); color: #fff; box-shadow: 0 0 0 10px var(--green-50), 0 0 0 11px var(--green-200); }
.success-mark .i { width: 40px; height: 40px; stroke-width: 2.4; }
.success-hero h1 { font-size: clamp(1.9rem, 1.5rem + 1.3vw, 2.6rem); }
.success-hero p { color: var(--ink-soft); font-size: 1.08rem; margin: 10px auto 0; max-width: 34rem; }
.recap { max-width: 640px; margin: 0 auto; }
.cal-add { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* Dialogue modal (élément <dialog> natif) */
dialog.modal { border: 0; padding: 0; border-radius: var(--r-xl); box-shadow: var(--shadow-pop); width: min(520px, calc(100vw - 32px)); color: var(--ink-2); }
dialog.modal::backdrop { background: rgb(14 39 26 / 45%); backdrop-filter: blur(2px); }
.modal-body { padding: 28px 28px 8px; }
.modal-body h2 { font-size: 1.35rem; margin-bottom: 10px; }
.modal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 20px 28px 24px; }

/* Tableaux */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow-card); }
table.table { width: 100%; border-collapse: collapse; font-size: .925rem; }
.table th { text-align: left; font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-mute); padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--sand-50); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--sand-50); }
.table .t-main { font-weight: 600; color: var(--ink); }
.table .t-sub { font-size: .85rem; color: var(--ink-mute); }
.table a.row-link { color: inherit; text-decoration: none; }
.table a.row-link:hover .t-main { color: var(--green); text-decoration: underline; }
tr.is-clickable { cursor: pointer; }

/* Pagination / filtres */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 18px; }
.filters .field { margin: 0; min-width: 150px; }
.filters .field + .field { margin: 0; }
.filters .input, .filters .select { min-height: 40px; padding-top: 7px; padding-bottom: 7px; font-size: .95rem; }
.search-input { position: relative; }
.search-input .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-mute); }
.search-input .input { padding-left: 38px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a { padding: 12px 14px; color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: .95rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.tabs a:hover { color: var(--green); }
.tabs a[aria-current="page"] { color: var(--green); border-bottom-color: var(--gold); }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--sand-200); color: var(--ink-soft); font: 700 .72rem var(--font-sans); }
.badge-gold { background: var(--gold); color: var(--green-950); }
.badge-green { background: var(--green); color: #fff; }

/* Indicateur photos */
.photo-flag { display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; font-weight: 600; padding: 3px 9px; border-radius: var(--r-pill); border: 1px solid; white-space: nowrap; }
.photo-flag.has { color: var(--green); background: var(--green-50); border-color: var(--green-200); }
.photo-flag.none { color: var(--orange); background: var(--orange-bg); border-color: var(--orange-line); }
.photo-flag .i { width: 14px; height: 14px; }

/* ==========================================================================
   Back-office
   ========================================================================== */
.admin { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--green-900); color: rgb(255 255 255 / 82%); display: flex; flex-direction: column; overflow-y: auto; }
.sidebar-brand { padding: 22px 22px 18px; border-bottom: 1px solid rgb(255 255 255 / 8%); display: flex; align-items: center; gap: 12px; text-decoration: none; }
.sidebar-brand img { height: 42px; width: auto; }
.sidebar-brand span { display: block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.sidebar-brand strong { display: block; color: #fff; font-family: var(--font-serif); font-size: .98rem; line-height: 1.2; }
.side-nav { padding: 14px 12px; display: grid; gap: 2px; }
.side-nav .grp { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: rgb(255 255 255 / 42%); padding: 16px 12px 6px; font-weight: 700; }
.side-nav a { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--r-sm); color: rgb(255 255 255 / 80%); text-decoration: none; font-weight: 500; font-size: .95rem; }
.side-nav a .i { color: rgb(255 255 255 / 55%); }
.side-nav a:hover { background: rgb(255 255 255 / 6%); color: #fff; }
.side-nav a[aria-current="page"] { background: rgb(255 255 255 / 9%); color: #fff; font-weight: 600; }
.side-nav a[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
.side-nav a[aria-current="page"] .i { color: var(--gold); }
.side-nav .badge { margin-left: auto; background: var(--gold); color: var(--green-950); }
.sidebar-foot { margin-top: auto; padding: 16px 20px 20px; border-top: 1px solid rgb(255 255 255 / 8%); font-size: .85rem; }
.sidebar-foot .tagline { color: var(--gold); font-size: .95rem; }
.admin-main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: 64px; background: rgb(250 248 245 / 94%); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px; padding: 0 32px; }
.topbar .crumbs { font-size: .9rem; color: var(--ink-mute); display: flex; gap: 8px; align-items: center; min-width: 0; }
.topbar .crumbs a { color: var(--ink-soft); text-decoration: none; }
.topbar .crumbs a:hover { color: var(--green); }
.topbar .header-actions { margin-left: auto; }
.admin-page { padding: 32px 32px 64px; max-width: 1400px; width: 100%; }
.admin-page .page-head { margin-bottom: 24px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { display: block; padding: 20px 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-card); text-decoration: none; color: inherit; transition: border-color .15s ease, box-shadow .15s ease; }
.kpi:hover { border-color: var(--green-300); color: inherit; }
.kpi .kpi-label { display: flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 600; color: var(--ink-soft); }
.kpi .kpi-value { font-family: var(--font-serif); font-weight: 700; font-size: 2.4rem; line-height: 1.1; color: var(--green); margin: 10px 0 4px; }
.kpi .kpi-sub { font-size: .85rem; color: var(--ink-mute); }
.kpi.is-hot { border-color: var(--gold-200); background: linear-gradient(180deg, var(--gold-50), #fff 60%); }
.kpi.is-hot .kpi-value { color: var(--gold-700); }
.kpi.is-alert .kpi-value { color: var(--danger); }
.kpi.is-calm .kpi-value { color: var(--sand-600); }
.work-list { display: grid; }
.work-item { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 24px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.work-item:last-child { border-bottom: 0; }
.work-item:hover { background: var(--sand-50); color: inherit; }
.work-item .wi-date { font-family: var(--font-serif); color: var(--green); font-weight: 700; line-height: 1.2; }
.work-item .wi-date span { display: block; font-family: var(--font-sans); font-weight: 400; font-size: .8rem; color: var(--ink-mute); }
.work-item .wi-main strong { color: var(--ink); display: block; }
.work-item .wi-main span { font-size: .88rem; color: var(--ink-mute); }
.decision { display: grid; gap: 10px; }
.decision form { margin: 0; }
.note-internal { background: #FFF9E8; border: 1px solid #F0DFB0; border-radius: var(--r); padding: 12px 14px; }
.note-internal .msg-meta { color: #8a6d1e; }
.internal-tag { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8a6d1e; background: #FFF4D6; border: 1px solid #F0DFB0; padding: 2px 8px; border-radius: var(--r-pill); }
.conflict-box { border: 1px solid var(--danger-line); background: var(--danger-bg); border-radius: var(--r); padding: 14px 16px; color: var(--danger); }
.tree { display: grid; gap: 16px; }
.tree-country > h2 { font-size: 1.1rem; display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.tree-city { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-card); overflow: hidden; }
.tree-city-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; background: var(--sand-50); border-bottom: 1px solid var(--line); }
.tree-city-head h3 { font-size: 1.05rem; }
.tree-venue { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.tree-venue:last-child { border-bottom: 0; }
.tree-venue-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.tree-venue-head .room-thumb { width: 56px; height: 42px; }
.tree-rooms { margin: 12px 0 0 70px; display: grid; gap: 6px; }
.tree-room { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--sand-50); }
.tree-room .room-thumb { width: 40px; height: 30px; }
.tree-room a.rn { font-weight: 600; color: var(--ink); text-decoration: none; }
.tree-room a.rn:hover { color: var(--green); text-decoration: underline; }
.inactive-tag { font-size: .75rem; font-weight: 700; color: var(--ink-mute); background: var(--sand-200); padding: 2px 8px; border-radius: var(--r-pill); }

/* Gestion des photos */
.photo-manager { display: grid; gap: 16px; }
.dropzone { display: grid; place-items: center; text-align: center; gap: 8px; padding: 28px; border: 2px dashed var(--line-strong); border-radius: var(--r-lg); background: var(--sand-50); color: var(--ink-soft); transition: all .15s ease; }
.dropzone.is-over { border-color: var(--green); background: var(--green-50); color: var(--green); }
.dropzone .i-xl { color: var(--sand-600); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.photo-item { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.photo-item .ph { position: relative; aspect-ratio: 4/3; background: var(--sand-100); }
.photo-item .ph img { width: 100%; height: 100%; object-fit: cover; }
.photo-item .ph .cover-tag { position: absolute; left: 8px; top: 8px; background: var(--gold); color: var(--green-950); font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: var(--r-pill); display: inline-flex; gap: 4px; align-items: center; }
.photo-item .ph .hidden-tag { position: absolute; right: 8px; top: 8px; background: rgb(0 0 0 / 65%); color: #fff; font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: var(--r-pill); display: inline-flex; gap: 4px; align-items: center; }
.photo-item .pbody { padding: 10px; display: grid; gap: 8px; }
.photo-item .pbody .input { min-height: 36px; padding: 6px 10px; font-size: .88rem; }
.photo-item .ptools { display: flex; flex-wrap: wrap; gap: 4px; }
.upload-progress { font-size: .88rem; color: var(--ink-soft); }

/* Emails */
.email-preview { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--sand-100); }
.email-preview iframe { width: 100%; height: 640px; border: 0; background: #fff; display: block; }
.code-vars { display: flex; flex-wrap: wrap; gap: 6px; }
.code-vars code { background: var(--sand-100); border: 1px solid var(--line); border-radius: var(--r-xs); padding: 2px 6px; font-size: .8rem; cursor: pointer; }
.perm-table td, .perm-table th { text-align: center; }
.perm-table td:first-child, .perm-table th:first-child { text-align: left; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
  .booking { grid-template-columns: 340px minmax(0, 1fr); gap: 20px; }
  .year-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .admin { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 80; transform: translateX(-100%); transition: transform .25s ease; }
  .sidebar.is-open { transform: none; box-shadow: var(--shadow-pop); }
  .topbar { padding: 0 20px; }
  .admin-page { padding: 24px 20px 56px; }
  .nav-toggle { display: inline-flex; }
  .booking { grid-template-columns: 1fr; }
  .booking-side { position: static; }
  .two-col { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-mobile-brand { display: flex; justify-content: center; margin-bottom: 28px; }
  .auth-mobile-brand img { height: 56px; }
}
@media (max-width: 860px) {
  .site-header-inner { padding: 0 16px; gap: 12px; }
  .brand-label { display: none; }
  .main-nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; align-items: stretch; height: auto; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px 16px; box-shadow: var(--shadow-pop); }
  .main-nav.is-open { display: flex; }
  .main-nav a { height: auto; padding: 14px 8px; border-bottom: 1px solid var(--line); }
  .main-nav a[aria-current="page"]::after { left: 0; right: auto; top: 12px; bottom: 12px; width: 3px; height: auto; }
  .header-actions .btn-new span { display: none; }
  .header-actions .btn-new { width: 44px; padding: 0; }
  .menu-btn .menu-name { display: none; }
  .page { padding: 24px 16px 64px; }
  .next-action { grid-template-columns: auto 1fr; padding: 22px; }
  .next-action .na-cta { grid-column: 1 / -1; }
  .next-action .na-cta .btn { width: 100%; }
  .new-request-cta { padding: 22px; }
  .res-hero-top { grid-template-columns: 1fr; padding: 24px 22px 20px; }
  .res-hero-band { padding: 18px 22px; }
  .res-hero-band .btn { width: 100%; }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .dl { grid-template-columns: 1fr; gap: 2px; }
  .dl dd { margin-bottom: 10px; }
  .year-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .cal-toolbar { padding: 12px; }
  .cal-nav { margin-left: 0; width: 100%; justify-content: space-between; }
  .cal-nav .cal-title { min-width: 0; font-size: 1.05rem; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; justify-content: center; padding: 8px 6px; }
  .cal-body { padding: 12px; }
  .month-grid { gap: 3px; }
  .day { min-height: 58px; padding: 5px; border-radius: 6px; }
  .day .dnum { width: 24px; height: 24px; font-size: .85rem; }
  .day .dstate span { display: none; }
  .day .dstate { justify-content: center; }
  .work-item { grid-template-columns: 1fr; gap: 6px; padding: 14px 18px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 16px; }
  .kpi .kpi-value { font-size: 1.9rem; }
  .tree-rooms { margin-left: 0; }
  .topbar .crumbs { display: none; }
  .gallery { grid-auto-rows: 90px; }
}
@media (max-width: 600px) {
  .planning-wrap.is-mobile-list { display: none; }
  .day-list { display: grid; gap: 10px; }
  .res-grid { grid-template-columns: 1fr; }
  .year-grid { grid-template-columns: 1fr 1fr; gap: 14px 12px; }
  .auth-main { padding: 32px 20px; }
  .modal-actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .sidebar, .topbar, .actions, .res-hero-band .btn { display: none !important; }
  body { background: #fff; }
}
.actions-center { justify-content: center; }
.table-flat { border: 0; box-shadow: none; border-radius: 0; }

.meta.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
.dl dd.msg-body { font-weight: 400; }
@media (max-width: 600px) { .meta.cols-2 { grid-template-columns: 1fr; } }
.cal-shell.cal-inline { border-radius: 0; border-left: 0; border-right: 0; box-shadow: none; }
@media (max-width: 1024px) { .cal-shell.cal-inline .cal-body { padding: 10px 8px 14px; } }

/* ------------------------------------------------------------ clés d'accès, second facteur */
.mono { font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace; letter-spacing: .04em; }
.wrap { flex-wrap: wrap; }
.btn-link { background: none; border: 0; padding: 4px 6px; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font: inherit; }
.btn-link:hover { color: var(--green); }
.input-sm { height: 36px; padding-block: 6px; max-width: 240px; }
.input-code { font-size: 1.6rem; text-align: center; letter-spacing: .35em; }
.card-accent { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 18%, transparent); }
.passkey-hero { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--green-50); color: var(--green); margin-bottom: 16px; }
.passkey-hero .i { width: 34px; height: 34px; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; color: var(--ink-soft); font-size: .95rem; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; }
.check-list .i { color: var(--green); flex: none; margin-top: 2px; }
.passkey-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r); }
.passkey-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; flex-wrap: wrap; }
.passkey-item + .passkey-item { border-top: 1px solid var(--line); }
.passkey-ico { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--sand-100); color: var(--green); }
.passkey-meta { flex: 1 1 220px; min-width: 0; display: grid; gap: 2px; }
.passkey-meta strong { overflow-wrap: anywhere; }
.passkey-actions > summary { list-style: none; }
.passkey-actions > summary::-webkit-details-marker { display: none; }
.passkey-panel { padding-top: 10px; }
.passkey-add .row .input { flex: 1 1 220px; }
.codes-grid { list-style: none; padding: 16px; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 18px;
  background: var(--sand-50); border: 1px dashed var(--line-strong); border-radius: var(--r); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
@media print {
  body * { visibility: hidden; }
  .codes-card, .codes-card * { visibility: visible; }
  .codes-card { position: absolute; inset: 0 auto auto 0; width: 100%; border: 0; box-shadow: none; }
  .codes-card .actions { display: none; }
}
.card-link { display: flex; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
.card-link:hover { border-color: var(--green-200); box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,.06)); }
.card-link strong { color: var(--green); }
.res-flag { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; padding: 6px 10px; border-radius: 8px; font-size: .85rem; font-weight: 600; }
.res-flag.tone-gold { background: var(--warn-bg); color: var(--warn); }
.res-flag.tone-orange { background: var(--danger-bg); color: var(--danger); }
.t-flag { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: .78rem; font-weight: 600; color: var(--warn); white-space: nowrap; }
.t-flag.is-danger { color: var(--danger); }
/* jours avant le délai minimum (vue formateur) : hachurés, distincts des jours passés */
.day.is-past.is-lead, .yd.is-past.is-lead, .pl-cell.s-past.s-lead {
  background-color: transparent;
  background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgba(120, 110, 90, .12) 6px 7px);
  border-radius: var(--r-sm, 8px);
}
.h-icon { display: flex; align-items: center; gap: 10px; }
.h-icon > .i { flex: none; color: var(--gold-700); }
.status { flex: none; white-space: nowrap; }
.btn-block { white-space: normal; text-align: center; }
.btn-block > .i { flex: none; }
/* mobile : rien ne dépasse de l'écran */
.table-wrap { position: relative; }
.tree > *, .tree-country, .tree-city { min-width: 0; }
.tree-city-head { flex-wrap: wrap; }
