/*
 * components.css — Composants UI réutilisables.
 * Ordre : boutons → navigation → header actions → cards → badges →
 *         qualifs-bar → cookie banner → breadcrumb → formulaires → hero →
 *         blocs génériques.
 */

/* ════════════════════════════════════════════════════════════════════
 * BOUTONS
 * ════════════════════════════════════════════════════════════════════ */

.btn {
	display:         inline-flex;
	align-items:     center;
	justify-content: center;
	gap:             var(--space-2);
	padding:         0.625rem 1.25rem;       /* 10px 20px */
	font-size:       var(--text-sm);
	font-weight:     var(--fw-semi);
	line-height:     1;
	border-radius:   var(--radius-sm);
	border:          2px solid transparent;
	text-decoration: none;
	white-space:     nowrap;
	cursor:          pointer;
	/* Annule explicitement la couleur bleue des liens génériques sur les <a class="btn"> */
	color:           var(--fg);
	transition:      background-color var(--transition),
	                 color            var(--transition),
	                 border-color     var(--transition),
	                 box-shadow       var(--transition);
}

.btn:focus-visible {
	outline:        2px solid var(--bw-blue);
	outline-offset: 2px;
}

.btn:disabled,
.btn[aria-disabled="true"] {
	opacity: 0.5;
	cursor:  not-allowed;
	pointer-events: none;
}

/* ── btn-primary — Signature rouge Brightway ─────────────────────── */

.btn-primary {
	background:     var(--accent);
	color:          #fff;
	border-color:   var(--accent);
	letter-spacing: 0.02em;                                      /* P10 core */
	box-shadow:     inset 0 0 0 1px rgba(255, 255, 255, 0.18);   /* E4 hairline */
}

.btn-primary:hover,
.btn-primary:focus-visible {
	background:   var(--accent-hover);
	border-color: var(--accent-hover);
	color:        #fff;
	box-shadow:   inset 0 0 0 1px rgba(255, 255, 255, 0.28);     /* E4 hover variant */
}

.btn-primary:active {
	background: var(--bw-red-hover);
}

/* ── btn-secondary — Contour, pas de fond ────────────────────────── */

.btn-secondary {
	background:   transparent;
	color:        var(--accent);
	border-color: var(--accent);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
	background:   var(--bw-red-light);
	color:        var(--accent-hover);
	border-color: var(--accent-hover);
}

[data-theme="dark"] .btn-secondary:hover {
	background: rgba(255, 82, 71, 0.12);
}

/* ── btn-ghost — Texte seul, effet discret ───────────────────────── */

.btn-ghost {
	background:   transparent;
	color:        var(--fg-muted);
	border-color: transparent;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
	background: var(--surface);
	color:      var(--fg);
}

/* ── btn-neutral — Contour gris (non-CTA, ex: cookie banner) ─────── */

.btn-neutral {
	background:   transparent;
	color:        var(--fg-muted);
	border-color: var(--border);
}

.btn-neutral:hover,
.btn-neutral:focus-visible {
	background:   var(--surface);
	color:        var(--fg);
	border-color: var(--bw-gray-dark);
}

/* ── Tailles ─────────────────────────────────────────────────────── */

.btn-sm {
	padding:   0.375rem 0.875rem;
	font-size: var(--text-xs);
}

.btn-lg {
	padding:   0.875rem 1.75rem;
	font-size: var(--text-base);
}

.btn-full {
	width:           100%;
	justify-content: center;
}

/* ── État loading ────────────────────────────────────────────────── */

.btn.is-loading {
	position: relative;
	color:    transparent;
	pointer-events: none;
}

.btn.is-loading::after {
	content:      '';
	position:     absolute;
	width:        16px;
	height:       16px;
	border:       2px solid currentColor;
	border-top-color: transparent;
	border-radius: 50%;
	animation:    bw-spin 0.6s linear infinite;
}

@keyframes bw-spin {
	to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	.btn.is-loading::after { animation: none; }
}

/* ════════════════════════════════════════════════════════════════════
 * NAVIGATION PRINCIPALE
 * Cibles : sortie réelle de wp_nav_menu() avec menu_class="primary-nav__list"
 *   <ul class="primary-nav__list">
 *     <li class="menu-item [menu-item-has-children] [current-menu-item] [nav-cta]">
 *       <a href="…">Label</a>
 *       <button class="dropdown-toggle">…</button>  ← injecté par nav.js
 *       <ul class="sub-menu" hidden>…</ul>
 *     </li>
 *   </ul>
 * ════════════════════════════════════════════════════════════════════ */

/* ── Conteneur desktop ───────────────────────────────────────────── */

.primary-nav {
	display:     flex;
	align-items: center;
}

/* Reset liste */
.primary-nav__list {
	display:     flex;
	align-items: center;
	gap:         var(--space-1);
	list-style:  none;
	margin:      0;
	padding:     0;
}

/* ── Items de premier niveau ─────────────────────────────────────── */

.primary-nav__list > .menu-item {
	position:    relative;
	flex-shrink: 0;
}

/*
 * Items avec sous-menu : flex pour aligner lien + .dropdown-toggle
 * sur la même ligne. flex-wrap est appliqué uniquement en mobile
 * (cf. @media max-width: 1023px) pour permettre au .sub-menu en
 * position:static de basculer sous le lien+bouton dans le drawer.
 * En desktop, le sub-menu est en position:absolute → flex-wrap
 * provoquait le retour à la ligne du chevron quand l'item rétrécissait.
 */
.primary-nav__list > .menu-item-has-children {
	display:     flex;
	align-items: center;
}

.primary-nav__list > .menu-item-has-children > a {
	flex: 1;
}

.primary-nav__list > .menu-item > a {
	display:         block;
	padding:         var(--space-2);
	font-size:       var(--text-sm);
	font-weight:     var(--fw-medium);
	color:           var(--fg-muted);
	border-radius:   var(--radius-sm);
	text-decoration: none;
	white-space:     nowrap;
	transition:      color var(--transition), background-color var(--transition);
}

.primary-nav__list > .menu-item > a:hover,
.primary-nav__list > .menu-item > a:focus-visible,
.primary-nav__list > .menu-item.current-menu-item > a,
.primary-nav__list > .menu-item.current-menu-ancestor > a {
	color:      var(--fg);
	background: var(--surface);
}

.primary-nav__list > .menu-item.current-menu-item > a {
	color: var(--accent);
}

/* ── Label non-cliquable (ex: "Pour qui ?") ─────────────────────── */

.primary-nav__list > .menu-item.is-label > a {
	cursor:         default;
	pointer-events: none;
	color:          var(--fg-muted);
}

/* ── Bouton dropdown (injecté par nav.js) ────────────────────────── */

.dropdown-toggle {
	display:          inline-flex;
	align-items:      center;
	justify-content:  center;
	width:            26px;
	height:           26px;
	margin-left:      -6px;
	padding:          0;
	background:       none;
	border:           none;
	cursor:           pointer;
	color:            var(--fg-muted);
	border-radius:    var(--radius-sm);
	vertical-align:   middle;
	transition:       color var(--transition), background-color var(--transition);
}

.dropdown-toggle:hover,
.dropdown-toggle:focus-visible {
	background: var(--surface);
	color:      var(--fg);
}

.dropdown-toggle svg {
	display:    block;
	transition: transform var(--transition);
	pointer-events: none;
}

.dropdown-toggle[aria-expanded="true"] svg {
	transform: rotate(180deg);
}

/* ── Sous-menus (dropdowns) ──────────────────────────────────────── */

.primary-nav__list > .menu-item > .sub-menu {
	position:      absolute;
	top:           calc(100% + var(--space-2));
	left:          0;
	min-width:     220px;
	list-style:    none;
	margin:        0;
	padding:       var(--space-2);
	background:    var(--bg);
	border:        1px solid var(--border);
	border-radius: var(--radius-md);
	box-shadow:    var(--shadow-2);
	z-index:       50;
}

/*
 * Desktop : le hover/focus-within réactive l'affichage même quand
 * nav.js a posé l'attribut hidden (= UA display:none, spécificité 0,1,0).
 * Notre sélecteur (0,3,0) prend le dessus sans !important.
 */
