/* =====================================================================
   UDO — Un toit pour ce soir · Système de design
   Mobile first · WCAG 2.2 AA · aucune dépendance externe
   ===================================================================== */

/* ---------- 1. Jetons ---------- */
:root {
  --forest: #285943;
  --forest-600: #2f6a4e;
  --forest-700: #1f4835;
  --forest-800: #183a2b;
  --forest-900: #122d21;
  --sage: #A8C3A0;
  --sage-200: #cfe0c9;
  --sage-100: #e7efe3;
  --sage-50: #f2f6ef;
  --beige: #F5F0E8;
  --beige-200: #ece4d6;
  --beige-300: #e0d5c2;
  --terracotta: #C87D5A;
  --terracotta-600: #b06a48;
  --terracotta-700: #9a5636; /* texte/boutons sur fond clair : contraste AA */
  --terracotta-100: #f6e4da;
  --white: #ffffff;
  --ink: #26332D;
  --ink-700: #3a4842;
  --muted: #56655e;
  --border: #e0d7c8;
  --border-strong: #c9bda9;
  --control-border: #857a67; /* contours des champs : contraste ≥ 3:1 (WCAG 2.2, 1.4.11) */
  --danger: #a8281f;
  --danger-bg: #fbe9e6;
  --warning: #7a4f00;
  --warning-bg: #fdf0d3;
  --success: #22663f;
  --success-bg: #e3f2e7;
  --info: #1d5a85;
  --info-bg: #e3eff8;
  --winter: #1f4f73;
  --winter-bg: #e4eef6;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(38, 51, 45, .06);
  --shadow: 0 1px 2px rgba(38, 51, 45, .05), 0 6px 18px rgba(38, 51, 45, .07);
  --shadow-lg: 0 10px 40px rgba(38, 51, 45, .14);
  --focus: 0 0 0 3px #fff, 0 0 0 5px #1d5a85;
  --container: 1200px;
  --gutter: 16px;
  --header-h: 64px;
  --bottom-nav-h: 64px;
  --sidebar-w: 264px;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--beige);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
