/* ============================================================
   mon-plan-de-masse.fr — la page comme une planche de dessin
   technique : papier, encre, cotes, projet en rouge.
   ============================================================ */

:root {
	--papier:   #FBFAF6;   /* la feuille */
	--bureau:   #EBEAE2;   /* la table sous la feuille */
	--calque:   #F3F2EA;   /* bandes alternées */
	--encre:    #23272B;   /* trait existant, texte */
	--graphite: #5F6569;   /* texte secondaire */
	--cote:     #878D93;   /* lignes de cote */
	--trame:    #DCDACD;   /* filets, grilles */
	--rouge:    #C2331C;   /* le projet — convention des plans */
	--rouge-f:  #A32812;
	--bleu:     #2F4E92;   /* liens, rappel cerfa */

	--f-disp: "Archivo", "Helvetica Neue", sans-serif;
	--f-corps: "Source Serif 4", Georgia, serif;
	--f-mono: "IBM Plex Mono", "SF Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* l'attribut hidden doit gagner sur les display: posés par les classes */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
	background: var(--bureau);
	color: var(--encre);
	font-family: var(--f-corps);
	font-size: 1.06rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

a { color: var(--bleu); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--rouge); }

.visually-hidden {
	position: absolute; width: 1px; height: 1px;
	clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

:focus-visible { outline: 2px solid var(--bleu); outline-offset: 2px; }

.rouge { color: var(--rouge); }

/* ---------------------------------------------- la feuille (cadre) */

.topbar, .feuille, .cartouche {
	max-width: 1140px;
	margin-inline: auto;
	background: var(--papier);
}

.feuille {
	border-inline: 1.5px solid var(--encre);
	box-shadow: inset 0 0 0 0 transparent, 0 12px 40px rgba(35, 39, 43, .10);
	position: relative;
}
/* filet intérieur de la planche */
.feuille::before {
	content: "";
	position: absolute; inset: 0 10px;
	border-inline: 1px solid var(--trame);
	pointer-events: none;
}

/* ---------------------------------------------- topbar */

.topbar {
	display: flex;
	align-items: center;
	gap: 1.2rem;
	padding: .85rem 2.2rem;
	border: 1.5px solid var(--encre);
	border-bottom-width: 1px;
	position: sticky; top: 0; z-index: 20;
}

.logo {
	display: flex; align-items: center; gap: .55rem;
	font-family: var(--f-disp);
	font-variation-settings: "wdth" 118;
	font-weight: 700;
	font-size: 1.02rem;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--encre);
	text-decoration: none;
	white-space: nowrap;
}
.logo em { font-style: normal; color: var(--rouge); }
.logo-rose { width: 21px; height: 21px; color: var(--encre); }

.topbar-note {
	font-family: var(--f-mono);
	font-size: .72rem;
	color: var(--graphite);
	letter-spacing: .02em;
	margin-left: auto;
}

