/*
Theme Name: AXEnergie
Theme URI: https://axenergie.ch
Author: AXEnergie
Description: Thème sur mesure AXEnergie V4 — conseil indépendant en efficacité énergétique pour PME en Suisse romande. Langage « instrumentation énergétique » : coins sectionnés, amorces de visée, balayage de scan, témoins en direct, trame de points, courbe de charge animée. Conforme à la charte officielle (Orbitron / Montserrat, vert #85DE1F, marine #1F2F46, gris #6E7A86).
Version: 4.5.1
License: GNU General Public License v2 or later
Text Domain: axenergie
*/

/* =====================================================
   1. Jetons — charte AXEnergie
   ===================================================== */
:root {
	--marine:      #1F2F46;   /* Marine charte : titres, fonds sombres  */
	--marine-2:    #182539;   /* Marine profond                          */
	--marine-3:    #2A3C58;   /* Surfaces sur fond marine                */
	--gris:        #6E7A86;   /* Gris charte : textes secondaires        */
	--gris-2:      #9AA4AE;
	--vert:        #85DE1F;   /* Vert charte                             */
	--vert-fonce:  #6FC013;   /* Vert, état survol                       */
	--vert-texte:  #4E7F10;   /* Vert lisible sur fond vert pâle         */
	--vert-pale:   rgba(133, 222, 31, .14);
	--fond:        #F4F6F8;   /* Fond de page (teinte du gris charte)    */
	--blanc:       #FFFFFF;
	--ligne:       #E2E7EC;
	--ligne-sombre: rgba(255, 255, 255, .14);

	--police-titres: 'Orbitron', 'Montserrat', sans-serif;
	--police-texte:  'Montserrat', -apple-system, 'Segoe UI', sans-serif;

	--largeur: 1140px;
	--pad: 24px;
	--ease: cubic-bezier(.22, .61, .25, 1);

	/* Langage « instrumentation » : coin sectionné + trame de points */
	--coupe: 18px;
	--coupe-sm: 10px;
	--grille-pt: rgba(31, 47, 70, .05);

	/* Jetons sémantiques (permettent le thème sombre) */
	--bloc-marine: #1F2F46;              /* fonds marine constants (Indépendance)   */
	--sur-vert: #1F2F46;                 /* texte posé sur le vert charte           */
	--voile: rgba(244, 246, 248, .88);   /* voile de l'en-tête au défilement        */
	--btn-fond: var(--bloc-marine);
	--btn-texte: #FFFFFF;
	--btn-survol: var(--vert);
	--btn-survol-texte: var(--sur-vert);
}

/* =====================================================
   1bis. Thème sombre — mêmes teintes de la charte,
   valeurs inversées ; activé par data-theme="sombre"
   ===================================================== */
[data-theme="sombre"] {
	--fond:        #131E30;
	--blanc:       #1E2C42;              /* surfaces : cartes, bandes, boîtes       */
	--marine:      #E9EEF5;              /* texte principal                          */
	--marine-2:    #0F1826;              /* pied de page                             */
	--gris:        #9FAAB6;
	--gris-2:      #87919D;
	--ligne:       #2B3B53;
	--voile:       rgba(19, 30, 48, .86);
	--vert-texte:  #A7E96A;
	--vert-pale:   rgba(133, 222, 31, .12);
	--btn-fond:    var(--vert);
	--btn-texte:   #1F2F46;
	--btn-survol:  #9BE45A;
	--btn-survol-texte: #1F2F46;
	--grille-pt: rgba(255, 255, 255, .05);
}

/* =====================================================
   2. Base
   ===================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
	font-family: var(--police-texte);
	background: var(--fond);
	color: var(--marine);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	transition: background-color .35s var(--ease), color .35s var(--ease);
}

::selection { background: var(--vert); color: var(--marine); }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }

.conteneur { max-width: var(--largeur); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

.ecran-lecteur {
	position: absolute; width: 1px; height: 1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

a:focus-visible, button:focus-visible, summary:focus-visible {
	outline: 2px solid var(--vert);
	outline-offset: 3px;
	border-radius: 2px;
}

/* =====================================================
   3. Typographie
   ===================================================== */
h1, h2, h3 {
	font-family: var(--police-titres);
	line-height: 1.16;
	letter-spacing: .005em;
	font-weight: 700;
	color: var(--marine);
}
h2 { font-size: clamp(1.65rem, 3vw, 2.3rem); font-weight: 600; max-width: 22em; }

.lead { color: var(--gris); max-width: 38em; }

