/* Pages Habitat, Espaces commerciaux, MRE et section « Et votre espace ? » de l'accueil.
   Mêmes jetons que style.css : papier sable, cuivre, texte brun. */

.page { background: var(--ink); }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 14px clamp(16px, 3vw, 40px); background: rgba(239, 230, 216, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid rgba(168, 105, 63, .18); }
.mainnav { display: flex; gap: 1.8rem; }
.mainnav a { color: var(--body-text); text-decoration: none; font: 500 11px var(--body); letter-spacing: .18em; text-transform: uppercase; transition: color .3s; }
.mainnav a:hover, .mainnav a[aria-current="page"] { color: var(--copper-2); }
#bar .mainnav { pointer-events: auto; }

.section { position: relative; z-index: 5; background: var(--ink); padding: clamp(56px, 10vh, 110px) var(--gut); }
.section.alt { background: var(--sand); }
.wrap { max-width: 1120px; margin: 0 auto; }
h2.t { font-family: var(--display); font-weight: 300; font-size: clamp(30px, 3.4vw, 48px); line-height: 1.1; margin: .8rem 0 1.4rem; }
.intro { color: var(--body-text); line-height: 1.65; max-width: 62ch; margin-bottom: 2.2rem; }

/* en-tête des pages */
.p-hero { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.p-hero h1 { font-size: clamp(38px, 4.6vw, 68px); }
.p-hero .actions { margin-top: 1.6rem; }

/* comparateur avant / après (images) */
.compare { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 4px; box-shadow: 0 30px 60px -36px rgba(80, 50, 30, .55); --pos: 50%; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare .after { clip-path: inset(0 0 0 var(--pos)); }
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.compare .bar { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #f3d3a8; box-shadow: 0 0 18px rgba(243, 211, 168, .9); pointer-events: none; }
.compare .knob { position: absolute; top: 50%; left: var(--pos); width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; border: 1px solid var(--copper); background: var(--card); display: grid; place-items: center; color: var(--copper); pointer-events: none; }
.compare .tag { position: absolute; top: 14px; font: 500 10px var(--body); letter-spacing: .28em; text-transform: uppercase; padding: .4rem .7rem; background: var(--card); color: var(--body-text); }
.compare .tag.l { left: 14px; }
.compare .tag.r { right: 14px; }
.compare:focus-within { outline: 2px solid var(--copper); outline-offset: 4px; }
.note { font-size: 12px; color: var(--muted); margin-top: .7rem; }

/* cartes et étapes */
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0; }
.grid3 > div { background: var(--sand); padding: 1.6rem 1.5rem; outline: 1px solid rgba(168, 105, 63, .22); }
.section.alt .grid3 > div { background: var(--ink); }
.grid3 h3 { font-family: var(--display); font-weight: 400; font-size: 20px; color: var(--copper-2); margin-bottom: .6rem; }
.grid3 p, .grid3 li { color: var(--body-text); line-height: 1.6; }
.grid3 ul { padding-left: 1.1rem; margin-top: .5rem; }
.grid3 .soon { display: inline-block; margin-top: .8rem; }
.steps { list-style: none; counter-reset: st; display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.steps li { counter-increment: st; border-top: 1px solid rgba(168, 105, 63, .4); padding-top: 1rem; color: var(--body-text); line-height: 1.55; }
.steps li::before { content: '0' counter(st); display: block; font: 500 11px var(--body); letter-spacing: .24em; color: var(--copper); margin-bottom: .5rem; }
.steps b { display: block; font-family: var(--display); font-weight: 400; font-size: 19px; color: var(--text); margin-bottom: .3rem; }

/* questions fréquentes */
.faq details { border-bottom: 1px solid rgba(168, 105, 63, .25); padding: 1.1rem 0; }
.faq summary { cursor: pointer; font-family: var(--display); font-size: 19px; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--copper); }
.faq details[open] summary::after { content: '–'; }
.faq p { margin-top: .7rem; color: var(--body-text); line-height: 1.65; max-width: 70ch; }

/* bandeau d'appel */
.band { background: #2b221c; }
.band h2.t { color: #f4ede2; }
.band .intro { color: #d9cbb8; }
.band .ghost { color: #f3d3a8; border-color: rgba(243, 211, 168, .5); background: transparent; }

.footer { position: relative; z-index: 5; background: var(--ink); padding: 28px var(--gut); font-size: 12px; color: var(--muted); border-top: 1px solid rgba(168, 105, 63, .2); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer a { color: var(--copper-2); text-decoration: none; margin-left: 1.2rem; }

/* « Et votre espace ? » : trois portes en arches, reprise du monogramme du logo */
.portes { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.5vw, 36px); }
.porte { text-decoration: none; color: inherit; display: block; }
.arch { position: relative; aspect-ratio: 3 / 4.2; border-radius: 999px 999px 4px 4px; overflow: hidden; border: 1px solid rgba(168, 105, 63, .45); background: #e9dfcf; box-shadow: inset 0 0 0 6px rgba(249, 244, 236, .55); transition: border-color .4s, transform .6s; }
.porte:hover .arch { border-color: var(--copper); transform: translateY(-4px); }
.arch img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.arch .b { animation: fadeAB 7s ease-in-out infinite; }
@keyframes fadeAB { 0%, 35% { opacity: 0; } 50%, 85% { opacity: 1; } 100% { opacity: 0; } }
.arch svg { position: absolute; left: 10%; top: 14%; width: 80%; height: 76%; }
.arch svg .s { fill: none; stroke: #9c5c33; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 700; stroke-dashoffset: 700; animation: draw 7s ease-in-out infinite; }
@keyframes draw { 0% { stroke-dashoffset: 700; } 45%, 82% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 700; } }
.arch .lbl { position: absolute; bottom: 14px; left: 50%; translate: -50% 0; font: 500 9.5px var(--body); letter-spacing: .26em; text-transform: uppercase; background: var(--card); padding: .4rem .65rem; color: var(--body-text); white-space: nowrap; }
.porte h3 { font-family: var(--display); font-weight: 400; font-size: 23px; margin: 1.2rem 0 .4rem; }
.porte p { color: var(--body-text); line-height: 1.55; }
.porte .go { display: inline-block; margin-top: .8rem; font: 500 11px var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--copper-2); }

/* transformations courtes : boucles vidéo existant → idée → réalité */
.films { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 28px); }
.films figure { margin: 0; }
.films video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-radius: 4px; background: #e6dac8; box-shadow: 0 24px 50px -32px rgba(80, 50, 30, .55); }
.films figcaption { margin-top: .9rem; color: var(--body-text); line-height: 1.5; }
.films b { display: block; font-family: var(--display); font-weight: 400; font-size: 20px; color: var(--text); margin-bottom: .25rem; }
.duo { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(16px, 2.5vw, 36px); }
.duo h3 { font-family: var(--display); font-weight: 400; font-size: 21px; margin: 1rem 0 .3rem; }
.duo p { color: var(--body-text); line-height: 1.55; }

@media (max-width: 860px) {
  .films, .duo { grid-template-columns: 1fr; }
  .p-hero { grid-template-columns: 1fr; }
  .portes { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  /* Mobile : la navigation passe sur une seconde ligne qui défile horizontalement */
  .topbar { flex-wrap: wrap; row-gap: 10px; }
  #bar .mainnav { display: none; } /* accueil : l'en-tête fixe recouvrirait le titre ; liens en pied de page et portes */
  .mainnav { order: 3; width: 100%; gap: 1.3rem; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
  .mainnav::-webkit-scrollbar { display: none; }
  .mainnav a { padding: 6px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .arch .b { animation: none; opacity: 1; }
  .arch svg .s { animation: none; stroke-dashoffset: 0; }
}