/* ---------------------------------------------- boutons */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 42px;
	padding: 0 1.15rem;
	font-family: var(--f-disp);
	font-variation-settings: "wdth" 110;
	font-weight: 600;
	font-size: .92rem;
	letter-spacing: .03em;
	text-decoration: none;
	border: 1.5px solid var(--rouge);
	cursor: pointer;
	white-space: nowrap;
}
.btn-plein { background: var(--rouge); color: #fff; }
.btn-plein:hover { background: var(--rouge-f); border-color: var(--rouge-f); color: #fff; }
.btn-grand { height: 52px; padding: 0 1.6rem; font-size: 1rem; }

/* ---------------------------------------------- hero */

.hero { padding: 4.2rem 2.2rem 3rem; }

.crayon {
	font-family: var(--f-mono);
	font-size: .78rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--graphite);
	margin-bottom: 1.1rem;
}
.crayon::before {
	content: "";
	display: inline-block;
	width: 2.2rem; height: 1px;
	background: var(--rouge);
	vertical-align: middle;
	margin-right: .7rem;
}

.hero h1 {
	font-family: var(--f-disp);
	font-variation-settings: "wdth" 112;
	font-weight: 680;
	font-size: clamp(1.9rem, 4.6vw, 3.15rem);
	line-height: 1.08;
	letter-spacing: -.01em;
	max-width: 21ch;
	text-wrap: balance;
}

.hero-sous {
	max-width: 62ch;
	margin-top: 1.25rem;
	font-size: 1.12rem;
	color: var(--graphite);
}

/* formulaire d'adresse */
.form-adresse {
	display: flex;
	gap: .6rem;
	margin-top: 1.9rem;
	max-width: 640px;
}
.form-adresse input {
	flex: 1;
	min-width: 0;
	height: 52px;
	padding: 0 1rem;
	font-family: var(--f-mono);
	font-size: .98rem;
	color: var(--encre);
	background: #fff;
	border: 1.5px solid var(--encre);
	border-radius: 0;
}
.form-adresse input::placeholder { color: #A7ACB1; }
.form-adresse input:focus-visible { outline-offset: 0; }

.form-note {
	font-family: var(--f-mono);
	font-size: .78rem;
	color: var(--graphite);
	margin-top: .55rem;
}

/* autocomplétion BAN */
.form-champ { position: relative; flex: 1; min-width: 0; display: flex; }
.form-champ input { width: 100%; }
.ac-liste {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 30;
	margin: 0;
	padding: 0;
	list-style: none;
	background: #fff;
	border: 1.5px solid var(--encre);
	border-top: 0;
	font-family: var(--f-mono);
	font-size: .85rem;
}
.ac-liste li { padding: .55rem .9rem; cursor: pointer; }
.ac-liste li:hover, .ac-liste li.actif { background: var(--calque); }

/* bouton « me localiser » */
.btn-geoloc {
	flex-shrink: 0;
	width: 52px;
	height: 52px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	border: 1.5px solid var(--encre);
	color: var(--encre);
	cursor: pointer;
}
.btn-geoloc svg { width: 20px; height: 20px; }
.btn-geoloc:hover { color: var(--rouge); border-color: var(--rouge); }
.btn-geoloc.cherche svg { animation: geoloc-pulse 1s infinite; }
@keyframes geoloc-pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) {
	.btn-geoloc.cherche svg { animation: none; opacity: .5; }
}

/* la planche de dessin */
.planche { margin-top: 2.4rem; }

.planche-cadre {
	position: relative;
	border: 1.5px solid var(--encre);
	background:
		repeating-linear-gradient(0deg,  transparent 0 24px, var(--trame) 24px 25px),
		repeating-linear-gradient(90deg, transparent 0 24px, var(--trame) 24px 25px),
		#FDFDFA;
}
.planche-cadre svg { display: block; width: 100%; height: auto; }

.planche-statut {
	position: absolute;
	inset: auto 0 0 0;
	padding: .5rem 1rem;
	font-family: var(--f-mono);
	font-size: .82rem;
	background: var(--encre);
	color: var(--papier);
}
.planche-statut.erreur { background: var(--rouge); color: #fff; }

#plan-legende {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem 1.4rem;
	align-items: baseline;
	padding: .6rem .2rem 0;
	font-family: var(--f-mono);
	font-size: .76rem;
	color: var(--graphite);
}
.leg::before {
	content: "";
	display: inline-block;
	width: 1.5rem; height: 0;
	margin-right: .45rem;
	vertical-align: middle;
	border-top: 2px solid var(--encre);
}
.leg-rouge::before { border-color: var(--rouge); }
.leg-cote::before { border-top-style: dashed; border-color: var(--cote); }
.leg-source { margin-left: auto; font-size: .72rem; }

.planche-suite {
	display: flex;
	align-items: center;
	gap: 1.2rem;
	flex-wrap: wrap;
	margin-top: 1.1rem;
	padding: 1rem 1.2rem;
	border: 1.5px solid var(--encre);
	background: #fff;
}
.planche-suite span {
	font-family: var(--f-mono);
	font-size: .78rem;
	color: var(--graphite);
	max-width: 34ch;
}

/* éléments dessinés dans le SVG du plan (classes posées par landing.js) */
.t-parcelle { fill: rgba(47, 78, 146, .035); stroke: var(--encre); stroke-width: 2; }
.t-bati     { fill: url(#hachures); stroke: var(--encre); stroke-width: 1.4; }
.t-projet   { fill: rgba(194, 51, 28, .07); stroke: var(--rouge); stroke-width: 2.2; cursor: grab; }
.t-projet.saisi { cursor: grabbing; }
.t-cote     { stroke: var(--cote); stroke-width: 1; }
.t-cote-txt {
	font-family: var(--f-mono);
	font-size: 15px;
	fill: var(--encre);
}
.t-cote-txt.rouge-txt { fill: var(--rouge); }
.t-label {
	font-family: var(--f-mono);
	font-size: 14px;
	fill: var(--graphite);
}
.t-nord { fill: var(--encre); stroke: var(--encre); }

/* ---------------------------------------------- sections */

.section { padding: 3.6rem 2.2rem; }
.section-calque {
	background: var(--calque);
	border-block: 1px solid var(--trame);
}

/* titre porté par une ligne de cote : <--| Titre |--> */
.titre-cote {
	display: flex;
	align-items: center;
	gap: 1.1rem;
	margin-bottom: 2.2rem;
	font-family: var(--f-disp);
	font-variation-settings: "wdth" 122;
	font-weight: 640;
	font-size: 1.18rem;
	letter-spacing: .12em;
	text-transform: uppercase;
}
/* filets de cote avec tiret oblique 45° aux extrémités intérieures
   (la convention des cotes d'architecte) */
.titre-cote::before, .titre-cote::after {
	content: "";
	flex: 1;
	height: 11px;
}
.titre-cote::before {
	background:
		linear-gradient(var(--cote), var(--cote)) center / 100% 1px no-repeat,
		linear-gradient(-45deg, transparent calc(50% - .8px), var(--cote) calc(50% - .8px) calc(50% + .8px), transparent calc(50% + .8px)) right center / 11px 11px no-repeat;
}
.titre-cote::after {
	background:
		linear-gradient(var(--cote), var(--cote)) center / 100% 1px no-repeat,
		linear-gradient(-45deg, transparent calc(50% - .8px), var(--cote) calc(50% - .8px) calc(50% + .8px), transparent calc(50% + .8px)) left center / 11px 11px no-repeat;
}
.titre-cote span { flex: 0 1 auto; min-width: 0; text-align: center; text-wrap: balance; }

/* ---------------------------------------------- étapes */

.etapes {
	list-style: none;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2.4rem;
	counter-reset: etape;
}
.etapes li { position: relative; padding-top: .4rem; }

.etape-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.1rem; height: 2.1rem;
	border: 1.5px solid var(--encre);
	border-radius: 50%;
	font-family: var(--f-mono);
	font-weight: 500;
	font-size: .95rem;
	margin-bottom: .9rem;
	background: var(--papier);
}
.etapes li:nth-child(2) .etape-num { border-color: var(--rouge); color: var(--rouge); }

.etapes h3 {
	font-family: var(--f-disp);
	font-variation-settings: "wdth" 108;
	font-weight: 640;
	font-size: 1.12rem;
	margin-bottom: .5rem;
}
.etapes p { color: var(--graphite); font-size: .99rem; }

/* ---------------------------------------------- livrable */

.livrable {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	gap: 3rem;
	align-items: center;
}
.livrable-visuel svg { width: 100%; height: auto; display: block; }
.mock-titre {
	font-family: var(--f-disp);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .1em;
	fill: var(--encre);
}
.mock-cote { font-family: var(--f-mono); font-size: 10.5px; fill: var(--encre); }
.mock-min  { font-family: var(--f-mono); font-size: 9.5px; fill: var(--graphite); }

.livrable-liste {
	list-style: none;
	display: grid;
	gap: .85rem;
}
.livrable-liste li {
	padding-left: 1.6rem;
	position: relative;
	font-size: 1rem;
}
.livrable-liste li::before {
	content: "";
	position: absolute;
	left: 0; top: .58em;
	width: .8rem; height: 0;
	border-top: 2px solid var(--rouge);
}

/* ---------------------------------------------- réassurance */

.grille-confiance {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0;
	border: 1px solid var(--trame);
}
.grille-confiance article {
	padding: 1.6rem 1.5rem 1.8rem;
	border-right: 1px solid var(--trame);
}
.grille-confiance article:last-child { border-right: 0; }
.grille-confiance svg {
	width: 30px; height: 30px;
	color: var(--rouge);
	margin-bottom: .9rem;
}
.grille-confiance h3 {
	font-family: var(--f-disp);
	font-variation-settings: "wdth" 108;
	font-weight: 640;
	font-size: 1.02rem;
	margin-bottom: .5rem;
}
.grille-confiance p { font-size: .93rem; color: var(--graphite); }

/* ---------------------------------------------- prix */

.prix {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	gap: 2.6rem;
	align-items: start;
}

.prix-carte {
	background: #fff;
	border: 1.5px solid var(--encre);
	padding: 2rem 2.2rem 1.6rem;
	position: relative;
}
/* coin plié façon calque */
.prix-carte::after {
	content: "";
	position: absolute;
	top: -1.5px; right: -1.5px;
	border-style: solid;
	border-width: 0 26px 26px 0;
	border-color: var(--bureau) var(--bureau) var(--calque) var(--calque);
	filter: drop-shadow(-1px 1px 1px rgba(35,39,43,.14));
}
.prix-etiquette {
	font-family: var(--f-mono);
	font-size: .76rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--graphite);
}
.prix-montant { margin: .4rem 0 1.1rem; }
.prix-montant strong {
	font-family: var(--f-disp);
	font-variation-settings: "wdth" 112;
	font-weight: 700;
	font-size: 3.1rem;
	letter-spacing: -.02em;
}
.prix-montant span {
	font-family: var(--f-mono);
	font-size: .82rem;
	color: var(--graphite);
	margin-left: .5rem;
}
.prix-carte ul {
	list-style: none;
	display: grid;
	gap: .55rem;
	margin-bottom: 1.6rem;
}
.prix-carte li {
	padding-left: 1.5rem;
	position: relative;
	font-size: .99rem;
}
.prix-carte li::before {
	content: "✓";
	position: absolute; left: 0;
	font-family: var(--f-mono);
	color: var(--rouge);
}
.prix-carte .btn { width: 100%; }
.prix-note {
	font-family: var(--f-mono);
	font-size: .76rem;
	color: var(--graphite);
	text-align: center;
	margin-top: .7rem;
}

.prix-comparaison h3 {
	font-family: var(--f-disp);
	font-variation-settings: "wdth" 115;
	font-weight: 640;
	font-size: .95rem;
	letter-spacing: .1em;
	text-transform: uppercase;
	margin-bottom: 1.1rem;
}
.prix-comparaison dl { display: grid; gap: 1.1rem; }
.prix-comparaison dt {
	font-family: var(--f-mono);
	font-size: .85rem;
	font-weight: 500;
}
.prix-comparaison dd { font-size: .93rem; color: var(--graphite); }

/* ---------------------------------------------- FAQ */

.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--trame); }
.faq details:first-child { border-top: 1px solid var(--trame); }
.faq summary {
	cursor: pointer;
	list-style: none;
	padding: 1.05rem .2rem;
	font-family: var(--f-disp);
	font-variation-settings: "wdth" 106;
	font-weight: 600;
	font-size: 1.04rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
	content: "+";
	font-family: var(--f-mono);
	font-size: 1.2rem;
	color: var(--rouge);
	flex-shrink: 0;
}
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 .2rem 1.2rem; color: var(--graphite); max-width: 68ch; }

