/* =====================================================================
   REFONTE GUIDES PDV / PSE / RCC — couche de style
   Chargé uniquement sur les 3 pages guides (cf. functions.php).
   SÉCURITÉ : tout est scopé sous body.aa-guide-page, classe posée par
   guides-refonte.js. Si le JS ne s'exécute pas, rien ne change.
   Big Neurons — 2026-07
   ===================================================================== */

/* Manrope (maquette) — auto-hébergée, pas d'appel externe (RGPD) */
@font-face {
	font-family: 'Manrope';
	src: url('guides/manrope-latin.woff2') format('woff2');
	font-weight: 400 800;
	font-style: normal;
	font-display: swap;
}

/* ---------------------------------------------------------------
   1. HERO — eyebrow + titre (texte inchangé, style maquette)
   --------------------------------------------------------------- */
body.aa-guide-page .aa-hero-eyebrow {
	font-family: 'Manrope', 'Avenir Regular', sans-serif;
	font-weight: 700;
	font-size: 12px;
	line-height: 16px;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	color: #377EF4;
	margin: 0 0 16px;
}
body.aa-guide-page h2.aa-hero-title,
body.aa-guide-page .aa-hero-title {
	font-family: 'Avenir Black', 'Avenir Regular', sans-serif !important;
	font-weight: 400 !important;
	font-size: 56px !important;
	line-height: 1.1 !important;
	color: #0B0F1C !important;
}
@media (max-width: 1024px) {
	body.aa-guide-page .aa-hero-title { font-size: 42px !important; }
}
@media (max-width: 767px) {
	body.aa-guide-page .aa-hero-title { font-size: 32px !important; }
}

/* aplatissement du bandeau hero (classes posées par le JS) :
   plus de boîte bleue, plus de photo, titre aligné à gauche.
   min-height:0 = on retire les 400px hérités de l'ancienne bannière
   pour que la suite (TOC + sidebar) remonte comme sur la maquette */
body.aa-guide-page .aa-hero-side { display: none !important; }
body.aa-guide-page .aa-hero-box {
	background: transparent !important;
	width: 100% !important;
	max-width: 100% !important;
	min-height: 0 !important;
	align-items: flex-start !important;
	justify-content: flex-start !important;
	padding: 16px 0 32px !important;
}
body.aa-guide-page .aa-hero-box .elementor-widget,
body.aa-guide-page .aa-hero-box .elementor-widget-container {
	width: 100% !important;
	max-width: 860px;
}
body.aa-guide-page .aa-hero-box .aa-hero-eyebrow,
body.aa-guide-page .aa-hero-box .aa-hero-title {
	text-align: left !important;
}

/* ---------------------------------------------------------------
   2. TABLE DES MATIÈRES (widget Elementor TOC)
   - carte claire, sous-titres masqués, numérotation propre
   --------------------------------------------------------------- */
body.aa-guide-page .elementor-widget-table-of-contents .elementor-toc__header,
body.aa-guide-page .elementor-widget-table-of-contents .elementor-toc__body {
	background: transparent;
	border: 0;
}
body.aa-guide-page .elementor-widget-table-of-contents .elementor-widget-container {
	background: #F8FAFC;
	border: 1px solid #F1F5F9;
	border-radius: 8px;
	padding: 41px 41px 25px;
}
body.aa-guide-page .elementor-toc__header-title {
	font-family: 'Avenir Black', 'Avenir Regular', sans-serif;
	font-weight: 400;
	font-size: 14px;
	line-height: 20px;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	color: #0B0F1C;
}
/* sous-titres : on ne garde que le premier niveau */
body.aa-guide-page .elementor-toc__list-item .elementor-toc__list-wrapper {
	display: none !important;
}
/* entrée "titre de page" retirée par le JS (maquette : la TOC commence aux sections) */
body.aa-guide-page .elementor-toc__list-item.aa-toc-skip {
	display: none !important;
}
/* items de premier niveau */
body.aa-guide-page .elementor-toc__body > .elementor-toc__list-wrapper > .elementor-toc__list-item {
	margin-bottom: 16px;
}
body.aa-guide-page .elementor-toc__body > .elementor-toc__list-wrapper > .elementor-toc__list-item:last-child {
	margin-bottom: 0;
}
body.aa-guide-page .elementor-toc__list-item-text,
body.aa-guide-page .elementor-toc__list-item-text-wrapper a {
	font-family: 'Manrope', 'Avenir Regular', sans-serif;
	font-weight: 600;
	font-size: 18px;
	line-height: 28px;
	color: #0B0F1C;
}
body.aa-guide-page .elementor-toc__list-item-text.elementor-item-active,
body.aa-guide-page .elementor-toc__list-item-text-wrapper a:hover {
	color: #377EF4;
	text-decoration: none;
}
/* marqueurs natifs (puces/icônes) masqués — la numérotation "1. " est
   injectée dans le texte par guides-refonte.js */