img, svg, video, canvas { max-width: 100%; height: auto; display: block; }
svg.icon { display: inline-block; width: 1.25em; height: 1.25em; vertical-align: -0.25em; flex-shrink: 0; }
svg.icon-sm { display: inline-block; width: 1em; height: 1em; vertical-align: -0.15em; flex-shrink: 0; }
svg.icon-lg { display: inline-block; width: 1.75rem; height: 1.75rem; flex-shrink: 0; }
svg.icon-xl { display: inline-block; width: 2.5rem; height: 2.5rem; flex-shrink: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 .5em; color: var(--forest-800); font-weight: 800; letter-spacing: -0.01em; overflow-wrap: break-word; }
h1 { font-size: clamp(1.6rem, 4.5vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 3.2vw, 1.85rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
a { color: var(--forest); text-underline-offset: 3px; }
a:hover { color: var(--forest-700); }
small, .small { font-size: .875rem; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }
ul, ol { padding-left: 1.25rem; }
table { border-collapse: collapse; width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
input[type="checkbox"], input[type="radio"] { width: 24px; height: 24px; accent-color: var(--forest); }
input[type="file"] { max-width: 100%; }
summary { min-height: 24px; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
[hidden] { display: none !important; }
.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: 8px; top: -100px; z-index: 1000; background: var(--forest); color: #fff; padding: .75rem 1rem; border-radius: var(--radius-sm); font-weight: 700; }
.skip-link:focus { top: 8px; color: #fff; }

/* ---------- 3. Mise en page ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: 760px; }
.container-form { max-width: 560px; }
.section { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.section-sm { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.section-alt { background: var(--white); }
.section-title { text-align: center; margin-bottom: 1.75rem; }
.section-title .eyebrow { display: inline-flex; align-items: center; gap: .5rem; color: var(--terracotta-700); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; }
.stack > * + * { margin-top: var(--stack, 1rem); }
.stack-sm { --stack: .5rem; }
.stack-lg { --stack: 1.75rem; }
.cluster { display: flex; flex-wrap: wrap; gap: var(--gap, .75rem); align-items: center; }
.cluster-between { justify-content: space-between; }
.grid { display: grid; gap: var(--gap, 1rem); grid-template-columns: 1fr; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: .5rem; }
.gap { gap: 1rem; }
.grow { flex: 1 1 auto; min-width: 0; }
@media (min-width: 600px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .section { padding-top: 3.5rem; padding-bottom: 3.5rem; }
}

/* ---------- 4. Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .7rem 1.25rem; border-radius: var(--radius-sm);
  border: 2px solid transparent; background: var(--forest); color: #fff;
  font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; text-align: center;
  cursor: pointer; transition: background-color .15s, border-color .15s, color .15s, transform .05s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--forest-700); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn-secondary { background: var(--sage-100); color: var(--forest-800); border-color: var(--sage); }
.btn-secondary:hover { background: var(--sage-200); color: var(--forest-900); }
.btn-accent { background: var(--terracotta-700); }
.btn-accent:hover { background: #82462a; }
.btn-outline { background: transparent; color: var(--forest); border-color: var(--forest); }
.btn-outline:hover { background: var(--forest); color: #fff; }
.btn-ghost { background: transparent; color: var(--forest); }
.btn-ghost:hover { background: var(--sage-100); color: var(--forest-800); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #861f18; }
.btn-danger-outline { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-danger-outline:hover { background: var(--danger); color: #fff; }
.btn-white { background: #fff; color: var(--forest-800); }
.btn-white:hover { background: var(--beige); color: var(--forest-900); }
.btn-sm { min-height: 38px; padding: .45rem .85rem; font-size: .9rem; }
.btn-lg { min-height: 56px; padding: .9rem 1.5rem; font-size: 1.1rem; }
.btn-block { display: flex; width: 100%; }
.btn-icon { min-width: 44px; min-height: 44px; padding: .5rem; border-radius: var(--radius-pill); background: transparent; color: var(--ink); border: 0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; position: relative; text-decoration: none; }
.btn-icon:hover { background: var(--sage-100); color: var(--forest); }
.link-button { background: none; border: 0; padding: .2rem 0; min-height: 24px; color: var(--forest); text-decoration: underline; cursor: pointer; font: inherit; }
.inline-form { display: inline; }

/* ---------- 5. Formulaires ---------- */
.field { margin-bottom: 1.1rem; }
.field > label, .field-label { display: block; font-weight: 700; margin-bottom: .35rem; color: var(--ink); }
.field .optional { font-weight: 400; color: var(--muted); font-size: .875rem; }
.field .req { color: var(--danger); }
.help { color: var(--muted); font-size: .875rem; margin: .3rem 0 0; }
.field-error { color: var(--danger); font-size: .9rem; font-weight: 600; margin: .35rem 0 0; }
.input, .select, .textarea {
  display: block; width: 100%; min-height: 48px; padding: .65rem .85rem;
  background: #fff; border: 1.5px solid var(--control-border); border-radius: var(--radius-sm);
  font-size: 1rem; line-height: 1.4; transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 120px; resize: vertical; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-700); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px rgba(40, 89, 67, .2); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2.25rem; }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-icon { position: relative; }
.input-icon > .icon { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon > .input { padding-left: 2.6rem; }
.password-field { position: relative; }
.password-field .input { padding-right: 3.25rem; }
.password-field .toggle-password { position: absolute; right: 4px; top: 2px; }
.check { display: flex; gap: .65rem; align-items: flex-start; margin-bottom: .6rem; cursor: pointer; }
.check input { width: 24px; height: 24px; margin: 0; flex-shrink: 0; accent-color: var(--forest); cursor: pointer; }
.check-card { display: flex; gap: .75rem; align-items: flex-start; padding: .85rem 1rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: #fff; cursor: pointer; }
.check-card:has(input:checked) { border-color: var(--forest); background: var(--sage-50); }
.check-card input { width: 24px; height: 24px; margin: 0; accent-color: var(--forest); flex-shrink: 0; }
.choice-grid { display: grid; gap: .6rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .choice-grid { grid-template-columns: repeat(3, 1fr); } .choice-grid-2 { grid-template-columns: repeat(2, 1fr); } }
.role-choice { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem; padding: 1rem .75rem; border: 2px solid var(--control-border); border-radius: var(--radius); background: #fff; cursor: pointer; font-weight: 700; }
.role-choice .icon-lg { color: var(--forest); }
.role-choice small { font-weight: 400; color: var(--muted); }
.role-choice:has(input:checked) { border-color: var(--forest); background: var(--sage-50); box-shadow: 0 0 0 1px var(--forest); }
.role-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.role-choice:has(input:focus-visible) { box-shadow: var(--focus); }
fieldset { border: 0; padding: 0; margin: 0 0 1.25rem; min-width: 0; }
legend { font-weight: 800; font-family: var(--font-display); color: var(--forest-800); font-size: 1.1rem; margin-bottom: .6rem; padding: 0; }
.form-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1.5rem; }
.form-actions-between { justify-content: space-between; }
.counter { font-size: .8rem; color: var(--muted); text-align: right; margin-top: .25rem; }
/* Interrupteur accessible (checkbox stylée) */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.switch:last-child { border-bottom: 0; }
.switch-label { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .65rem; font-weight: 600; min-width: 0; }
.switch-label small { display: block; flex-basis: 100%; font-weight: 400; color: var(--muted); }
.switch input { appearance: none; -webkit-appearance: none; position: relative; width: 52px; height: 30px; border-radius: 30px; background: var(--control-border); flex-shrink: 0; cursor: pointer; transition: background-color .15s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .15s; }
.switch input:checked { background: var(--forest); }
.switch input:checked::after { transform: translateX(22px); }
.switch input:focus-visible { box-shadow: var(--focus); }
/* Compteur + / − */
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--control-border); border-radius: var(--radius-sm); background: #fff; overflow: hidden; }
.stepper button { width: 44px; height: 44px; border: 0; background: var(--beige); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--forest); }
.stepper button:hover { background: var(--sage-100); }
.stepper input { width: 3rem; text-align: center; border: 0; min-height: 44px; font-weight: 700; -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.row-field { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.dropzone { border: 2px dashed var(--border-strong); border-radius: var(--radius); padding: 1.5rem; text-align: center; background: var(--sage-50); }
.dropzone .icon-xl { margin: 0 auto .5rem; color: var(--forest); }

/* ---------- 6. Cartes, badges, alertes ---------- */
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.25rem; }
.card-lg { padding: 1.5rem; }
.card-flat { box-shadow: none; }
.card-muted { background: var(--sage-50); border-color: var(--sage-200); }
.card-warm { background: #fbf3ea; border-color: #efd9c5; }
.card-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem .75rem; margin-bottom: 1rem; }
.card-header h2, .card-header h3 { margin: 0; font-size: 1.15rem; display: flex; align-items: center; gap: .5rem; }
.card-link { color: var(--forest); font-weight: 700; font-size: .9rem; text-decoration: none; display: inline-flex; align-items: center; gap: .25rem; min-height: 32px; }
.card-link:hover { text-decoration: underline; }
.card-clickable { display: block; text-decoration: none; color: inherit; transition: box-shadow .15s, border-color .15s; }
.card-clickable:hover { box-shadow: var(--shadow); border-color: var(--sage); color: inherit; }
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: var(--radius-pill); font-size: .8rem; font-weight: 700; line-height: 1.4; white-space: nowrap; border: 1px solid transparent; }
.badge-success { background: var(--success-bg); color: var(--success); border-color: #bfe0c9; }
.badge-warning { background: var(--warning-bg); color: var(--warning); border-color: #f2d79a; }
.badge-danger { background: var(--danger-bg); color: var(--danger); border-color: #f1c2bc; }
.badge-info { background: var(--info-bg); color: var(--info); border-color: #bcd8ec; }
.badge-neutral { background: var(--beige-200); color: var(--ink-700); border-color: var(--border); }
.badge-accent { background: var(--terracotta-100); color: var(--terracotta-700); border-color: #ecc6b1; }
.badge-dark { background: var(--ink); color: #fff; }
.badge-count { min-width: 1.4rem; height: 1.4rem; padding: 0 .35rem; justify-content: center; background: var(--terracotta-700); color: #fff; border-radius: var(--radius-pill); font-size: .75rem; }
.verified-badge { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .6rem; border-radius: var(--radius-pill); background: var(--success-bg); color: var(--success); font-size: .8rem; font-weight: 700; }
.alert { display: flex; gap: .75rem; align-items: flex-start; padding: .9rem 1rem; border-radius: var(--radius-sm); border: 1px solid; margin-bottom: 1rem; }
.alert > .icon { margin-top: .1rem; }
.alert p:last-child { margin-bottom: 0; }
.alert-success { background: var(--success-bg); border-color: #bfe0c9; color: #164d2e; }
.alert-error, .alert-danger { background: var(--danger-bg); border-color: #f1c2bc; color: #7e1d16; }
.alert-warning { background: var(--warning-bg); border-color: #f2d79a; color: #5c3b00; }
.alert-info { background: var(--info-bg); border-color: #bcd8ec; color: #164566; }
.alert-title { font-weight: 800; margin: 0 0 .2rem; }
.flash-stack { margin-top: 1rem; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: var(--radius-pill); background: var(--beige); border: 1px solid var(--border); font-size: .85rem; color: var(--ink-700); }
.chip .icon-sm { color: var(--forest); }
.chip-list { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0; }
.empty-state { text-align: center; padding: 2rem 1rem; color: var(--muted); }
.empty-state .icon-xl { margin: 0 auto .75rem; color: var(--terracotta); }
.empty-state h3 { color: var(--ink); }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--sage-200); color: var(--forest-800); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; overflow: hidden; object-fit: cover; }
.avatar-lg { width: 72px; height: 72px; font-size: 1.5rem; }
.avatar-sm { width: 32px; height: 32px; font-size: .85rem; }
.divider-label { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-size: .875rem; margin: 1.25rem 0; }
.divider-label::before, .divider-label::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.muted { color: var(--muted); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.fw-bold { font-weight: 700; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2.5rem; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.w-100 { width: 100%; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-plain { list-style: none; padding: 0; margin: 0; }
.list-check { list-style: none; padding: 0; margin: 0; }
.list-check li { display: flex; gap: .6rem; align-items: flex-start; padding: .3rem 0; }
.list-check li .icon { color: var(--forest); margin-top: .15rem; }
.kv { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: .4rem 1rem; margin: 0; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- 7. Bandeaux ---------- */
.winter-banner { background: linear-gradient(90deg, var(--winter-bg), #f0f6fb); border-bottom: 1px solid #c4d9ea; color: var(--winter); }
.winter-banner .container { display: flex; gap: .75rem; align-items: center; padding-top: .6rem; padding-bottom: .6rem; flex-wrap: wrap; }
.winter-banner strong { font-family: var(--font-display); }
.winter-banner a { color: var(--winter); font-weight: 700; }
.announcement-bar { background: var(--forest); color: #fff; font-size: .9rem; }
.announcement-bar .container { padding-top: .5rem; padding-bottom: .5rem; display: flex; gap: .6rem; align-items: center; }
.announcement-bar a { color: #fff; font-weight: 700; }
.announcement-warning { background: var(--warning-bg); color: var(--warning); }
.announcement-warning a { color: var(--warning); }
.demo-banner { background: repeating-linear-gradient(-45deg, #fff6d9, #fff6d9 12px, #fdf0c5 12px, #fdf0c5 24px); color: #5c4500; text-align: center; font-size: .85rem; font-weight: 700; padding: .35rem; }

/* ---------- 8. En-tête public ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--border); backdrop-filter: saturate(1.2) blur(6px); }
.site-header .container { display: flex; align-items: center; gap: 1rem; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.brand img { height: 46px; width: auto; }
.main-nav { display: none; }
.main-nav ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.main-nav a { display: block; white-space: nowrap; padding: .5rem .6rem; border-radius: var(--radius-xs); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.main-nav a:hover, .main-nav a.is-active { color: var(--forest); background: var(--sage-50); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.header-actions .btn { min-height: 42px; padding: .5rem .9rem; }
.header-actions .hide-mobile { display: none; }
.menu-toggle { display: inline-flex; }
.mobile-menu { position: fixed; inset: 0; z-index: 100; background: rgba(18, 45, 33, .45); }
.mobile-menu-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(88vw, 360px); background: #fff; padding: 1rem; overflow-y: auto; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 1rem; }
.mobile-menu-panel nav a { display: flex; align-items: center; gap: .75rem; padding: .8rem .5rem; border-bottom: 1px solid var(--border); color: var(--ink); text-decoration: none; font-weight: 600; }
.mobile-menu-panel nav a:hover { color: var(--forest); }
.mobile-menu-header { display: flex; justify-content: space-between; align-items: center; }
.emergency-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .7rem; border-radius: var(--radius-pill); background: var(--danger-bg); color: var(--danger); font-weight: 800; font-size: .85rem; text-decoration: none; border: 1px solid #f1c2bc; }
.emergency-chip:hover { background: #f8d9d4; color: #7e1d16; }
/* Navigation complète seulement quand elle tient réellement (≈ 1 340 px) ; en dessous, menu compact. */
.site-header .container { max-width: 1440px; }
@media (min-width: 768px) { .header-actions .hide-mobile { display: inline-flex; } }
@media (min-width: 1380px) {
  .main-nav { display: block; }
  .menu-toggle { display: none; }
}
@media (min-width: 600px) { .header-actions .hide-xs { display: inline-flex; } }
@media (max-width: 599px) { .header-actions .hide-xs { display: none; } .brand img { height: 40px; } }

/* ---------- 9. Accueil ---------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, #fbf6ee 0%, #f4ecdd 100%); border-bottom: 1px solid var(--border); }
.hero-inner { display: grid; gap: 1.5rem; padding-top: 2rem; padding-bottom: 2.25rem; align-items: center; }
.hero h1 { font-size: clamp(2rem, 7vw, 3.3rem); white-space: pre-line; margin-bottom: .6rem; }
.hero-lead { font-size: 1.1rem; color: var(--ink-700); max-width: 38rem; }
.hero-ctas { display: grid; gap: .75rem; margin-top: 1.25rem; }
.cta-big { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.15rem; border-radius: var(--radius); text-decoration: none; font-weight: 800; font-size: 1.15rem; font-family: var(--font-display); box-shadow: var(--shadow); min-height: 64px; color: #fff; }
.cta-big .icon-lg { flex-shrink: 0; }
.cta-big .cta-arrow { margin-left: auto; }
.cta-seek { background: var(--forest); }
.cta-seek:hover { background: var(--forest-700); color: #fff; }
.cta-offer { background: var(--sage); color: var(--forest-900); }
.cta-offer:hover { background: #98b88f; color: var(--forest-900); }
.cta-help { background: var(--terracotta-700); }
.cta-help:hover { background: #82462a; color: #fff; }
.hero-values { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: 1.25rem; color: var(--ink-700); font-weight: 600; font-size: .95rem; padding: 0; list-style: none; }
.hero-values li { display: flex; gap: .4rem; align-items: center; }
.hero-values .icon { color: var(--forest); }
@media (min-width: 720px) {
  .hero-ctas { grid-template-columns: repeat(3, 1fr); }
  .cta-big { flex-direction: column; align-items: flex-start; min-height: 128px; }
  .cta-big .cta-arrow { margin-left: 0; margin-top: auto; }
}
@media (min-width: 1000px) {
  .hero-inner { grid-template-columns: 1.15fr .85fr; padding-top: 3rem; padding-bottom: 3rem; }
}
.quick-search { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1rem; box-shadow: var(--shadow); display: grid; gap: .75rem; }
.quick-search h2 { font-size: 1.15rem; margin: 0; }
@media (min-width: 1100px) { .quick-search { grid-template-columns: auto minmax(340px, 1fr) auto; align-items: center; padding: 1rem 1.25rem; } }
.steps { display: grid; gap: 1rem; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.step { display: flex; gap: 1rem; align-items: flex-start; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem; }
.step-icon { position: relative; width: 64px; height: 64px; border-radius: 50%; background: var(--sage-100); color: var(--forest); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.step-icon::before { counter-increment: step; content: counter(step); position: absolute; top: -4px; left: -4px; width: 26px; height: 26px; border-radius: 50%; background: var(--terracotta-700); color: #fff; font-weight: 800; font-size: .85rem; display: flex; align-items: center; justify-content: center; }
.step h3 { margin-bottom: .25rem; }
.step p { margin: 0; color: var(--ink-700); }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); } .step { flex-direction: column; align-items: center; text-align: center; } }
.stat-tiles { display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .stat-tiles { grid-template-columns: repeat(4, 1fr); } }
.stat-tile { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; text-align: center; }
.stat-tile .icon-lg { margin: 0 auto .4rem; color: var(--terracotta-700); }
.stat-value { display: block; font-family: var(--font-display); font-size: 1.9rem; font-weight: 800; color: var(--forest-800); line-height: 1.1; }
.stat-label { display: block; color: var(--ink-700); font-size: .9rem; font-weight: 600; }
.testimonial { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; position: relative; }
.testimonial blockquote { margin: 0 0 .75rem; font-style: italic; color: var(--ink-700); }
.testimonial blockquote::before { content: "“"; font-family: Georgia, serif; font-size: 3rem; line-height: 0; color: var(--terracotta); vertical-align: -0.4em; margin-right: .15rem; }
.testimonial footer { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: .9rem; }
.faq-list { display: grid; gap: .6rem; }
.faq-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.faq-item summary { cursor: pointer; padding: .9rem 1rem; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { transition: transform .2s; color: var(--forest); }
.faq-item[open] summary .icon { transform: rotate(180deg); }
.faq-item .faq-answer { padding: 0 1rem 1rem; color: var(--ink-700); }
.winter-card { background: linear-gradient(135deg, #e6f0f7, #f7fafc); border: 1px solid #c4d9ea; border-radius: var(--radius-lg); padding: 1.5rem; color: var(--winter); }
.winter-card h2 { color: var(--winter); display: flex; gap: .6rem; align-items: center; }
.trust-list { display: grid; gap: .75rem; }
.trust-item { display: flex; gap: .75rem; align-items: flex-start; }
.trust-item .icon-lg { color: var(--forest); flex-shrink: 0; }
.partner-card { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .5rem; min-height: 120px; background: #fff; border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 1rem; color: var(--muted); }

/* ---------- 10. Pied de page ---------- */
.site-footer { background: var(--forest-800); color: #e7efe3; margin-top: 2rem; }
.site-footer a { color: #e7efe3; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: 1.75rem; padding: 2.5rem 0 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 1.4fr repeat(4, 1fr); } }
.footer-brand img { height: 52px; width: auto; margin-bottom: .75rem; }
.footer-brand p { color: #cfe0c9; font-size: .95rem; }
.site-footer h2 { color: #fff; font-size: 1rem; margin-bottom: .75rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .2rem; font-size: .93rem; }
.site-footer ul a { display: inline-block; padding: .3rem 0; }
.footer-emergency { background: var(--forest-900); }
.footer-emergency .container { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding-top: .9rem; padding-bottom: .9rem; font-size: .9rem; }
.footer-emergency a { font-weight: 800; color: #fff; background: rgba(255, 255, 255, .08); padding: .2rem .6rem; border-radius: var(--radius-pill); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); }
.footer-bottom .container { padding-top: 1rem; padding-bottom: 1.25rem; font-size: .85rem; color: #b8cbb2; display: flex; flex-wrap: wrap; gap: .5rem 1rem; justify-content: space-between; }

/* ---------- 11. Contenu éditorial (CMS) ---------- */
.page-header { background: linear-gradient(180deg, #fbf6ee, var(--beige)); padding: 2rem 0 1.25rem; border-bottom: 1px solid var(--border); }
.page-header h1 { margin-bottom: .3rem; }
.page-header p { color: var(--ink-700); margin: 0; max-width: 46rem; }
.breadcrumb { font-size: .875rem; color: var(--muted); margin-bottom: .5rem; }
.breadcrumb a { color: var(--muted); }
.prose { max-width: 46rem; }
.prose h2 { margin-top: 1.75rem; }
.prose h3 { margin-top: 1.25rem; }
.prose li { margin-bottom: .35rem; }
.prose blockquote { margin: 1.25rem 0; padding: .9rem 1.1rem; border-left: 4px solid var(--terracotta); background: #fbf3ea; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.prose table { margin: 1rem 0; font-size: .95rem; background: #fff; border: 1px solid var(--border); }
.prose th, .prose td { padding: .6rem .75rem; border: 1px solid var(--border); text-align: left; vertical-align: top; }
.prose th { background: var(--sage-50); }
.prose code { background: var(--beige-200); padding: .1rem .35rem; border-radius: 4px; font-size: .9em; }
.legal-template-notice { border: 2px dashed var(--warning); background: var(--warning-bg); color: var(--warning); padding: .75rem 1rem; border-radius: var(--radius-sm); font-weight: 600; margin-bottom: 1.5rem; }

/* ---------- 12. Recherche & annonces ---------- */
.search-layout { display: grid; gap: 1rem; padding: 1rem 0 2rem; }
@media (min-width: 1000px) { .search-layout { grid-template-columns: 300px 1fr; align-items: start; } }
.filters-panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
@media (min-width: 1000px) { .filters-panel { position: sticky; top: calc(var(--header-h) + 1rem); max-height: calc(100vh - var(--header-h) - 2rem); overflow-y: auto; } }
.filters-panel h2 { font-size: 1.1rem; display: flex; align-items: center; gap: .5rem; }
.filters-toggle { display: flex; }
@media (min-width: 1000px) { .filters-toggle { display: none; } .filters-panel.is-collapsible { display: block !important; } }
.date-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: 1rem; }
.date-toggle label { display: flex; align-items: center; justify-content: center; gap: .4rem; min-height: 46px; border: 1.5px solid var(--forest); border-radius: var(--radius-sm); font-weight: 700; color: var(--forest); cursor: pointer; }
.date-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.date-toggle label:has(input:checked) { background: var(--forest); color: #fff; }
.date-toggle label:has(input:focus-visible) { box-shadow: var(--focus); }
.results-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.results-header h1, .results-header h2 { margin: 0; font-size: 1.3rem; }
.view-switch { display: inline-flex; border: 1.5px solid var(--forest); border-radius: var(--radius-sm); overflow: hidden; }
.view-switch a, .view-switch button { padding: .5rem .85rem; color: var(--forest); text-decoration: none; font-weight: 700; display: inline-flex; gap: .35rem; align-items: center; background: #fff; border: 0; cursor: pointer; }
.view-switch .is-active { background: var(--forest); color: #fff; }
.listing-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); }
@media (min-width: 1300px) { .listing-grid-3 { grid-template-columns: repeat(3, 1fr); } }
.listing-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .15s, transform .15s; }
.listing-card:hover { box-shadow: var(--shadow); }
.listing-media { position: relative; aspect-ratio: 16 / 10; background: var(--sage-100); }
.listing-media img { width: 100%; height: 100%; object-fit: cover; }
.listing-media .placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--forest); }
.listing-media .placeholder svg { width: 56px; height: 56px; opacity: .7; }
.listing-media .media-badges { position: absolute; left: .6rem; bottom: .6rem; display: flex; gap: .35rem; flex-wrap: wrap; }
.listing-media .media-badges .badge { box-shadow: var(--shadow-sm); }
.fav-button { position: absolute; top: .6rem; right: .6rem; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .95); border: 0; display: flex; align-items: center; justify-content: center; color: var(--terracotta-700); cursor: pointer; box-shadow: var(--shadow-sm); z-index: 2; }
.fav-button:hover { background: #fff; }
.fav-button[aria-pressed="true"] { color: #b3261e; }
.listing-body { padding: .9rem 1rem 1rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.listing-title { font-size: 1.1rem; margin: 0; }
.listing-title a { color: var(--forest-800); text-decoration: none; }
.listing-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.listing-title a:focus-visible { box-shadow: none; }
.listing-card:has(.listing-title a:focus-visible) { box-shadow: var(--focus); }
.listing-meta { display: flex; flex-wrap: wrap; gap: .35rem .9rem; color: var(--ink-700); font-size: .9rem; }
.listing-meta span { display: inline-flex; align-items: center; gap: .3rem; }
.listing-meta .icon-sm { color: var(--forest); }
.listing-location { display: flex; align-items: center; gap: .35rem; color: var(--muted); font-size: .9rem; margin-top: auto; }
.search-map { height: 420px; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; background: var(--sage-50); }
@media (min-width: 1000px) { .search-map { height: 560px; } }
.map-notice { display: flex; gap: .5rem; align-items: flex-start; font-size: .875rem; color: var(--ink-700); background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .6rem .8rem; margin-top: .6rem; }
.map-marker { width: 38px; height: 38px; border-radius: 50%; background: var(--forest); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); display: flex; align-items: center; justify-content: center; color: #fff; }
.map-marker svg { width: 20px; height: 20px; }
.map-marker.is-tonight { background: var(--terracotta-700); }
.map-me { width: 18px; height: 18px; border-radius: 50%; background: #1d5a85; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(29, 90, 133, .25); }
.listing-detail { display: grid; gap: 1.25rem; padding: 1.25rem 0 2rem; }
@media (min-width: 1000px) { .listing-detail { grid-template-columns: 1fr 380px; align-items: start; } .listing-aside { position: sticky; top: calc(var(--header-h) + 1rem); } }
.gallery { display: grid; gap: .5rem; grid-template-columns: 1fr; border-radius: var(--radius); overflow: hidden; }
.gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 10; background: var(--sage-100); }
@media (min-width: 700px) { .gallery.has-many { grid-template-columns: 2fr 1fr; } .gallery.has-many .gallery-side { display: grid; gap: .5rem; } }
.gallery-side img { aspect-ratio: 16 / 10; }
.feature-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .6rem; list-style: none; padding: 0; margin: 0; }
.feature-list li { display: flex; align-items: center; gap: .55rem; padding: .55rem .75rem; background: var(--sage-50); border-radius: var(--radius-sm); font-weight: 600; font-size: .95rem; }
.feature-list li .icon { color: var(--forest); }
.feature-list li.is-off { background: var(--beige); color: var(--muted); font-weight: 400; text-decoration: line-through; text-decoration-color: rgba(86, 101, 94, .5); }
.feature-list li.is-off .icon { color: var(--muted); }
.host-card { display: flex; flex-wrap: wrap; gap: .9rem; align-items: center; }
.host-card > div { flex: 1 1 12rem; min-width: 0; }
.host-card .name { font-weight: 800; font-size: 1.05rem; }
.badge-list { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; padding: 0; margin: .5rem 0 0; }

/* ---------- 13. Espaces connectés ---------- */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.app-topbar { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--border); }
.app-topbar .bar { display: flex; align-items: center; gap: .5rem; min-height: 60px; padding: 0 var(--gutter); }
.app-topbar .brand img { height: 40px; }
.app-topbar .topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .25rem; }
.notif-dot { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--terracotta-700); color: #fff; font-size: .75rem; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }
.user-menu { position: relative; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: .5rem; cursor: pointer; padding: .25rem .5rem; border-radius: var(--radius-pill); }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: var(--sage-50); }
.user-menu .user-name { display: none; font-weight: 700; line-height: 1.15; font-size: .9rem; }
.user-menu .user-name small { display: block; font-weight: 400; color: var(--muted); }
@media (min-width: 700px) { .user-menu .user-name { display: block; } }
.dropdown-panel { position: absolute; right: 0; top: calc(100% + 6px); min-width: 240px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: .4rem; z-index: 60; }
.dropdown-panel a, .dropdown-panel button { display: flex; width: 100%; align-items: center; gap: .6rem; padding: .6rem .7rem; border-radius: var(--radius-xs); color: var(--ink); text-decoration: none; background: none; border: 0; cursor: pointer; font-weight: 600; text-align: left; }
.dropdown-panel a:hover, .dropdown-panel button:hover { background: var(--sage-50); color: var(--forest); }
.app-body { display: flex; flex: 1; }
.app-sidebar { display: none; }
.app-main { flex: 1; min-width: 0; padding: 1rem var(--gutter) calc(var(--bottom-nav-h) + 1.5rem); }
@media (min-width: 1000px) {
  .app-sidebar { display: flex; flex-direction: column; width: var(--sidebar-w); flex-shrink: 0; background: var(--forest-800); color: #e7efe3; position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto; padding: 1rem .75rem; }
  .app-main { padding: 1.5rem 2rem 2.5rem; }
  .bottom-nav { display: none !important; }
}
.sidebar-section { margin-bottom: 1rem; }
.sidebar-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: #a9c2a2; font-weight: 800; margin: .75rem .6rem .35rem; }
.sidebar-nav { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.sidebar-nav a { display: flex; align-items: center; gap: .7rem; padding: .6rem .7rem; border-radius: var(--radius-sm); color: #e7efe3; text-decoration: none; font-weight: 600; font-size: .95rem; }
.sidebar-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.sidebar-nav a.is-active { background: var(--sage-100); color: var(--forest-900); }
.sidebar-nav a.is-active .icon { color: var(--forest); }
.sidebar-nav .badge-count { margin-left: auto; }
.sidebar-footer { margin-top: auto; padding: .75rem .6rem 0; font-size: .82rem; color: #a9c2a2; }
.sidebar-footer a { color: #e7efe3; }
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: #fff; border-top: 1px solid var(--border); display: grid; grid-template-columns: repeat(5, 1fr); height: var(--bottom-nav-h); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -4px 16px rgba(38, 51, 45, .06); }
.bottom-nav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: .75rem; font-weight: 700; }
.bottom-nav a .icon { width: 24px; height: 24px; }
.bottom-nav a.is-active { color: var(--forest); }
.bottom-nav a.is-active::before { content: ""; position: absolute; top: 0; left: 25%; right: 25%; height: 3px; border-radius: 0 0 3px 3px; background: var(--forest); }
.bottom-nav .notif-dot { top: 6px; right: calc(50% - 22px); }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1.25rem; }
.page-head h1 { margin: 0; font-size: clamp(1.4rem, 3.5vw, 1.9rem); }
.page-head p { margin: .2rem 0 0; color: var(--ink-700); }
.back-link { display: inline-flex; align-items: center; gap: .3rem; color: var(--forest); font-weight: 700; text-decoration: none; margin-bottom: .75rem; }
.welcome-card { display: flex; gap: 1rem; align-items: center; background: linear-gradient(135deg, #fbf6ee, #f0e6d6); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; margin-bottom: 1.25rem; }
.welcome-card h1 { margin: 0; font-size: clamp(1.3rem, 3.5vw, 1.8rem); }
.welcome-card p { margin: .25rem 0 0; color: var(--ink-700); }
.dash-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 1100px) { .dash-grid { grid-template-columns: 2fr 1fr; } }
.kpi-grid { display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); margin-bottom: 1.25rem; }
@media (min-width: 800px) { .kpi-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1200px) { .kpi-grid-5 { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1500px) { .kpi-grid-7 { grid-template-columns: repeat(7, 1fr); } }
.kpi { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; display: flex; flex-direction: column; gap: .2rem; text-decoration: none; color: inherit; }
a.kpi:hover { border-color: var(--sage); box-shadow: var(--shadow); color: inherit; }
.kpi .icon-lg { color: var(--forest); }
.kpi-value { font-family: var(--font-display); font-weight: 800; font-size: 1.75rem; color: var(--forest-800); line-height: 1.1; }
.kpi-label { color: var(--ink-700); font-weight: 600; font-size: .9rem; overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
.kpi-trend { font-size: .8rem; color: var(--success); font-weight: 700; }
.kpi-warm { background: #fbf1e4; border-color: #efd9c5; }
.kpi-warm .icon-lg { color: var(--terracotta-700); }
.quick-actions { display: grid; gap: .6rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .quick-actions { grid-template-columns: repeat(4, 1fr); } }
.quick-action { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; min-height: 96px; padding: .75rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); text-align: center; text-decoration: none; color: var(--ink); font-weight: 700; font-size: .92rem; position: relative; }
.quick-action:hover { border-color: var(--sage); background: var(--sage-50); color: var(--forest-800); }
.quick-action .icon-lg { color: var(--terracotta-700); }
.quick-action .badge-count { position: absolute; top: .5rem; right: .5rem; }
.item-list { list-style: none; margin: 0; padding: 0; }
.item-list > li { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .85rem; padding: .8rem 0; border-bottom: 1px solid var(--border); }
.item-list > li:last-child { border-bottom: 0; }
.item-list .item-main { flex: 1 1 12rem; min-width: 0; overflow-wrap: anywhere; }
.item-list .item-title { font-weight: 700; color: var(--ink); text-decoration: none; display: block; }
.item-list a.item-title:hover { color: var(--forest); }
.item-list .item-sub { color: var(--muted); font-size: .875rem; }
.item-list .item-icon { width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--sage-100); color: var(--forest); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.item-list .item-thumb { width: 72px; height: 56px; border-radius: var(--radius-xs); object-fit: cover; background: var(--sage-100); flex-shrink: 0; }
.timeline { list-style: none; padding: 0; margin: 0; counter-reset: tl; }
.timeline li { position: relative; display: flex; gap: .75rem; padding: 0 0 1rem; }
.timeline li::before { counter-increment: tl; content: counter(tl); width: 28px; height: 28px; border-radius: 50%; background: var(--beige-200); color: var(--muted); font-weight: 800; font-size: .85rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; z-index: 1; }
.timeline li::after { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--border); }
.timeline li:last-child::after { display: none; }
.timeline li.is-done::before { background: var(--forest); color: #fff; content: "✓"; }
.timeline li.is-current::before { background: var(--terracotta-700); color: #fff; }
.timeline .tl-title { font-weight: 700; }
.timeline .tl-sub { color: var(--muted); font-size: .875rem; }
.tabs { display: flex; flex-wrap: wrap; gap: .4rem; padding-bottom: 2px; margin-bottom: 1rem; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button { flex-shrink: 0; padding: .5rem 1rem; border-radius: var(--radius-pill); border: 1.5px solid var(--control-border); background: #fff; color: var(--ink-700); font-weight: 700; text-decoration: none; font-size: .92rem; cursor: pointer; }
.tabs a:hover { border-color: var(--forest); color: var(--forest); }
.tabs .is-active, .tabs [aria-current="page"], .tabs [aria-selected="true"] { background: var(--forest); color: #fff; border-color: var(--forest); }
.tabs .badge-count { margin-left: .3rem; }
.address-reveal { border: 2px solid var(--forest); background: var(--sage-50); border-radius: var(--radius); padding: 1rem 1.15rem; }
.address-reveal h3 { display: flex; gap: .5rem; align-items: center; }
.sensitive-hint { display: flex; gap: .5rem; align-items: flex-start; color: var(--ink-700); font-size: .875rem; background: #fbf3ea; border: 1px solid #efd9c5; border-radius: var(--radius-sm); padding: .6rem .8rem; }
.sensitive-hint .icon { color: var(--terracotta-700); }
.trust-footer { background: var(--forest-800); color: #e7efe3; border-radius: var(--radius); padding: 1rem 1.25rem; display: grid; gap: .75rem; margin-top: 1.5rem; font-size: .9rem; }
@media (min-width: 900px) { .trust-footer { grid-template-columns: repeat(3, 1fr); } }
.trust-footer div { display: flex; gap: .6rem; align-items: flex-start; }

/* ---------- 14. Messagerie ---------- */
.conversation-list { list-style: none; padding: 0; margin: 0; }
.conversation-list a { display: flex; gap: .8rem; align-items: center; padding: .85rem; border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--border); }
.conversation-list a:hover { background: var(--sage-50); }
.conversation-list .is-unread .conv-name { font-weight: 800; }
.conversation-list .conv-preview { color: var(--muted); font-size: .9rem; }
.conversation-list .unread-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--terracotta-700); flex-shrink: 0; }
.chat { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); min-height: 60vh; max-height: calc(100vh - 220px); }
.chat-header { display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem; border-bottom: 1px solid var(--border); }
.chat-messages { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; background: #fcfaf6; }
.bubble { max-width: 82%; padding: .65rem .85rem; border-radius: 16px; background: #fff; border: 1px solid var(--border); white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble time { display: block; font-size: .75rem; color: var(--muted); margin-top: .25rem; text-align: right; }
.bubble.is-mine { align-self: flex-end; background: var(--sage-100); border-color: var(--sage-200); border-bottom-right-radius: 4px; }
.bubble.is-theirs { align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble.is-system { align-self: center; background: var(--beige-200); border: 0; font-size: .85rem; color: var(--ink-700); text-align: center; max-width: 92%; }
.bubble .read-mark { color: var(--forest); font-weight: 800; }
.chat-form { display: flex; gap: .5rem; padding: .75rem; border-top: 1px solid var(--border); align-items: flex-end; }
.chat-form textarea { flex: 1; min-height: 48px; max-height: 160px; resize: none; }
.chat-warning { font-size: .8rem; color: var(--muted); padding: 0 1rem .6rem; }

/* ---------- 15. Tableaux ---------- */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.table { width: 100%; font-size: .93rem; }
.table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--sage-50); padding: .65rem .8rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: .7rem .8rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fcfaf6; }
.table .actions { text-align: right; white-space: nowrap; }
.pagination { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: center; margin-top: 1.25rem; list-style: none; padding: 0; }
.pagination a, .pagination span { display: inline-flex; min-width: 42px; min-height: 42px; padding: 0 .7rem; align-items: center; justify-content: center; border-radius: var(--radius-sm); border: 1px solid var(--border); background: #fff; text-decoration: none; color: var(--ink); font-weight: 700; }
.pagination a:hover { border-color: var(--forest); color: var(--forest); }
.pagination .is-current { background: var(--forest); color: #fff; border-color: var(--forest); }
.filter-bar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem; margin-bottom: 1rem; }
.filter-bar .field { margin: 0; flex: 1 1 160px; }
.filter-bar .field label { font-size: .85rem; }

/* ---------- 16. Calendrier ---------- */
.calendar { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.calendar-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .75rem; }
.calendar-head h3 { margin: 0; text-transform: capitalize; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calendar-grid .dow { text-align: center; font-size: .75rem; font-weight: 800; color: var(--muted); padding: .25rem 0; }
.calendar-day { aspect-ratio: 1; min-width: 0; border-radius: var(--radius-xs); border: 1px solid var(--border); background: var(--beige); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; cursor: pointer; color: var(--muted); position: relative; }
.calendar-day:hover { border-color: var(--forest); }
.calendar-day.is-available { background: var(--sage-200); color: var(--forest-900); border-color: var(--sage); }
.calendar-day.is-booked { background: var(--terracotta-100); color: var(--terracotta-700); border-color: #ecc6b1; cursor: not-allowed; }
.calendar-day.is-past { opacity: .4; cursor: default; }
.calendar-day.is-today { box-shadow: inset 0 0 0 2px var(--forest); }
.calendar-day.is-empty { visibility: hidden; }
.calendar-legend { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin-top: .75rem; font-size: .85rem; color: var(--ink-700); }
.calendar-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.calendar-legend i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; border: 1px solid var(--border); }
.legend-available { background: var(--sage-200); }
.legend-booked { background: var(--terracotta-100); }
.legend-off { background: var(--beige); }

/* ---------- 17. Assistant par étapes ---------- */
.wizard-steps { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0 0 1.5rem; }
.wizard-steps li { display: flex; align-items: center; gap: .45rem; color: var(--muted); font-weight: 700; font-size: .9rem; white-space: nowrap; }
.wizard-steps li + li::before { content: ""; width: 18px; height: 2px; background: var(--border-strong); margin-right: .1rem; }
.wizard-steps .num { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border-strong); display: inline-flex; align-items: center; justify-content: center; font-size: .85rem; }
.wizard-steps .is-current { color: var(--forest-800); }
.wizard-steps .is-current .num { background: var(--forest); border-color: var(--forest); color: #fff; }
.wizard-steps .is-done .num { background: var(--sage); border-color: var(--sage); color: var(--forest-900); }
.form-section { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; }
.form-section > h2 { font-size: 1.15rem; display: flex; align-items: center; gap: .5rem; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; }
.photo-item { position: relative; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); background: var(--sage-50); }
.photo-item img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.photo-item form { position: absolute; top: .35rem; right: .35rem; }
.photo-item .btn-icon { background: rgba(255, 255, 255, .95); color: var(--danger); min-width: 36px; min-height: 36px; }

/* ---------- 18. Caméra ---------- */
.camera-box { background: var(--forest-900); border-radius: var(--radius); overflow: hidden; position: relative; aspect-ratio: 3 / 4; max-width: 360px; margin: 0 auto; }
.camera-box video, .camera-box img, .camera-box canvas { width: 100%; height: 100%; object-fit: cover; }
.camera-frame { position: absolute; inset: 12%; border: 3px dashed rgba(255, 255, 255, .7); border-radius: 50% / 42%; pointer-events: none; }
.camera-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #e7efe3; text-align: center; padding: 1rem; gap: .5rem; }

/* ---------- 19. Urgences ---------- */
.emergency-grid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }
.emergency-number { display: flex; align-items: center; gap: .9rem; padding: .85rem 1rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.emergency-number:hover { border-color: var(--danger); color: var(--ink); }
.emergency-number .num { min-width: 64px; height: 52px; padding: 0 .4rem; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 900; font-size: 1.6rem; color: #fff; background: var(--forest); }
.emergency-number .num-red { background: var(--danger); }
.emergency-number .num-blue { background: #1d5a85; }
.emergency-number .num-purple { background: #5b3f8a; }
.emergency-number strong { display: block; }
.emergency-number small { color: var(--muted); }
.emergency-number .icon { margin-left: auto; color: var(--forest); }
.danger-callout { background: var(--danger-bg); border: 1px solid #f1c2bc; color: #7e1d16; border-radius: var(--radius); padding: 1rem 1.15rem; display: flex; gap: .75rem; align-items: flex-start; }
.danger-callout .icon-lg { color: var(--danger); }

/* ---------- 20. Authentification ---------- */
.auth-wrap { display: flex; justify-content: center; padding: 1.5rem var(--gutter) 3rem; }
.auth-card { width: 100%; max-width: 520px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow); }
.auth-card-wide { max-width: 760px; }
.auth-card h1 { font-size: 1.6rem; }
@media (min-width: 600px) { .auth-card { padding: 2rem; } }

/* ---------- 21. Dialogues ---------- */
dialog.modal { border: 0; border-radius: var(--radius-lg); padding: 0; width: min(92vw, 520px); box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(18, 45, 33, .5); }
.modal-body { padding: 1.5rem; }
.modal-actions { display: flex; gap: .6rem; justify-content: flex-end; padding: 0 1.5rem 1.5rem; flex-wrap: wrap; }

/* ---------- 22. Graphiques SVG ---------- */
.chart { width: 100%; height: auto; }
.chart text { font-family: var(--font); font-size: 11px; fill: var(--muted); }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; list-style: none; padding: 0; margin: .5rem 0 0; font-size: .85rem; color: var(--ink-700); }
.chart-legend li { display: inline-flex; align-items: center; gap: .4rem; }
.chart-legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot-forest { background: #285943; } .dot-terracotta { background: #C87D5A; } .dot-sage { background: #8fb389; } .dot-sand { background: #d9c7a6; } .dot-blue { background: #1d5a85; } .dot-ink { background: #26332D; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 30%) 1fr auto; gap: .6rem; align-items: center; margin-bottom: .45rem; font-size: .9rem; }
.bar-track { height: 10px; border-radius: 5px; background: var(--beige-200); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 5px; background: var(--forest); width: 0; }

/* ---------- 23. Administration ---------- */
.admin-shell .app-topbar { border-bottom-color: #d6cdb9; }
.admin-shell .app-sidebar { background: var(--forest-900); }
.admin-tiles { display: grid; gap: .75rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .admin-tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .admin-tiles { grid-template-columns: repeat(4, 1fr); } }
.admin-tile { display: flex; gap: .85rem; align-items: center; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; text-decoration: none; color: var(--ink); }
.admin-tile:hover { border-color: var(--sage); box-shadow: var(--shadow); color: var(--ink); }
.admin-tile .icon-lg { color: var(--forest); }
.admin-tile strong { display: block; font-size: 1.02rem; }
.admin-tile small { color: var(--muted); }
.admin-tile .badge-count { margin-left: auto; align-self: flex-start; }
.status-strip { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; font-size: .875rem; color: var(--ink-700); padding: 1rem 0 0; border-top: 1px solid var(--border); margin-top: 1.5rem; }
.status-strip span { display: inline-flex; align-items: center; gap: .4rem; }
.status-strip .icon-sm { color: var(--success); }
.role-card { display: flex; gap: .75rem; align-items: center; background: #fbf3ea; border: 1px solid #efd9c5; border-radius: var(--radius); padding: .75rem 1rem; }
.mode-card { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; border-radius: var(--radius); padding: 1rem 1.15rem; border: 1px solid; }
.mode-card.is-winter { background: var(--winter-bg); border-color: #c4d9ea; color: var(--winter); }
.mode-card.is-alert { background: var(--danger-bg); border-color: #f1c2bc; color: #7e1d16; }
.mode-card h3 { margin: 0; color: inherit; }
.mode-card .grow p { margin: 0; }
.json-diff { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; white-space: pre-wrap; word-break: break-all; background: var(--beige); padding: .5rem; border-radius: var(--radius-xs); max-height: 160px; overflow: auto; margin: 0; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; background: var(--beige-200); padding: .1rem .35rem; border-radius: 4px; }
.doc-viewer { background: var(--forest-900); border-radius: var(--radius); padding: 1rem; text-align: center; }
.doc-viewer img { max-height: 70vh; margin: 0 auto; border-radius: var(--radius-sm); }
.markdown-editor { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1rem; min-height: 420px; }

/* ---------- 24. Bandeau cookies ---------- */
.cookie-notice { position: fixed; left: var(--gutter); right: var(--gutter); bottom: var(--gutter); z-index: 90; max-width: 560px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 1rem 1.15rem; font-size: .92rem; }
.has-bottom-nav .cookie-notice { bottom: calc(var(--bottom-nav-h) + var(--gutter)); }
@media (min-width: 1000px) { .has-bottom-nav .cookie-notice { bottom: var(--gutter); } }

/* ---------- 25. Erreurs ---------- */
.error-page { text-align: center; padding: 3rem var(--gutter); max-width: 640px; margin: 0 auto; }
.error-code { font-family: var(--font-display); font-size: 4.5rem; font-weight: 900; color: var(--sage); line-height: 1; }

/* ---------- 26. Accessibilité & impression ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .btn, .badge, .card { border: 1px solid CanvasText; }
}
@media print {
  .site-header, .site-footer, .bottom-nav, .app-sidebar, .app-topbar, .cookie-notice, .winter-banner, .btn { display: none !important; }
  body { background: #fff; }
  .app-main { padding: 0; }
}

/* ---------- 27. Compléments ---------- */
.gap-lg { --gap: 1.5rem; }
.gap-xl { --gap: 2rem; }
.cluster[data-center] { justify-content: center; }
.hero-art { width: 100%; height: auto; filter: drop-shadow(0 10px 30px rgba(38, 51, 45, .12)); }
.stat-tiles-2 { grid-template-columns: repeat(2, 1fr) !important; }
.table-scroll { overflow-x: auto; }
@media (min-width: 1000px) { .admin-mobile-nav { display: none; } }
.admin-mobile-nav summary { cursor: pointer; display: flex; gap: .5rem; align-items: center; }
.admin-mobile-nav .item-title { display: flex; gap: .5rem; align-items: center; padding: .45rem 0; }
.h3 { font-size: 1.2rem; }
.d-block{display:block}

.header-actions .btn { white-space: nowrap; }
@media (max-width: 999px) { .filters-panel[hidden] { display: none !important; } }

.attachment-link { display: flex; width: fit-content; max-width: 100%; align-items: center; gap: .35rem; margin-top: .35rem; padding: .35rem .6rem; border-radius: var(--radius-xs); background: rgba(255, 255, 255, .7); border: 1px solid var(--border); font-size: .88rem; color: var(--forest-800); text-decoration: none; overflow-wrap: anywhere; }
.attachment-link:hover { border-color: var(--forest); }
.attach-button { cursor: pointer; align-self: center; }
.chat-form:has(input[type="file"]:focus-visible) .attach-button { box-shadow: var(--focus); }

/* ---------- 28. Responsive : renforcements (tous modules) ---------- */
/* Les éléments de grille peuvent rétrécir sous la largeur de leur contenu (évite les débordements). */
.grid > *, .dash-grid > *, .search-layout > *, .listing-detail > *, .kpi-grid > *, .footer-grid > *, .hero-inner > *, .quick-search > *, .calendar-months > * { min-width: 0; }
@media (max-width: 599px) {
  .hide-xs { display: none !important; }
  .card, .form-section, .filters-panel { padding: 1rem; }
  .card-lg { padding: 1.15rem; }
  .page-head .btn, .page-head > .cluster { flex: 1 1 auto; }
  .form-actions > .btn { flex: 1 1 auto; }
  .modal-actions > .btn { flex: 1 1 auto; }
  .kv { grid-template-columns: 1fr; gap: .1rem; }
  .kv dd { margin-bottom: .5rem; }
  .error-code { font-size: 3.5rem; }
}
/* Carte d'accueil des tableaux de bord : passe à la ligne au lieu d'écraser le texte. */
.welcome-card { flex-wrap: wrap; }
.welcome-card .grow { flex: 1 1 15rem; }
@media (max-width: 599px) {
  .welcome-card { padding: 1rem; gap: .75rem; }
  .welcome-card .avatar-lg { width: 48px; height: 48px; font-size: 1.1rem; }
  .welcome-card .grow { flex-basis: calc(100% - 48px - .75rem); }
}
/* Calendrier hébergeur : autant de mois par ligne que la largeur le permet. */
.calendar-months { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
@media (max-width: 599px) { .calendar { padding: .75rem; } .calendar-grid { gap: 3px; } .calendar-day { font-size: .85rem; } }
/* Étapes des formulaires : grille 2 × 2 lisible sur téléphone. */
@media (max-width: 599px) {
  .wizard-steps { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem .75rem; }
  .wizard-steps li { white-space: normal; line-height: 1.25; }
  .wizard-steps li + li::before { display: none; }
}
.wizard-steps a { display: inline-flex; min-width: 32px; min-height: 32px; align-items: center; justify-content: center; text-decoration: none; }
/* Onglets : passent à la ligne (tous visibles) ; cibles confortables. */
.tabs a, .tabs button { min-height: 40px; display: inline-flex; align-items: center; }
/* Barres d'outils des espaces connectés. */
.app-topbar .brand picture { display: block; }
.app-topbar .brand img { height: 40px; width: auto; }
@media (max-width: 479px) { .app-topbar .bar { gap: .35rem; } .app-topbar .emergency-chip { padding: .35rem .6rem; } }
/* Messagerie sur téléphone : occupe la hauteur disponible, champ et boutons confortables. */
@media (max-width: 599px) {
  .chat { min-height: calc(100vh - 260px); max-height: calc(100vh - 200px); border-radius: var(--radius-sm); }
  .chat-messages { padding: .75rem; }
  .bubble { max-width: 88%; }
  .chat-form { padding: .5rem; }
}
/* Tableaux : affichés en fiches quand ils ne tiennent pas dans la largeur (classe posée par app.js ;
   sans JavaScript, le tableau reste consultable par défilement horizontal). */
table.is-stacked, table.is-stacked > tbody, table.is-stacked > tbody > tr, table.is-stacked > tbody > tr > td, table.is-stacked > tbody > tr > th { display: block; width: 100%; }
table.is-stacked > thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
table.is-stacked > tbody > tr { padding: .65rem .85rem; border-bottom: 1px solid var(--border); }
table.is-stacked > tbody > tr:last-child { border-bottom: 0; }
table.is-stacked > tbody > tr > td, table.is-stacked > tbody > tr > th { border: 0 !important; padding: .3rem 0 !important; text-align: left !important; white-space: normal !important; overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
table.is-stacked > tbody > tr > [data-label] { display: flow-root; padding-left: 8.25rem !important; }
table.is-stacked > tbody > tr > [data-label]::before { content: attr(data-label); float: left; width: 7.5rem; margin-left: -8.25rem; padding-top: .15rem; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; line-height: 1.3; color: var(--muted); overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
table.is-stacked > tbody > tr > td:first-child { font-weight: 600; }
table.is-stacked .actions:not([data-label]) { display: flex !important; flex-wrap: wrap; gap: .4rem; align-items: center; }
table.is-stacked tbody tr:hover { background: transparent; }
.prose table.is-stacked { border-radius: var(--radius-sm); }
/* Graphiques SVG : textes lisibles sur petit écran. */
.chart-narrow { display: none; }
.chart-narrow text { font-size: 14px; }
@media (max-width: 599px) { .chart-wide { display: none; } .chart-narrow { display: block; } }
/* Liens isolés (« Mot de passe oublié ? », « En savoir plus »…) et liens de cellules : zone tactile confortable. */
p.small > a:only-child, p.text-center > a:only-child, p.text-right > a:only-child, .cookie-notice a.small, .kv dd > a, td > a, strong > a:only-child { display: inline-block; padding-top: .25rem; padding-bottom: .25rem; }
.item-list a.item-title { padding-top: .1rem; padding-bottom: .1rem; }
/* Menus d'actions dans les listes : à droite de la ligne ; sur téléphone, s'ouvrent en panneau au-dessus de la barre inférieure. */
.item-list > li > details:last-child { margin-left: auto; }
@media (max-width: 599px) {
  .item-list .dropdown-panel { position: fixed; left: var(--gutter); right: var(--gutter); top: auto; bottom: calc(var(--bottom-nav-h) + .75rem + env(safe-area-inset-bottom)); min-width: 0; z-index: 70; }
}
/* Écrans tactiles : pas d'astuce clavier ; en-tête de conversation qui passe à la ligne. */
@media (hover: none) and (pointer: coarse) { .kbd-hint { display: none; } }
.chat-header { flex-wrap: wrap; }
.chat-header .grow { flex: 1 1 9rem; }
.chat-header .btn { margin-left: auto; }
/* Bandeau cookies plus compact sur téléphone. */
@media (max-width: 599px) {
  .cookie-notice { left: .5rem; right: .5rem; bottom: .5rem; padding: .75rem .9rem; font-size: .85rem; }
  .has-bottom-nav .cookie-notice { bottom: calc(var(--bottom-nav-h) + .5rem); }
}
table.is-stacked > tbody > tr > .cell-empty { display: none; }
/* Liste des conversations : la colonne de texte prend toute la place disponible. */
.conversation-list a > .grow { flex: 1 1 auto; min-width: 0; }
@media (max-width: 599px) { .conversation-list a { gap: .65rem; padding: .75rem .6rem; } .conversation-list a > .nowrap { font-size: .78rem; } }
/* Barre inférieure : libellés jamais superposés, même à 320 px. */
.bottom-nav a { padding: 0 2px; min-width: 0; }
.bottom-nav a > span:not(.notif-dot) { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 359px) { .bottom-nav a { padding: 0; font-weight: 600; letter-spacing: -.035em; } }
table.is-stacked .badge { white-space: normal; text-align: left; }
table.is-stacked td a, table.is-stacked td code, table.is-stacked td .code { overflow-wrap: anywhere; word-break: break-word; }

/* ---------- 29. Manifeste, illustrations et accroches ---------- */
.manifesto { background: var(--forest-900); color: #e7efe3; padding: 2.5rem 0; overflow: hidden; }
.manifesto-inner { display: grid; gap: 1.75rem; align-items: center; }
.manifesto-eyebrow { color: #f3c9a3; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; margin: 0 0 .6rem; }
.manifesto h2 { color: #fff; font-size: clamp(2rem, 7vw, 3.2rem); line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 1.25rem; }
.manifesto-lines { list-style: none; padding: 0; margin: 0; display: grid; gap: .85rem; }
.manifesto-lines li { font-family: var(--font-display); font-size: clamp(1.08rem, 2.8vw, 1.3rem); font-weight: 700; line-height: 1.35; color: #F5F0E8; padding-left: 1rem; border-left: 4px solid var(--terracotta); }
.manifesto-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.manifesto-actions .btn { flex: 1 1 12rem; }
@media (min-width: 900px) {
  .manifesto { padding: 4.5rem 0; }
  .manifesto-inner { grid-template-columns: 1.05fr 1fr; gap: 3.5rem; }
  .manifesto-actions .btn { flex: 0 0 auto; }
}
.page-header-grid { display: grid; gap: 1.25rem; align-items: center; }
.punchline { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.15rem, 3.2vw, 1.5rem); line-height: 1.3; color: var(--terracotta-700) !important; margin-top: .9rem !important; max-width: 34rem; }
.footer-punch { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; color: #f3c9a3 !important; }
.winter-card.has-art { display: grid; gap: 1.25rem; align-items: center; }
@media (min-width: 900px) { .winter-card.has-art { grid-template-columns: 1fr 1.2fr; } .winter-card.has-art .winter-art { order: 2; } }
.seeker-message { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; color: var(--forest-800); max-width: 30rem; margin-left: auto; margin-right: auto; }
.site-header .brand picture { display: block; }
@media (max-width: 479px) { .site-header .brand picture img { height: 40px; } .site-header .container { gap: .5rem; } }

/* ---------- 30. Photos réelles : héros, bandeaux, en-têtes ---------- */
picture { display: block; }
picture img { display: block; width: 100%; height: auto; }
/* Héros de l'accueil : photo plein écran, voile sombre pour la lisibilité (contraste du texte ≥ 7:1). */
.hero-photo { position: relative; isolation: isolate; background: #0c1e16; border-bottom: 0; color: #fff; }
.hero-photo .hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-photo .hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 40%; }
.hero-photo::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10, 26, 19, .62) 0%, rgba(10, 26, 19, .86) 55%, rgba(10, 26, 19, .95) 100%); }
.hero-photo .hero-inner { padding-top: 3rem; padding-bottom: 2.5rem; }
.hero-photo h1 { color: #fff; text-shadow: 0 2px 18px rgba(0, 0, 0, .35); }
.hero-photo .hero-lead { color: #f5f0e8; }
.hero-photo .hero-values { color: #e7efe3; }
.hero-photo .hero-values .icon { color: var(--sage); }
.hero-photo .cta-seek { background: #fff; color: var(--forest-900); }
.hero-photo .cta-seek:hover { background: var(--beige); color: var(--forest-900); }
@media (min-width: 1000px) {
  .hero-photo { min-height: min(86vh, 760px); display: flex; align-items: center; }
  .hero-photo::before { background: linear-gradient(90deg, rgba(10, 26, 19, .94) 0%, rgba(10, 26, 19, .82) 42%, rgba(10, 26, 19, .3) 75%, rgba(10, 26, 19, .15) 100%); }
  .hero-photo .hero-inner { grid-template-columns: minmax(0, 46rem); width: 100%; padding-top: 4.5rem; padding-bottom: 4.5rem; }
}
/* Manifeste : photo réelle. */
.manifesto-art img { border-radius: var(--radius-lg); box-shadow: 0 18px 50px rgba(0, 0, 0, .4); aspect-ratio: 3 / 2; object-fit: cover; }
/* Bandeaux photo plein écran avec phrase choc. */
.impact-band { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: 78vh; min-height: 78svh; max-height: 820px; padding: 4rem 0 3rem; background: #0c1e16; color: #fff; overflow: hidden; }
.impact-band .impact-bg { position: absolute; inset: 0; z-index: -2; }
.impact-band .impact-bg img { width: 100%; height: 100%; object-fit: cover; }
.impact-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10, 26, 19, .15) 0%, rgba(10, 26, 19, .55) 45%, rgba(10, 26, 19, .92) 100%); }
.impact-inner { position: relative; }
.impact-title { color: #fff; font-size: clamp(2.3rem, 9vw, 5rem); line-height: 1.02; letter-spacing: -0.025em; max-width: 14ch; margin-bottom: .75rem; text-shadow: 0 2px 24px rgba(0, 0, 0, .45); }
.impact-text { font-family: var(--font-display); font-size: clamp(1.1rem, 3vw, 1.5rem); font-weight: 700; color: #f5f0e8; max-width: 34rem; margin-bottom: 1.5rem; }
.impact-right .impact-inner { text-align: right; }
.impact-right .impact-title, .impact-right .impact-text { margin-left: auto; }
.impact-right .impact-bg img { object-position: 30% center; }
@media (max-width: 599px) { .impact-band { min-height: 72svh; padding: 3rem 0 2.25rem; } .impact-right .impact-inner { text-align: left; } .impact-right .impact-title, .impact-right .impact-text { margin-left: 0; } .impact-band .btn { width: 100%; } }
/* En-têtes de pages illustrés. */
.page-art { width: 100%; max-width: 560px; justify-self: center; }
.page-art img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); aspect-ratio: 3 / 2; object-fit: cover; }
@media (min-width: 800px) { .page-header-grid { grid-template-columns: 1.1fr .9fr; gap: 2.5rem; } .page-art { justify-self: end; } }
.card-with-photo { overflow: hidden; }
.card-with-photo .card-photo { margin: -1.5rem -1.5rem 1.25rem; }
.card-with-photo .card-photo img { aspect-ratio: 16 / 9; object-fit: cover; }
@media (max-width: 599px) { .card-with-photo .card-photo { margin: -1.15rem -1.15rem 1rem; } }
.winter-card.has-art { overflow: hidden; }
.winter-art img { border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; }
@media (min-width: 900px) { .winter-art { height: 100%; } .winter-art img { height: 100%; min-height: 260px; } }
.empty-state-art .empty-art { max-width: 440px; margin: 0 auto 1.25rem; }
.empty-state-art .empty-art img { border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; }
@media (prefers-reduced-transparency: reduce) { .hero-photo::before, .impact-band::before { background: rgba(10, 26, 19, .9); } }
/* Héros sur téléphone et tablette : la photo est bien visible en haut puis se fond dans le texte ;
   l'action « Je cherche un toit » reste visible sans défiler. */
@media (max-width: 999px) {
  .hero-photo::before { display: none; }
  .hero-photo .hero-bg { position: relative; inset: auto; z-index: 0; height: 34vh; height: 34svh; min-height: 210px; max-height: 340px; }
  .hero-photo .hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 30, 22, 0) 35%, rgba(12, 30, 22, .7) 75%, #0c1e16 100%); }
  .hero-photo .hero-bg img { object-position: 58% 45%; }
  .hero-photo .hero-inner { position: relative; z-index: 1; margin-top: -3.5rem; padding-top: 0; }
}
.impact-left .impact-bg img { object-position: center 60%; }
@media (max-width: 599px) { .impact-right .impact-bg img { object-position: 43% center; } }

/* ---------- 31. Soutenir UDO (dons) ---------- */
.eyebrow-text { display: inline-flex; align-items: center; gap: .4rem; color: var(--terracotta-700); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; margin-bottom: .5rem; }
.donate-promise { margin-top: .5rem; }
.donate-uses { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); margin-top: 1rem; }
.donate-use { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.donate-use-icon { display: inline-flex; width: 52px; height: 52px; border-radius: 50%; align-items: center; justify-content: center; background: var(--terracotta-100); color: var(--terracotta-700); margin-bottom: .75rem; }
.donate-use h3 { font-size: 1.1rem; margin-bottom: .35rem; }
.donate-use p { color: var(--ink-700); margin: 0; }
.support-card { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; background: #fbf3ea; border: 1px solid #efd9c5; border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; }
.support-card .grow { flex: 1 1 18rem; }
.support-card h2 { font-size: 1.25rem; margin-bottom: .35rem; }
.support-card p { color: var(--ink-700); }
.footer-support a { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem 0; color: #f3c9a3 !important; font-weight: 700; }