/* ---------------------------------------------- honnêteté */

.section-honnete { padding-bottom: 4.2rem; }
.liste-honnete {
	list-style: none;
	display: grid;
	gap: .7rem;
	max-width: 760px;
}
.liste-honnete li {
	padding-left: 1.6rem;
	position: relative;
	font-size: 1rem;
}
.liste-honnete li::before {
	content: "✕";
	position: absolute; left: 0;
	font-family: var(--f-mono);
	font-size: .85rem;
	color: var(--graphite);
}

/* ---------------------------------------------- footer cartouche */

.cartouche {
	border: 1.5px solid var(--encre);
	border-top-width: 2.5px;
	margin-bottom: 3rem;
}
.cartouche-grille {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
}
.cart-cellule {
	padding: 1.2rem 1.4rem 1.4rem;
	border-right: 1px solid var(--trame);
	font-size: .86rem;
	color: var(--graphite);
}
.cart-cellule:last-child { border-right: 0; }
.cart-label {
	display: block;
	font-family: var(--f-mono);
	font-size: .68rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--encre);
	margin-bottom: .45rem;
}
.cartouche-bas {
	border-top: 1px solid var(--trame);
	padding: .8rem 1.4rem;
	font-family: var(--f-mono);
	font-size: .74rem;
	color: var(--graphite);
}

