/* ============================================================
   DELTEA · Composants canon V6 — Partie 1/2
   Cartes verre, Bouton B2, Coches sections, Dividers
   Valeurs FIGE d'AGENTS.md — zéro invention
   ============================================================ */

/* ============================================================
   1. CARTES VERRE (FIGE)
   Structure : .carte-bord > 4x .coche + .carte-verre > .carte-voile + .carte-cadre
   AUCUN lisere, AUCUNE bordure, AUCUNE ombre de pourtour.
   ============================================================ */

.carte-bord {
	position: relative;
	border-radius: var(--rayon-controle);
	overflow: visible; /* les coches depassent */
}

/* --- Coches cartes : 4x16px L-shape, un par coin --- */

.carte-bord .coche {
	position: absolute;
	width: 16px;
	height: 16px;
	border: 0 solid var(--sauge);
	z-index: 10;
	pointer-events: none;
}

.carte-bord .coche[data-coin="tl"] { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.carte-bord .coche[data-coin="tr"] { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.carte-bord .coche[data-coin="bl"] { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.carte-bord .coche[data-coin="br"] { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }

/* Variante inline */
.carte-bord--inline { display: inline-block; }

/* --- Verre sombre (defaut) --- */

.carte-verre {
	position: relative;
	z-index: 1;
	background: linear-gradient(135deg, rgba(242,240,235,.05), rgba(5,8,16,.12) 40%, rgba(20,25,32,.07) 70%, transparent);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	box-shadow: none !important;
}

/* --- Voile grain : SVG feTurbulence, tuile 160x160 --- */

.carte-voile {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border-radius: var(--rayon-controle);
	pointer-events: none;
	z-index: 1;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.04'/%3E%3C/svg%3E");
	animation: 	carteRespire 3s infinite ease-in-out;
}

@keyframes carteRespire {
  0% { opacity: 0.65; }
  50% { opacity: 1; }
  100% { opacity: 0.65; }
}

@media (prefers-reduced-motion: reduce) {
	.carte-voile { animation: none; opacity: .8; }
}

/* --- Cadre contenu : z-index au-dessus du grain --- */

.carte-cadre {
	position: relative;
	z-index: 2;
	padding: var(--esp-md);
}

/* ============================================================
   2. BOUTON B2 (FIGE) — .btn-v3 / .btn-v3--sauge
   Unique CTA du site. Ne plus toucher.
   ============================================================ */

.btn-v3 {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 40px;
	width: 150px;
	padding: 0 var(--esp-sm);
	font-family: 'General Sans', sans-serif;
	font-size: 14px;
	line-height: 1;
	border-radius: var(--rayon-controle);
	transition: all var(--easing-doux);
	cursor: pointer;
	text-decoration: none;
	overflow: hidden;
	box-shadow: 0 0 6px 0 rgba(95, 118, 106, 0.4);
}

.btn-v3:hover,
.btn-v3:focus-visible {
	transform: scale(1.02);
	filter: brightness(1.1);
	outline: none;
}

/* --- Variante Sauge (aplat + bordure conique animee ~6s) --- */

.btn-v3--sauge {
	background-color: var(--sauge);
	color: var(--blanc-forge);
	border: 2px solid transparent; /* reserve a la bordure conique pseudo */
}

/* Bordure conique animee en ::before */
.btn-v3--sauge::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: var(--rayon-controle);
	background: conic-gradient(from var(--angle, 0deg), transparent 0%, var(--sauge) 10%, transparent 20%);
	z-index: -1;
	animation: rotationConique 6s linear infinite;
}

@property --angle {
	syntax: '<angle>';
	initial-value: 0deg;
	inherits: false;
}

@keyframes rotationConique {
	to { --angle: 360deg; }
}

/* Reflet shine ~3s */
.btn-v3--sauge::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .15), transparent);
	animation: shineBalis 1.5s ease-in-out infinite;
}

@keyframes shineBalis {
	0%   { left: -60%; }
	80%  { left: 100%; }
	100% { left: 100%; }
}

