:root {
	--creme: #f5f0e8;
	--papier: #fffdf8;
	--terre: #9a5f43;
	--terre-foncee: #6e3f2c;
	--sauge: #65705b;
	--encre: #27241f;
	--sable: #d8c8b5;
	--blanc: #fff;
	--serif: Georgia, 'Times New Roman', serif;
	--sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--encre); background: var(--papier); font: 400 1rem/1.65 var(--sans); }
a { color: inherit; text-underline-offset: .2em; }
img { display: block; max-width: 100%; }
h1, h2 { margin: 0; font-family: var(--serif); font-weight: 400; line-height: .98; letter-spacing: -.025em; }
h1 { font-size: clamp(2.7rem, 6.2vw, 5.9rem); }
h2 { font-size: clamp(2.2rem, 4.4vw, 4.2rem); }
.evitement { position: fixed; z-index: 100; left: 1rem; top: -5rem; padding: .75rem 1rem; background: var(--encre); color: white; }
.evitement:focus { top: 1rem; }
.marque { margin: 0; font-family: var(--serif); font-size: 1.4rem; text-decoration: none; }
.surtitre { margin: 0 0 1rem; color: var(--terre); font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }

.entete { position: sticky; z-index: 20; top: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 2rem; min-height: 5rem; padding: 1rem clamp(1.25rem, 4vw, 4rem); border-bottom: 1px solid rgba(39,36,31,.12); background: rgba(255,253,248,.94); backdrop-filter: blur(14px); }
.navigation { display: flex; gap: 1.75rem; font-size: .84rem; }
.navigation a, .deconnexion { text-decoration: none; }
.navigation a { position: relative; padding: .65rem 0; color: var(--sauge); transition: color .2s ease; }
.navigation a::after { content: ''; position: absolute; right: 0; bottom: .25rem; left: 0; height: 2px; background: var(--terre); transform: scaleX(0); transform-origin: center; transition: transform .2s ease; }
.navigation a:hover, .navigation a:focus-visible, .navigation a.est-actif { color: var(--encre); }
.navigation a.est-actif::after { transform: scaleX(1); }
.entete__actions { display: flex; justify-content: flex-end; align-items: center; gap: 1rem; font-size: .78rem; }
.bouton-imprimer { padding: .55rem .8rem; border: 1px solid var(--sable); border-radius: 999px; color: inherit; background: transparent; cursor: pointer; }