body.aa-guide-page .elementor-toc__list-item-text-wrapper i,
body.aa-guide-page .elementor-toc__list-item-text-wrapper svg,
body.aa-guide-page .elementor-toc__number-icon {
	display: none !important;
}

/* ---------------------------------------------------------------
   3. TABLEAUX COMPARATIFS (grilles e-con taguées .aa-guide-table)
   --------------------------------------------------------------- */
body.aa-guide-page .aa-guide-table {
	border: 1px solid #DCDAEE !important;
	border-radius: 8px !important;
	overflow: hidden !important;
	background: #fff !important;
	gap: 0 !important; /* neutralise les gaps de la grille d'origine */
	/* vraie grille CSS : N colonnes égales (N posé par le JS via --aa-cols),
	   indépendante des largeurs flex des cellules d'origine */
	display: grid !important;
	grid-template-columns: repeat(var(--aa-cols, 4), 1fr) !important;
}
/* neutralisation du design d'origine (cellules en cartes + chips colorées) :
   les règles Elementor par element-ID sont plus spécifiques -> !important */
body.aa-guide-page .aa-guide-table > .e-con {
	border: 0 !important;
	border-bottom: 1px solid #DCDAEE !important;
	border-radius: 0 !important;
	margin: 0 !important;
	box-shadow: none !important;
	width: auto !important;      /* la grille pilote la largeur, pas la cellule */
	max-width: none !important;
	min-width: 0 !important;
	background: #fff !important;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 18px 20px !important;
	min-height: 0 !important;
}
body.aa-guide-page .aa-guide-table > .e-con.aa-last-row { border-bottom: 0 !important; }
body.aa-guide-page .aa-guide-table .elementor-widget,
body.aa-guide-page .aa-guide-table .elementor-widget-container {
	background: transparent !important;
	padding: 0 !important;
	border: 0 !important;
	box-shadow: none !important;
}
/* cellules d'en-tête (taguées .aa-th par le JS) */
body.aa-guide-page .aa-guide-table > .e-con.aa-th {
	background: #F8FAFC;
}
body.aa-guide-page .aa-guide-table > .e-con.aa-th p {
	font-family: 'Avenir Regular', sans-serif;
	font-size: 16px;
	line-height: 1.1;
	text-transform: uppercase;
	text-align: center;
	color: #0B0F1C;
	margin: 0;
}
/* première colonne (taguée .aa-first-col) : libellés en gras */
body.aa-guide-page .aa-guide-table > .e-con.aa-first-col:not(.aa-th) p {
	font-family: 'Avenir Black', 'Avenir Regular', sans-serif;
}
body.aa-guide-page .aa-guide-table > .e-con p {
	font-size: 14px;
	line-height: 1.25;
	text-align: center;
	color: #0B0F1C;
	margin: 0;
}
@media (max-width: 767px) {
	body.aa-guide-page .aa-guide-table > .e-con { padding: 12px 10px !important; }
	body.aa-guide-page .aa-guide-table > .e-con p { font-size: 12px; }
	body.aa-guide-page .aa-guide-table > .e-con.aa-th p { font-size: 13px; }
}