@media (min-width: 1024px) {
	.primary-nav__list > .menu-item-has-children:hover > .sub-menu,
	.primary-nav__list > .menu-item-has-children:focus-within > .sub-menu {
		display: block;
	}
}

/* Ouverture via JS clavier / clic bouton (toutes tailles d'écran) */
.primary-nav__list > .menu-item-has-children.dropdown-open > .sub-menu {
	display: block;
}

/* Links dans le dropdown */
.primary-nav__list > .menu-item > .sub-menu .menu-item > a {
	display:         block;
	padding:         var(--space-2) var(--space-3);
	font-size:       var(--text-sm);
	color:           var(--fg-muted);
	border-radius:   var(--radius-sm);
	text-decoration: none;
	white-space:     nowrap;
	transition:      background-color var(--transition), color var(--transition);
}

.primary-nav__list > .menu-item > .sub-menu .menu-item > a:hover,
.primary-nav__list > .menu-item > .sub-menu .menu-item > a:focus-visible {
	background: var(--surface);
	color:      var(--fg);
}

/* ── CTA "Nous contacter" — contour rouge, même hauteur que btn-sm ─── */
/*
 * Menu principal : item .nav-cta → contour rouge Brightway, gabarit btn-sm.
 * Seul CTA du header depuis 2026-04-23 (le bouton "Demander un devis" a
 * été retiré pour lever la redondance : les 2 menaient déjà vers /contact/).
 */
.primary-nav__list > .menu-item.nav-cta > a {
	padding:       0.375rem 0.875rem;  /* identique à .btn-sm */
	font-size:     var(--text-xs);
	font-weight:   var(--fw-semi);
	line-height:   1;
	background:    transparent;
	color:         var(--accent);
	border:        2px solid var(--accent);
	border-radius: var(--radius-sm);
}

.primary-nav__list > .menu-item.nav-cta > a:hover,
.primary-nav__list > .menu-item.nav-cta > a:focus-visible {
	background:    var(--bw-red-light);
	color:         var(--accent-hover);
	border-color:  var(--accent-hover);
}

[data-theme="dark"] .primary-nav__list > .menu-item.nav-cta > a:hover,
[data-theme="dark"] .primary-nav__list > .menu-item.nav-cta > a:focus-visible {
	background: rgba(255, 82, 71, 0.12);
}

/* Spacer DOM injecté par nav.js — caché par défaut, activé en mobile.
   Sur desktop, la nav est horizontale ; sans display:none le spacer
   prendrait 120px d'espace dans la rangée et pousserait les items. */
.drawer-spacer {
	display: none;
}

/* ── Mobile : overlay plein écran (.primary-nav.is-open via nav.js) ─ */

@media (max-width: 1023px) {
	.primary-nav {
		position:   fixed;
		/* On remplace inset:0 par top/left/right + height explicite pour
		   pouvoir utiliser 100dvh : la "dynamic viewport height" s'adapte
		   à la barre URL iOS Safari (collapsed/expanded), ce que 100vh ou
		   inset:0 ne font pas → le bas du drawer (et donc le CTA) restait
		   masqué par la barre URL. Fallback 100vh pour navigateurs sans dvh. */
		top:        0;
		left:       0;
		right:      0;
		height:     100vh;
		height:     100dvh;
		z-index:    80;
		background: var(--bg);
		overflow-y: auto;
		/* padding-inline = 0 pour que les séparateurs des items soient
		   edge-to-edge (le padding horizontal est porté par les <a>).
		   Pas de padding-bottom ici : WebKit iOS (Safari + Brave/Chrome
		   iOS, tous WebKit-only) n'inclut pas le padding-bottom d'un
		   scroll container dans le scroll extent → espace inatteignable.
		   Le coussin de fin est porté par .primary-nav__list (enfant). */
		padding:    var(--space-6) 0;
		transform:  translateX(100%);
		transition: transform 250ms ease;
	}

	.primary-nav.is-open {
		transform: translateX(0);
	}

	/* Scroll-lock du body quand le drawer est ouvert (classe posée par nav.js).
	   Évite que le contenu glisse derrière l'overlay sur iOS Safari notamment. */
	body.nav-open {
		overflow: hidden;
	}

	/* Drawer ouvert : le logo et les actions du header (lang, thème, BURGER)
	   doivent rester cliquables au-dessus de l'overlay. Sans ça, .primary-nav
	   (position:fixed; inset:0; z-index:80) recouvre le burger (statique →
	   peint sous les positionnés z>0) et l'utilisateur ne peut plus refermer
	   le menu. z-index:90 = au-dessus du drawer (80), sous les modales (≥100). */
	body.nav-open .site-logo,
	body.nav-open .site-header__actions {
		position: relative;
		z-index:  90;
	}

	.primary-nav__list {
		flex-direction: column;
		align-items:    stretch;
		gap:            0;
		margin-top:     var(--space-8);
		/* Défensif : force le UL à 100% du drawer. Normalement déjà 100%
		   par défaut, mais évite tout résidu d'override Customizer ou
		   plugin qui contraindrait la largeur et tronquerait les séparateurs. */
		width:          100%;
		/* (padding-bottom retiré : même le padding-bottom sur le UL était
		   tronqué par WebKit iOS dans certaines conditions. Le coussin
		   est désormais un vrai <li class="drawer-spacer"> injecté par
		   nav.js — voir règle .drawer-spacer ci-dessous.) */
	}

	/* Spacer DOM injecté par nav.js. Solution de dernier recours après
	   échec des approches padding/margin (cf. commentaire .primary-nav).
	   La hauteur d'un élément DOM réel est toujours incluse dans le
	   scroll extent WebKit iOS, contrairement à padding/margin.
	   120px couvre les barres UI iOS les plus hautes (Brave ~90px) ;
	   env() ajoute ~34px pour le home indicator iPhone X+. */
	.drawer-spacer {
		display:     block;
		flex-shrink: 0;
		height:      calc(120px + env(safe-area-inset-bottom));
	}

	/* Drawer : .sub-menu (position:static) doit basculer sous le
	   lien+bouton du parent. flex-wrap autorise ce retour à la ligne. */
	.primary-nav__list > .menu-item-has-children {
		flex-wrap: wrap;
	}

	/* Séparateurs : portés par le LI (et non le <a>) pour s'étendre
	   sur toute la largeur du drawer, y compris la zone du chevron
	   .dropdown-toggle dans les items has-children. */
	.primary-nav__list > .menu-item {
		width:         100%;        /* défensif (cf. .primary-nav__list) */
		border-bottom: 1px solid var(--border);
	}

	/* Override desktop : pas de fond gris en mobile sur hover/focus/current.
	   Le padding-inline élargi des liens en drawer transformait ce gris en
	   grosse bande peu lisible. Le rouge accent sur l'item courant reste
	   via la règle .current-menu-item > a { color: var(--accent) }. */
	.primary-nav__list > .menu-item > a:hover,
	.primary-nav__list > .menu-item > a:focus-visible,
	.primary-nav__list > .menu-item.current-menu-item > a,
	.primary-nav__list > .menu-item.current-menu-ancestor > a {
		background: transparent;
	}

	.primary-nav__list > .menu-item.nav-cta {
		border-bottom: none;
		/* margin-bottom retiré : non inclus dans le scroll extent WebKit
		   iOS quand c'est le dernier enfant d'un overflow:auto. Le coussin
		   est désormais sur .primary-nav__list (padding-bottom). */
	}

	.primary-nav__list > .menu-item > .sub-menu .menu-item {
		border-bottom: 1px solid var(--border);
	}

	.primary-nav__list > .menu-item > .sub-menu .menu-item:last-child {
		border-bottom: none;
	}

	/* Chevron : marge à droite (le drawer n'a plus de padding-inline). */
	.primary-nav__list > .menu-item-has-children > .dropdown-toggle {
		margin-right: var(--space-4);
	}

	.primary-nav__list > .menu-item > a {
		padding:       var(--space-3) var(--space-6);
		font-size:     var(--text-base, 1rem);
		font-weight:   var(--fw-semi);
		color:         var(--fg);
		border-bottom: none;
		border-radius: 0;
		white-space:   normal;
	}

	.primary-nav__list > .menu-item > .sub-menu {
		position:   static;
		flex-basis: 100%;        /* repasse en dessous du lien+bouton (flex-wrap) */
		border:     none;
		box-shadow: none;
		border-radius: 0;
		/* padding 0 : l'indent visuel des sous-items est porté par le
		   padding-left des <a> ci-dessous, pour que les séparateurs
		   restent edge-to-edge. */
		padding:    0;
		background: transparent;
	}

	.primary-nav__list > .menu-item > .sub-menu .menu-item > a {
		/* padding-left = --space-12 (48px = 2× --space-6) → indent visuel
		   sous le parent. padding-right = --space-6 = aligné à droite. */
		padding:       var(--space-2) var(--space-6) var(--space-2) var(--space-12);
		border-bottom: none;
		border-radius: 0;
		color:         var(--fg-muted);
		white-space:   normal;
	}

	.primary-nav__list > .menu-item.nav-cta > a {
		margin-top:    var(--space-4);
		/* margin-inline pour que le bouton CTA ne touche pas les bords
		   du drawer (qui n'a plus de padding-inline). */
		margin-inline: var(--space-6);
		text-align:    center;
		border-radius: var(--radius-sm);
		border-bottom: none;
	}
}