.hero { display: grid; grid-template-columns: 1.15fr .85fr; height: calc(100svh - 5rem); min-height: 36rem; background: var(--creme); overflow: hidden; }
.hero__visuel { position: relative; min-height: 0; background: linear-gradient(145deg, rgba(101,112,91,.12), rgba(154,95,67,.22)), radial-gradient(circle at 35% 30%, #e8ddcd, transparent 37%), linear-gradient(135deg, #b2ad98, #756f5e); overflow: hidden; }
.hero__visuel::before { content: ''; position: absolute; inset: 22% 12% 0; background: linear-gradient(135deg, #d7c5ad 0 45%, #8d765f 46% 52%, #bd9c78 53%); clip-path: polygon(8% 40%, 50% 0, 94% 38%, 94% 100%, 8% 100%); opacity: .85; }
.hero__visuel::after { content: ''; position: absolute; inset: auto 0 0; height: 34%; background: linear-gradient(8deg, #646a4d, #8e9271); opacity: .9; }
.hero__visuel--photo::before, .hero__visuel--photo::after { display: none; }
.hero__visuel--photo img { width: 100%; height: 100%; object-fit: cover; }
.provisoire { position: absolute; z-index: 2; left: 1.5rem; bottom: 1.5rem; padding: .5rem .75rem; border-radius: 999px; background: rgba(255,253,248,.88); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.hero__contenu { display: flex; min-height: 0; flex-direction: column; justify-content: center; align-items: flex-start; padding: clamp(2rem, 5vh, 4rem) clamp(2rem, 6vw, 6rem); }
.hero h1 { font-size: clamp(2.55rem, min(5.5vw, 8.6vh), 5.5rem); }
.hero__introduction { max-width: 36rem; margin-top: clamp(1rem, 2.5vh, 2rem); font-size: clamp(1rem, 1.45vw, 1.25rem); }
.hero__introduction p { margin: 0; }
.prix { margin: clamp(1rem, 2.5vh, 2rem) 0; color: var(--terre-foncee); font-family: var(--serif); font-size: clamp(1.35rem, 2.8vh, 1.8rem); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.bouton { display: inline-flex; min-height: 3.15rem; align-items: center; justify-content: center; padding: .8rem 1.3rem; border: 1px solid var(--terre-foncee); border-radius: 999px; font-size: .88rem; font-weight: 500; text-decoration: none; }
.bouton--principal { color: var(--blanc); background: var(--terre-foncee); }
.bouton--secondaire { background: transparent; }

.chiffres { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--sable); border-bottom: 1px solid var(--sable); background: var(--papier); }
.chiffres div { display: flex; flex-direction: column; padding: clamp(2rem, 4vw, 4rem); text-align: center; }
.chiffres div + div { border-left: 1px solid var(--sable); }
.chiffres strong { font-family: var(--serif); font-size: clamp(1.75rem, 2.8vw, 3rem); font-weight: 400; line-height: 1; white-space: nowrap; }
.chiffres span { margin-top: .65rem; color: var(--sauge); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; }

.section { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(3rem, 8vw, 9rem); padding: clamp(5rem, 10vw, 11rem) clamp(1.5rem, 8vw, 9rem); }
.section__entete { max-width: 42rem; }
.lead { margin-top: 2rem; color: var(--sauge); font: 400 clamp(1.2rem, 2vw, 1.6rem)/1.45 var(--serif); }
.lead p { margin: 0; }
.section__corps { align-self: end; max-width: 44rem; font-size: 1.08rem; }
.texte p:first-child { margin-top: 0; }
.texte p:last-child { margin-bottom: 0; }
.section--bien { background: var(--papier); }
.section--synthese { background: var(--creme); }
.synthese-achat ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem 2rem; margin: 0; padding: 0; list-style: none; }
.synthese-achat li { padding: .7rem 0; border-bottom: 1px solid var(--sable); }
.synthese-achat li::before { content: '✓'; margin-right: .7rem; color: var(--terre); }
.donnees-simulees { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-top: 1.5rem; }
.donnees-simulees > div { display: flex; min-width: 0; flex-direction: column; padding: 1rem; border: 1px dashed var(--terre); background: #fff7ed; }
.donnees-simulees span { color: var(--terre); font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.donnees-simulees strong { margin: .35rem 0; font: 400 1.05rem/1.3 var(--serif); }
.donnees-simulees small { color: var(--sauge); line-height: 1.4; }
.remplacement { margin-top: 1.5rem; padding: 1rem; border: 1px dashed var(--terre); color: var(--terre-foncee); background: #fff7ed; font-size: .82rem; font-weight: 600; }
.section--regards { background: var(--papier); }
.regards { display: grid; max-width: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.regards > div { padding: 2rem; border: 1px solid var(--sable); background: var(--creme); }
.regards h3 { margin: 0 0 1rem; font: 400 1.6rem var(--serif); }
.regards ul { margin: 0; padding-left: 1.2rem; }
.section--terrain { background: var(--creme); }
.terrain-apercu { max-width: none; }
.plan-cadastral { position: relative; margin: 0; border: 1px solid var(--sable); background: var(--papier); }
.plan-cadastral img { width: 100%; max-height: 42rem; object-fit: contain; }
.plan-cadastral figcaption { padding: .8rem 1rem; border-top: 1px solid var(--sable); color: var(--sauge); font-size: .75rem; }
.terrain-apercu ul { columns: 2; margin: 1.5rem 0; padding-left: 1.2rem; }
.section--caracteristiques { grid-template-areas: 'titre titre' 'fiche fiche'; color: var(--blanc); background: var(--sauge); }
.section--caracteristiques .section__entete { grid-area: titre; max-width: 68rem; }
.section--caracteristiques .surtitre { color: #e7c8ad; }
.fiche { grid-area: fiche; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 2rem; padding: clamp(2rem, 4vw, 4rem); border: 1px solid rgba(255,255,255,.32); }
.fiche ul { margin: 0; padding: 0; list-style: none; }
.fiche li { display: flex; justify-content: space-between; gap: 2rem; padding: .8rem 0; border-bottom: 1px solid rgba(255,255,255,.18); }
.fiche table { width: 100%; margin: 0; border-collapse: collapse; table-layout: fixed; align-self: start; }
.fiche table:last-child { margin-bottom: 0; }
.fiche th, .fiche td { width: 50%; padding: .8rem 1rem; border: 1px solid rgba(255,255,255,.28); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.fiche th { color: #fff4e9; background: rgba(255,255,255,.1); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.fiche tr:nth-child(even) td { background: rgba(255,255,255,.045); }
.fiche h2 { margin: 1.5rem 0 0; font: 400 1.65rem/1.15 var(--serif); letter-spacing: 0; }
.fiche h2:first-child, .fiche h2:nth-of-type(2) { margin-top: 0; }
.fiche > h2:nth-of-type(1) { grid-column: 1; grid-row: 1; }
.fiche > h2:nth-of-type(2) { grid-column: 2; grid-row: 1; }
.fiche > table:nth-of-type(1) { grid-column: 1; grid-row: 2; }
.fiche > table:nth-of-type(2) { grid-column: 2; grid-row: 2; }
.fiche > table:nth-of-type(2) + p { grid-column: 2; grid-row: 3; align-self: start; }
.fiche > h2:nth-of-type(3), .fiche > h2:nth-of-type(3) ~ p { grid-column: 1 / -1; }
.fiche > h2:nth-of-type(3) { grid-row: 4; }
.fiche > h2:nth-of-type(3) { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,.22); }

.section--plans { grid-template-areas: 'titre texte' 'niveaux niveaux'; background: var(--creme); }
.section--plans .section__entete { grid-area: titre; }
.section--plans > .section__corps { grid-area: texte; }
.niveaux { grid-area: niveaux; display: grid; gap: clamp(4rem, 8vw, 8rem); margin-top: 2rem; }
.niveau { display: grid; grid-template-columns: minmax(15rem, .55fr) 1.45fr; gap: clamp(2rem, 5vw, 6rem); padding-top: 2rem; border-top: 1px solid var(--sable); }
.niveau header > span { color: var(--terre); font: 400 1rem var(--serif); }
.niveau h3 { margin: .4rem 0 1rem; font: 400 clamp(2rem, 3.5vw, 3.6rem)/1 var(--serif); }
.niveau header p { color: var(--sauge); }
.niveau__medias { display: grid; grid-template-columns: 1.2fr .8fr; gap: 1rem; }
.niveau__medias--trois { grid-template-columns: 1.2fr .8fr .8fr; }
.media-slot { position: relative; min-width: 0; min-height: 18rem; margin: 0; border: 1px solid var(--sable); background: var(--papier); overflow: hidden; }
.media-slot img { width: 100%; height: 100%; min-height: 18rem; object-fit: cover; }
.media-slot--plan img { object-fit: contain; padding: 1rem; }
.media-slot figcaption { position: absolute; right: .75rem; bottom: .75rem; left: .75rem; padding: .45rem .65rem; background: rgba(255,253,248,.9); font-size: .75rem; }
.media-slot--vide { display: grid; place-content: center; padding: 1.5rem; color: var(--sauge); background: repeating-linear-gradient(135deg, transparent 0 16px, rgba(101,112,91,.06) 17px 18px), var(--papier); text-align: center; }
.media-slot--vide::before { content: '+'; display: grid; width: 2.5rem; height: 2.5rem; margin: 0 auto 1rem; place-items: center; border: 1px solid var(--sable); border-radius: 50%; color: var(--terre); font-size: 1.4rem; }
.media-slot--vide span { font: 400 1.25rem var(--serif); }
.media-slot--vide small { margin-top: .35rem; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }

.section--galerie { grid-template-areas: 'titre texte' 'galerie galerie'; background: var(--papier); }
.section--galerie .section__entete { grid-area: titre; }
.section--galerie > .section__corps { grid-area: texte; }
.galerie { grid-area: galerie; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; }
.galerie figure { position: relative; min-height: 22rem; margin: 0; overflow: hidden; background: var(--creme); }
.galerie figure:nth-child(5n + 1), .galerie figure:nth-child(5n + 4) { grid-column: span 2; }
.galerie img { width: 100%; height: 100%; min-height: 22rem; object-fit: cover; }
.galerie figcaption { position: absolute; right: 1rem; bottom: 1rem; left: 1rem; padding: .55rem .75rem; background: rgba(255,253,248,.88); font-size: .78rem; }
.galerie--provisoire div { display: grid; min-height: 16rem; padding: 1.5rem; place-items: center; border: 1px solid var(--sable); color: var(--sauge); background: radial-gradient(circle, rgba(154,95,67,.1), transparent 55%), var(--creme); font: 400 1.2rem var(--serif); text-align: center; }
.galerie--provisoire div:nth-child(5n + 1), .galerie--provisoire div:nth-child(5n + 4) { grid-column: span 2; }

.section--documents { background: var(--creme); }
.liste-pieces { margin: 0; padding: 0; border-top: 1px solid var(--sable); list-style: none; }
.liste-pieces li { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--sable); }
.statut { flex: 0 0 auto; padding: .35rem .65rem; border-radius: 999px; font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; }
.statut--disponible { color: #33402c; background: #dce5d5; }
.statut--attente { color: var(--terre-foncee); background: #ead9ca; }
.telechargements { margin-top: 1.5rem; }
.telechargements h4 { margin: 0 0 .75rem; font: 400 1.25rem var(--serif); }
.telechargements ul { display: grid; gap: .65rem; margin: 0; padding: 0; list-style: none; }
.telechargements a { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 1rem; border: 1px solid var(--sable); background: var(--papier); text-decoration: none; }
.telechargements a::before { content: '↓'; color: var(--terre); }
.telechargements a span { margin-right: auto; }
.telechargements small { color: var(--sauge); white-space: nowrap; }
.grille-pieces { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.grille-pieces a { display: flex; min-height: 6rem; flex-direction: column; justify-content: space-between; padding: 1rem; border: 1px solid var(--sable); background: var(--papier); text-decoration: none; }
.grille-pieces a::before { content: 'PDF ↓'; color: var(--terre); font-size: .68rem; font-weight: 700; letter-spacing: .08em; }
.grille-pieces span { font: 400 1.15rem var(--serif); }
.grille-pieces small { color: var(--terre); }

.citation { padding: clamp(5rem, 10vw, 11rem) 10vw; background: var(--creme); text-align: center; }
.citation p { max-width: 68rem; margin: auto; color: var(--terre-foncee); font: 400 clamp(2.2rem, 5vw, 5rem)/1.08 var(--serif); }
.section--situation { grid-template-areas: 'titre texte' 'carte carte'; background: var(--papier); }
.section--situation .section__entete { grid-area: titre; }
.section--situation .section__corps { grid-area: texte; }
.carte-provisoire { grid-area: carte; display: grid; min-height: 24rem; margin-top: 2rem; place-items: center; border: 1px solid var(--sable); background: radial-gradient(circle at 63% 45%, rgba(154,95,67,.25) 0 1%, transparent 1.4%), repeating-linear-gradient(35deg, transparent 0 35px, rgba(101,112,91,.1) 36px 38px), var(--creme); color: var(--sauge); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }
.carte-situation { grid-area: carte; margin: 2rem 0 0; border: 1px solid var(--sable); background: var(--creme); }
.carte-situation img { width: 100%; }
.carte-situation figcaption { padding: .75rem 1rem; color: var(--terre); font-size: .72rem; }

.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; padding: clamp(4rem, 8vw, 8rem); color: var(--blanc); background: var(--terre-foncee); }
.contact .surtitre { color: #e7c8ad; }
.contact p { max-width: 38rem; }
.contact__coordonnees { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-content: center; }
.contact__coordonnees p:last-child { grid-column: 1 / -1; }
.bouton--clair { border-color: var(--blanc); }
.pied { display: flex; justify-content: space-between; gap: 2rem; align-items: center; padding: 2rem clamp(1.5rem, 4vw, 4rem); background: var(--encre); color: var(--blanc); font-size: .82rem; }

.page-acces { min-height: 100vh; background: radial-gradient(circle at 20% 10%, rgba(216,200,181,.75), transparent 35%), linear-gradient(135deg, var(--creme), #d8c8b5); }
.acces { display: grid; min-height: 100vh; padding: 2rem; place-items: center; }
.acces__carte { width: min(100%, 34rem); padding: clamp(2rem, 5vw, 4.5rem); border: 1px solid rgba(110,63,44,.18); background: rgba(255,253,248,.92); box-shadow: 0 2rem 5rem rgba(61,43,31,.14); }
.acces h1 { margin: 1.5rem 0; font-size: clamp(3.5rem, 8vw, 5.5rem); }
.acces__introduction { margin-bottom: 2rem; color: var(--sauge); font-size: 1.08rem; }
.acces__aide { margin: 2rem 0 0; color: var(--sauge); font-size: .82rem; }
.acces .formulaire_spip { margin: 0; padding: 0; border: 0; background: transparent; }
.acces .editer-groupe { padding: 0; }
.acces .editer { margin-bottom: 1rem; padding: 0; }
.acces label { display: block; margin-bottom: .35rem; font-size: .82rem; font-weight: 600; }
.acces input.text, .acces input.password { width: 100%; min-height: 3rem; padding: .7rem .8rem; border: 1px solid var(--sable); border-radius: 0; background: var(--blanc); font: inherit; }
.acces .boutons { margin: 1.5rem 0 0; text-align: left; }
.acces .submit { min-height: 3rem; padding: .7rem 1.3rem; border: 0; border-radius: 999px; color: white; background: var(--terre-foncee); font: 600 .9rem var(--sans); cursor: pointer; }

@media (max-width: 900px) {
	.entete { grid-template-columns: 1fr auto; gap: .5rem 1rem; }
	.navigation { grid-column: 1 / -1; order: 3; width: calc(100vw - 2.5rem); gap: 1.25rem; overflow-x: auto; scrollbar-width: thin; }
	.navigation a { flex: 0 0 auto; }
	.hero, .section, .contact { grid-template-columns: 1fr; }
	.hero { grid-template-rows: 30% 70%; height: calc(100svh - 7.06rem); min-height: 0; }
	.hero__visuel { min-height: 0; }
	.hero__contenu { padding: 1rem 1.5rem; }
	.hero h1 { font-size: clamp(1.95rem, 7.3vw, 3rem); }
	.hero__introduction { margin-top: .8rem; font-size: 1rem; }
	.prix { margin: .8rem 0; }
	.section--situation { grid-template-areas: 'titre' 'texte' 'carte'; }
	.section--plans { grid-template-areas: 'titre' 'texte' 'niveaux'; }
	.section--galerie { grid-template-areas: 'titre' 'texte' 'galerie'; }
	.section--caracteristiques { grid-template-areas: 'titre' 'fiche'; }
	.fiche { grid-template-columns: 1fr; }
	.synthese-achat ul, .regards, .grille-pieces, .donnees-simulees { grid-template-columns: 1fr; }
	.terrain-apercu ul { columns: 1; }
	.fiche > h2:nth-of-type(n), .fiche > table:nth-of-type(n), .fiche > table:nth-of-type(2) + p, .fiche > h2:nth-of-type(3) ~ p { grid-column: 1; grid-row: auto; }
	.niveau { grid-template-columns: 1fr; }
	.niveau__medias, .niveau__medias--trois { grid-template-columns: repeat(2, 1fr); }
	.niveau__medias--trois .media-slot--plan { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
	.entete { min-height: 4rem; padding: .75rem 1rem; }
	.navigation { width: calc(100vw - 2rem); }
	.hero { height: calc(100svh - 7.06rem); min-height: 0; }
	.entete__actions { gap: .4rem; }
	.deconnexion { font-size: 0; }
	.deconnexion::after { content: 'Sortir'; font-size: .75rem; }
	.bouton-imprimer { display: none; }
	.chiffres { grid-template-columns: 1fr; }
	.chiffres div + div { border-left: 0; border-top: 1px solid var(--sable); }
	.contact__coordonnees { grid-template-columns: 1fr; }
	.niveau__medias, .niveau__medias--trois, .galerie { grid-template-columns: 1fr; }
	.niveau__medias--trois .media-slot--plan, .galerie figure:nth-child(n), .galerie--provisoire div:nth-child(n) { grid-column: auto; }
	.media-slot, .media-slot img { min-height: 15rem; }
	.pied { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}