.sur-titre {
	font-size: .74rem;
	font-weight: 600;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--gris);
	display: flex;
	align-items: center;
	gap: .7em;
}
.sur-titre::before {
	content: "";
	width: 22px; height: 2px;
	background: var(--vert);
	flex: none;
}

/* =====================================================
   4. En-tête
   ===================================================== */
.entete {
	position: fixed;
	top: 0; left: 0; right: 0;
	z-index: 50;
	transition: background .3s var(--ease), box-shadow .3s var(--ease);
}
.entete.defile {
	background: var(--voile);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	box-shadow: 0 1px 0 var(--ligne);
}

/* Barre d'administration WordPress */
.admin-bar .entete { top: 32px; }
.admin-bar .menu-mobile { top: 104px; }
@media screen and (max-width: 782px) {
	.admin-bar .entete { top: 46px; }
	.admin-bar .menu-mobile { top: 118px; }
}

.nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 72px;
	gap: 20px;
}

.logo-lien { display: inline-flex; align-items: center; flex: none; }
.logo-lien img { width: 168px; height: auto; }

.nav-liens { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-liens a {
	font-size: .92rem;
	font-weight: 500;
	color: var(--marine);
	position: relative;
	padding: 4px 0;
	white-space: nowrap;
}
.nav-liens a::after {
	content: "";
	position: absolute;
	left: 0; bottom: 0;
	height: 2px; width: 0;
	background: var(--vert);
	transition: width .25s var(--ease);
}
.nav-liens a:hover::after,
.nav-liens a:focus-visible::after { width: 100%; }

/* =====================================================
   5. Boutons
   ===================================================== */
.btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: .6em;
	background: var(--btn-fond);
	color: var(--btn-texte);
	font-family: var(--police-texte);
	font-weight: 600;
	font-size: .95rem;
	padding: .85em 1.5em;
	border: none;
	cursor: pointer;
	clip-path: polygon(0 0, calc(100% - var(--coupe-sm)) 0, 100% var(--coupe-sm), 100% 100%, 0 100%);
	transition: background .25s var(--ease), color .25s var(--ease), transform .2s var(--ease);
}
.btn:hover { background: var(--btn-survol); color: var(--btn-survol-texte); transform: translateY(-1px); }
.btn[hidden] { display: none; }
.btn .fleche { transition: transform .25s var(--ease); }
.btn:hover .fleche { transform: translateX(3px); }

/* Amorces de visée : apparaissent aux deux coins non sectionnés, au survol */
.btn::after {
	content: "";
	position: absolute;
	inset: 6px;
	pointer-events: none;
	opacity: 0;
	background:
		linear-gradient(currentColor, currentColor) top    left  / 9px 1.5px no-repeat,
		linear-gradient(currentColor, currentColor) top    left  / 1.5px 9px no-repeat,
		linear-gradient(currentColor, currentColor) bottom right / 9px 1.5px no-repeat,
		linear-gradient(currentColor, currentColor) bottom right / 1.5px 9px no-repeat;
	transition: opacity .25s var(--ease);
}
.btn:hover::after { opacity: .55; }

.btn-contour {
	background: transparent;
	color: var(--marine);
	border: 1px solid var(--ligne);
}
.btn-contour:hover { background: var(--blanc); border-color: var(--vert); color: var(--marine); }

.entete .btn { padding: .6em 1.2em; font-size: .88rem; flex: none; }

/* Bascule clair / sombre */
.bascule-theme {
	width: 42px; height: 42px;
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--ligne);
	border-radius: 50%;
	background: var(--blanc);
	cursor: pointer;
	transition: border-color .25s var(--ease), transform .2s var(--ease), background .35s var(--ease);
}
.bascule-theme:hover { border-color: var(--vert); transform: translateY(-1px); }
.bascule-theme svg {
	width: 19px; height: 19px;
	stroke: var(--marine);
	stroke-width: 2;
	fill: none;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.bascule-theme .ico-soleil { display: none; }
[data-theme="sombre"] .bascule-theme .ico-lune { display: none; }
[data-theme="sombre"] .bascule-theme .ico-soleil { display: block; }

/* Logos et filigranes selon le thème */
.logo-nuit { display: none; }
[data-theme="sombre"] .logo-jour { display: none; }
[data-theme="sombre"] .logo-nuit { display: block; }
.filigrane-nuit { display: none; }
[data-theme="sombre"] .filigrane-jour { display: none; }
[data-theme="sombre"] .filigrane-nuit { display: block; }

/* Burger */
.burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.burger span {
	display: block;
	width: 22px; height: 2px;
	background: var(--marine);
	margin: 5px 0;
	transition: transform .3s var(--ease), opacity .3s var(--ease);
}

.menu-mobile {
	display: none;
	position: fixed;
	top: 72px; left: 0; right: 0;
	z-index: 49;
	background: var(--fond);
	border-bottom: 1px solid var(--ligne);
	padding: 12px var(--pad) 28px;
}
.menu-mobile.ouvert { display: block; }
.menu-mobile a {
	display: block;
	padding: 14px 0;
	font-size: 1.05rem;
	font-weight: 600;
	border-bottom: 1px solid var(--ligne);
}
.menu-mobile a:last-child { border-bottom: none; }

/* =====================================================
   6. Héros
   ===================================================== */
.heros { padding: 158px 0 0; position: relative; overflow: hidden; }
.heros::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	background-image: radial-gradient(var(--grille-pt) 1.5px, transparent 1.5px);
	background-size: 26px 26px;
	pointer-events: none;
}
.heros .conteneur { position: relative; z-index: 1; }