/* ── Toggle thème (soleil / lune) ────────────────────────────────── */

.theme-toggle {
	display:        flex;
	align-items:    center;
	justify-content: center;
	width:          44px;
	height:         44px;
	border-radius:  var(--radius-sm);
	color:          var(--fg-muted);
	transition:     background-color var(--transition), color var(--transition);
	flex-shrink:    0;
}

.theme-toggle:hover {
	background: var(--surface);
	color:      var(--fg);
}

.theme-toggle svg {
	width:  20px;
	height: 20px;
	flex-shrink: 0;
}

/* Icône lune visible en light, soleil visible en dark */
.theme-toggle .icon-moon   { display: block;  }
.theme-toggle .icon-sun    { display: none;   }

[data-theme="dark"] .theme-toggle .icon-moon { display: none;  }
[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }

/* ── Burger (mobile) ─────────────────────────────────────────────── */

.nav-toggle {
	display:        none;
	flex-direction: column;
	justify-content: center;
	align-items:    center;
	gap:            5px;
	width:          44px;
	height:         44px;
	border-radius:  var(--radius-sm);
	color:          var(--fg);
	flex-shrink:    0;
}

@media (max-width: 1023px) {
	.nav-toggle { display: flex; }
	/* .primary-nav géré par l'overlay dans le bloc mobile ci-dessus */
	.site-header__cta { display: none; }
}