/* ---------------------------------------------- pages légales */

.page-legale { max-width: 820px; }
.page-legale h1 { font-size: 1.35rem; }
.page-legale h2 {
	font-family: var(--f-disp);
	font-variation-settings: "wdth" 110;
	font-weight: 640;
	font-size: 1.15rem;
	margin: 2rem 0 .6rem;
}
.page-legale p { margin-bottom: .8rem; color: var(--graphite); }
.page-legale .sous-titre {
	font-family: var(--f-mono);
	font-size: .8rem;
}

/* ---------------------------------------------- formulaire de contact */

.form-contact { display: grid; gap: 1.2rem; max-width: 640px; margin-top: 1.6rem; }
.form-ligne { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.form-contact label {
	display: block;
	font-family: var(--f-disp);
	font-variation-settings: "wdth" 108;
	font-weight: 600;
	font-size: .92rem;
	margin-bottom: .35rem;
	color: var(--encre);
}
.form-aide { font-family: var(--f-mono); font-weight: 400; font-size: .72rem; color: var(--graphite); }
.form-contact input[type="text"],
.form-contact input[type="email"],
.form-contact select,
.form-contact textarea {
	width: 100%;
	padding: .65rem .8rem;
	font-family: var(--f-mono);
	font-size: .95rem;
	color: var(--encre);
	background: #fff;
	border: 1.5px solid var(--encre);
	border-radius: 0;
}
.form-contact textarea { resize: vertical; font-family: var(--f-corps); font-size: 1rem; }
.form-contact .btn { justify-self: start; }

.contact-avertissement {
	border-left: 3px solid var(--rouge);
	padding: .6rem 1rem;
	background: var(--calque);
	font-size: .95rem;
}
.form-erreur {
	background: var(--rouge);
	color: #fff;
	padding: .7rem 1rem;
	font-family: var(--f-mono);
	font-size: .88rem;
}
.form-confirmation {
	border: 1.5px solid var(--encre);
	background: #fff;
	padding: 1.4rem 1.6rem;
	max-width: 640px;
}

@media (max-width: 700px) {
	.form-ligne { grid-template-columns: 1fr; }
}

/* ---------------------------------------------- responsive */

@media (max-width: 980px) {
	.grille-confiance { grid-template-columns: 1fr 1fr; }
	.grille-confiance article:nth-child(2n) { border-right: 0; }
	.grille-confiance article:nth-child(-n+2) { border-bottom: 1px solid var(--trame); }
	.livrable { grid-template-columns: 1fr; gap: 2rem; }
	.prix { grid-template-columns: 1fr; }
	.cartouche-grille { grid-template-columns: 1fr 1fr; }
	.cart-cellule:nth-child(2n) { border-right: 0; }
	.cart-cellule:nth-child(-n+2) { border-bottom: 1px solid var(--trame); }
}

@media (max-width: 700px) {
	body { font-size: 1rem; }
	.topbar { padding: .6rem .9rem; gap: .6rem; }
	.topbar-note { display: none; }
	.topbar .btn { margin-left: auto; height: 34px; font-size: .76rem; padding: 0 .65rem; white-space: nowrap; }
	.logo { font-size: .84rem; gap: .4rem; }
	.logo-rose { width: 16px; height: 16px; }
	.btn { white-space: normal; }
	.prix-carte { padding: 1.5rem 1.2rem 1.2rem; }
	.prix-carte .btn-grand { height: auto; min-height: 52px; padding-block: .6rem; }
	.hero { padding: 2.6rem 1.1rem 2.2rem; }
	.section { padding: 2.6rem 1.1rem; }
	.form-adresse { display: grid; grid-template-columns: 1fr 52px; }
	.form-adresse .btn-grand { grid-column: 1 / -1; width: 100%; }
	.etapes { grid-template-columns: 1fr; gap: 1.8rem; }
	.grille-confiance { grid-template-columns: 1fr; }
	.grille-confiance article { border-right: 0; border-bottom: 1px solid var(--trame); }
	.grille-confiance article:last-child { border-bottom: 0; }
	.cartouche-grille { grid-template-columns: 1fr; }
	.cart-cellule { border-right: 0; border-bottom: 1px solid var(--trame); }
	.cart-cellule:last-child { border-bottom: 0; }
	.leg-source { margin-left: 0; }
	.feuille::before { inset: 0 4px; }
}
