/*
Theme Name: Cercle Décile
Description: Thème enfant de Hello Elementor pour Cercle Décile.
Author: MP Production
Template: hello-elementor
Version: 1.7.2
Text Domain: cercledecile
*/

/* Polices auto-hébergées (pas d'appel à Google Fonts : RGPD) */
@font-face {
	font-family: "Instrument Serif";
	src: url("fonts/instrument-serif.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Instrument Serif";
	src: url("fonts/instrument-serif-italic.woff2") format("woff2");
	font-weight: 400;
	font-style: italic;
	font-display: swap;
}
@font-face {
	font-family: "Inter";
	src: url("fonts/inter.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

/* Instrument Serif n'existe qu'en graisse normale : on empêche le navigateur de fabriquer un faux gras. */
h1, h2, h3, h4, h5, h6, .elementor-heading-title {
	font-synthesis: none;
}

/* Mot mis en avant : dans un bloc qui porte la classe « cd-mots » (Avancé → Classes CSS),
   un mot mis en italique dans un paragraphe s'affiche en Instrument Serif doré, plus grand. */
.cd-mots .elementor-widget-text-editor em,
.cd-mots .elementor-widget-text-editor i {
	font-family: "Instrument Serif", Georgia, serif;
	font-style: italic;
	font-weight: 400;
	font-size: 1.45em;
	line-height: 1;
	color: var(--e-global-color-secondary, #C2A16B);
}

/* Timeline (bloc « La méthode ») : grille avec la classe « cd-timeline », étapes « cd-etape », pastilles numérotées « cd-num » (cercle du logo, images/cd-pastille.svg).
   Ligne en ::after (Elementor réserve ::before des conteneurs à ses fonds). Les couleurs se règlent dans Elementor ; ici seulement la forme : pastilles rondes et ligne qui les relie,
   horizontale sur ordinateur, verticale à gauche sur tablette et mobile. La ligne va de l'ivoire à l'or : la progression. */
.cd-timeline {
	position: relative;
}
.cd-timeline::after {
	content: "";
	position: absolute;
	top: 35px;
	left: 12.5%;
	right: 12.5%;
	width: auto;
	height: 2px;
	pointer-events: none;
	background: linear-gradient(90deg, var(--e-global-color-ivoire2, #EFE8D8), var(--e-global-color-secondary, #C2A16B));
}
/* timeline à 3 étapes (classe « cd-n3 » en plus) : la ligne relie le centre de la 1re et de la 3e colonne */
.cd-timeline.cd-n3::after {
	left: 16.667%;
	right: 16.667%;
}
.cd-timeline .cd-num {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	/* le cercle à chevrons du logo autour du chiffre ; le fond (couleur de la page, réglé dans Elementor) masque la ligne */
	background-image: url("images/cd-pastille.svg"); /* chargé au défilement par Elementor (classe e-lazyloaded) quand le bloc est bas dans la page */
	background-size: 100% 100%;
	background-repeat: no-repeat;
	display: flex !important;
	align-items: center;
	justify-content: center;
	position: relative;
	z-index: 2;
	flex: none;
}
.cd-timeline .cd-num .elementor-heading-title {
	line-height: 1;
}
@media (max-width: 1024px) {
	/* verticale : un tronçon par étape, de sa pastille à la suivante (36 px = écart entre les étapes), pas après la dernière */
	.cd-timeline::after {
		display: none;
	}
	.cd-timeline .cd-etape {
		position: relative;
	}
	.cd-timeline .cd-etape:not(:last-child)::after {
		content: "";
		position: absolute;
		top: 36px;
		left: 35px;
		width: 2px;
		height: calc(100% + 36px);
		background: linear-gradient(180deg, var(--cd-l0), var(--cd-l1));
	}
	.cd-timeline .cd-etape:nth-child(1) { --cd-l0: #EFE8D8; --cd-l1: #E0CFAE; }
	.cd-timeline .cd-etape:nth-child(2) { --cd-l0: #E0CFAE; --cd-l1: #D1B88C; }
	.cd-timeline .cd-etape:nth-child(3) { --cd-l0: #D1B88C; --cd-l1: #C2A16B; }
	.cd-timeline .cd-etape {
		display: grid !important;
		grid-template-columns: 72px 1fr;
		column-gap: 20px;
		row-gap: 6px;
		align-items: start;
	}
	.cd-timeline .cd-etape > .cd-num {
		grid-row: 1 / span 2;
	}
	.cd-timeline .cd-etape > .elementor-element:not(.cd-num) {
		grid-column: 2;
	}
	.cd-timeline .cd-etape > .elementor-element:not(.cd-num):nth-child(2) {
		margin-top: 20px;
	}
}

/* Page Tarifs : les promesses des cartes de prix ont la même hauteur (3 lignes) pour que les prix restent alignés. */
.cd-promesse {
	min-height: calc(4.95em + 0.9rem); /* 3 lignes + marge du paragraphe */
}
@media (max-width: 767px) {
	.cd-promesse {
		min-height: 0;
	}
}

/* Liens « Détails & tarifs → » des tuiles de l'accueil (classe « cd-lien ») : passent en gras au survol. */
.cd-lien a {
	transition: font-weight .15s ease;
}
.cd-lien a:hover,
.cd-lien a:focus-visible {
	font-weight: 800;
}

/* Articles (modèle « Article — Cercle Décile », conteneur « cd-article ») : confort de lecture et éléments de l'éditeur. */
.cd-article .chapo {
	font-size: 1.2em;
	line-height: 1.6;
	color: var(--e-global-color-primary, #1C2841);
}
.cd-article .elementor-widget-theme-post-content h2 {
	font-family: "Instrument Serif", Georgia, serif;
	font-weight: 400;
	font-size: 34px;
	line-height: 1.15;
	color: var(--e-global-color-primary, #1C2841);
	margin: 1.8em 0 .5em;
}
.cd-article .elementor-widget-theme-post-content h3 {
	font-family: "Instrument Serif", Georgia, serif;
	font-weight: 400;
	font-size: 26px;
	color: var(--e-global-color-primary, #1C2841);
	margin: 1.5em 0 .4em;
}
.cd-article .elementor-widget-theme-post-content p {
	margin: 0 0 1.1em;
}
.cd-article .elementor-widget-theme-post-content a:not(.wp-block-button__link) {
	color: var(--e-global-color-primary, #1C2841);
	text-decoration: underline;
	text-decoration-color: var(--e-global-color-secondary, #C2A16B);
	text-underline-offset: 3px;
}
.cd-article .elementor-widget-theme-post-content em {
	font-style: italic;
}
.cd-article .elementor-widget-theme-post-content blockquote {
	margin: 1.6em 0;
	padding: 4px 0 4px 22px;
	border-left: 2px solid var(--e-global-color-secondary, #C2A16B);
	font-family: "Instrument Serif", Georgia, serif;
	font-style: italic;
	font-size: 1.4em;
	line-height: 1.35;
	color: var(--e-global-color-secondary, #C2A16B);
}
.cd-article .wp-block-buttons {
	margin: 1.6em 0;
}
.cd-article .wp-block-button__link {
	display: inline-block;
	background: var(--e-global-color-secondary, #C2A16B);
	color: var(--e-global-color-accent, #F7F3EA);
	border-radius: 999px;
	padding: 14px 28px;
	font: 700 15px/1.2 "Inter", sans-serif;
	text-decoration: none;
	transition: background .2s, color .2s;
}
.cd-article .wp-block-button__link:hover {
	background: var(--e-global-color-primary, #1C2841);
	color: var(--e-global-color-accent, #F7F3EA);
}
@media (max-width: 767px) {
	.cd-article .elementor-widget-theme-post-content h2 {
		font-size: 28px;
	}
}

/* Cartes d'articles (widget Articles, classe « cd-cartes ») : image sans voile sombre, carte à plat comme les tuiles. */
.cd-cartes .elementor-post__thumbnail__link:after {
	display: none;
}
.cd-cartes .elementor-post__card {
	box-shadow: none !important;
	overflow: hidden;
}
.cd-cartes .elementor-post__text {
	padding-top: 24px;
}
/* l'image remplit le cadre 5:3 de la carte même avant le script d'Elementor (pas de vide sous l'image au chargement) */
.cd-cartes .elementor-post__thumbnail img {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	transform: none !important;
}
.cd-cartes .elementor-posts--skin-cards .elementor-post__thumbnail__link,
.cd-cartes.elementor-posts--skin-cards .elementor-post__thumbnail__link {
	margin-bottom: 0;
}
.cd-cartes .elementor-post__thumbnail {
	border-radius: 10px;
}
.cd-cartes .elementor-post__meta-data {
	padding-bottom: 18px;
}

/* Pied de page : dernier article (photo, titre, date) — espacements resserrés. */
.elementor-location-footer .cd-cartes .elementor-post__thumbnail__link {
	margin-bottom: 0 !important;
}
.elementor-location-footer .cd-cartes .elementor-post__text {
	padding-top: 10px; /* au lieu des 24 px des cartes de la page Actualités */
}
.elementor-location-footer .cd-cartes .elementor-post__title {
	margin-bottom: 4px;
}

/* Élément « collant » (classe « cd-colle ») : sur ordinateur et tablette, il reste visible sous l'en-tête pendant
   que le texte voisin défile, dans les limites de sa colonne (ex. portrait de Qui sommes-nous). */
@media (min-width: 768px) {
	.cd-colle {
		position: sticky;
		top: 104px; /* hauteur de l'en-tête collant + marge */
		align-self: flex-start;
	}
}

/* Exemple de tableau de bord (accueil, « Les résultats suivis ») : classe « cd-tableau », contenu dans un widget HTML. */
.cd-tableau {
	background: #fff;
	border: 1px solid var(--e-global-color-ivoire2, #EFE8D8);
	border-radius: 16px;
	overflow: hidden;
	margin-top: 28px;
	font-family: "Inter", sans-serif;
	color: var(--e-global-color-text, #1B2438);
}
.cd-tableau__tete {
	background: var(--e-global-color-primary, #1C2841);
	padding: 22px 28px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	border-bottom: 3px solid var(--e-global-color-secondary, #C2A16B);
}
.cd-tableau__surtitre {
	font: 600 11px/1 "Inter", sans-serif;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--e-global-color-secondary, #C2A16B);
}
.cd-tableau__titre {
	font: 400 26px/1.15 "Instrument Serif", Georgia, serif;
	color: var(--e-global-color-accent, #F7F3EA);
}
.cd-tableau table {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
	border: 0;
}
.cd-tableau th,
.cd-tableau td {
	border: 0;
	background: transparent;
	text-align: left;
	vertical-align: middle;
}
.cd-tableau thead th {
	font: 600 11px/1 "Inter", sans-serif;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--e-global-color-gris, #55607A);
	padding: 18px 28px 12px;
	border-bottom: 1px solid var(--e-global-color-ivoire2, #EFE8D8);
}
.cd-tableau thead th + th {
	padding-left: 0; /* aligné sur les chiffres de la colonne */
}
.cd-tableau tbody tr + tr th,
.cd-tableau tbody tr + tr td {
	border-top: 1px solid var(--e-global-color-ivoire2, #EFE8D8);
}
.cd-tableau tbody th {
	font: 400 20px/1.25 "Instrument Serif", Georgia, serif;
	color: var(--e-global-color-primary, #1C2841);
	padding: 18px 28px;
	width: 46%;
}
.cd-tableau tbody th small {
	font: 400 13px/1.3 "Inter", sans-serif;
	color: var(--e-global-color-gris, #55607A);
}
/* neutralise les styles de tableau du thème parent (rayures grises, en-têtes centrés) */
.cd-tableau table th,
.cd-tableau table td,
.cd-tableau table tbody > tr:nth-child(odd) > td,
.cd-tableau table tbody > tr:nth-child(odd) > th,
.cd-tableau table tbody tr:hover > td,
.cd-tableau table tbody tr:hover > th {
	background-color: transparent !important;
	text-align: left !important;
}
/* chemin parcouru entre le départ et la cible */
.cd-tableau__barre {
	display: block;
	height: 4px;
	margin-top: 10px;
	border-radius: 4px;
	background: linear-gradient(90deg, #E8DCC2, var(--e-global-color-secondary, #C2A16B)) 0 0 / var(--p, 0%) 100% no-repeat, var(--e-global-color-ivoire2, #EFE8D8);
	max-width: 260px;
}
.cd-tableau tbody td {
	font-size: 16px;
	color: var(--e-global-color-gris, #55607A);
	padding: 18px 28px 18px 0;
	white-space: nowrap;
}
.cd-tableau td.cd-tableau__mois {
	font-weight: 700;
	color: var(--e-global-color-primary, #1C2841);
}
.cd-tableau td.cd-tableau__cible {
	font: italic 400 21px/1 "Instrument Serif", Georgia, serif;
	color: var(--e-global-color-secondary, #C2A16B);
}
.cd-tableau__note {
	margin: 0;
	padding: 16px 28px 20px;
	font-size: 13px;
	line-height: 1.6;
	color: var(--e-global-color-gris, #55607A);
	background: var(--e-global-color-accent, #F7F3EA);
	border-top: 1px solid var(--e-global-color-ivoire2, #EFE8D8);
}
/* mobile : une fiche par indicateur, les trois valeurs côte à côte avec leur libellé */
@media (max-width: 767px) {
	.cd-tableau thead { display: none; }
	.cd-tableau tbody tr {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		padding: 16px 20px;
		border-top: 1px solid var(--e-global-color-ivoire2, #EFE8D8);
	}
	.cd-tableau tbody tr:first-child { border-top: 0; }
	.cd-tableau tbody tr + tr th,
	.cd-tableau tbody tr + tr td { border-top: 0; }
	.cd-tableau tbody th { grid-column: 1 / -1; width: auto; padding: 0 0 10px; }
	.cd-tableau tbody td { padding: 0; }
	.cd-tableau tbody td::before {
		content: attr(data-l);
		display: block;
		font: 600 10px/1.6 "Inter", sans-serif;
		letter-spacing: 1px;
		text-transform: uppercase;
		color: var(--e-global-color-gris, #55607A);
	}
	.cd-tableau__tete, .cd-tableau__note { padding-left: 20px; padding-right: 20px; }
}