.nav-toggle__bar {
	display:        block;
	width:          22px;
	height:         2px;
	background:     currentColor;
	border-radius:  2px;
	transition:     transform var(--transition), opacity var(--transition);
	transform-origin: center;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
	opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* ── Menu mobile overlay ─────────────────────────────────────────── */

.mobile-nav {
	position:   fixed;
	inset:      0;
	z-index:    90;
	background: var(--bg);
	overflow-y: auto;
	padding:    var(--space-6);
	transform:  translateX(100%);
	transition: transform 250ms ease;
}

.mobile-nav.is-open {
	transform: translateX(0);
}

.mobile-nav__list {
	margin-top: var(--space-8);
}

.mobile-nav__link {
	display:     block;
	padding:     var(--space-4) 0;
	font-size:   var(--text-lg);
	font-weight: var(--fw-semi);
	color:       var(--fg);
	border-bottom: 1px solid var(--border);
}

.mobile-nav__link:hover {
	color: var(--accent);
}

.mobile-nav__sub {
	padding-left: var(--space-4);
}

.mobile-nav__sub a {
	display:     block;
	padding:     var(--space-3) 0;
	font-size:   var(--text-base);
	color:       var(--fg-muted);
	border-bottom: 1px solid var(--border);
}

/* ════════════════════════════════════════════════════════════════════
 * CARDS
 * ════════════════════════════════════════════════════════════════════ */

.card {
	background:    var(--bg);
	border:        1px solid var(--border);
	border-radius: var(--radius-md);
	overflow:      hidden;
	transition:    box-shadow var(--transition), transform var(--transition-md);
}

.card:hover {
	box-shadow: var(--shadow-2);
	transform:  translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
	.card:hover { transform: none; }
}

.card__image {
	aspect-ratio: 3 / 2;
	overflow:     hidden;
}

.card__image img {
	width:      100%;
	height:     100%;
	object-fit: cover;
	transition: transform 300ms ease;
}

.card:hover .card__image img {
	transform: scale(1.03);
}

@media (prefers-reduced-motion: reduce) {
	.card:hover .card__image img { transform: none; }
}

.card__body {
	padding: var(--space-6);
}

.card__meta {
	font-size:     var(--text-xs);
	font-weight:   var(--fw-semi);
	color:         var(--fg-muted);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: var(--space-3);
}

.card__title {
	font-size:     var(--text-lg);
	font-weight:   var(--fw-semi);
	color:         var(--fg);
	margin-bottom: var(--space-3);
	line-height:   var(--lh-snug);
}

.card__title a {
	color:           var(--fg);
	text-decoration: none;
	transition:      color var(--transition);
}

.card__title a:hover,
.card__title a:focus-visible {
	color: var(--accent);
}

.card__excerpt {
	font-size:  var(--text-sm);
	color:      var(--fg-muted);
	line-height: var(--lh-relaxed);
}

.card__footer {
	padding:   var(--space-4) var(--space-6);
	border-top: 1px solid var(--border);
	display:   flex;
	align-items: center;
	justify-content: space-between;
}

/* Card expertise — avec icône et accroche */
.card-expertise {
	display:        flex;
	flex-direction: column;
	height:         100%; /* occupe toute la hauteur de la cellule grid */
}

/* Le body s'étire pour pousser le footer en bas — sans ça les boutons
   "En savoir plus" s'alignent à des hauteurs différentes selon la
   longueur de l'excerpt. */
.card-expertise .card__body {
	flex: 1 1 auto;
}

/* Force le titre à ~2 lignes pour aligner les excerpts entre cards —
   "Formation & sensibilisation" wrap sur 2 lignes tandis que les 3 autres
   tiennent sur 1. align-items: flex-end pousse les titres courts en bas
   de la zone réservée → 1ère ligne des titres courts = 2e ligne des
   titres longs → excerpts alignés. */
.card-expertise .card__title {
	min-height:  3.6rem;
	display:     flex;
	align-items: flex-end;
}

.card-expertise .card__icon {
	width:         48px;
	height:        48px;
	background:    var(--bw-red-light);
	border-radius: var(--radius-md);
	display:       flex;
	align-items:   center;
	justify-content: center;
	margin-bottom: var(--space-4);
}

[data-theme="dark"] .card-expertise .card__icon {
	background: rgba(255, 82, 71, 0.12);
}

.card-expertise .card__icon svg {
	width:  24px;
	height: 24px;
	color:  var(--accent);
}

/* Card référence — logo client + résumé */
.card-reference {
	display:        flex;
	flex-direction: column;
}

.card-reference .card__body {
	flex: 1 0 auto;
}

.card-reference .card__footer {
	margin-top: auto;
}

/* Card formation — footer (séparateur + bouton Programme) aligné en bas
   indépendamment de la hauteur du body, comme .card-reference. */
.card-formation {
	display:        flex;
	flex-direction: column;
}

.card-formation .card__body {
	flex: 1 0 auto;
}

.card-formation .card__footer {
	margin-top: auto;
}

.card-reference .card__logo {
	height:      60px;
	display:     flex;
	align-items: center;
	margin-bottom: var(--space-4);
}

.card-reference .card__logo img {
	max-height: 48px;
	width:      auto;
	max-width:  160px;
	object-fit: contain;
}

/* ════════════════════════════════════════════════════════════════════
 * BADGES
 * ════════════════════════════════════════════════════════════════════ */

.badge {
	display:       inline-flex;
	align-items:   center;
	gap:           var(--space-1);
	padding:       0.2em 0.6em;
	font-size:     var(--text-xs);
	font-weight:   var(--fw-semi);
	border-radius: 999px;
	line-height:   1.2;
	white-space:   nowrap;
}

.badge-success {
	background: rgba(30, 126, 52, 0.12);
	color:      var(--bw-green);
}

[data-theme="dark"] .badge-success {
	background: rgba(76, 175, 114, 0.15);
	color:      var(--bw-green);
}

.badge-warn {
	background: rgba(199, 119, 0, 0.12);
	color:      var(--bw-orange);
}

.badge-neutral {
	background: var(--surface);
	color:      var(--fg-muted);
	border:     1px solid var(--border);
}

.badge-red {
	background: var(--bw-red-light);
	color:      var(--accent);
}

/* ════════════════════════════════════════════════════════════════════
 * QUALIFS BAR — Bandeau des 5 qualifications (sous le header)
 * Règle : discret mais lisible, aucun effet clinquant.
 * ════════════════════════════════════════════════════════════════════ */
/*
 * Les styles de structure sont dans layout.css (.qualifs-bar, .qualifs-bar__list).
 * Ici uniquement les variantes et états spécifiques au composant.
 */

.qualifs-bar__item img {
	height:    18px;
	width:     auto;
	opacity:   0.7;
	filter:    grayscale(1);
	transition: opacity var(--transition), filter var(--transition);
}

.qualifs-bar__item:hover img {
	opacity: 1;
	filter:  grayscale(0);
}

[data-theme="dark"] .qualifs-bar__item img {
	filter:  grayscale(1) brightness(1.4);
	opacity: 0.6;
}

[data-theme="dark"] .qualifs-bar__item:hover img {
	filter:  grayscale(0) brightness(1);
	opacity: 1;
}

/* ════════════════════════════════════════════════════════════════════
 * COOKIE BANNER — Conformité CNIL
 * Règle : "Refuser" doit être aussi visible que "Accepter".
 * Les deux boutons ont le même poids visuel (même taille, même border).
 * ════════════════════════════════════════════════════════════════════ */

.cookie-banner {
	position:      fixed;
	bottom:        0;
	left:          0;
	right:         0;
	z-index:       800;
	background:    var(--bg);
	border-top:    1px solid var(--border);
	box-shadow:    0 -4px 24px rgb(0 0 0 / .10);
	padding:       var(--space-4) 0;
	transform:     translateY(0);
	transition:    transform 300ms ease;
}

.cookie-banner.is-hidden {
	transform: translateY(110%);
}

.cookie-banner__inner {
	display:        flex;
	align-items:    center;
	gap:            var(--space-6);
	flex-wrap:      wrap;
}

@media (max-width: 767px) {
	.cookie-banner__inner {
		flex-direction: column;
		align-items:    flex-start;
	}
}

.cookie-banner__text {
	flex:       1;
	font-size:  var(--text-sm);
	color:      var(--fg-muted);
	line-height: var(--lh-relaxed);
	min-width:  0;
}

.cookie-banner__text a {
	color:            var(--link);
	text-decoration:  underline;
	text-underline-offset: 2px;
}

.cookie-banner__actions {
	display:     flex;
	align-items: center;
	gap:         var(--space-3);
	flex-shrink: 0;
}

@media (max-width: 767px) {
	.cookie-banner__actions {
		width: 100%;
	}

	.cookie-banner__actions .btn {
		flex: 1;
		justify-content: center;
	}
}

/*
 * Les deux boutons utilisent .btn + taille identique.
 * Accepter = .btn-secondary (contour rouge) — signal de confirmation
 * Refuser  = .btn-neutral   (contour gris)  — même taille, même poids
 * → Conformité CNIL : aucun des deux n'est "caché" ou dévalorisé.
 */
.cookie-banner__accept,
.cookie-banner__reject {
	min-width: 120px;
}

/* ════════════════════════════════════════════════════════════════════
 * BREADCRUMB
 * ════════════════════════════════════════════════════════════════════ */

.breadcrumb {
	font-size:   var(--text-sm);
	color:       var(--fg-muted);
	padding:     var(--space-3) 0;
}

/* Le conteneur flex réel est l'<ol>, pas le <nav>, car c'est l'<ol>
   qui contient directement les <li>. Sans ça, les items restaient empilés. */
.breadcrumb ol {
	display:     flex;
	align-items: center;
	flex-wrap:   wrap;
	gap:         var(--space-2);
	list-style:  none;
	margin:      0;
	padding:     0;
}

.breadcrumb__item {
	display:     flex;
	align-items: center;
	gap:         var(--space-2);
}

.breadcrumb__item + .breadcrumb__item::before {
	content:    '/';
	color:      var(--bw-gray-muted);
	font-weight: var(--fw-regular);
}

.breadcrumb__link {
	color:            var(--fg-muted);
	text-decoration:  none;
	transition:       color var(--transition);
}

.breadcrumb__link:hover {
	color: var(--accent);
}

.breadcrumb__current {
	color:       var(--fg);
	font-weight: var(--fw-medium);
}

/* ════════════════════════════════════════════════════════════════════
 * FORMULAIRES
 * ════════════════════════════════════════════════════════════════════ */

.form-field {
	display:        flex;
	flex-direction: column;
	gap:            var(--space-2);
}

.form-label {
	font-size:   var(--text-sm);
	font-weight: var(--fw-medium);
	color:       var(--fg);
}

.form-label .required {
	color:       var(--accent);
	margin-left: var(--space-1);
}

.form-input,
.form-textarea,
.form-select {
	width:         100%;
	padding:       0.625rem var(--space-4);
	background:    var(--bg);
	color:         var(--fg);
	border:        1px solid var(--border);
	border-radius: var(--radius-sm);
	font-size:     var(--text-base);
	line-height:   var(--lh-normal);
	transition:    border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
	outline:      none;
	border-color: var(--bw-blue);
	box-shadow:   0 0 0 3px rgba(11, 94, 215, 0.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
	color: var(--bw-gray-muted);
}

.form-textarea {
	resize:     vertical;
	min-height: 120px;
}

.form-select {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238A8F95' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat:   no-repeat;
	background-position: right var(--space-4) center;
	padding-right:       var(--space-8);
}

.form-error {
	font-size:   var(--text-xs);
	color:       var(--accent);
	font-weight: var(--fw-medium);
}

.form-input.has-error,
.form-textarea.has-error {
	border-color: var(--accent);
}

/* Honeypot — accessible hide */
.form-honeypot {
	position: absolute;
	left:     -9999px;
	opacity:  0;
	height:   0;
	overflow: hidden;
}

/* ── Message de résultat formulaire ──────────────────────────────── */

.form-notice {
	padding:       var(--space-4);
	border-radius: var(--radius-md);
	font-size:     var(--text-sm);
	font-weight:   var(--fw-medium);
	line-height:   var(--lh-normal);
}

.form-notice--success {
	background: rgba(30, 126, 52, 0.1);
	color:      var(--bw-green);
	border:     1px solid rgba(30, 126, 52, 0.2);
}

.form-notice--error {
	background: var(--bw-red-light);
	color:      var(--accent);
	border:     1px solid rgba(224, 43, 32, 0.2);
}

/* ════════════════════════════════════════════════════════════════════
 * HERO
 * ════════════════════════════════════════════════════════════════════ */

.hero {
	padding-top:    var(--space-24);
	padding-bottom: var(--space-24);
	position:       relative;
	overflow:       hidden;
}

@media (max-width: 767px) {
	.hero {
		padding-top:    var(--space-16);
		padding-bottom: var(--space-16);
	}
}

.hero__eyebrow {
	display:       inline-flex;
	align-items:   center;
	gap:           var(--space-2);
	font-size:     var(--text-xs);
	font-weight:   var(--fw-semi);
	color:         var(--accent);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	margin-bottom: var(--space-6);
}

.hero__eyebrow::before {
	content:       '';
	display:       inline-block;
	width:         24px;
	height:        2px;
	background:    var(--accent);
	border-radius: 1px;
}

.hero__title {
	font-size:     var(--text-5xl);
	font-weight:   var(--fw-bold);
	line-height:   var(--lh-tight);
	letter-spacing: -0.03em;
	color:         var(--fg);
	max-width:     760px;
	margin-bottom: var(--space-6);
}

@media (max-width: 767px) {
	.hero__title {
		font-size: var(--text-3xl);
	}
}

.hero__lead {
	font-size:     var(--text-md);
	color:         var(--fg-muted);
	line-height:   var(--lh-relaxed);
	max-width:     560px;
	margin-bottom: var(--space-8);
}

.hero__actions {
	display:   flex;
	gap:       var(--space-4);
	flex-wrap: wrap;
}

/* Hero sous-pages — plus compact */
.hero-sub {
	padding-top:    var(--space-12);
	padding-bottom: var(--space-12);
	background:     var(--surface);
	border-bottom:  1px solid var(--border);
}

/* Fraunces italique sur h1 pages intérieures — signature display discrète
   (poids 500) qui rappelle le hero home (700) sans le concurrencer. */
.hero-sub .hero__title {
	font-family:    var(--font-display);
	font-style:     italic;
	font-weight:    500;
	font-size:      var(--text-3xl);
	letter-spacing: -0.01em;
}

/* Hero pages intérieures — orchestration first-load (E3-lite).
   Stagger 0/120/180ms sur breadcrumb → h1 → lead. Pas de JS requis :
   `both` fill-mode → element à opacity:0 pendant le delay puis anime.
   Plus court que le hero home (3 éléments vs 5) pour ne pas concurrencer. */
@keyframes bwHeroSubEnter {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: translateY(0); }
}

.hero-sub .breadcrumb  { animation: bwHeroSubEnter 500ms cubic-bezier(.22, .61, .36, 1)   0ms both; }
.hero-sub .hero__title { animation: bwHeroSubEnter 500ms cubic-bezier(.22, .61, .36, 1) 120ms both; }
.hero-sub .hero__lead  { animation: bwHeroSubEnter 500ms cubic-bezier(.22, .61, .36, 1) 180ms both; }

@media (prefers-reduced-motion: reduce) {
	.hero-sub .breadcrumb,
	.hero-sub .hero__title,
	.hero-sub .hero__lead {
		animation: none;
	}
}

/* ════════════════════════════════════════════════════════════════════
 * REVEALS GÉNÉRIQUES (scroll-triggered fade + translateY)
 *
 * Gatés par .js-reveals-ready sur <html> (posé par reveals.js dès
 * l'IIFE) : sans JS les éléments restent à opacity:1, pas de FOUC.
 * Les delays de stagger sont définis par page via --bw-reveal-delay
 * (voir pages/home.css, pages/contact.css, …).
 * ════════════════════════════════════════════════════════════════════ */

html.js-reveals-ready .bw-reveal {
	opacity:          0;
	transform:        translateY(12px);
	transition:       opacity 500ms ease-out, transform 500ms ease-out;
	transition-delay: var(--bw-reveal-delay, 0ms);
	will-change:      opacity, transform;
}

html.js-reveals-ready .bw-reveal.is-visible {
	opacity:   1;
	transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	html.js-reveals-ready .bw-reveal {
		opacity:          1;
		transform:        none;
		transition:       none;
		transition-delay: 0ms;
	}
}

/* ════════════════════════════════════════════════════════════════════
 * STATS GRID PARTAGÉE (.home-stats)
 *
 * Pattern "spotlight anthracite" : 4 chiffres clés sur fond sombre,
 * Fraunces display + labels Inter. Utilisé par template-parts/block-stats.php
 * sur la home ET sur tpl-a-propos.php.
 *
 * Le nom de classe .home-stats est historique (initialement home-only) ;
 * les styles sont désormais partagés. Le template-part reste le point
 * d'entrée unique du markup.
 * ════════════════════════════════════════════════════════════════════ */

.home-stats {
	padding:    var(--space-24) 0;
	background: var(--bw-anthracite);
	color:      var(--bg);
	position:   relative;
	overflow:   hidden;
}

/* Grain SVG — texture subtile pour sortir l'aplat anthracite du "flat digital".
   feTurbulence fractal noise, feColorMatrix blanchit + abaisse l'alpha à 0.35.
   mix-blend-mode: overlay → le bruit éclaire ponctuellement le fond sombre.
   Encodage : %25 = %, %23 = # (fragment URL). */
.home-stats::after {
	content:          '';
	position:         absolute;
	inset:            0;
	pointer-events:   none;
	z-index:          0;
	opacity:          0.04;
	mix-blend-mode:   overlay;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.35 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.home-stats > .container {
	position: relative;
	z-index:  1;
}

/* 4 pistes 280 px max, centrées dans le container, labels longs contenus via min=0 */
.home-stats__items {
	display:               grid;
	grid-template-columns: repeat(4, minmax(0, 280px));
	justify-content:       center;
	gap:                   var(--space-6);
	text-align:            center;
}

.home-stats__item {
	display:         flex;
	flex-direction:  column;
	align-items:     center;
	justify-content: center;
	gap:             var(--space-2);
	padding:         0 var(--space-4);
	min-width:       0;
	text-align:      center;
}

.home-stats__item + .home-stats__item {
	border-left: 1px solid color-mix(in srgb, currentColor 10%, transparent);
}

.home-stats__value {
	display:              block;
	width:                100%;
	text-align:           center;
	font-family:          var(--font-display);
	font-size:            clamp(3.5rem, 7.5vw, 6rem);   /* 56px → 96px fluide */
	font-weight:          600;
	line-height:          1;
	color:                var(--bw-red);
	letter-spacing:       -0.02em;
	font-variant-numeric: tabular-nums;
}

.home-stats__label {
	font-size:       var(--text-sm);
	font-weight:     var(--fw-medium);
	color:           color-mix(in srgb, currentColor 72%, transparent);
	letter-spacing:  0.3px;
	max-width:       180px;
}

@media (max-width: 960px) {
	.home-stats {
		padding: var(--space-16) 0;
	}
	.home-stats__items {
		grid-template-columns: repeat(2, minmax(0, 260px));
		justify-content:       center;
		gap:                   var(--space-12) var(--space-6);
	}
	.home-stats__item + .home-stats__item {
		border-left: 0;
	}
}

@media (max-width: 480px) {
	.home-stats__items {
		grid-template-columns: 1fr;
		gap:                   var(--space-8);
	}
}

/* Stagger 0/80/160/240 ms sur la grille 4-items */
.home-stats__items > .bw-reveal:nth-child(1) { --bw-reveal-delay:   0ms; }
.home-stats__items > .bw-reveal:nth-child(2) { --bw-reveal-delay:  80ms; }
.home-stats__items > .bw-reveal:nth-child(3) { --bw-reveal-delay: 160ms; }
.home-stats__items > .bw-reveal:nth-child(4) { --bw-reveal-delay: 240ms; }

/* Red line draw au sommet — déclenché par reveals.js posant .is-visible */
html.js-reveals-ready .home-stats::before {
	content:    '';
	position:   absolute;
	top:        0;
	left:       0;
	height:     1px;
	width:      0;
	background: var(--bw-red);
	transition: width 700ms cubic-bezier(.22, .61, .36, 1);
	z-index:    2;
}

html.js-reveals-ready .home-stats.is-visible::before {
	width: 100%;
}

@media (prefers-reduced-motion: reduce) {
	html.js-reveals-ready .home-stats::before {
		width:      100%;
		transition: none;
	}
}

/* ════════════════════════════════════════════════════════════════════
 * BLOCS GÉNÉRIQUES
 * ════════════════════════════════════════════════════════════════════ */

/* Bloc CTA (call to action centré) */
.block-cta {
	text-align:  center;
	padding:     var(--space-16) 0;
	background:  var(--bw-anthracite);
	color:       #e8eaed;
}

[data-theme="dark"] .block-cta {
	background: #0a0c10;
}

.block-cta h2 {
	color:         #fff;
	margin-bottom: var(--space-4);
}

.block-cta p {
	color:         #c1c6cc;
	margin-bottom: var(--space-8);
	max-width:     560px;
	margin-left:   auto;
	margin-right:  auto;
	line-height:   var(--lh-relaxed);
}

/* Section sombre réutilisable — pattern "spotlight" extrait de .home-stats.
   Permet à n'importe quelle section d'être l'inversion chromatique de la
   page. Le grain (SVG fractalNoise inline, mix-blend-mode overlay 0.04)
   sort l'aplat anthracite du "flat digital" sans bruit perceptible.
   Encodage : %25 = %, %23 = # (fragment URL).
   Usage : <section class="section section-dark">. */
.section-dark {
	background: var(--bw-anthracite);
	color:      var(--bg);
	position:   relative;
	overflow:   hidden;
}

[data-theme="dark"] .section-dark {
	background: #0a0c10;
}

.section-dark::after {
	content:          '';
	position:         absolute;
	inset:            0;
	pointer-events:   none;
	z-index:          0;
	opacity:          0.04;
	mix-blend-mode:   overlay;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.35 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.section-dark > * {
	position: relative;
	z-index:  1;
}

/* Bloc 4 piliers */
.block-piliers .pilier-card {
	padding:       var(--space-6);
	border-radius: var(--radius-md);
	border:        1px solid var(--border);
	background:    var(--bg);
	transition:    border-color var(--transition), box-shadow var(--transition);
}

.block-piliers .pilier-card:hover {
	border-color: var(--accent);
	box-shadow:   var(--shadow-1);
}

.block-piliers .pilier-card__number {
	font-size:     var(--text-xs);
	font-weight:   var(--fw-bold);
	color:         var(--accent);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	margin-bottom: var(--space-3);
}

.block-piliers .pilier-card__title {
	font-size:     var(--text-lg);
	font-weight:   var(--fw-semi);
	color:         var(--fg);
	margin-bottom: var(--space-3);
}

.block-piliers .pilier-card__desc {
	font-size:  var(--text-sm);
	color:      var(--fg-muted);
	line-height: var(--lh-relaxed);
}

/* Logos clients (grille homogène) */
.logos-grid {
	display:               grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap:                   var(--space-6);
	align-items:           center;
}

.logos-grid__item {
	display:         flex;
	align-items:     center;
	justify-content: center;
	padding:         var(--space-4);
	filter:          grayscale(1);
	opacity:         0.6;
	transition:      filter var(--transition), opacity var(--transition);
}

.logos-grid__item:hover {
	filter:  grayscale(0);
	opacity: 1;
}

.logos-grid__item img {
	max-height: 48px;
	width:      auto;
	max-width:  120px;
	object-fit: contain;
}

[data-theme="dark"] .logos-grid__item {
	filter:  grayscale(1) brightness(1.5);
	opacity: 0.5;
}

[data-theme="dark"] .logos-grid__item:hover {
	filter:  grayscale(0) brightness(1);
	opacity: 1;
}

/* Bloc FAQ */
.faq-list {
	display:        flex;
	flex-direction: column;
	gap:            var(--space-3);
}

.faq-item {
	border:        1px solid var(--border);
	border-radius: var(--radius-md);
	overflow:      hidden;
}

/* <details>/<summary> natifs — pas de JS, a11y native. Le <summary>
   gère le toggle, l'attribut [open] est inséré automatiquement. */
.faq-item__question {
	display:         flex;
	align-items:     center;
	justify-content: space-between;
	width:           100%;
	padding:         var(--space-4) var(--space-6);
	font-weight:     var(--fw-medium);
	color:           var(--fg);
	text-align:      left;
	background:      var(--bg);
	cursor:          pointer;
	list-style:      none; /* retire la flèche ▸ par défaut (Firefox) */
	transition:      background-color var(--transition);
}

/* Retire le marker natif WebKit/Blink (Chrome, Safari) */
.faq-item__question::-webkit-details-marker { display: none; }

.faq-item__question:hover {
	background: var(--surface);
}

.faq-item[open] > .faq-item__question {
	background: var(--surface);
	color:      var(--accent);
}

.faq-item__question-text {
	flex: 1;
}

.faq-item__icon {
	width:      20px;
	height:     20px;
	flex-shrink: 0;
	transition: transform var(--transition);
}

.faq-item[open] > .faq-item__question .faq-item__icon {
	transform: rotate(45deg);
}

.faq-item__answer {
	padding:                var(--space-4) var(--space-6);
	font-size:              var(--text-sm);
	color:                  var(--fg-muted);
	line-height:            var(--lh-relaxed);
	background:             var(--surface);
	border-top:             1px solid var(--border);
	text-align:             justify;
	hyphens:                auto;
	-webkit-hyphens:        auto;
	hyphenate-limit-chars:  6 3 3;
}

/* Pagination */
.pagination {
	display:         flex;
	justify-content: center;
	align-items:     center;
	gap:             var(--space-2);
	margin-top:      var(--space-12);
}

.page-numbers {
	display:         flex;
	align-items:     center;
	justify-content: center;
	width:           40px;
	height:          40px;
	border-radius:   var(--radius-sm);
	font-size:       var(--text-sm);
	font-weight:     var(--fw-medium);
	color:           var(--fg-muted);
	border:          1px solid var(--border);
	transition:      background-color var(--transition), color var(--transition), border-color var(--transition);
}

.page-numbers:hover {
	background:   var(--surface);
	color:        var(--fg);
	border-color: var(--bw-gray-dark);
}

.page-numbers.current {
	background:   var(--accent);
	color:        #fff;
	border-color: var(--accent);
}

/* Loader overlay (pour filter.js) */
.filter-loader {
	display:         flex;
	align-items:     center;
	justify-content: center;
	padding:         var(--space-16) 0;
	color:           var(--fg-muted);
	font-size:       var(--text-sm);
	gap:             var(--space-3);
}

.filter-loader__spinner {
	width:         24px;
	height:        24px;
	border:        2px solid var(--border);
	border-top-color: var(--accent);
	border-radius: 50%;
	animation:     bw-spin 0.6s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
	.filter-loader__spinner { animation: none; }
}

/* ════════════════════════════════════════════════════════════════════
 * HERO LAYOUT (two-column home)
 * ════════════════════════════════════════════════════════════════════ */

.hero__layout {
	display:     grid;
	grid-template-columns: 1fr 1fr;
	gap:         var(--space-12);
	align-items: center;
}

@media (max-width: 1023px) {
	.hero__layout {
		grid-template-columns: 1fr;
	}

	.hero__visual {
		display: none; /* SVG masqué sur mobile — les textes priment */
	}
}

.hero-visual__svg {
	width:     100%;
	max-width: 500px;
	height:    auto;
}

/* ════════════════════════════════════════════════════════════════════
 * SEARCH FORM
 * ════════════════════════════════════════════════════════════════════ */

.search-form__inner {
	display: flex;
	gap:     var(--space-2);
	max-width: 480px;
}

.search-form__input {
	flex: 1;
}

.search-form__submit {
	flex-shrink: 0;
	padding:     0.625rem 1rem;
}

/* ════════════════════════════════════════════════════════════════════
 * PROCESS LIST (méthodologie étapes numérotées)
 * ════════════════════════════════════════════════════════════════════ */

.process-list {
	list-style: none;
	padding:    0;
	margin:     0;
	display:    flex;
	flex-direction: column;
	gap:        var(--space-8);
}

.process-item {
	display:     flex;
	gap:         var(--space-6);
	align-items: flex-start;
}

.process-item__step {
	flex-shrink:     0;
	display:         inline-flex;
	align-items:     center;
	justify-content: center;
	width:           2.5rem;
	height:          2.5rem;
	border-radius:   50%;
	background:      var(--accent);
	color:           #fff;
	font-size:       var(--text-sm);
	font-weight:     var(--fw-bold);
	line-height:     1;
}

.process-item > div strong {
	display:     block;
	font-weight: var(--fw-semi);
	margin-bottom: var(--space-1);
}

.process-item > div p {
	margin: 0;
	color:  var(--muted);
}

/* ════════════════════════════════════════════════════════════════════
 * TAG CLOUD (référentiels, techno)
 * ════════════════════════════════════════════════════════════════════ */

.tag-cloud {
	list-style: none;
	padding:    0;
	margin:     0;
	display:    flex;
	flex-wrap:  wrap;
	gap:        var(--space-2);
}

.tag {
	display:       inline-block;
	padding:       0.25rem 0.75rem;
	border:        1px solid var(--border);
	border-radius: var(--radius-sm);
	font-size:     var(--text-sm);
	font-weight:   var(--fw-medium);
	background:    var(--bg-alt);
	color:         var(--fg);
	white-space:   nowrap;
}

/* ════════════════════════════════════════════════════════════════════
 * STATS GRID (chiffres clés)
 * ════════════════════════════════════════════════════════════════════ */

.stats-grid {
	display:               grid;
	grid-template-columns: repeat(4, 1fr);
	gap:                   var(--space-6);
	text-align:            center;
}

@media (max-width: 767px) {
	.stats-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

.stat-item__value {
	display:     block;
	font-size:   clamp(2rem, 4vw, 3rem);
	font-weight: var(--fw-bold);
	color:       var(--accent);
	line-height: 1;
}

.stat-item__label {
	display:     block;
	font-size:   var(--text-sm);
	color:       var(--muted);
	margin-top:  var(--space-2);
}

/* ════════════════════════════════════════════════════════════════════
 * FEATURE ITEMS (liste d'avantages icon+texte)
 * ════════════════════════════════════════════════════════════════════ */

.feature-item {
	display: flex;
	gap:     var(--space-4);
	align-items: flex-start;
}

.feature-item--card {
	background:    var(--bg-alt);
	border:        1px solid var(--border);
	border-radius: var(--radius);
	padding:       var(--space-6);
}

.feature-item__icon {
	flex-shrink: 0;
	color:       var(--accent);
}

.feature-item__icon--sm svg {
	width:  20px;
	height: 20px;
}

.feature-item h3 {
	font-size:     var(--text-base);
	font-weight:   var(--fw-semi);
	margin-bottom: var(--space-1);
}

.feature-item p {
	margin: 0;
	color:  var(--muted);
	font-size: var(--text-sm);
}

/* ════════════════════════════════════════════════════════════════════
 * AUTO-GRID VARIANTS
 * ════════════════════════════════════════════════════════════════════ */

.auto-grid--2 {
	--auto-grid-min: 280px;
}

/* Le parent .auto-grid utilise une valeur fixe (280px), pas --auto-grid-min :
   on override explicitement grid-template-columns pour forcer 3 colonnes
   égales qui remplissent la largeur du container. */
.auto-grid--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
	.auto-grid--3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.auto-grid--3 {
		grid-template-columns: 1fr;
	}
}

/* ════════════════════════════════════════════════════════════════════
 * CARD VARIANTS
 * ════════════════════════════════════════════════════════════════════ */

/* Les cards d'une grille stretch à hauteur égale : on rend le body flex
   column avec justify-content: center pour que le contenu (icône + titre
   + paragraphe) soit équilibré verticalement dans chaque card, plutôt
   que collé en haut avec un vide variable en bas. */
.card.card--flush {
	display:        flex;
	flex-direction: column;
}

.card--flush .card__body {
	padding:         var(--space-6);
	display:         flex;
	flex-direction:  column;
	justify-content: center;
	gap:             var(--space-3);
	flex:            1 1 auto;
}

/* Reset des margins natives navigateur : sans ça les margins UA de h3/p
   s'ajoutent au gap flex (margin collapse désactivé en flex), ce qui
   produit un espacement déséquilibré entre icône, titre et paragraphe. */
.card--flush .card__body > * {
	margin-top:    0;
	margin-bottom: 0;
}

.card--accent-top {
	border-top: 3px solid var(--accent);
}

/* ════════════════════════════════════════════════════════════════════
 * PILIERS NAV (segment pages)
 * ════════════════════════════════════════════════════════════════════ */

.piliers-nav {
	display:               grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap:                   var(--space-4);
}

.pilier-link {
	display:       flex;
	flex-direction: column;
	gap:           var(--space-2);
	padding:       var(--space-5);
	border:        1px solid var(--border);
	border-radius: var(--radius);
	text-decoration: none;
	color:         var(--fg);
	transition:    border-color var(--transition), background var(--transition);
}

.pilier-link:hover {
	border-color: var(--accent);
	background:   var(--bg-alt);
}

.pilier-link strong {
	font-weight: var(--fw-semi);
}

.pilier-link p {
	margin:    0;
	font-size: var(--text-sm);
	color:     var(--muted);
}

/* ════════════════════════════════════════════════════════════════════
 * PROSE (corps éditorial enrichi)
 * ════════════════════════════════════════════════════════════════════ */

.prose p {
	margin-bottom: var(--space-4);
	line-height:   var(--leading-relaxed);
}

.prose p:last-child {
	margin-bottom: 0;
}

/* ════════════════════════════════════════════════════════════════════
 * CONTACT — formulaire (partagé, utilisé par tpl-contact.php)
 * Mise en page spécifique de la page Contact : voir pages/contact.css.
 * ════════════════════════════════════════════════════════════════════ */

/* ── Formulaire ──────────────────────────────────────────────────── */

.contact-form {
	width: 100%;
}

.contact-form__hp {
	position:   absolute;
	left:       -9999px;
	visibility: hidden;
	height:     0;
	overflow:   hidden;
}

.contact-form__grid {
	display:               grid;
	grid-template-columns: 1fr 1fr;
	gap:                   var(--space-5) var(--space-8);
}

@media (max-width: 640px) {
	.contact-form__grid {
		grid-template-columns: 1fr;
		gap:                   var(--space-5);
	}
}

.form-group {
	display:        flex;
	flex-direction: column;
	gap:            var(--space-1);
}

.form-group--full {
	grid-column: 1 / -1;
}

.form-label {
	font-size:   var(--text-sm);
	font-weight: var(--fw-medium);
}

.form-label__required {
	color:       var(--accent);
	margin-left: 2px;
}

.form-input {
	width:         100%;
	padding:       0.625rem 0.875rem;
	font-size:     var(--text-base);
	font-family:   inherit;
	border:        1px solid var(--border);
	border-radius: var(--radius-sm);
	background:    var(--bg);
	color:         var(--fg);
	transition:    border-color var(--transition), box-shadow var(--transition);
	line-height:   1.5;
}

.form-input:focus {
	outline:      none;
	border-color: var(--bw-blue);
	box-shadow:   0 0 0 3px rgba(11, 94, 215, 0.15);
}

.form-input:invalid:not(:placeholder-shown) {
	border-color: var(--accent);
}

.form-textarea {
	resize:     vertical;
	min-height: 140px;
}

.form-select {
	appearance:    none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238A8F95' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat:   no-repeat;
	background-position: right 0.75rem center;
	padding-right: 2.5rem;
}

.form-error {
	font-size:  var(--text-xs);
	color:      var(--accent);
	min-height: 1.2em;
}

.form-hint {
	font-size: var(--text-xs);
	color:     var(--muted);
}

.form-rgpd-notice {
	font-size: var(--text-xs);
	color:     var(--muted);
	margin:    0;
}

.form-rgpd-notice a {
	color: var(--link);
}

.form-required-legend {
	font-size:    var(--text-xs);
	color:        var(--muted);
	margin:       0 0 var(--space-4);
}

.form-required-legend span[aria-hidden="true"] {
	color: var(--accent);
	font-weight: var(--fw-semi);
}

.contact-form__submit {
	margin-top: var(--space-6);
}

/* ── Notices de retour formulaire ────────────────────────────────── */

.form-notice {
	padding:       var(--space-4) var(--space-5);
	border-radius: var(--radius-sm);
	margin-bottom: var(--space-6);
	font-size:     var(--text-sm);
	font-weight:   var(--fw-medium);
}

.form-notice--success {
	background: #D1FAE5;
	border:     1px solid #059669;
	color:      #065F46;
}

.form-notice--error {
	background: var(--bw-red-light);
	border:     1px solid var(--accent);
	color:      #7F1D1D;
}

[data-theme="dark"] .form-notice--success {
	background: rgba(16, 185, 129, 0.1);
	border-color: #34D399;
	color: #6EE7B7;
}

[data-theme="dark"] .form-notice--error {
	background: rgba(224, 43, 32, 0.1);
	border-color: var(--accent);
	color: #FCA5A5;
}

/* ── Legal content ───────────────────────────────────────────────── */

.legal-content h2 {
	margin-top: var(--space-10);
}

.legal-content h2:first-child {
	margin-top: 0;
}

.legal-content h3 {
	margin-top: var(--space-6);
}

.legal-table {
	width:           100%;
	border-collapse: collapse;
	font-size:       var(--text-sm);
	margin:          var(--space-4) 0;
}

.legal-table th,
.legal-table td {
	padding:     var(--space-3) var(--space-4);
	border:      1px solid var(--border);
	text-align:  left;
	line-height: 1.5;
}

.legal-table thead th {
	background:  var(--bg-alt);
	font-weight: var(--fw-semi);
}

/* ── Sécurité site ───────────────────────────────────────────────── */

.security-measures {
	display:        flex;
	flex-direction: column;
	gap:            var(--space-8);
	margin-top:     var(--space-6);
}

.security-section h3 {
	font-size:     var(--text-base);
	font-weight:   var(--fw-semi);
	color:         var(--muted);
	margin-bottom: var(--space-3);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-size:     var(--text-xs);
}

.security-list {
	list-style: none;
	padding:    0;
	margin:     0;
	display:    flex;
	flex-direction: column;
	gap: var(--space-2);
}

.security-list li {
	font-size:  var(--text-sm);
	padding:    var(--space-2) var(--space-3);
	background: var(--bg-alt);
	border:     1px solid var(--border);
	border-radius: var(--radius-sm);
	line-height: 1.5;
}

.security-list code {
	font-family: var(--font-mono);
	font-size:   0.85em;
	color:       var(--accent);
	background:  transparent;
}

.security-responsible-disclosure {
	background:    var(--bg-alt);
	border:        1px solid var(--border);
	border-left:   4px solid var(--accent);
	border-radius: 0 var(--radius) var(--radius) 0;
	padding:       var(--space-6);
}

.security-responsible-disclosure h2 {
	margin-top: 0;
}

/* Bloc clé PGP publique : monospace, scrollable horizontalement,
   fond légèrement contrasté pour distinguer du corps de texte. */
.pgp-key {
	font-family:    var(--font-mono);
	font-size:      0.75rem;
	line-height:    1.4;
	background:     var(--bg-alt);
	border:         1px solid var(--border);
	border-radius:  var(--radius);
	padding:        var(--space-4);
	margin:         var(--space-4) 0;
	overflow-x:     auto;
	white-space:    pre;
	color:          var(--fg);
	-webkit-overflow-scrolling: touch;
}

.pgp-key code {
	font-family: inherit;
	font-size:   inherit;
	background:  transparent;
	padding:     0;
	color:       inherit;
}

.pgp-note {
	font-size: var(--text-sm);
	color:     var(--fg-muted);
	margin-top: var(--space-3);
}

/* ════════════════════════════════════════════════════════════════════
 * NEWS — Filtre catégories + badge + card-news
 * ════════════════════════════════════════════════════════════════════ */

.news-filter-bar {
	display:        flex;
	flex-wrap:      wrap;
	gap:            var(--space-3);
	margin-bottom:  var(--space-2);
}

.news-filter-bar__btn {
	display:         inline-flex;
	align-items:     center;
	padding:         var(--space-2) var(--space-4);
	font-size:       var(--text-sm);
	font-weight:     var(--fw-semi);
	color:           var(--fg);
	background:      var(--bg);
	border:          1.5px solid var(--border);
	border-radius:   999px;
	text-decoration: none;
	transition:      background var(--transition), border-color var(--transition), color var(--transition);
}

.news-filter-bar__btn:hover,
.news-filter-bar__btn:focus-visible {
	border-color: var(--fg);
	background:   var(--bg-alt);
}

.news-filter-bar__btn.is-active {
	background:   var(--fg);
	color:        var(--bg);
	border-color: var(--fg);
}

.news-filter-bar__btn--brand.is-active {
	background:   var(--bw-red);
	border-color: var(--bw-red);
	color:        var(--bw-white);
}

.news-filter-bar__btn--alert.is-active {
	background:   var(--bw-orange);
	border-color: var(--bw-orange);
	color:        var(--bw-white);
}

.news-filter-bar__btn--publication.is-active {
	background:   var(--bw-green);
	border-color: var(--bw-green);
	color:        var(--bw-white);
}

.news-filter-bar__btn--cyber.is-active {
	background:   var(--bw-blue);
	border-color: var(--bw-blue);
	color:        var(--bw-white);
}

.category-badge {
	display:         inline-block;
	padding:         0.15em 0.6em;
	font-size:       var(--text-xs);
	font-weight:     var(--fw-bold);
	letter-spacing:  0.5px;
	text-transform:  uppercase;
	border-radius:   999px;
	text-decoration: none;
	white-space:     nowrap;
	color:           var(--bw-white);
	background:      var(--bw-gray-muted);
	transition:      background var(--transition);
}

.category-badge:hover,
.category-badge:focus-visible {
	color: var(--bw-white);
}

/* Couleurs hardcodées (vs var(--bw-red)/--bw-orange) pour deux raisons :
   - le texte forcé en #FFFFFF — var(--bw-white) bascule en noir en dark
     mode (convention "fond clair du mode courant") et rendrait illisible ;
   - les versions claires des tokens en dark mode (--bw-red #FF5247,
     --bw-orange #E8A020) donnent un ratio < 4.5 sur blanc → AA fail.
   Valeurs ci-dessous : ratio ≥ 4.9 partout (RGAA AA texte normal),
   identiques light/dark pour meilleure reconnaissance catégorie. */
.category-badge--brand    { background: #E02B20; }
.category-badge--brand:hover,
.category-badge--brand:focus-visible    { background: #B3231A; }
.category-badge--alert    { background: #A35F00; }
.category-badge--alert:hover,
.category-badge--alert:focus-visible    { background: color-mix(in srgb, #A35F00 88%, black); }
.category-badge--publication { background: #1E7E34; }
.category-badge--publication:hover,
.category-badge--publication:focus-visible { background: color-mix(in srgb, #1E7E34 88%, black); }
.category-badge--cyber    { background: #0B5ED7; }
.category-badge--cyber:hover,
.category-badge--cyber:focus-visible    { background: color-mix(in srgb, #0B5ED7 88%, black); }

/* `.card a:not(.btn)` (spécificité 0,2,1) du reset bat ces variants
   (0,1,0) et impose color: inherit. On force #FFFFFF pour rester lisible
   sur le fond saturé du badge. */
.category-badge--brand,
.category-badge--alert,
.category-badge--publication,
.category-badge--cyber {
	color: #FFFFFF !important;
}

/* Card-news : flex column, footer en bas (mêmes règles que .card-reference) */
.card-news {
	display:        flex;
	flex-direction: column;
}

.card-news .card__body {
	flex: 1 0 auto;
}

.card-news .card__footer {
	margin-top: auto;
}

.card-news__meta {
	display:       flex;
	align-items:   center;
	gap:           var(--space-3);
	margin-bottom: var(--space-3);
	flex-wrap:     wrap;
}

.card-news__date {
	font-size: var(--text-xs);
	color:     var(--fg-muted);
}

/* ════════════════════════════════════════════════════════════════════
 * BANDEAU CERTIFICATION (PASSI / CERT FIRST / Qualiopi)
 * Cadre 240×140 fixe et identique pour les trois logos, afin
 * d'harmoniser la taille perçue malgré les ratios sources différents
 * (PASSI ~1.6:1, CERT ~1:1, Qualiopi ~2.4:1). Fond blanc constant
 * (light + dark) — les logos sources supposent un fond clair.
 * ════════════════════════════════════════════════════════════════════ */

.cert-banner {
	padding:    var(--space-2) 0;
	text-align: center;
}

.cert-banner__logos {
	display:         flex;
	flex-wrap:       wrap;
	justify-content: center;
	align-items:     center;
	gap:             var(--space-3);
}

.cert-banner__logo {
	display:         inline-flex;
	align-items:     center;
	justify-content: center;
	width:           240px;
	height:          140px;
	padding:         var(--space-3);
	background:      #FFFFFF;
	border:          1px solid var(--bw-gray-border);
	border-radius:   var(--radius-md);
	box-shadow:      var(--shadow-1);
}

.cert-banner__logo img {
	max-width:  100%;
	max-height: 100%;
	width:      auto;
	height:     auto;
	display:    block;
	object-fit: contain;
}
