/* ==========================================================================
   Maquette BIVO : socle commun
   Palette : noir pur #000000, blanc #FFFFFF, un seul brun #805C43 (accent).
   Les fichiers livrés ne contiennent que cette palette : aucune autre
   direction de maquette (archivées dans _archive/).
   Le brun guide l'attention : boutons principaux (texte blanc), repères de
   sélection, points d'accent. Jamais en petit texte sur noir (contraste 3,5:1).
   Typographie système expressive.
   ========================================================================== */

:root {
  --bg: #000000;
  --fg: #FFFFFF;
  --accent: #805C43;
  --accent-ink: #FFFFFF;
  --muted: #8E8E8E;      /* gris neutre (blanc atténué), 6,4:1 sur noir */
  --muted-2: #5F5F5F;    /* gris sombre, repères décoratifs seulement */
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.24);
  --surface: #0B0B0C;
  --surface-2: #121214;

  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Inter, system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Inter, system-ui, sans-serif;
  --font-serif: "New York", ui-serif, "Iowan Old Style", "Palatino", "Times New Roman", serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;

  --bar-h: 64px;
  --gutter: clamp(16px, 4vw, 64px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 180ms;
  --dur: 420ms;
  --dur-slow: 900ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;   /* main pousse le pied au bas des pages courtes (page 404) */
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  /* Durées nulles : les changements de style s'appliquent de façon synchrone, aucune transition ni animation ne joue. */
  *, *::before, *::after { animation-duration: 0s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0s !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
}

/* Bouton de commande (commandes de section) */
.lab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.lab-btn:hover { border-color: var(--fg); }
.lab-btn[aria-pressed="true"] { border-color: var(--accent); color: var(--fg); }
.lab-btn[aria-pressed="true"]::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.lab-btn--primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.lab-btn--primary:hover { border-color: var(--fg); }
.lab-btn:disabled { opacity: 0.4; cursor: default; }
@media (pointer: coarse) { .lab-btn { min-height: 44px; } }

/* Mention discrète réutilisable */
.lab-note {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Titre de scène générique */
.lab-display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.98;
  text-wrap: balance;
}
.lab-lead { color: var(--muted); font-size: clamp(15px, 1.4vw, 18px); line-height: 1.55; max-width: 46ch; }

/* ==========================================================================
   Maquette de site fictif (.bsite) : rendu par Shared.renderSite
   Entièrement dimensionnée en unités de conteneur : la même maquette
   reste lisible de 280 px à 1200 px de largeur.
   ========================================================================== */
.bsite-frame {
  container-type: inline-size;
  width: 100%;
}
.bsite {
  --bs-bg: #0F0F10;
  --bs-bg-2: #161617;
  --bs-fg: #F4F4F2;
  --bs-muted: #9A9A96;
  --bs-line: rgba(255, 255, 255, 0.12);
  --bs-accent: #FFFFFF;
  --bs-accent-ink: #0F0F10;
  --bs-font: var(--font-display);
  --bs-font-body: var(--font-ui);
  --bs-radius: 0px;
  --bs-space: 1;
  --bs-title-weight: 600;
  --bs-title-tracking: -0.035em;
  --bs-title-size: clamp(22px, 5.4cqw, 64px);
  --bs-kicker-tracking: 0.16em;
  --bs-body-size: clamp(11px, 1.45cqw, 17px);
  --bs-small-size: clamp(9px, 1.1cqw, 12px);
  --bs-pad: clamp(14px, 4cqw, 56px);
  --bs-media-aspect: 4 / 5;
  position: relative;
  overflow: hidden;
  background: var(--bs-bg);
  color: var(--bs-fg);
  font-family: var(--bs-font-body);
  font-size: var(--bs-body-size);
  line-height: 1.5;
  border-radius: var(--bs-radius);
  user-select: none;
}
.bsite * { box-sizing: border-box; }
.bsite span, .bsite i { font-style: normal; }

.bs-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2cqw;
  padding: clamp(10px, 2.2cqw, 28px) var(--bs-pad);
  border-bottom: 1px solid var(--bs-line);
}
.bs-logo { font-family: var(--bs-font); font-weight: 700; letter-spacing: -0.02em; font-size: clamp(12px, 1.8cqw, 22px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 48%; }
.bs-links { display: flex; gap: clamp(8px, 2.4cqw, 32px); color: var(--bs-muted); font-size: var(--bs-small-size); letter-spacing: 0.06em; text-transform: uppercase; }
.bs-cta {
  display: inline-block;
  padding: clamp(5px, 0.9cqw, 11px) clamp(9px, 1.6cqw, 20px);
  background: var(--bs-accent);
  color: var(--bs-accent-ink);
  font-weight: 600;
  font-size: var(--bs-small-size);
  letter-spacing: 0.04em;
  border-radius: calc(var(--bs-radius) * 0.6 + 999px * 0);
  white-space: nowrap;
}

.bs-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(14px, 4cqw, 64px);
  align-items: center;
  padding: calc(var(--bs-pad) * 1.2 * var(--bs-space)) var(--bs-pad);
}
.bs-kicker {
  display: block;
  font-size: var(--bs-small-size);
  letter-spacing: var(--bs-kicker-tracking);
  text-transform: uppercase;
  color: var(--bs-accent);
  margin-bottom: clamp(8px, 1.6cqw, 20px);
}
.bs-title {
  font-family: var(--bs-font);
  font-weight: var(--bs-title-weight);
  font-size: var(--bs-title-size);
  letter-spacing: var(--bs-title-tracking);
  line-height: 1.02;
  text-wrap: balance;
  margin: 0 0 clamp(10px, 2cqw, 24px);
}
.bs-intro { color: var(--bs-muted); max-width: 42ch; margin: 0 0 clamp(12px, 2.6cqw, 32px); }
.bs-btn {
  display: inline-block;
  padding: clamp(7px, 1.3cqw, 15px) clamp(12px, 2.2cqw, 26px);
  border: 1px solid var(--bs-fg);
  color: var(--bs-fg);
  font-weight: 500;
  font-size: var(--bs-small-size);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--bs-radius);
}
.bs-btn--accent { background: var(--bs-accent); color: var(--bs-accent-ink); border-color: var(--bs-accent); }
.bs-hero-media { position: relative; aspect-ratio: var(--bs-media-aspect); overflow: hidden; background: var(--bs-bg-2); border-radius: var(--bs-radius); }
.bs-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.bs-hero-media svg { width: 100%; height: 100%; }
.bs-hero-media .bs-plan { padding: clamp(10px, 3cqw, 40px); color: var(--bs-fg); }