/* Halo Sauge pulsant (alpha seule, jamais d'etalement plein) */
.btn-v3--sauge:hover,
.btn-v3--sauge:focus-visible {
	box-shadow: 0 0 12px 0 color-mix(in srgb, var(--sauge) 40%, transparent);
}

/* Zone tactile >=44px via ::after transparent */
.btn-v3--sauge .btn-v3__hitarea {
	position: absolute;
	inset: -2px; /* +2px de chaque cote = 44px min sur 40px */
	border-radius: calc(var(--rayon-controle) + 2px);
}

/* ============================================================
   3. COCHES SECTIONS : 2 opposees, 30px
   (Distinctes des coches cartes 18px)
   ============================================================ */

.section-coche {
	position: absolute;
	width: 30px;
	height: 30px;
	border-color: var(--hairline);
	border-style: solid;
}

/* Variante haut-gauche / bas-droite */
.section-coche--hg { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.section-coche--bd { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }

/* Variante haut-droite / bas-gauche */
.section-coche--hd { top: -1px; right: -1px; border-width: 1px 1px 0 0; }
.section-coche--bg { bottom: -1px; left: -1px; border-width: 0 0 1px 1px; }

/* ============================================================
   4. DIVIDERS — defaut D1 = hairline couture 1px
   Jamais de vague/courbe. data-divider pour variantes.
   ============================================================ */

.divider {
	border: none;
	height: 1px;
	background-color: var(--hairline); /* ~8% sombre / ~10% clair via token */
	width: 100%;
}

/* Variante avec marge laterale */
[data-divider="narrow"] .divider,
.divider--narrow {
	max-width: var(--lecture);
	margin-left: auto;
	margin-right: auto;
}

/* ============================================================
   5. HEADER — .site-header (sticky) > .site-nav + .btn-v3--sauge
   html.header--hidden masque au scroll bas.
   ============================================================ */

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background-color: var(--bg);
	padding-top: 1rem;
	transition: transform 0.4s var(--easing-doux), opacity 0.4s var(--easing-doux);
}

html.header--hidden .site-header {
	transform: translateY(-100%);
	opacity: 0;
	pointer-events: none;
}

.site-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem var(--esp-md);
	max-width: var(--large);
	margin-left: auto;
	margin-right: auto;
	height: 72px;
}

.site-header .btn-v3 {
	display: none;
}

@media (min-width: 1280px) {
	.site-header .btn-v3 {
		display: inline-flex;
	}
}