/* ---------------------------------------------------------------
   4. BANNIÈRE INFOGRAPHIE (injectée) + POP-IN SCROLLABLE
   --------------------------------------------------------------- */
body.aa-guide-page .aa-infog-banner {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	background: #0B0F1B url('guides/banner-bg.jpg') center / cover no-repeat;
	border-radius: 16px;
	padding: 32px 64px;
	min-height: 140px;
	margin: 40px 0;
	overflow: hidden;
}
body.aa-guide-page .aa-infog-banner__left {
	display: flex;
	align-items: center;
	gap: 35px;
	min-width: 0;
}
body.aa-guide-page .aa-infog-banner__icon {
	flex: 0 0 auto;
	width: 78px;
	height: 78px;
}
body.aa-guide-page .aa-infog-banner__title {
	font-family: 'Avenir Black', 'Avenir Regular', sans-serif;
	font-weight: 400;
	font-size: 32px;
	line-height: 1.1;
	color: #fff;
	max-width: 360px;
	margin: 0;
}
body.aa-guide-page .aa-infog-banner__btn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #fff;
	border: 0;
	border-radius: 48px;
	padding: 16px 24px;
	font-family: 'Avenir Black', 'Avenir Regular', sans-serif;
	font-size: 16px;
	line-height: 24px;
	color: #0B0F1C;
	cursor: pointer;
	transition: transform .25s ease, box-shadow .25s ease;
}
body.aa-guide-page .aa-infog-banner__btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
body.aa-guide-page .aa-infog-banner__btn svg { flex: 0 0 auto; }

@media (max-width: 1024px) {
	body.aa-guide-page .aa-infog-banner { padding: 28px 32px; }
	body.aa-guide-page .aa-infog-banner__title { font-size: 26px; }
}
@media (max-width: 767px) {
	body.aa-guide-page .aa-infog-banner {
		flex-direction: column;
		align-items: flex-start;
		padding: 24px 20px;
		margin: 28px 0;
	}
	body.aa-guide-page .aa-infog-banner__left { gap: 16px; }
	body.aa-guide-page .aa-infog-banner__icon { width: 56px; height: 56px; }
	body.aa-guide-page .aa-infog-banner__title { font-size: 22px; max-width: none; }
	body.aa-guide-page .aa-infog-banner__btn { width: 100%; justify-content: center; }
}

/* Pop-in */
body.aa-guide-page .aa-infog-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: flex-start;
	justify-content: center;
	background: rgba(4, 6, 15, 0.88);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 48px 16px;
}
body.aa-guide-page .aa-infog-overlay.is-open { display: flex; }
body.aa-guide-page.aa-modal-open { overflow: hidden; }
body.aa-guide-page .aa-infog-dialog {
	position: relative;
	width: 100%;
	max-width: 860px;
	margin: auto 0;
}
body.aa-guide-page .aa-infog-dialog img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 16px;
}
body.aa-guide-page .aa-infog-close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 2;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(11, 15, 28, 0.6);
	border: 0;
	border-radius: 50%;
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}
body.aa-guide-page .aa-infog-close:hover { background: rgba(11, 15, 28, 0.9); }

/* ---------------------------------------------------------------
   5. SIDEBAR — carte "Ressource gratuite" (existante, restylée)
   --------------------------------------------------------------- */
body.aa-guide-page .guide-card-sticky {
	position: relative;
	background: #0B0F1C !important;
	border-radius: 8px !important;
	padding: 32px !important;
	box-shadow: none !important;
}
/* étoile décorative en haut à droite */
body.aa-guide-page .guide-card-sticky::after {
	content: "";
	position: absolute;
	top: 24px;
	right: 24px;
	width: 46px;
	height: 46px;
	background: url('guides/picto-star.svg') center / contain no-repeat;
	pointer-events: none;
}
/* l'illustration actuelle disparaît (remplacée par le nouveau design) */
body.aa-guide-page .guide-card-sticky .guide-card-sticky-img { display: none !important; }

