/* ============================================================
   Mockup A v3 — site chapeau www.losange-editions.com
   Charte legacy reconstituée (extraction 2026-11-02) :
     body   : #FFF / #333 / "Open Sans" 14px
     titres : "Alegreya Sans" weight 100 (ultra-light)
     accents : couleurs des maisons via les visuels (pas de palette logo)
   v3 (Cowork 2026-11-03) :
     - polices locales woff2 (assets/fonts/, SIL OFL) — zéro webfont externe
     - header : logo officiel PNG + bandeau dégradé de lisibilité
     - menu burger + panneau latéral (variante C retenue par Eric 2026-11-03)
   v5 (Cowork 2026-11-03) : bloc maisons enrichi (visuel, logo, accroche, texte, lien)
   Zéro PHP · zéro JS · zéro CDN · CSS vanilla.
   ============================================================ */

/* ============ Polices locales ============ */

@font-face {
  font-family: 'Open Sans';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('assets/fonts/open-sans-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Open Sans';
  font-style: italic; font-weight: 400; font-display: swap;
  src: url('assets/fonts/open-sans-latin-400-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal; font-weight: 600; font-display: swap;
  src: url('assets/fonts/open-sans-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Alegreya Sans';
  font-style: normal; font-weight: 100; font-display: swap;
  src: url('assets/fonts/alegreya-sans-latin-100-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Alegreya Sans';
  font-style: italic; font-weight: 100; font-display: swap;
  src: url('assets/fonts/alegreya-sans-latin-100-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Alegreya Sans';
  font-style: normal; font-weight: 300; font-display: swap;
  src: url('assets/fonts/alegreya-sans-latin-300-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Alegreya Sans';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('assets/fonts/alegreya-sans-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Alegreya Sans';
  font-style: italic; font-weight: 400; font-display: swap;
  src: url('assets/fonts/alegreya-sans-latin-400-italic.woff2') format('woff2');
}

/* Polices des maisons — pour touches typographiques synchronisées avec les slides */
@font-face {
  font-family: 'Lora';
  font-style: italic; font-weight: 400; font-display: swap;
  src: url('assets/fonts/maisons/lora-latin-400-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Lora';
  font-style: normal; font-weight: 600; font-display: swap;
  src: url('assets/fonts/maisons/lora-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic; font-weight: 600; font-display: swap;
  src: url('assets/fonts/maisons/cormorant-garamond-latin-600-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal; font-weight: 700; font-display: swap;
  src: url('assets/fonts/maisons/cormorant-garamond-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Oswald';
  font-style: normal; font-weight: 500; font-display: swap;
  src: url('assets/fonts/maisons/oswald-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Oswald';
  font-style: normal; font-weight: 600; font-display: swap;
  src: url('assets/fonts/maisons/oswald-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Nunito';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('assets/fonts/maisons/nunito-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Nunito';
  font-style: normal; font-weight: 800; font-display: swap;
  src: url('assets/fonts/maisons/nunito-latin-800-normal.woff2') format('woff2');
}

/* ============ Variables ============ */

:root {
  /* Palette light = version D (fond blanc pur, primary officielles des pages maintenance) */
  --bg: #FFFFFF;
  --bg-soft: #FAFAFA;
  --ink: #1C1C1C;
  --ink-soft: #5B5F66;
  --ink-muted: #8A8E96;
  --ink-strong: #0A0A0A;
  --rule: #E8E8E8;
  --rule-strong: #CCCCCC;

  /* Références maisons (primary pages maintenance) */
  --chamina: #6E7B51;
  --artemis: #4B674E;
  --bonneton: #283C4F;
  --grenouille: #38688E;

  --font-body: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
  --font-head: 'Alegreya Sans', 'Open Sans', 'Helvetica Neue', sans-serif;

  --header-h: 88px;

  /* surfaces dépendant du thème */
  --panel: #FFFFFF;        /* panneau menu */
  --btn-bg: #111111; --btn-fg: #FFFFFF; --btn-hover: #000000;
  --card-shadow: rgba(0,0,0,.08);
  --burger-ink: #111111;
  --card-bg: #FFFFFF;
  color-scheme: light;
}

/* ============ Mode nuit ============
   Automatique (préférence système) et interrupteur manuel (case #theme-toggle, CSS pur).
   L'interrupteur inverse le mode courant : coché = l'inverse de la préférence système. */
@media (prefers-color-scheme: dark) {
  html:not(:has(#theme-toggle:checked)) { --dark: 1; }
}
@media (prefers-color-scheme: light), (prefers-color-scheme: no-preference) {
  html:has(#theme-toggle:checked) { --dark: 1; }
}
@media (prefers-color-scheme: dark) {
  html:not(:has(#theme-toggle:checked)) {
    --bg: #151B25; --bg-soft: #10151D; --card-bg: #1C2430; --ink: #CFD8E3; --ink-soft: #9DA9B8; --ink-muted: #6F7B8A; --ink-strong: #F1F5F9;
    --rule: #273140; --rule-strong: #364254; --panel: #1A2230; --btn-bg: #F1F5F9; --btn-fg: #151B25; --btn-hover: #FFFFFF;
    --card-shadow: rgba(0,0,0,.55); --burger-ink: #F1F5F9; color-scheme: dark;
  }
}
@media (prefers-color-scheme: light), (prefers-color-scheme: no-preference) {
  html:has(#theme-toggle:checked) {
    --bg: #151B25; --bg-soft: #10151D; --card-bg: #1C2430; --ink: #CFD8E3; --ink-soft: #9DA9B8; --ink-muted: #6F7B8A; --ink-strong: #F1F5F9;
    --rule: #273140; --rule-strong: #364254; --panel: #1A2230; --btn-bg: #F1F5F9; --btn-fg: #151B25; --btn-hover: #FFFFFF;
    --card-shadow: rgba(0,0,0,.55); --burger-ink: #F1F5F9; color-scheme: dark;
  }
}

/* interrupteur jour / nuit (pied du panneau menu) */
.theme-toggle { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav-foot { margin-top: auto; padding-top: 28px; border-top: 1px solid var(--rule); }
.theme-switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; color: var(--ink-soft); font-size: 13px; letter-spacing: .4px; text-transform: uppercase; user-select: none; }
.theme-label { position: relative; display: inline-block; }
.lbl-night { display: none; }
.track { position: relative; width: 46px; height: 26px; border-radius: 13px; background: var(--rule-strong); transition: background .25s; flex: none; }
.knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #FFF; box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: transform .25s cubic-bezier(.22,1,.36,1), background .25s; }
/* icône : soleil (point) / lune (croissant) dessinés dans le bouton */
.knob::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #E8B931; transition: background .25s, box-shadow .25s; }
/* état « nuit » effectif = préférence système XOR interrupteur */
@media (prefers-color-scheme: dark) {
  html:not(:has(#theme-toggle:checked)) .track { background: var(--ink-strong); }
  html:not(:has(#theme-toggle:checked)) .knob { transform: translateX(20px); background: #1A2230; }
  html:not(:has(#theme-toggle:checked)) .knob::after { background: transparent; box-shadow: inset -4px -2px 0 0 #F1F5F9; }
  html:not(:has(#theme-toggle:checked)) .lbl-day { display: none; }
  html:not(:has(#theme-toggle:checked)) .lbl-night { display: inline; }
}
@media (prefers-color-scheme: light), (prefers-color-scheme: no-preference) {
  html:has(#theme-toggle:checked) .track { background: var(--ink-strong); }
  html:has(#theme-toggle:checked) .knob { transform: translateX(20px); background: #1A2230; }
  html:has(#theme-toggle:checked) .knob::after { background: transparent; box-shadow: inset -4px -2px 0 0 #F1F5F9; }
  html:has(#theme-toggle:checked) .lbl-day { display: none; }
  html:has(#theme-toggle:checked) .lbl-night { display: inline; }
}
.theme-toggle:focus-visible ~ .theme-switch .track { outline: 2px solid var(--ink-strong); outline-offset: 3px; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); font-size: 14px; line-height: 1.65; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; transition: background .3s, color .3s; }
a { color: var(--ink-strong); text-decoration: none; transition: color .2s; }
a:hover { color: var(--ink-strong); }
img, svg { max-width: 100%; display: block; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* Accessibilité : focus clavier visible partout */
a:focus-visible, button:focus-visible, label:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid #FFF; outline-offset: 3px;
}
.maisons a:focus-visible, .contact a:focus-visible, .site-footer a:focus-visible {
  outline-color: var(--ink-strong);
}
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: #FFF; color: #111; padding: 8px 14px; }
.skip-link:focus { left: 8px; }

/* ============ Titres (Alegreya Sans ultra-light) ============ */

h1, h2, h3 { font-family: var(--font-head); font-weight: 100; color: var(--ink-strong); }
h1 { font-size: 52px; line-height: 1.12; letter-spacing: -.3px; }
h2 { font-size: 38px; line-height: 1.2; margin-bottom: 20px; }
h3 { font-size: 22px; line-height: 1.3; font-weight: 300; margin-bottom: 10px; }

/* ============ Header (overlay sur le hero) ============ */

.site-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  min-height: var(--header-h);
  display: flex; align-items: center;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 40px; width: 100%; max-width: none; padding: 0 32px; } /* logo et menu restent collés aux bords quelle que soit la largeur */
.site-header .logo { margin-right: auto; }

.logo { display: block; line-height: 0; }
.logo img {
  height: 36px; width: auto;
  /* Logo officiel sombre sur fond transparent → rendu blanc sur le hero.
     Si Losange fournit une version blanche, retirer le filtre. */
  filter: brightness(0) invert(1) drop-shadow(0 1px 2px rgba(0,0,0,.35));
}

.main-nav a {
  color: #FFF;
  font-size: 14px;
  letter-spacing: .4px;
  text-shadow: 0 1px 3px rgba(0,0,0,.45);
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.main-nav a:hover, .main-nav a:focus-visible { color: #FFF; border-bottom-color: #FFF; }

/* ============ Menu burger (panneau latéral, checkbox CSS, sans JS) ============ */

.nav-toggle { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.burger {
  position: relative; z-index: 60; width: 44px; height: 44px; cursor: pointer;
  display: flex; flex-direction: column; justify-content: center; gap: 6px; align-items: center;
}
.burger span { display: block; width: 26px; height: 2px; background: #FFF; transition: transform .25s, opacity .2s, background .25s; }
.nav-toggle:checked ~ .burger span { background: var(--burger-ink); }
.nav-toggle:checked ~ .burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle:checked ~ .burger span:nth-child(2) { opacity: 0; }
.nav-toggle:checked ~ .burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.nav-toggle:focus-visible ~ .burger { outline: 2px solid #FFF; outline-offset: 3px; }

.main-nav {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(380px, 100%); z-index: 55;
  background: var(--panel); padding: 110px 48px 48px;
  transform: translateX(100%); transition: transform .3s ease;
  box-shadow: -10px 0 40px rgba(0,0,0,.25);
  overflow-y: auto;
}
.nav-toggle:checked ~ .main-nav { transform: translateX(0); }
.main-nav ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.main-nav a { display: block; color: var(--ink-strong); font-family: var(--font-head); font-weight: 300; font-size: 26px; padding: 8px 0; }
.main-nav a:hover, .main-nav a:focus-visible { color: var(--ink-strong); opacity: .75; }
.main-nav .sub a { font-family: var(--font-body); font-weight: 400; font-size: 14px; color: var(--ink-soft); padding: 5px 0 5px 18px; }
.main-nav li.sub:last-of-type a { margin-bottom: 14px; }
.nav-overlay { position: fixed; inset: 0; z-index: 54; background: rgba(0,0,0,.45); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; cursor: pointer; }
.nav-toggle:checked ~ .nav-overlay { opacity: 1; visibility: visible; }
.main-nav { display: flex; flex-direction: column; transition: transform .32s cubic-bezier(.22,1,.36,1); }
/* mobile < 480 px : bottom sheet (comme le drawer légal des one-pages maisons) */
@media (max-width: 479px) {
  .main-nav { top: auto; left: 0; right: 0; bottom: 0; width: 100%; height: auto; max-height: min(86svh, 40rem); border-radius: 1.1rem 1.1rem 0 0; padding: 0 24px max(env(safe-area-inset-bottom, 0px), 24px); transform: translateY(100%); box-shadow: 0 -16px 48px rgba(0,0,0,.3); }
  .main-nav::before { content: ""; display: block; width: 2.5rem; height: 4px; margin: 10px auto 22px; border-radius: 999px; background: var(--rule-strong); }
  .nav-toggle:checked ~ .main-nav { transform: translateY(0); }
  .main-nav a { font-size: 24px; padding: 6px 0; }
  .nav-foot { padding-top: 20px; margin-top: 22px; }
}

/* ============ Hero ============ */

.hero {
  position: relative;
  min-height: 100vh;
  padding: 0; /* neutralise le padding générique des sections */
  color: #FFF;
  overflow: hidden;
}
.hero-visuals { position: absolute; inset: 0; background: #2A2A2A; }
.hero-slide { position: absolute; inset: 0; opacity: 0; animation: slideFade 20s infinite; background-size: cover; background-position: center; }
.slide-artemis    { background-image: url('images/artemis.png');    animation-delay: 0s; opacity: 1; }
.slide-bonneton   { background-image: url('images/bonneton.jpg');   animation-delay: 5s; }
.slide-chamina    { background-image: url('images/chamina.jpg');    animation-delay: 10s; }
.slide-grenouille { background-image: url('images/grenouille.jpg'); animation-delay: 15s; }

@keyframes slideFade {
  0%, 25% { opacity: 1; }
  30%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide { animation: none; }
  html { scroll-behavior: auto; }
}

.hero-overlay {
  position: relative;
  z-index: 1;
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 140px 0 80px;
  /* bandeau sombre haut (logo/menu) + léger assombrissement bas (lisibilité captions) */
  background:
    linear-gradient(to bottom, rgba(0,0,0,.55) 0%, rgba(0,0,0,.25) 140px, rgba(0,0,0,0) 260px),
    linear-gradient(to bottom, rgba(0,0,0,0) 55%, rgba(0,0,0,.55) 100%);
}
.hero h1 {
  color: #FFF;
  margin: 0;
  text-shadow: 0 2px 12px rgba(0,0,0,.45);
  line-height: 1.1;
}
.hero h1 .t1 {
  display: inline-block;
  font-weight: 700;
  font-size: 1.3em;
  letter-spacing: .01em;
}
.hero h1 .t2 {
  display: inline-block;
  font-weight: 400;
  font-style: italic;
  font-size: 1.5em;
  letter-spacing: .005em;
  margin-top: 10px;
  /* Hauteur fixe ≥ police la plus haute (Bonneton Cormorant ~101 px),
     évite le reflow du hero quand la police change. */
  line-height: 130px;
  height: 130px;
  transition: opacity .35s ease;
}
.hero h1 .t2.is-swapping { opacity: 0; }

/* Polices par maison, swap via JS font-rotation.js (sync avec les slides) */
.hero h1 .t2.font-artemis    { font-family: 'Lora', Georgia, serif;             font-weight: 400; font-style: italic; font-size: 1.55em; letter-spacing: .005em; }
.hero h1 .t2.font-bonneton   { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; font-style: italic; font-size: 1.95em; letter-spacing: .01em; }
.hero h1 .t2.font-chamina    { font-family: 'Oswald', 'Inter', sans-serif;      font-weight: 500; font-style: normal; font-size: 1.5em;  letter-spacing: .04em; text-transform: uppercase; }
.hero h1 .t2.font-grenouille { font-family: 'Nunito', system-ui, sans-serif;    font-weight: 800; font-style: normal; font-size: 1.45em; letter-spacing: -.005em; }

/* ============ Captions synchronisées avec les slides ============ */
.hero-captions {
  position: absolute;
  left: 0; right: 0; bottom: 56px;
  display: flex; justify-content: center;
  pointer-events: none;
  padding: 0 24px;
  min-height: 0;
}
.hero-caption {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 720px;
  max-width: calc(100vw - 48px);
  height: 72px;              /* hauteur fixe = pire cas (Bonneton 21 px × 2 lignes) */
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0;
  color: #F5F5F5;
  font-size: 18px;
  line-height: 1.35;
  text-align: center;
  text-shadow: 0 1px 6px rgba(0,0,0,.65), 0 0 18px rgba(0,0,0,.4);
  opacity: 0;
  animation: captionFade 20s infinite;
  white-space: normal;
}
.cap-artemis    { animation-delay: 0s; opacity: 1; font-family: 'Lora', Georgia, serif;             font-weight: 400; font-size: 18px; }
.cap-bonneton   { animation-delay: 5s;             font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; font-size: 21px; }
.cap-chamina    { animation-delay: 10s;            font-family: 'Oswald', 'Inter', sans-serif;      font-weight: 500; font-size: 17px; letter-spacing: .04em; }
.cap-grenouille { animation-delay: 15s;            font-family: 'Nunito', system-ui, sans-serif;    font-weight: 400; font-size: 17px; }

@keyframes captionFade {
  0%, 25% { opacity: 1; }
  30%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-caption { animation: none; opacity: 1; }
  .hero-caption:not(.cap-artemis) { display: none; }
}

/* ============ Section commune ============ */

section { padding: 90px 0; }
section h2 { text-align: center; }
.section-sub { text-align: center; color: var(--ink-soft); max-width: 580px; margin: 0 auto 60px; font-size: 15px; }

/* ============ Maisons (v5, enrichi) ============ */

.maisons { background: var(--bg); }
.maisons-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 48px 40px; margin-top: 10px; }

.maison { display: flex; flex-direction: column; background: var(--card-bg); border: 1px solid var(--rule); transition: box-shadow .25s, transform .25s; }
.maison:hover { box-shadow: 0 10px 34px var(--card-shadow); transform: translateY(-3px); }

/* visuel 16:9 + logo blanc en bas à gauche sur dégradé */
.maison-visual { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 9; max-width: 100%; }
.maison-img { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform .6s ease; }
.maison:hover .maison-img { transform: scale(1.04); }
.maison-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55) 0%, rgba(0,0,0,.15) 45%, rgba(0,0,0,0) 70%); }
.maison-logo { position: absolute; left: 28px; bottom: 22px; z-index: 1; height: 48px; width: auto; max-width: 60%; object-fit: contain; filter: brightness(0) invert(1) drop-shadow(0 1px 3px rgba(0,0,0,.4)); }
.img-chamina    { background-image: url('images/chamina.jpg'); }
.img-artemis    { background-image: url('images/artemis.png'); }
.img-bonneton   { background-image: url('images/bonneton.jpg'); }
.img-grenouille { background-image: url('images/grenouille.jpg'); }

/* corps : filet de couleur maison + accroche + nom + tagline + texte + lien */
.maison-body { position: relative; padding: 26px 32px 32px; border-top: 4px solid var(--accent-maison); }
/* Accents maisons — primary officielles (cohérent avec les sites des 4 maisons) */
.maison-artemis    { --accent-maison: #4B674E; } /* vert sauge foncé */
.maison-bonneton   { --accent-maison: #283C4F; } /* bleu nuit */
.maison-chamina    { --accent-maison: #6E7B51; } /* vert olive */
.maison-grenouille { --accent-maison: #38688E; } /* bleu océan */

/* En mode nuit, les primary sombres ne se voient plus sur le fond bleu nuit.
   On passe aux secondary (accent) des pages maintenance, plus chaudes et contrastées. */
@media (prefers-color-scheme: dark) {
  html:not(:has(#theme-toggle:checked)) .maison-artemis    { --accent-maison: #D0765E; } /* terracotta */
  html:not(:has(#theme-toggle:checked)) .maison-bonneton   { --accent-maison: #D07A44; } /* orange cuivré */
  html:not(:has(#theme-toggle:checked)) .maison-chamina    { --accent-maison: #F2A94A; } /* orange safran */
  html:not(:has(#theme-toggle:checked)) .maison-grenouille { --accent-maison: #8AC75A; } /* vert pomme */
}
@media (prefers-color-scheme: light), (prefers-color-scheme: no-preference) {
  html:has(#theme-toggle:checked) .maison-artemis    { --accent-maison: #D0765E; }
  html:has(#theme-toggle:checked) .maison-bonneton   { --accent-maison: #D07A44; }
  html:has(#theme-toggle:checked) .maison-chamina    { --accent-maison: #F2A94A; }
  html:has(#theme-toggle:checked) .maison-grenouille { --accent-maison: #8AC75A; }
}

.themes { font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 12px; line-height: 1.6; }
.themes .k { color: var(--ink-strong); font-weight: 600; margin-right: 6px; }
@media (prefers-color-scheme: dark) { html:not(:has(#theme-toggle:checked)) .themes .k { color: var(--accent-maison); } }
@media (prefers-color-scheme: light), (prefers-color-scheme: no-preference) { html:has(#theme-toggle:checked) .themes .k { color: var(--accent-maison); } }
.maison-body h3 { font-size: 30px; font-weight: 400; margin-bottom: 4px; }
.tagline { font-family: var(--font-head); font-weight: 400; font-style: italic; font-size: 18px; color: var(--ink-soft); margin-bottom: 14px; }
.maison-body > p:not(.themes):not(.tagline) { color: var(--ink-soft); font-size: 14px; line-height: 1.7; margin-bottom: 20px; }
.maison-link { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .3px; color: var(--ink-strong); padding-bottom: 3px; border-bottom: 2px solid var(--accent-maison); transition: color .2s, border-color .2s; }
.maison-link:hover, .maison-link:focus-visible { color: var(--ink-strong); border-bottom-color: var(--ink-strong); }
.maison-link span { display: inline-block; transition: transform .2s; }
.maison-link:hover span { transform: translateX(4px); }

/* ============ Pôle ============ */

.pole { background: var(--bg-soft); text-align: center; }
.pole p { max-width: 760px; margin: 0 auto; font-size: 16px; line-height: 1.8; color: var(--ink-soft); }

/* ============ Contact ============ */

.contact { background: var(--card-bg); }
.contact .lede { text-align: center; max-width: 580px; margin: 0 auto 50px; color: var(--ink-soft); font-size: 15px; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; max-width: 1080px; margin: 0 auto; }
.contact-grid h3 { font-weight: 300; margin-bottom: 16px; font-size: 20px; }
.contact-grid address { font-style: normal; line-height: 1.8; color: var(--ink-soft); }
.contact-grid strong { color: var(--ink-strong); font-weight: 600; display: inline-block; margin-top: 8px; }
.contact-grid p { color: var(--ink-soft); margin-bottom: 20px; line-height: 1.6; }

/* 3e colonne "Retrouvez-nous" : aligne à droite */
.contact-grid > div:last-child { text-align: right; }

.social-list { list-style: none; padding: 0; margin: 0; }
.social-list li { margin-bottom: 10px; }
.social-list a { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-strong); font-size: 14px; text-decoration: none; transition: opacity .2s; }
.social-list a:hover { opacity: .7; }
.social-icon { width: 20px; height: 20px; fill: currentColor; flex: none; }

.btn {
  display: inline-block;
  background: var(--btn-bg);
  color: var(--btn-fg);
  padding: 14px 36px;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: background .2s;
}
.btn:hover { background: var(--btn-hover); color: var(--btn-fg); }

/* ============ Footer ============ */

.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--rule);
  padding: 50px 0 30px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.8;
}
.site-footer p { margin-bottom: 14px; }
.footer-links { display: flex; justify-content: center; gap: 32px; margin: 20px 0; flex-wrap: wrap; }
.footer-links a { color: var(--ink-soft); font-size: 13px; }
.footer-links a:hover { color: var(--ink-strong); }
.footer-copy { font-size: 12px; color: var(--ink-muted); margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--rule); }
.footer-copy small { font-size: 13px; color: var(--ink-strong); display: inline-block; margin-top: 8px; line-height: 1.6; }

/* ============ Responsive ============ */

@media (max-width: 820px) {
  .site-header .container { padding: 0 20px; }
  :root { --header-h: 72px; }
  h1 { font-size: 40px; }                   /* +18 % vs 34 : titre plus imposant mobile */
  h2 { font-size: 30px; }
  .logo img { height: 30px; }
  section { padding: 63px 0; }              /* -30 % vs 90 : respirations verticales plus serrées */
  .hero-overlay { padding-top: 110px; }
  .hero h1 .t2 { height: 90px; line-height: 90px; }  /* hauteur figée adaptée mobile */
  .hero-captions { bottom: 36px; padding: 0 20px; }
  .hero-caption { font-size: 16px; height: 62px; }   /* police +, hauteur 2 lignes max */
  .maisons-grid { grid-template-columns: 1fr; gap: 32px; margin-top: 8px; }
  .section-sub { margin-bottom: 42px; }     /* -30 % vs 60 */
  .maison-body { padding: 22px 22px 26px; }
  .maison-body h3 { font-size: 26px; }
  .maison-logo { height: 38px; left: 20px; bottom: 16px; }
  .contact-grid { grid-template-columns: 1fr; gap: 25px; }  /* -30 % vs 36 */
  .pole p, .contact .lede { margin: 0 auto; }
}
@media (max-width: 480px) {
  .themes { font-size: 10px; }
  section { padding: 50px 0; }              /* encore + serré en très petit écran */
  .hero h1 .t1 { font-size: 1.1em; }        /* + un peu */
  .hero h1 .t2 { font-size: 1.3em; height: 80px; line-height: 80px; }
  .hero-captions { bottom: 24px; padding: 0 16px; }
  .hero-caption { font-size: 15px; line-height: 1.3; height: 55px; }
}

/* ============ Drawer légal (porté depuis maintenance/chamina) ============ */
.legal-drawer {
  position: fixed; inset: 0; z-index: 1000;
  pointer-events: none;
}
.legal-drawer[hidden] { display: none; }

.legal-drawer__overlay {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, .55);
  opacity: 0;
  transition: opacity .3s ease, backdrop-filter .3s ease;
  pointer-events: auto;
}

.legal-drawer__panel {
  position: absolute;
  background: var(--bg);
  color: var(--ink);
  box-shadow: -24px 0 48px -8px rgba(0,0,0,.22);
  display: flex; flex-direction: column;
  pointer-events: auto;
  outline: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.legal-drawer.is-open .legal-drawer__overlay { opacity: 1; }
.legal-drawer.is-open .legal-drawer__panel { transform: translate(0, 0); }

/* Mobile < 480 px — bottom sheet */
.legal-drawer__panel {
  left: 0; right: 0; bottom: 0; top: auto;
  width: 100%; height: min(90svh, 44rem);
  border-radius: 14px 14px 0 0;
  padding: 4px clamp(16px, 4vw, 20px) max(env(safe-area-inset-bottom), 20px);
  transform: translateY(100%);
  transition: transform .32s cubic-bezier(.22, 1, .36, 1);
}
.legal-drawer__handle {
  width: 40px; height: 4px;
  margin: 8px auto 12px;
  background: rgba(0,0,0,.18);
  border-radius: 999px;
}

/* Mobile large & tablette portrait 480–859 px */
@media (min-width: 480px) {
  .legal-drawer__panel {
    top: 0; right: 0; bottom: 0; left: auto;
    width: 92%; height: 100svh;
    border-radius: 0;
    padding: 20px 20px max(env(safe-area-inset-bottom), 20px);
    padding-left: max(env(safe-area-inset-left), 20px);
    padding-right: max(env(safe-area-inset-right), 20px);
    transform: translateX(100%);
    transition: transform .32s cubic-bezier(.22, 1, .36, 1);
  }
  .legal-drawer__handle { display: none; }
}

/* Tablettes paysage / petits portables 860–1099 px */
@media (min-width: 860px) {
  .legal-drawer__panel {
    width: min(70%, 42rem);
    padding: 24px 28px max(env(safe-area-inset-bottom), 24px);
    transition: transform .35s cubic-bezier(.22, 1, .36, 1);
  }
}

/* Desktop ≥ 1100 px */
@media (min-width: 1100px) {
  .legal-drawer.is-open .legal-drawer__overlay {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
  .legal-drawer__panel {
    width: min(55%, 48rem);
    padding: 40px 44px max(env(safe-area-inset-bottom), 32px);
    transition: transform .38s cubic-bezier(.22, 1, .36, 1);
  }
}

.legal-drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  flex-wrap: wrap;
}
.legal-drawer__tabs {
  display: flex; flex-wrap: wrap; gap: 6px;
  min-width: 0; flex: 1;
}
.legal-drawer__tabs a {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 14px; min-height: 44px;
  border-radius: 4px;
  border: 1.5px solid var(--ink-strong);
  background: transparent; color: var(--ink-strong);
  text-decoration: none; text-align: center;
  font-family: var(--font-body);
  font-size: 11px; font-weight: 600; letter-spacing: 1.4px;
  text-transform: uppercase; line-height: 1.2;
  overflow-wrap: anywhere;
  transition: background .2s ease, color .2s ease;
}
.legal-drawer__tabs a:hover { background: var(--ink-strong); color: var(--bg); }
.legal-drawer__tabs a[aria-current="page"] {
  background: var(--ink-strong); color: var(--bg); cursor: default;
}
.legal-drawer__tabs a:focus-visible {
  outline: 2px solid var(--ink-strong); outline-offset: 3px;
}

.legal-drawer__close {
  flex: none;
  display: inline-grid; place-items: center;
  width: 44px; height: 44px;
  border: 1px solid rgba(0,0,0,.14);
  border-radius: 50%;
  background: var(--bg-soft); color: var(--ink-strong);
  font-size: 22px; line-height: 1; cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.legal-drawer__close:hover { background: var(--ink-strong); color: var(--bg); transform: scale(1.05); }
.legal-drawer__close:focus-visible { outline: 2px solid var(--ink-strong); outline-offset: 3px; }
@media (min-width: 860px) { .legal-drawer__close { width: 40px; height: 40px; } }

.legal-drawer__body {
  padding-top: 20px;
  font-family: var(--font-body);
  font-size: 15px; line-height: 1.7;
  color: var(--ink);
  hyphens: auto;
}
.legal-drawer__body h1 { display: none; }
.legal-drawer__body h2 {
  font-family: var(--font-head);
  font-weight: 100;
  font-size: 26px;
  line-height: 1.25;
  color: var(--ink-strong);
  margin: 32px 0 10px;
}
.legal-drawer__body h2:first-of-type { margin-top: 16px; }
.legal-drawer__body h3 {
  margin: 20px 0 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.legal-drawer__body p { margin: 0 0 14px; text-wrap: pretty; overflow-wrap: anywhere; }
.legal-drawer__body ul, .legal-drawer__body ol { margin: 0 0 18px; padding-left: 22px; }
.legal-drawer__body li { margin: 6px 0; }
.legal-drawer__body a {
  color: var(--ink-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.legal-drawer__body a:hover { opacity: .75; }
.legal-drawer__body code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.875em; padding: 2px 6px;
  background: var(--bg-soft); border-radius: 3px; color: var(--ink-strong);
}
.legal-drawer__body p em:last-child {
  display: block; margin-top: 28px; text-align: right;
  font-style: italic; font-size: 13px; color: var(--ink-muted);
}

html.drawer-locked { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .legal-drawer__overlay, .legal-drawer__panel { transition: none; }
}

@media print {
  .legal-drawer { display: none !important; }
}

/* ============ Pages légales autonomes (fallback JS off) ============ */
.page-legal { background: var(--bg); color: var(--ink); }
.legal-standalone { padding: 60px 20px 100px; max-width: 760px; }
.legal-standalone h1 { font-family: var(--font-head); font-weight: 100; color: var(--ink-strong); margin: 0 0 20px; }
.legal-back { font-size: 13px; color: var(--ink-soft); margin-bottom: 12px; }
.legal-back a { color: inherit; }
.legal-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 32px; }
.legal-tabs a {
  padding: 9px 14px;
  border: 1.5px solid var(--ink-strong);
  border-radius: 4px;
  font-size: 11px; font-weight: 600; letter-spacing: 1.4px;
  text-transform: uppercase; text-decoration: none; color: var(--ink-strong);
}
.legal-tabs a[aria-current="page"] { background: var(--ink-strong); color: var(--bg); }
.legal-body h2 { font-family: var(--font-head); font-weight: 100; font-size: 26px; margin: 32px 0 10px; color: var(--ink-strong); }
.legal-body h3 { font-size: 13px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-soft); margin: 20px 0 8px; }
.legal-body p { margin: 0 0 14px; }
.legal-body ul, .legal-body ol { margin: 0 0 18px; padding-left: 22px; }
.legal-body li { margin: 6px 0; }
.legal-body a { color: var(--ink-strong); text-decoration: underline; text-underline-offset: 3px; }