.site-nav__links {
	display: flex;
	gap: var(--esp-sm);
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-nav__logo {
	display: flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	color: inherit;
	margin: 0;
	padding: 0;
}

.site-nav__logo img {
	height: 48px;
	width: auto;
}

.site-nav__links {
	display: none; /* mobile : cache, drawer */
	list-style: none;
	gap: var(--esp-md);
	margin: 0;
	padding: 0;
}

@media (min-width: 1280px) {
	.site-nav__links {
		display: flex;
	}
}

@media (min-width: 1280px) {
	.site-nav__burger {
		display: none !important;
	}
}

.site-nav__links a {
	font-family: 'General Sans', sans-serif;
	font-size: var(--typo-sm);
	color: var(--ink-2);
	text-decoration: none;
	transition: color 0.2s var(--easing-doux);
}

.site-nav__links a:hover,
.site-nav__links a:focus-visible {
	color: var(--ink);
}

/* Burger mobile */
.site-nav__burger {
	display: flex;
	flex-direction: column;
	gap: 5px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
	min-width: 44px;
	min-height: 44px;
	align-items: center;
	justify-content: center;
}

.site-nav__burger span {
	display: block;
	width: 20px;
	height: 1.5px;
	background-color: var(--ink);
	transition: transform 0.3s var(--easing-doux), opacity 0.3s var(--easing-doux);
}

/* Barre de progression 2px Sauge */
.barre-progression {
	position: absolute;
	bottom: 0;
	left: 0;
	height: 2px;
	width: 0%;
	background-color: var(--sauge);
	transition: width 0.15s linear;
}

/* ============================================================
   6. DRAWER MOBILE (FIGE) — plein ecran, role="dialog"
   ============================================================ */

.drawer {
	position: fixed;
	inset: 0;
	z-index: 200;
	background-color: var(--bg);
	display: flex;
	flex-direction: column;
	padding: var(--esp-md);
	overflow-y: auto;
}

.drawer[hidden] {
	display: none;
}

/* Overlay */
.drawer__overlay {
	position: absolute;
	inset: 0;
	z-index: -1;
	background-color: rgba(5, 8, 16, .6);
}

/* Retour — fleche 1px, PAS de croix */
.drawer__retour {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: none;
	border: none;
	cursor: pointer;
	padding: var(--esp-xs) 0;
	color: var(--ink);
	font-family: 'General Sans', sans-serif;
	font-size: var(--typo-sm);
	margin-bottom: var(--esp-lg);
}

.drawer__retour::before {
	content: '';
	display: inline-block;
	width: 12px;
	height: 1.5px;
	background-color: var(--ink);
	transform: rotate(180deg);
	position: relative;
}

.drawer__retour::after {
	content: '';
	display: inline-block;
	width: 0;
	height: 0;
	border-top: 6px solid transparent;
	border-bottom: 6px solid transparent;
	border-right: 8px solid var(--ink);
	transform: rotate(180deg);
	margin-left: -4px;
}

/* Index numerote */
.drawer__index {
	list-style: none;
	padding: 0;
	margin: 0;
	counter-reset: drawer-index;
}

.drawer__index li {
	counter-increment: drawer-index;
	border-bottom: 1px solid var(--hairline);
}

.drawer__index a {
	display: flex;
	align-items: center;
	gap: var(--esp-sm);
	padding: var(--esp-md) 0;
	text-decoration: none;
	color: var(--ink-2);
	font-family: 'General Sans', sans-serif;
	font-size: var(--typo-lg);
	transition: color 0.2s var(--easing-doux);
}

.drawer__index a:hover,
.drawer__index a:focus-visible {
	color: var(--ink);
}

.drawer__index li::before {
	content: counter(drawer-index, decimal-leading-zero) ' · ';
	font-family: 'Space Mono', monospace;
	font-size: var(--typo-xs);
	color: var(--sauge);
	white-space: nowrap;
}

/* ============================================================
   7. FAQ — accordeon natif details > summary, chevron maison
   ============================================================ */

.faq {
	list-style: none;
	padding: 0;
	margin: 0;
}

.faq details {
	border-bottom: 1px solid var(--hairline);
}

.faq details:first-child {
	border-top: 1px solid var(--hairline);
}

.faq summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--esp-sm);
	padding: var(--esp-md) 0;
	cursor: pointer;
	list-style: none;
	font-family: 'General Sans', sans-serif;
	font-size: var(--typo-base);
	color: var(--ink);
	line-height: 1.4;
}

.faq summary::-webkit-details-marker {
	display: none;
}

/* Chevron maison */
.faq summary::after {
	content: '';
	flex-shrink: 0;
	width: 12px;
	height: 12px;
	border-right: 1.5px solid var(--ink-2);
	border-bottom: 1.5px solid var(--ink-2);
	transform: rotate(45deg);
	transition: transform 0.3s var(--easing-doux);
}

.faq details[open] summary::after {
	transform: rotate(-45deg);
}

.faq details p {
	padding-bottom: var(--esp-md);
	color: var(--ink-2);
	line-height: 1.6;
}

/* ============================================================
   8. TIMELINE METHODE — scroll-snap horizontal mobile
   5 etapes : Auditer, Cadrer, Structurer, Deployer, Copiloter
   ============================================================ */

.timeline-methode {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	gap: var(--esp-md);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	padding-bottom: var(--esp-sm);
}

.timeline-methode::-webkit-scrollbar {
	height: 4px;
}

.timeline-methode::-webkit-scrollbar-track {
	background: var(--bg-surface);
	border-radius: 2px;
}

