/* Box du Mesnil
   Concept : bandes pleine largeur sur une colonne de 1120 px. Le bleu et l'orange viennent du visuel
   « Box à louer » existant, le ton bois et le gris acier viennent du hangar (cloisons OSB, portes métalliques).
   Une seule famille de caractères (réglage « police » de data/site.json) : titres en minuscules, graisse 700. */

@font-face { font-family: "Outfit"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("fonts/outfit-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("fonts/outfit-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("fonts/outfit-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("fonts/outfit-latin-700-normal.woff2") format("woff2"); }

:root {
  /* couleurs */
  --bg: #f4f6fa;
  --surface: #ffffff;
  --ink: #0c2340;
  --muted: #4a5d78;
  --line: #d3dbe7;
  --brand: #1257c4;
  --band: #0b2f66;
  --band-ink: #ffffff;
  --band-muted: #c4d5f0;
  --accent: #ff9800;
  --on-accent: #1d1300;
  --osb: #e2c591;
  --osb-line: #9c7636;
  --osb-ink: #1a1408;
  --ok: #1b7a43;
  --alerte: #b3261e;
  /* typographie */
  --display: "Outfit", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --body: "Outfit", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --corps: 1.0625rem;
  /* mesures */
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --radius: 6px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1524; --surface: #12213a; --ink: #eaf0f8; --muted: #a5b6ce; --line: #283c5a;
    --brand: #7db0ff; --band: #0d2a57; --band-ink: #ffffff; --band-muted: #b9cbea;
    --accent: #ffa726; --on-accent: #1d1300;
    --osb: #c9a568; --osb-line: #f0d6a4; --osb-ink: #1a1408;
    --ok: #6fd49a; --alerte: #ff9a92;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a1524; --surface: #12213a; --ink: #eaf0f8; --muted: #a5b6ce; --line: #283c5a;
  --brand: #7db0ff; --band: #0d2a57; --band-ink: #ffffff; --band-muted: #b9cbea;
  --accent: #ffa726; --on-accent: #1d1300;
  --osb: #c9a568; --osb-line: #f0d6a4; --osb-ink: #1a1408;
  --ok: #6fd49a; --alerte: #ff9a92;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--corps)/1.55 var(--body); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, ul, ol, dl, dd, figure, address { margin: 0; }
ul, ol { padding: 0; list-style: none; }
address { font-style: normal; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

.wrap { max-width: 1120px; margin-inline: auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }

h1, h2 { font-family: var(--display); font-weight: 700; line-height: 1.1; text-wrap: balance; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 5.2vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font: 600 1.125rem/1.3 var(--body); }
.lien { color: var(--brand); text-decoration: underline; text-underline-offset: .18em; }
.lien:hover { text-decoration-thickness: 2px; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .6rem 1.35rem;
  background: var(--accent); color: var(--on-accent); border: 2px solid var(--accent); border-radius: var(--radius);
  font: 600 1.0625rem/1.2 var(--body); text-decoration: none; cursor: pointer; transition: transform .12s ease, filter .12s ease; }
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.btn--ghost { background: transparent; color: var(--band-ink); border-color: var(--band-muted); }
.btn--small { min-height: 40px; padding: .35rem .9rem; font-size: 1rem; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:hover { transform: none; } }

/* En-tête */
.top { background: var(--band); color: var(--band-ink); }
.top__in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .8rem; }
.logo { font: 700 1.25rem/1 var(--display); letter-spacing: 0; color: var(--band-ink); text-decoration: none; white-space: nowrap; }
.logo__box { display: inline-block; padding: .16em .32em; margin-right: .12em; background: var(--accent); color: var(--on-accent); border-radius: 3px; }
.nav { display: flex; align-items: center; gap: 1.4rem; }
.nav a:not(.btn) { color: var(--band-muted); text-decoration: none; font-weight: 500; }
.nav a:not(.btn):hover { color: var(--band-ink); text-decoration: underline; text-underline-offset: .3em; }
@media (max-width: 640px) { .nav a:not(.btn) { display: none; } }

/* Hero */
.hero { background: var(--band); color: var(--band-ink); padding-block: clamp(1.5rem, 4vw, 3rem) clamp(2rem, 4vw, 3rem); }
.hero__in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.hero__text { display: flex; flex-direction: column; gap: 1.25rem; align-items: flex-start; min-width: 0; }
.hero__lead { font-size: 1.1875rem; color: var(--band-muted); max-width: 34em; }
.hero__prix { font: 700 clamp(1.35rem, 2.6vw, 1.75rem)/1.15 var(--display); letter-spacing: -.01em; color: var(--band-ink); }
.hero__prix small { display: block; margin-top: .35rem; font: 400 .875rem/1.3 var(--body); letter-spacing: 0; color: var(--band-muted); }
.hero__prix strong { color: var(--accent); font-weight: 700; white-space: nowrap; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero__photo { position: relative; min-width: 0; }
.hero__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.hero__photo figcaption { position: absolute; left: .75rem; bottom: .75rem; padding: .25rem .6rem; background: var(--osb); color: var(--osb-ink);
  font: 600 .875rem/1.3 var(--display); border-radius: 3px; }
@media (max-width: 820px) { .hero__in { grid-template-columns: minmax(0, 1fr); } }

.statut { display: inline-flex; align-items: center; gap: .55rem; padding: .3rem .8rem; border: 1px solid var(--band-muted); border-radius: 999px;
  font-weight: 500; font-size: 1rem; color: var(--band-ink); }
.statut::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: var(--accent); flex: none; }
.statut--dispo::before { background: #5fe08f; }

.faits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem 2rem; margin-top: clamp(1.75rem, 4vw, 2.75rem);
  padding-top: 1.5rem; border-top: 1px solid color-mix(in srgb, var(--band-muted) 35%, transparent); }
.faits div { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.faits dt { font: 700 clamp(1.5rem, 3vw, 2.1rem)/1.1 var(--display); letter-spacing: -.02em; color: var(--band-ink); font-variant-numeric: tabular-nums; }
.faits dd { color: var(--band-muted); font-size: 1rem; }
@media (max-width: 640px) { .faits { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Blocs */
.bloc { padding-block: clamp(2.75rem, 7vw, 5rem); }
.bloc--teinte { background: var(--surface); border-block: 1px solid var(--line); }
.bloc h2 { margin-bottom: 1.5rem; }
.intro { color: var(--muted); max-width: 44em; margin-bottom: 1.75rem; }
.note { color: var(--muted); font-size: 1rem; margin-top: 1.25rem; max-width: 50em; }
.deux-col { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.deux-col > * { min-width: 0; }
@media (max-width: 820px) { .deux-col { grid-template-columns: minmax(0, 1fr); } }

.atouts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem clamp(2rem, 5vw, 4rem); }
.atouts li { display: flex; flex-direction: column; gap: .4rem; padding-top: 1rem; border-top: 3px solid var(--ink); min-width: 0; }
.atouts p { color: var(--muted); max-width: 34em; }
@media (max-width: 640px) { .atouts { grid-template-columns: minmax(0, 1fr); } }

.galerie { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-top: clamp(2rem, 5vw, 3.5rem); }
.galerie img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); }
@media (max-width: 640px) { .galerie { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Grille tarifaire */
.grille-scroll { overflow-x: auto; }
.grille { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.grille th, .grille td { padding: .7rem .9rem .7rem 0; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.grille thead th { font: 600 .8125rem/1.3 var(--body); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--ink); white-space: nowrap; }
.grille .num { text-align: right; padding-right: 0; }
.grille td.num + td.num, .grille th.num + th.num { padding-left: 1.5rem; }
.grille .surface { font-weight: 600; white-space: nowrap; }
.grille .loyer { font: 700 1.5rem/1 var(--display); letter-spacing: -.01em; white-space: nowrap; }
.grille .loyer small { font: 400 .9375rem/1 var(--body); color: var(--muted); }
.grille .dims { white-space: nowrap; }
.numeros { display: inline-flex; align-items: baseline; gap: .3rem; padding: .2rem .6rem; background: var(--osb); color: var(--osb-ink);
  font: 600 1rem/1.25 var(--display); border-radius: 3px; white-space: nowrap; }
.numeros small { font-size: .8125rem; font-weight: 500; }
.dispo { display: inline-block; margin-left: .5rem; padding: .1rem .5rem; border: 1px solid var(--ok); color: var(--ok); border-radius: 999px; font: 600 .8125rem/1.4 var(--body); white-space: nowrap; }
.emprise { display: block; width: 92px; height: 74px; }
.emprise .sol { fill: var(--osb); stroke: var(--osb-line); stroke-width: 1.5; }
.emprise .palette { fill: none; stroke: var(--osb-ink); stroke-width: 1; stroke-dasharray: 3 2; }
@media (max-width: 720px) {
  .grille thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .grille, .grille tbody { display: block; }
  .grille tr { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; grid-template-areas: "emprise box loyer" "emprise resume resume";
    column-gap: .9rem; row-gap: .3rem; align-items: center; padding-block: .9rem; border-bottom: 1px solid var(--line); }
  .grille td { display: block; padding: 0; border: 0; min-width: 0; }
  .grille td.c-emprise { grid-area: emprise; }
  .grille td.c-box { grid-area: box; align-self: end; }
  .grille td.c-loyer { grid-area: loyer; }
  .grille td.c-niveau { grid-area: resume; align-self: start; color: var(--muted); font-size: .9375rem; }
  .grille td.c-niveau::after { content: " · " attr(data-resume); }
  .grille td.c-dims, .grille td.c-surface { display: none; }
}

/* Conditions */
.conditions { display: flex; flex-direction: column; }
.conditions div { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1rem; padding-block: .85rem; border-top: 1px solid var(--line); }
.conditions div:last-child { border-bottom: 1px solid var(--line); }
.conditions dt { font-weight: 600; }
.conditions dd { color: var(--muted); }
@media (max-width: 480px) { .conditions div { grid-template-columns: minmax(0, 1fr); gap: .15rem; } }
.cote { display: flex; flex-direction: column; gap: 1.25rem; }
.encart { display: flex; flex-direction: column; gap: .9rem; padding: 1.4rem 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.encart ul { display: flex; flex-direction: column; gap: .45rem; }
.encart li { position: relative; padding-left: 1.5rem; }
.encart li::before { content: ""; position: absolute; left: .15rem; top: .72em; width: .8rem; height: 2px; background: var(--alerte); }
.encart p { color: var(--muted); font-size: 1rem; }
details summary { cursor: pointer; font-weight: 600; padding-block: .7rem; }
details summary:hover { color: var(--brand); }
.conseils { border-block: 1px solid var(--line); }
.conseils ul { display: flex; flex-direction: column; gap: .6rem; padding: 0 0 1rem 1.1rem; list-style: disc; color: var(--muted); }

/* Accès */
.deux-col--etroit { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 820px) { .deux-col--etroit { grid-template-columns: minmax(0, 1fr); } }
#acces address { font-size: 1.1875rem; margin-bottom: 1rem; }
#acces h3 { margin-bottom: .6rem; }
#acces p { color: var(--muted); }
.contacts { display: flex; flex-direction: column; gap: .4rem; margin-top: .9rem; }
.contacts span { display: inline-block; min-width: 6.5rem; color: var(--muted); }
.contacts a, .pied a { overflow-wrap: anywhere; }

/* Liste d'attente */
.bloc--attente { background: var(--band); color: var(--band-ink); }
.bloc--attente .intro { color: var(--band-muted); }
.etapes { display: flex; flex-direction: column; gap: .9rem; counter-reset: etape; }
.etapes li { counter-increment: etape; display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: .9rem; align-items: baseline; color: var(--band-muted); }
.etapes li::before { content: counter(etape); font: 700 1.5rem/1 var(--display); color: var(--accent); }
.formulaire { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.1rem; padding: clamp(1.1rem, 3vw, 1.75rem);
  background: var(--surface); color: var(--ink); border-radius: var(--radius); }
.champ { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.champ--large { grid-column: 1 / -1; }
.champ--piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.champ label { font-weight: 600; font-size: 1rem; }
.opt { font-weight: 400; color: var(--muted); }
.champ input, .champ select, .champ textarea { width: 100%; min-height: 46px; padding: .55rem .7rem; background: var(--bg); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: var(--radius); font: 400 1.0625rem/1.4 var(--body); }
.champ textarea { resize: vertical; }
.champ input:focus-visible, .champ select:focus-visible, .champ textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--brand); }
.champ [aria-invalid="true"] { border-color: var(--alerte); }
.champ .erreur { color: var(--alerte); font-size: .9375rem; }
.rgpd { color: var(--muted); font-size: .9375rem; }
.form__bas { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.1rem; }
.form__etat { flex: 1 1 14rem; min-width: 0; font-weight: 500; }
.form__etat.est-ok { color: var(--ok); }
.form__etat.est-erreur { color: var(--alerte); }
@media (max-width: 520px) { .formulaire { grid-template-columns: minmax(0, 1fr); } }

/* Pied de page */
.pied { padding-block: 2.25rem 2.75rem; color: var(--muted); font-size: 1rem; }
.pied .wrap { display: flex; flex-direction: column; gap: .35rem; }
.pied__ligne { color: var(--ink); margin-bottom: .6rem; }
.pied details { border-top: 1px solid var(--line); }
.pied details:last-of-type { border-bottom: 1px solid var(--line); }
.pied details p { max-width: 62em; margin-bottom: .7rem; }
.pied__copy { margin-top: 1rem; font-size: .9375rem; }
.a-completer { background: var(--accent); color: var(--on-accent); padding: 0 .35em; border-radius: 3px; font-weight: 600; }

/* WhatsApp et réseaux sociaux : liens simples, sans module tiers */
.pied__reseaux { margin-bottom: .9rem; color: var(--ink); }
.pied__reseaux span { margin-right: .5rem; color: var(--muted); }
.pied { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)); } /* place pour le bouton flottant */
.flottant { position: fixed; z-index: 20; right: max(1rem, env(safe-area-inset-right, 0px)); bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: .5rem; min-height: 48px; padding: .55rem 1.05rem .55rem .85rem;
  background: #0b6b4f; color: #ffffff; border: 2px solid #ffffff; border-radius: 999px;
  font: 600 1rem/1 var(--body); text-decoration: none; box-shadow: 0 6px 18px rgba(8, 20, 40, .28); }
.flottant:hover { background: #095a43; }
.flottant svg { flex: none; }
@media (max-width: 480px) { .flottant { padding: .55rem .9rem .55rem .75rem; } }
@media print { .flottant { display: none; } }

/* Page d'entrée en location (un lien par box) */
.entree-tete .wrap > * + * { margin-top: 1rem; }
.entree-tete .faits { margin-top: clamp(1.5rem, 4vw, 2.25rem); }
.entree-note { color: var(--band-muted); font-size: 1rem; max-width: 50em; }
.entree-col h2 { margin-bottom: 1.5rem; }
.entree-col .formulaire { border: 1px solid var(--line); }
.entree-col .encart { margin-top: 2rem; }
.etapes--clair li { color: var(--muted); }
.etapes--clair li::before { color: var(--brand); }
.encart--info li::before { background: var(--brand); }
.groupe { border: 0; padding: 0; margin: 0; min-width: 0; }
.groupe legend { padding: 0; margin-bottom: .45rem; font-weight: 600; }
.choix { display: flex; flex-wrap: wrap; gap: .6rem; }
.choix label { display: inline-flex; align-items: center; gap: .55rem; min-height: 46px; padding: .4rem 1rem .4rem .8rem; background: var(--bg);
  border: 1.5px solid var(--line); border-radius: var(--radius); font-weight: 500; cursor: pointer; }
.choix label:has(input:checked) { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.choix input, .champ input[type="checkbox"] { flex: none; width: 1.2rem; height: 1.2rem; min-height: 0; padding: 0; accent-color: var(--brand); }
.sous-titre { margin-top: .35rem; padding-top: 1rem; border-top: 1px solid var(--line); font: 600 1.125rem/1.3 var(--body); }
.aide { color: var(--muted); font-size: .9375rem; }
.champ input[type="file"] { padding: .45rem; font-size: 1rem; }
.champ input[type="file"]::file-selector-button { margin-right: .8rem; padding: .45rem .8rem; background: var(--ink); color: var(--surface);
  border: 0; border-radius: 4px; font: 600 .9375rem/1.2 var(--body); cursor: pointer; }
.champ label.case { display: flex; align-items: flex-start; gap: .65rem; font-weight: 400; cursor: pointer; }
.champ label.case input { margin-top: .2rem; }
.formulaire progress { width: 100%; height: .6rem; accent-color: var(--brand); }
.entree-message { display: flex; flex-direction: column; gap: 1.25rem; max-width: 46em; }
.bloc .entree-message h2 { margin-bottom: 0; }
.pied--court { padding-bottom: 2.75rem; }