/* Le monogramme AE de la charte, en filigrane derrière le héros */
.heros-filigrane {
	position: absolute;
	top: 64px;
	right: -4%;
	width: 44%;
	max-width: 560px;
	opacity: .13;
	pointer-events: none;
	user-select: none;
	will-change: transform;
}
@media (max-width: 700px) {
	.heros-filigrane { width: 78%; right: -28%; top: 90px; opacity: .11; }
}

.heros .sur-titre { margin-bottom: 26px; }
.heros h1 {
	font-size: clamp(2.1rem, 5vw, 3.6rem);
	max-width: 16em;
	font-weight: 700;
}
.heros h1 .accent { color: var(--vert-fonce); white-space: nowrap; }
.heros p.lead { margin-top: 26px; font-size: 1.1rem; }
.heros-cta { display: flex; gap: 14px; margin-top: 38px; flex-wrap: wrap; }

/* =====================================================
   7. Signature : la courbe de charge
   ===================================================== */
.bloc-courbe {
	margin-top: 96px;
}
.courbe-tete {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 18px;
}
.courbe-titre {
	font-size: .72rem;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--gris);
}
.legende { display: flex; gap: 22px; flex-wrap: wrap; }
.legende span {
	font-size: .72rem;
	font-weight: 500;
	color: var(--gris);
	display: flex;
	align-items: center;
	gap: .55em;
}
.legende i { width: 14px; height: 3px; flex: none; border-radius: 2px; }
.legende .l-act i { background: var(--marine); }
.legende .l-opt i { background: var(--vert); }
.legende .l-eco i { background: var(--vert-pale); height: 10px; border: 1px solid var(--vert); }

.courbe-svg { width: 100%; height: auto; touch-action: pan-y; }
@media (pointer: fine) {
	.courbe-svg { cursor: crosshair; }
}
.courbe-svg:focus-visible {
	outline: 2px solid var(--vert);
	outline-offset: 4px;
	border-radius: 2px;
}
.courbe-invite {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 14px 0 0;
	font-size: .84rem;
	font-weight: 600;
	color: var(--vert-texte);
	opacity: .8;
	transition: opacity .2s var(--ease);
}
.courbe-invite .fleche { transition: transform .2s var(--ease); }
.courbe-svg:hover ~ .courbe-invite,
.courbe-svg:focus-visible ~ .courbe-invite { opacity: 1; }
.courbe-svg:hover ~ .courbe-invite .fleche,
.courbe-svg:focus-visible ~ .courbe-invite .fleche { transform: translateX(3px); }
.courbe-svg .ligne-grille { stroke: var(--ligne); stroke-width: 1; }
.courbe-svg .etiquette { font-family: var(--police-texte); font-size: 10px; fill: var(--gris); font-variant-numeric: tabular-nums; }
#trace-actuelle  { stroke: var(--marine); stroke-width: 2.5; fill: none; stroke-linecap: round; }
#trace-optimisee { stroke: var(--vert);   stroke-width: 2.5; fill: none; stroke-linecap: round; }
#zone-economies  { fill: var(--vert-pale); }
.etiquette-eco {
	font-family: var(--police-texte);
	font-size: 12.5px;
	font-weight: 600;
	fill: var(--vert-texte);
}
/* Le pourcentage lui-même, en grand format Orbitron, chiffres tabulaires */
#pct-eco {
	font-family: var(--police-titres);
	font-size: 32px;
	font-weight: 700;
	letter-spacing: .01em;
	font-variant-numeric: tabular-nums;
}