.timeline-methode::-webkit-scrollbar-thumb {
	background: var(--ardoise);
	border-radius: 2px;
}

.timeline-methode li {
	flex: 0 0 auto;
	width: min(85vw, 320px);
	scroll-snap-align: start;
}

.timeline-methode__etape {
	position: relative;
	padding: var(--esp-md);
}

.timeline-methode__numero {
	font-family: 'Space Mono', monospace;
	font-size: var(--typo-xs);
	color: var(--sauge);
	margin-bottom: var(--esp-xs);
}

.timeline-methode__verbe {
	font-family: 'Clash Display', sans-serif;
	font-size: var(--typo-xl);
	font-weight: 600;
	line-height: 1.2;
	color: var(--ink);
	margin-bottom: var(--esp-xs);
}

.timeline-methode__desc {
	font-size: var(--typo-sm);
	color: var(--ink-2);
	line-height: 1.5;
}

/* Emplacement SIGNE:timeline-methode */
.timeline-methode__signe {
	width: 100%;
	max-width: 320px;
	margin-top: var(--esp-md);
}

.timeline-methode__signe img,
.timeline-methode__signe svg {
	width: 100%;
	height: auto;
	display: block;
}

/* ============================================================
   9. SCHEMA — figure reservee, width/height explicites (anti-CLS)
   Emplacement SCHEMA:* via deltea-identite (etape 5)
   ============================================================ */

.schema {
	margin: var(--esp-lg) 0;
}

.schema[data-ratio="16:9"] {
	position: relative;
	width: 100%;
	padding-top: calc(100% / (16 / 9));
	background-color: var(--bg-surface);
	border-radius: var(--rayon-controle);
}

.schema[data-ratio="4:3"] {
	position: relative;
	width: 100%;
	padding-top: calc(100% / (4 / 3));
	background-color: var(--bg-surface);
	border-radius: var(--rayon-controle);
}

.schema[data-ratio="1:1"] {
	position: relative;
	width: 100%;
	padding-top: 100%;
	background-color: var(--bg-surface);
	border-radius: var(--rayon-controle);
}

.schema__contenu {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--esp-md);
}

.schema__legende {
	font-family: 'Space Mono', monospace;
	font-size: var(--typo-xs);
	color: var(--ink-2);
	text-align: center;
	margin-top: var(--esp-xs);
}

/* ============================================================
   10. OBSERVATOIRE — formulaire emailing
   ============================================================ */

.observatoire {
	padding: var(--esp-xl) 0;
}

.observatoire__form {
	display: flex;
	flex-direction: column;
	gap: var(--esp-sm);
	max-width: var(--lecture);
	margin: 0 auto;
}

.observatoire__input {
	width: 100%;
	padding: var(--esp-xs) var(--esp-sm);
	background-color: var(--bg-surface);
	color: var(--ink);
	border: 1px solid var(--hairline);
	border-radius: var(--rayon-controle);
	font-family: 'General Sans', sans-serif;
	font-size: var(--typo-base);
	transition: border-color 0.2s var(--easing-doux);
}

.observatoire__input:focus {
	outline: none;
	border-color: var(--sauge);
}

.observatoire__btn {
	align-self: flex-start;
}

/* ============================================================
   11. FOOTER — .site-footer : refonte premium complete (spec §2.0/§2.1)
   ============================================================ */

.site-footer {
	background-color: var(--bg-surface);
	padding: 4rem 0 2rem;
	border-top: 1px solid rgba(242,240,235,0.05);
	margin-top: var(--esp-xl);
}

/* Branding centre (logo + baseline + contacts) */

.site-footer-brand {
	text-align: center;
	max-width: var(--large);
	margin-left: auto;
	margin-right: auto;
	padding-bottom: 3rem;
}

.site-footer-brand img {
	height: 44px;
	width: auto;
	display: block;
	margin: 0 auto;
}

.site-footer-brand p {
	color: var(--ardoise);
	line-height: 1.6;
	font-size: 0.9rem;
	max-width: 280px;
	margin: 1.5rem auto;
}