.bs-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2cqw;
  padding: 0 var(--bs-pad) clamp(10px, 2cqw, 24px);
}
.bs-section-title { font-family: var(--bs-font); font-weight: var(--bs-title-weight); letter-spacing: var(--bs-title-tracking); font-size: clamp(16px, 3cqw, 36px); line-height: 1.1; }
.bs-section-count { color: var(--bs-muted); font-size: var(--bs-small-size); letter-spacing: 0.1em; }

.bs-services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 2cqw, 28px);
  padding: 0 var(--bs-pad) calc(var(--bs-pad) * var(--bs-space));
}
.bs-service {
  border-top: 1px solid var(--bs-line);
  padding-top: clamp(10px, 1.8cqw, 22px);
  transition: border-color var(--dur) var(--ease-out), background var(--dur) var(--ease-out);
}
.bs-service-num { font-family: var(--font-mono); font-size: var(--bs-small-size); color: var(--bs-accent); margin-bottom: clamp(6px, 1cqw, 12px); display: block; }
.bs-service-title { font-family: var(--bs-font); font-weight: 600; font-size: clamp(12px, 1.9cqw, 22px); letter-spacing: -0.02em; margin-bottom: clamp(4px, 0.8cqw, 10px); }
.bs-service-desc { color: var(--bs-muted); font-size: clamp(10px, 1.3cqw, 15px); line-height: 1.45; }

.bs-contact {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(14px, 3cqw, 48px);
  padding: calc(var(--bs-pad) * var(--bs-space)) var(--bs-pad);
  border-top: 1px solid var(--bs-line);
  background: var(--bs-bg-2);
}
.bs-contact-title { font-family: var(--bs-font); font-weight: var(--bs-title-weight); letter-spacing: var(--bs-title-tracking); font-size: clamp(18px, 3.6cqw, 44px); line-height: 1.05; margin-bottom: clamp(10px, 1.8cqw, 22px); }
.bs-contact-list { display: grid; gap: clamp(6px, 1cqw, 12px); font-size: clamp(10px, 1.35cqw, 15px); color: var(--bs-muted); }
.bs-contact-list b { color: var(--bs-fg); font-weight: 500; }
.bs-contact-form { display: grid; gap: clamp(6px, 1cqw, 12px); }
.bs-field { height: clamp(26px, 3.6cqw, 44px); border: 1px solid var(--bs-line); border-radius: var(--bs-radius); padding: 0 clamp(8px, 1.2cqw, 14px); display: flex; align-items: center; color: var(--bs-muted); font-size: var(--bs-small-size); }
.bs-field--area { height: clamp(50px, 7cqw, 90px); align-items: flex-start; padding-top: clamp(6px, 1cqw, 12px); }
.bs-footer { display: flex; justify-content: space-between; gap: 2cqw; padding: clamp(10px, 1.6cqw, 20px) var(--bs-pad); border-top: 1px solid var(--bs-line); color: var(--bs-muted); font-size: var(--bs-small-size); letter-spacing: 0.04em; }