/* --- Chorégraphie d'apparition (uniquement avec JavaScript) --- */
.js .courbe-svg .ligne-grille { opacity: 0; transition: opacity .5s var(--ease); }
.js .courbe-svg .ligne-grille:nth-of-type(2) { transition-delay: .07s; }
.js .courbe-svg .ligne-grille:nth-of-type(3) { transition-delay: .14s; }
.js .courbe-svg .ligne-grille:nth-of-type(4) { transition-delay: .21s; }
.js .courbe-svg .etiquette { opacity: 0; transition: opacity .5s var(--ease) .18s; }
.js .courbe-svg.actif .ligne-grille,
.js .courbe-svg.actif .etiquette { opacity: 1; }

.js #trace-actuelle { opacity: 0; }
.js .courbe-svg.actif #trace-actuelle { opacity: 1; }

/* La courbe optimisée naît sur la courbe actuelle au début du décrochage */
.js #trace-optimisee { opacity: 0; transition: opacity .35s var(--ease); }
.js .courbe-svg.compte #trace-optimisee { opacity: 1; }

/* La zone d'économies grandit avec l'écart entre les deux courbes */
.js #zone-economies { opacity: 0; transition: opacity .6s var(--ease); }
.js .courbe-svg.compte #zone-economies { opacity: 1; }

/* Le compteur d'économies accompagne la descente */
.js .etiquette-eco {
	opacity: 0;
	transform: translateY(9px);
	transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.js .courbe-svg.compte .etiquette-eco {
	opacity: 1;
	transform: none;
}

/* Point lumineux en tête du tracé vert */
#pointe {
	fill: var(--vert);
	stroke: #fff;
	stroke-width: 2;
	opacity: 0;
	filter: drop-shadow(0 0 6px rgba(133, 222, 31, .85));
	transition: opacity .3s var(--ease);
}
#pointe.visible { opacity: 1; }

/* Curseur d'inspection au survol */
#inspecteur { opacity: 0; transition: opacity .25s var(--ease); pointer-events: none; }
.courbe-svg.inspecte #inspecteur { opacity: 1; }
#curseur { stroke: var(--gris-2); stroke-width: 1; stroke-dasharray: 3 4; }
#point-actuel  { fill: var(--marine); stroke: #fff; stroke-width: 1.5; }
#point-optimise { fill: var(--vert);  stroke: #fff; stroke-width: 1.5; }

/* =====================================================
   8. Bandeau chiffres
   ===================================================== */
.chiffres {
	margin-top: 80px;
	border-top: 1px solid var(--ligne);
	border-bottom: 1px solid var(--ligne);
	background: var(--blanc);
}
.chiffres .conteneur {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
}
.chiffre {
	position: relative;
	padding: 34px 26px;
	border-left: 1px solid var(--ligne);
}
.chiffre::before {
	content: "";
	position: absolute;
	top: 0; left: -1px;
	width: 18px; height: 2px;
	background: var(--vert);
}
.chiffre:first-child { border-left: none; }
.chiffre:first-child::before { left: 0; }
.chiffre b {
	display: block;
	font-family: var(--police-titres);
	font-weight: 600;
	font-size: clamp(1.5rem, 2.4vw, 2rem);
	color: var(--marine);
	font-variant-numeric: tabular-nums;
}
.chiffre b .unite { font-size: .55em; color: var(--vert-fonce); margin-left: .15em; }
.chiffre small {
	display: block;
	margin-top: 6px;
	font-size: .82rem;
	color: var(--gris);
	line-height: 1.45;
}

/* =====================================================
   9. Sections
   ===================================================== */
.section { padding: 110px 0; }
.tete-section { margin-bottom: 56px; }
.tete-section .sur-titre { margin-bottom: 20px; }

/* =====================================================
   10. Services
   ===================================================== */