.site-footer-contacts {
	display: flex;
	gap: 1.5rem;
	justify-content: center;
	flex-wrap: wrap;
}

/* Grille colonnes */

.site-footer-grid {
	display: grid;
	gap: 2rem;
	grid-template-columns: 1fr;
	max-width: var(--large);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--esp-sm);
	padding-right: var(--esp-sm);
	margin-bottom: 3rem;
}

@media (min-width: 1280px) {
	.site-footer-grid {
		grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
		gap: 3rem;
	}
}

.site-footer-col h4 {
	color: var(--blanc-forge);
	font-size: 0.8rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	margin-bottom: 1.5rem;
}

.site-footer-col a {
	color: var(--ardoise);
	text-decoration: none;
	transition: color var(--easing-doux);
	display: block;
	margin-bottom: 0.75rem;
	font-size: 0.9rem;
}

.site-footer-col a:hover {
	color: var(--sauge);
}

/* Legal */
.footer-legal {
	max-width: var(--large);
	margin-left: auto;
	margin-right: auto;
	padding: var(--esp-sm) var(--esp-sm) 0;
	text-align: center;
}

.footer-legal p {
	font-size: var(--typo-xxs);
	color: var(--ardoise);
	line-height: 1.5;
	opacity: 0.7;
}

.footer-legal a {
	color: var(--ardoise);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color 0.25s var(--easing-doux);
}

.footer-legal a:hover,
.footer-legal a:focus-visible {
	color: var(--blanc-forge);
}

/* ============================================================
   FOOTER PREMIUM — ecrase total styles precedents (spec finitions)
   ============================================================ */

.site-footer { padding: 2rem 0 1rem; border-top: 1px solid rgba(242,240,235,0.05); }
.site-footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; margin-bottom: 2rem; }
@media (min-width: 1280px) { .site-footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; gap: 2rem; } }
.site-footer h4 { color: var(--blanc-forge); font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 1.5rem; }
.site-footer a { color: var(--ardoise); text-decoration: none; transition: color var(--easing-doux); margin-bottom: 0.75rem; font-size: 0.9rem; }
.site-footer a:hover { color: var(--sauge); }
.site-footer-bottom { padding-top: 1rem; border-top: 1px solid rgba(242,240,235,0.05); text-align: center; }
.footer-col-logo img { height: 48px !important; width: auto !important; }
.footer-baseline { font-size: 1.05rem; color: var(--blanc-forge); font-weight: 500; margin-bottom: 1rem; }
.footer-contacts { display: flex; justify-content: center; gap: 2rem; margin-bottom: 1.5rem; }
.footer-contacts a { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--sauge); font-weight: 500; margin-bottom: 0; }
.footer-contacts a[href^="mailto"] { display: inline !important; pointer-events: auto !important; }
.footer-copyright { color: var(--ardoise); font-size: 0.8rem; opacity: 0.7; }

/* ============================================================
   GLOSSAIRE — design spec
   ============================================================ */

.glossaire-terme { color: inherit; font-weight: 600; text-decoration: underline dotted 1px; text-underline-offset: 4px; cursor: help; transition: color var(--easing-doux); }
.glossaire-terme:hover { color: var(--sauge); }

/* ============================================================
   FOOTER CONTRASTE — lisibilite spec finitions
   ============================================================ */

.site-footer a, .footer-copyright, .footer-baseline { color: rgba(242, 240, 235, 0.75) !important; }
.footer-contacts a { text-decoration: underline dotted 1px !important; text-underline-offset: 4px; }

/* ============================================================
   GLOSSAIRE POPOVER — etat actif spec
   ============================================================ */

.glossaire-popover { display: none; opacity: 0; position: absolute; z-index: 1100; background: var(--graphite-profond); padding: 1rem; border-radius: var(--rayon-controle); border: 1px solid rgba(242,240,235,0.1); }
.glossaire-popover.is-active { display: block !important; opacity: 1 !important; visibility: visible !important; }