body.aa-guide-page .aa-res-eyebrow {
	font-family: 'Avenir Regular', sans-serif;
	font-size: 11px;
	line-height: 1.1;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: #3AEEEB;
	margin: 0 0 20px;
	padding-right: 56px; /* place pour l'étoile */
}
body.aa-guide-page .guide-card-sticky .guide-card-sticky-text {
	font-family: 'Avenir Black', 'Avenir Regular', sans-serif !important;
	font-size: 31px !important;
	line-height: 1.2 !important;
	color: #fff !important;
	margin: 0 0 23px !important;
	padding-right: 0;
}
body.aa-guide-page .guide-card-sticky a { text-decoration: none; }
body.aa-guide-page .guide-card-sticky .guide-card-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	background: #377EF4 !important;
	border-radius: 48px !important;
	padding: 16px 24px !important;
	font-family: 'Avenir Black', 'Avenir Regular', sans-serif !important;
	font-size: 16px !important;
	line-height: 24px !important;
	color: #fff !important;
	text-align: center;
	transition: background .25s ease;
}
body.aa-guide-page .guide-card-sticky .guide-card-btn:hover { background: #3271DC !important; }
body.aa-guide-page .aa-res-meta {
	border-top: 1px solid #183C5F;
	margin: 23px 0 0;
	padding: 25px 0 0;
	font-family: 'Avenir Regular', sans-serif;
	font-size: 10px;
	line-height: 15px;
	letter-spacing: 1px;
	text-transform: uppercase;
	text-align: center;
	color: #AAB3CD;
}

/* ---------------------------------------------------------------
   6. SIDEBAR — carte "Nos modèles de lettres" (injectée)
   --------------------------------------------------------------- */
body.aa-guide-page .aa-models-card {
	display: block;
	border-radius: 8px;
	overflow: hidden;
	margin-top: 16px;
	text-decoration: none !important;
	box-shadow: none;
}
body.aa-guide-page .aa-models-card__inner {
	background: #FAF4F2;
	padding: 24px 32px;
	display: flex;
	flex-direction: column;
	gap: 23px;
}
body.aa-guide-page .aa-models-card__icon { width: 30px; height: 32px; }
body.aa-guide-page .aa-models-card__title {
	font-family: 'Avenir Black', 'Avenir Regular', sans-serif;
	font-weight: 400;
	font-size: 32px;
	line-height: 1.2;
	color: #0B0F1C;
	margin: 0;
}
body.aa-guide-page .aa-models-card__link {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
	font-family: 'Avenir Regular', sans-serif;
	font-size: 16px;
	line-height: 24px;
	color: #0B0F1C;
}
body.aa-guide-page .aa-models-card__link svg { transition: transform .25s ease; }
body.aa-guide-page .aa-models-card:hover .aa-models-card__link svg { transform: translateX(4px); }
body.aa-guide-page .aa-models-card__bar { height: 8px; background: #377EF4; }

/* ---------------------------------------------------------------
   7. LARGEURS MAQUETTE — rangée contenu+sidebar élargie à 1284px,
   sidebar fixée à 411px (classes posées par le JS).
   La maquette est dessinée sur un conteneur ~1280px alors que la
   page Elementor est bornée à 1140px : sans ça, tout est trop étroit.
   --------------------------------------------------------------- */
@media (min-width: 1320px) {
	body.aa-guide-page .aa-guide-row {
		--content-width: 1284px !important;
		max-width: 1284px !important;
		flex-wrap: nowrap !important;
	}
	body.aa-guide-page .aa-content-col {
		flex: 1 1 0 !important;
		min-width: 0 !important;
		width: auto !important;
		max-width: none !important;
	}
	body.aa-guide-page .aa-sidebar-col {
		width: 411px !important;
		min-width: 411px !important;
		max-width: 411px !important;
		flex: 0 0 411px !important;
	}
	/* le hero suit la même largeur pour garder des marges alignées */
	body.aa-guide-page .aa-hero-banner {
		--content-width: 1284px !important;
		max-width: 1284px !important;
	}
	/* le titre ne doit jamais passer sous la sidebar remontée à son niveau */
	body.aa-guide-page .aa-hero-box .elementor-widget-container,
	body.aa-guide-page .aa-hero-title {
		max-width: 790px !important;
	}
}
/* ---------------------------------------------------------------
   8. NOTRE SIDEBAR (remplace l'existante sur desktop)
   L'ancienne colonne (sticky JS Elementor) est masquée : notre
   markup + sticky CSS natif = zéro interférence, largeur garantie.
   --------------------------------------------------------------- */
body.aa-guide-page .aa-sidebar-replaced > .e-con { display: none !important; }
body.aa-guide-page .aa-sidebar-col { align-items: stretch; }

/* toutes les cartes d'origine (desktop + instance mobile en flux) sont
   remplacées par les nôtres */
body.aa-guide-page .guide-card-sticky { display: none !important; }

/* version mobile/tablette : clone des cartes entre le hero et la TOC
   (maquette mobile) — masqué sur desktop */
body.aa-guide-page .aa-sidebar-mobile { display: none; }
@media (max-width: 1024px) {
	body.aa-guide-page .aa-sidebar-mobile {
		display: flex;
		flex-direction: column;
		gap: 16px;
		margin: 8px 0 28px;
	}
	body.aa-guide-page .aa-sidebar { display: none; }
}

body.aa-guide-page .aa-sidebar {
	position: sticky;
	top: 130px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	width: 100%;
	max-height: calc(100vh - 150px);
	overflow-y: auto;
	scrollbar-width: none;
}
body.aa-guide-page .aa-sidebar::-webkit-scrollbar { display: none; }

/* carte "Ressource gratuite" (notre markup) */
body.aa-guide-page .aa-retro-card {
	position: relative;
	background: #0B0F1C;
	border-radius: 8px;
	padding: 32px;
}
body.aa-guide-page .aa-retro-card::after {
	content: "";
	position: absolute;
	top: 24px;
	right: 24px;
	width: 46px;
	height: 46px;
	background: url('guides/picto-star.svg') center / contain no-repeat;
	pointer-events: none;
}
body.aa-guide-page .aa-retro-card__title {
	font-family: 'Avenir Black', 'Avenir Regular', sans-serif;
	font-size: 31px;
	line-height: 1.2;
	color: #fff;
	margin: 0 0 23px;
}
body.aa-guide-page .aa-retro-card__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	background: #377EF4;
	border-radius: 48px;
	padding: 16px 24px;
	font-family: 'Avenir Black', 'Avenir Regular', sans-serif;
	font-size: 16px;
	line-height: 24px;
	color: #fff !important;
	text-align: center;
	text-decoration: none !important;
	white-space: nowrap;
	transition: background .25s ease;
}
body.aa-guide-page .aa-retro-card__btn:hover { background: #3271DC; }
body.aa-guide-page .aa-retro-card__btn svg { flex: 0 0 auto; }
body.aa-guide-page .aa-retro-card .aa-res-eyebrow { margin-bottom: 20px; }
body.aa-guide-page .aa-retro-card .aa-res-meta { margin-top: 23px; }

/* ---------------------------------------------------------------
   9. SIDEBAR — nettoyage existant (mobile inclus)
   --------------------------------------------------------------- */
/* Bloc turquoise préexistant : absent de la maquette et doublon de la
   carte "Nos modèles de lettres" -> masqué (réversible en supprimant
   cette règle) */
body.aa-guide-page .guide-card-sticky-2 { display: none !important; }

/* Garde-fou : quand le groupe sticky Elementor est actif (fixed),
   il ne doit jamais dépasser l'écran -> scroll interne si besoin */
body.aa-guide-page .aa-sticky-group.elementor-sticky--active {
	max-height: calc(100vh - 200px);
	overflow-y: auto;
	scrollbar-width: none;
}
body.aa-guide-page .aa-sticky-group.elementor-sticky--active::-webkit-scrollbar { display: none; }

/* Carte modèles : tailles exactes maquette (la sidebar 411px les absorbe) */
body.aa-guide-page .aa-models-card__inner { padding: 24px 32px; gap: 23px; }
body.aa-guide-page .aa-models-card__title { font-size: 32px; }