.grille-services {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 22px;
}
.carte {
	display: block;
	text-decoration: none;
	color: inherit;
	background: var(--blanc);
	border: 1px solid var(--ligne);
	clip-path: polygon(0 0, calc(100% - var(--coupe)) 0, 100% var(--coupe), 100% 100%, 0 100%);
	padding: 34px 30px 38px;
	position: relative;
	overflow: hidden;
	transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
/* Amorces de visée aux deux coins non sectionnés */
.carte::after {
	content: "";
	position: absolute;
	inset: 10px;
	pointer-events: none;
	opacity: 0;
	background:
		linear-gradient(var(--vert), var(--vert)) top    left  / 15px 2px no-repeat,
		linear-gradient(var(--vert), var(--vert)) top    left  / 2px 15px no-repeat,
		linear-gradient(var(--vert), var(--vert)) bottom right / 15px 2px no-repeat,
		linear-gradient(var(--vert), var(--vert)) bottom right / 2px 15px no-repeat;
	transition: opacity .3s var(--ease);
}
.carte:hover {
	transform: translateY(-5px);
	border-color: var(--vert);
	box-shadow: 0 14px 34px rgba(31, 47, 70, .08);
}
.carte:hover::after { opacity: 1; }
.carte .ico {
	width: 46px; height: 46px;
	clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
	background: var(--vert-pale);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 24px;
}
.carte .ico svg {
	width: 24px; height: 24px;
	stroke: var(--vert-fonce);
	stroke-width: 2;
	fill: none;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.carte h3 { font-size: 1.1rem; margin-bottom: 12px; }
.carte p { font-size: .95rem; color: var(--gris); }
.carte .badge {
	display: inline-block;
	margin-top: 18px;
	font-size: .68rem;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--vert-texte);
	background: var(--vert-pale);
	padding: .45em .9em;
	border-radius: 2px;
}

/* =====================================================
   10bis. Jonction : logo complet en grand filigrane,
   entre Services et Méthode
   ===================================================== */
.jonction-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 6px 24px 20px;
	background: var(--fond);
}
.jonction-filigrane {
	width: min(86%, 920px);
	height: auto;
	opacity: .09;
	pointer-events: none;
	user-select: none;
}
@media (max-width: 700px) {
	.jonction-logo { padding: 4px 24px 16px; }
	.jonction-filigrane { width: 98%; opacity: .08; }
}

/* =====================================================
   11. Méthode
   ===================================================== */
.methode {
	background: var(--blanc);
	border-top: 1px solid var(--ligne);
	border-bottom: 1px solid var(--ligne);
}
.etapes {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0;
	border-left: 1px solid var(--ligne);
}
.etape {
	border-right: 1px solid var(--ligne);
	padding: 6px 26px 10px;
	position: relative;
}
.etape .num {
	font-family: var(--police-titres);
	font-size: .76rem;
	color: var(--vert-fonce);
	font-weight: 600;
	letter-spacing: .1em;
	font-variant-numeric: tabular-nums;
}
.etape h3 { font-size: 1rem; margin: 14px 0 10px; }
.etape p { font-size: .9rem; color: var(--gris); }
.etape .duree {
	display: block;
	margin-top: 16px;
	font-size: .72rem;
	font-weight: 500;
	color: var(--gris);
	letter-spacing: .08em;
	text-transform: uppercase;
}

/* =====================================================
   12. Indépendance (section marine)
   ===================================================== */
.indep {
	background: var(--bloc-marine);
	color: #fff;
	position: relative;
	overflow: hidden;
}
.indep::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	background-image: radial-gradient(rgba(255, 255, 255, .05) 1.5px, transparent 1.5px);
	background-size: 26px 26px;
	pointer-events: none;
}
/* Le carré pivoté du prototype devient le monogramme en filigrane */
.indep-filigrane {
	position: absolute;
	right: -60px; top: 50%;
	transform: translateY(-50%);
	width: 380px;
	opacity: .14;
	pointer-events: none;
	user-select: none;
}
.indep .conteneur { position: relative; z-index: 1; }
.indep .sur-titre { color: rgba(255, 255, 255, .55); }
.indep h2 { max-width: 16em; color: #fff; }
.indep h2 em { font-style: normal; color: var(--vert); }
.indep .colonnes {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 60px;
	margin-top: 54px;
}
.indep .colonnes p { color: rgba(255, 255, 255, .72); font-size: 1rem; }
.indep ul { list-style: none; display: grid; gap: 16px; }
.indep li {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	color: rgba(255, 255, 255, .85);
	font-size: .98rem;
}
.indep li svg {
	width: 20px; height: 20px;
	flex: none;
	margin-top: 3px;
	stroke: var(--vert);
	stroke-width: 2.5;
	fill: none;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* =====================================================
   12bis. FAQ
   ===================================================== */
.faq-section {
	background: var(--blanc);
	border-top: 1px solid var(--ligne);
	border-bottom: 1px solid var(--ligne);
}
.faq { max-width: 800px; margin: 0 auto; }
.faq details {
	position: relative;
	background: var(--fond);
	border: 1px solid var(--ligne);
	clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
	margin-bottom: 12px;
	transition: border-color .25s var(--ease);
}
.faq details[open] { border-color: var(--vert); }
.faq summary {
	cursor: pointer;
	list-style: none;
	font-weight: 600;
	color: var(--marine);
	padding: 18px 54px 18px 22px;
	position: relative;
	font-size: .97rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
	content: "";
	position: absolute;
	right: 22px; top: 50%;
	width: 13px; height: 8px;
	transform: translateY(-50%);
	background: no-repeat center / contain
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13 8'%3E%3Cpath d='M1 1l5.5 6L12 1' fill='none' stroke='%231F2F46' stroke-width='2'/%3E%3C/svg%3E");
	transition: transform .25s var(--ease);
}
[data-theme="sombre"] .faq summary::after {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13 8'%3E%3Cpath d='M1 1l5.5 6L12 1' fill='none' stroke='%23E9EEF5' stroke-width='2'/%3E%3C/svg%3E");
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(180deg); }
.faq details > div { padding: 0 22px 20px; }
.faq details > div p { font-size: .93rem; color: var(--gris); margin: 0; }

/* =====================================================
   13. Contact
   ===================================================== */
.contact .boite {
	background: var(--blanc);
	border: 1px solid var(--ligne);
	clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%);
	padding: clamp(36px, 6vw, 72px);
	display: grid;
	grid-template-columns: 1.2fr .8fr;
	gap: 60px;
	align-items: center;
}
.contact h2 { max-width: none; margin-top: 20px; }
.contact .lead { margin-top: 16px; }
.contact .heros-cta { margin-top: 30px; }
.contact .lateral {
	display: grid;
	gap: 22px;
	border-left: 1px solid var(--ligne);
	padding-left: 48px;
}
.contact .lateral small {
	display: block;
	font-size: .68rem;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--gris);
	margin-bottom: 5px;
}
.contact .lateral .grand {
	font-weight: 700;
	font-size: 1.1rem;
	letter-spacing: -.01em;
	transition: color .2s var(--ease);
}
.contact .lateral a.grand:hover { color: var(--vert-fonce); }