/* Empilement sur conteneur étroit */
@container (max-width: 520px) {
  .bs-hero { grid-template-columns: 1fr; }
  .bs-hero-media { aspect-ratio: 16 / 10; }
  .bs-services { grid-template-columns: 1fr; }
  .bs-contact { grid-template-columns: 1fr; }
  .bs-links { display: none; }
}

/* ---- Pages nommées (Shared.renderPage) ---- */
.bsite--long-name .bs-logo { font-size: clamp(10px, 1.3cqw, 15px); letter-spacing: 0; max-width: 56%; }
.bs-page-head { padding: calc(var(--bs-pad) * var(--bs-space)) var(--bs-pad) clamp(10px, 2cqw, 28px); }
.bs-page-head .bs-title { margin-bottom: 0; }
.bs-services--detail { padding-top: clamp(6px, 1cqw, 12px); }
.bs-inclusions { list-style: none; margin: clamp(6px, 1.2cqw, 14px) 0 0; padding: 0; display: grid; gap: clamp(3px, 0.5cqw, 6px); font-size: clamp(9px, 1.2cqw, 13px); color: var(--bs-muted); }
.bs-inclusions li { padding-left: clamp(10px, 1.4cqw, 16px); position: relative; }
.bs-inclusions li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: clamp(4px, 0.6cqw, 7px); height: 1px; background: var(--bs-accent); }
.bs-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(6px, 1.4cqw, 18px); padding: 0 var(--bs-pad) calc(var(--bs-pad) * var(--bs-space)); }
.bs-tile { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bs-bg-2); border-radius: var(--bs-radius); }
.bs-tile img { width: 100%; height: 100%; object-fit: cover; }
.bs-tile-plan { width: 100%; height: 100%; padding: clamp(8px, 2cqw, 24px); color: var(--bs-fg); }
.bs-tile-plan svg { width: 100%; height: 100%; }
.bs-tile-label { position: absolute; left: clamp(8px, 1.4cqw, 16px); bottom: clamp(6px, 1.2cqw, 14px); font-size: var(--bs-small-size); letter-spacing: 0.08em; text-transform: uppercase; color: var(--bs-fg); text-shadow: 0 1px 8px rgba(0,0,0,0.6); padding: 2px 6px; background: rgba(15, 15, 16, 0.85); max-width: calc(100% - 2 * clamp(8px, 1.4cqw, 16px)); overflow-wrap: anywhere; }
.bs-about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); gap: clamp(14px, 4cqw, 64px); align-items: center; padding: calc(var(--bs-pad) * var(--bs-space)) var(--bs-pad); }
.bs-about-media { aspect-ratio: 4 / 5; }
.bs-form { display: grid; gap: clamp(8px, 1.4cqw, 16px); padding: 0 var(--bs-pad) calc(var(--bs-pad) * var(--bs-space)); }
.bs-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(8px, 1.4cqw, 16px); }
.bs-form .bs-btn { justify-self: start; }
.bs-contact--page { background: transparent; border-top: 0; }
.bs-map { position: relative; min-height: clamp(120px, 28cqw, 320px); border: 1px solid var(--bs-line); border-radius: var(--bs-radius); background-color: var(--bs-bg-2); background-image: linear-gradient(var(--bs-line) 1px, transparent 1px), linear-gradient(90deg, var(--bs-line) 1px, transparent 1px); background-size: 12.5% 12.5%; }
.bs-map-pin { position: absolute; left: 54%; top: 46%; width: clamp(8px, 1.4cqw, 14px); height: clamp(8px, 1.4cqw, 14px); border-radius: 50%; background: var(--bs-accent); box-shadow: 0 0 0 clamp(4px, 0.8cqw, 8px) color-mix(in srgb, var(--bs-accent) 25%, transparent); }
.bs-map-label { position: absolute; left: clamp(8px, 1.4cqw, 16px); bottom: clamp(6px, 1.2cqw, 14px); font-size: var(--bs-small-size); letter-spacing: 0.08em; text-transform: uppercase; color: var(--bs-muted); }
@container (max-width: 520px) {
  .bs-about { grid-template-columns: 1fr; }
  .bs-form-grid { grid-template-columns: 1fr; }
}

/* Le contenu principal occupe l'espace disponible : le pied reste au bas des pages courtes */
body > main { flex: 1 0 auto; }