/* =====================================================
   13bis. Calculateur d'économies (section + modal)
   ===================================================== */
.calc-carte {
	max-width: 760px;
	margin: 0 auto;
	text-align: center;
	background: var(--blanc);
	border: 1px solid var(--ligne);
	clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%);
	padding: clamp(40px, 6vw, 64px) clamp(28px, 5vw, 64px);
}
.calc-carte .sur-titre { justify-content: center; }
.calc-carte h2 { margin-left: auto; margin-right: auto; }
.calc-carte h2.titre-souligne::after { margin-left: auto; margin-right: auto; }
.calc-carte .lead { margin: 0 auto 32px; }
.calc-note {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	margin: 20px 0 0;
	font-size: .82rem;
	color: var(--gris);
}
.calc-note svg { flex: none; color: var(--vert-fonce); }

.btn-vert-grand {
	background: var(--vert);
	color: var(--sur-vert);
	font-size: 1.02rem;
	padding: 1.05em 2.1em;
}
.btn-vert-grand:hover { background: var(--vert-fonce); color: var(--sur-vert); }

/* ---- Voile et fenêtre modale ---- */
.voile-calc {
	position: fixed;
	inset: 0;
	z-index: 300;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(10, 16, 26, .62);
	backdrop-filter: blur(5px);
	-webkit-backdrop-filter: blur(5px);
}
.voile-calc[hidden] { display: none; }

.modal-calc {
	position: relative;
	width: 100%;
	max-width: 560px;
	max-height: 90vh;
	overflow-y: auto;
	background: var(--blanc);
	clip-path: polygon(0 0, calc(100% - var(--coupe)) 0, 100% var(--coupe), 100% 100%, 0 100%);
	padding: 36px 34px 32px;
	box-shadow: 0 30px 70px rgba(5, 10, 20, .35);
	animation: calc-apparition .35s var(--ease);
}
@keyframes calc-apparition {
	from { opacity: 0; transform: translateY(14px) scale(.98); }
	to   { opacity: 1; transform: none; }
}

.calc-fermer {
	position: absolute;
	top: 14px; right: 14px;
	width: 36px; height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	background: transparent;
	color: var(--gris);
	cursor: pointer;
	border-radius: 50%;
	transition: background .2s var(--ease), color .2s var(--ease);
}
.calc-fermer:hover { background: var(--fond); color: var(--marine); }
.calc-fermer svg { width: 17px; height: 17px; }

/* ---- Progression ---- */
.calc-progression {
	height: 4px;
	background: var(--ligne);
	border-radius: 2px;
	overflow: hidden;
	margin-right: 40px;
}
.calc-progression-remplie {
	display: block;
	height: 100%;
	width: 25%;
	background: var(--vert);
	transition: width .4s var(--ease);
}
.calc-etape-num {
	margin: 10px 0 0;
	font-size: .7rem;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--gris);
}

/* ---- Étapes du formulaire ---- */
.calc-etape { border: none; padding: 26px 0 0; margin: 0; }
@keyframes calc-etape-in {
	from { opacity: 0; transform: translateX(16px); }
	to   { opacity: 1; transform: none; }
}
.calc-etape:not([hidden]) { animation: calc-etape-in .4s var(--ease); }

.calc-etape legend { padding: 0; width: 100%; float: none; }
.calc-etape legend > span:first-child {
	display: block;
	font-family: var(--police-titres);
	font-size: 1.18rem;
	font-weight: 600;
	color: var(--marine);
	line-height: 1.3;
}
.calc-souslegende {
	display: block;
	margin-top: 7px;
	font-family: var(--police-texte);
	font-size: .86rem;
	font-weight: 400;
	color: var(--gris);
}

/* Cartes de choix (chauffage) */
.calc-choix {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-top: 22px;
}
@media (max-width: 420px) { .calc-choix { grid-template-columns: 1fr; } }
.calc-carte-choix { position: relative; }
.calc-carte-choix input {
	position: absolute;
	inset: 0;
	opacity: 0;
	margin: 0;
	cursor: pointer;
}
.calc-carte-choix span {
	display: block;
	padding: 14px 12px;
	border: 1px solid var(--ligne);
	border-radius: 8px;
	font-size: .92rem;
	font-weight: 500;
	color: var(--marine);
	text-align: center;
	transition: border-color .2s var(--ease), background .2s var(--ease);
}
.calc-carte-choix input:checked + span {
	border-color: var(--vert);
	background: var(--vert-pale);
	font-weight: 600;
}
.calc-carte-choix input:focus-visible + span {
	outline: 2px solid var(--vert);
	outline-offset: 2px;
}

/* Bascule d'unité (CHF / kWh) */
.calc-unite {
	display: inline-flex;
	gap: 4px;
	margin: 22px 0 4px;
	padding: 4px;
	background: var(--fond);
	border-radius: 8px;
}
.calc-unite label { position: relative; }
.calc-unite input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.calc-unite span {
	display: block;
	padding: 8px 22px;
	border-radius: 6px;
	font-size: .85rem;
	font-weight: 600;
	color: var(--gris);
	transition: background .2s var(--ease), color .2s var(--ease);
}
.calc-unite input:checked + span { background: var(--vert); color: var(--sur-vert); }
.calc-unite input:focus-visible + span { outline: 2px solid var(--vert); outline-offset: 2px; }

/* Champs texte */
.calc-label {
	display: block;
	font-size: .8rem;
	font-weight: 600;
	color: var(--gris);
	margin: 18px 0 6px;
}
.calc-input {
	width: 100%;
	font-family: var(--police-texte);
	font-size: 1rem;
	color: var(--marine);
	padding: 13px 14px;
	border: 1px solid var(--ligne);
	border-radius: 8px;
	background: var(--fond);
	transition: border-color .2s var(--ease), background .2s var(--ease);
}
.calc-input:focus { outline: none; border-color: var(--vert); background: var(--blanc); }

.calc-erreur {
	margin: 16px 0 0;
	font-size: .85rem;
	font-weight: 600;
	color: #C0392B;
}
[data-theme="sombre"] .calc-erreur { color: #FF7A6E; }

.calc-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 28px;
}
#calcSuivant, #calcEnvoyer { margin-left: auto; }
#calcEnvoyer:not([hidden]) { animation: calc-etape-in .35s var(--ease); }

/* ---- Écran de confirmation ---- */
.calc-succes { text-align: center; padding: 8px 4px 4px; }
.calc-succes svg { width: 50px; height: 50px; color: var(--vert-fonce); margin: 0 auto 18px; }
.calc-succes h3 {
	font-family: var(--police-titres);
	font-size: 1.25rem;
	margin-bottom: 12px;
}
.calc-succes p {
	color: var(--gris);
	font-size: .95rem;
	max-width: 38ch;
	margin: 0 auto 10px;
}
.calc-succes .btn { margin-top: 16px; }

@media (max-width: 560px) {
	.modal-calc { padding: 30px 22px 26px; }
}

/* ---- Modal compact (pré-visite / e-mail), un seul écran ---- */
.modal-compacte { max-width: 460px; }
.modal-compacte .sur-titre { margin-bottom: 6px; }
.titre-modal {
	font-family: var(--police-titres);
	font-size: 1.24rem;
	font-weight: 600;
	color: var(--marine);
	margin: 2px 0 8px;
}
.modal-compacte .calc-souslegende { display: block; margin-bottom: 6px; }
.modal-compacte form { margin-top: 18px; }
.calc-actions-fin { justify-content: flex-end; margin-top: 22px; }

/* ---- Témoin flottant : copier le numéro ---- */
.toast-tel {
	position: fixed;
	left: 50%;
	bottom: 26px;
	z-index: 400;
	display: flex;
	align-items: center;
	gap: 14px;
	background: var(--marine);
	color: #fff;
	padding: 13px 16px 13px 20px;
	border-radius: 8px;
	box-shadow: 0 16px 38px rgba(5, 10, 20, .32);
	font-size: .88rem;
	opacity: 0;
	transform: translate(-50%, 10px);
	transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.toast-tel[hidden] { display: none; }
.toast-tel.visible { opacity: 1; transform: translate(-50%, 0); }
.toast-tel button {
	background: var(--vert);
	color: var(--sur-vert);
	border: none;
	font-family: var(--police-texte);
	font-weight: 600;
	font-size: .84rem;
	padding: 8px 14px;
	border-radius: 6px;
	cursor: pointer;
	white-space: nowrap;
	transition: background .2s var(--ease);
}
.toast-tel button:hover { background: var(--vert-fonce); }
@media (max-width: 480px) {
	.toast-tel { left: 16px; right: 16px; transform: translateY(10px); flex-wrap: wrap; }
	.toast-tel.visible { transform: translateY(0); }
}


.pied {
	background: var(--marine-2);
	color: rgba(255, 255, 255, .7);
	padding: 56px 0 40px;
	font-size: .9rem;
}
.pied .haut {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 40px;
	flex-wrap: wrap;
	padding-bottom: 36px;
	margin-bottom: 28px;
	border-bottom: 1px solid var(--ligne-sombre);
}
.pied img.logo-pied { width: 190px; }
.pied nav { display: flex; gap: 28px; flex-wrap: wrap; }
.pied nav a { transition: color .2s var(--ease); }
.pied nav a:hover { color: var(--vert); }
.pied .bas {
	display: flex;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
	font-size: .8rem;
	color: rgba(255, 255, 255, .45);
}

/* =====================================================
   15. Révélations au défilement (avec repli sans JS)
   ===================================================== */
.js .reveal {
	opacity: 0;
	transform: translateY(26px);
	transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .08s; }
.js .reveal.d2 { transition-delay: .16s; }
.js .reveal.d3 { transition-delay: .24s; }

/* =====================================================
   16. Pages internes
   ===================================================== */
.page-interne { padding: 140px 0 90px; }
.page-interne .contenu { max-width: 760px; }
.page-interne h1 { margin-bottom: 30px; font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.page-interne h2 { margin-top: 40px; }
.page-interne p { margin-bottom: 1em; }

/* =====================================================
   17. Responsive
   ===================================================== */
@media (max-width: 960px) {
	.grille-services { grid-template-columns: 1fr 1fr; }
	.etapes { grid-template-columns: 1fr 1fr; border-top: 1px solid var(--ligne); }
	.etape { padding: 24px 26px; border-bottom: 1px solid var(--ligne); }
	.chiffres .conteneur { grid-template-columns: 1fr 1fr; }
	.chiffre:nth-child(3) { border-left: none; }
	.indep .colonnes { grid-template-columns: 1fr; gap: 36px; }
	.indep-filigrane { width: 300px; right: -100px; opacity: .12; }
	.contact .boite { grid-template-columns: 1fr; gap: 40px; }
	.contact .lateral { border-left: none; padding-left: 0; border-top: 1px solid var(--ligne); padding-top: 36px; }
}
@media (max-width: 700px) {
	/* Le SVG de la courbe est ~2,3× plus petit sur mobile :
	   on grossit ses textes d'autant pour rester lisible */
	.etiquette-eco { font-size: 22px; }
	#pct-eco { font-size: 54px; }
	.courbe-svg .etiquette { font-size: 15px; }
	.nav-liens { display: none; }
	.entete .btn { display: none; }
	.burger { display: block; }
	.section { padding: 80px 0; }
	.heros { padding-top: 120px; }
	.grille-services { grid-template-columns: 1fr; }
	.etapes { grid-template-columns: 1fr; }
	.chiffres .conteneur { grid-template-columns: 1fr 1fr; }
	.chiffre { padding: 24px 18px; }
}

/* =====================================================
   18. Mouvement réduit
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
	.js .reveal { opacity: 1; transform: none; }
	.js .courbe-svg .ligne-grille,
	.js .courbe-svg .etiquette,
	.js #trace-actuelle,
	.js #trace-optimisee,
	.js #zone-economies { opacity: 1; }
	.js .etiquette-eco { opacity: 1; transform: none; }
}
