/*
 * Theme Name:  Revision Child
 * Theme URI:   https://revision.codesupply.co/
 * Description: Revision Child Theme — Bureaudeposte.net Le Mag'
 * Author:      Code Supply Co.
 * Author URI:  https://codesupply.co/
 * Template:    revision
 * Version:     1.0.0
 */

/* =========================================================
   BUREAUDEPOSTE.NET — CHARTE GRAPHIQUE ET CORRECTIONS
   =========================================================

   TABLE DES MATIÈRES
   ------------------
   1. MODE CLAIR FORCÉ (masquer toggle dark/light)
   2. COULEURS — CHARTE JAUNE BUREAUDEPOSTE.NET
   3. CORRECTIONS IMAGES (ratio, crop)
   4. CORRECTIONS LAYOUT (espacement, cards)
   5. PARTAGE SOCIAL (masquer Facebook et X)
   6. FOOTER
   7. NAVIGATION ET BREADCRUMBS
   ========================================================= */


/* ---------------------------------------------------------
   1. MODE CLAIR FORCÉ
   Masque le bouton toggle dark/light mode dans le header
   et le menu mobile (géré aussi via PHP mais en sécurité CSS).
   --------------------------------------------------------- */

.cs-site-scheme-toggle,
.cs-header__scheme-toggle,
.cs-offcanvas__scheme-toggle {
	display: none !important;
}


/* ---------------------------------------------------------
   2. COULEURS — CHARTE JAUNE BUREAUDEPOSTE.NET
   Couleur principale : #FFC928 (jaune logo)
   Couleur sombre associée : #C78C00
   Remplace le violet (#5955D1 / #9895FF) du thème par défaut.
   --------------------------------------------------------- */

:root {
	/* Couleur d'accentuation → jaune BDP */
	--cs-light-accent-color:       #FFC928;

	/* Couleur primaire (titres, liens forts) */
	--cs-light-primary-color:      #1A1A2E;

	/* Dégradé boutons : jaune plein (pas de dégradé) */
	--cs-light-button-background-start: #FFC928;
	--cs-light-button-background-end:   #FFC928;

	/* Texte des boutons : noir pour contraste sur jaune */
	--cs-light-button-color:       #1A1A2E;

	/* Hover boutons : teinte plus claire */
	--cs-light-button-hover-background-start: #FFD45A;
	--cs-light-button-hover-background-end:   #FFC820;
	--cs-light-button-hover-color:            #1A1A2E;

	/* Override direct de la variable computed (plus fiable que les indirections) */
	--cs-color-button-hover: linear-gradient(180deg, #FFD45A 0%, #FFC820 100%);
	--cs-color-button-hover-contrast: #1A1A2E;
}

/* Assure que la couleur d'accentuation s'applique aux liens et tags */
a:hover,
.cs-meta-category a:hover,
.cs-entry__title a:hover {
	color: #FFC928;
}

.post-categories a,
.cs-meta-category a {
	border-color: #FFC928;
}

.post-categories a:hover,
.cs-meta-category a:hover {
	background-color: #FFC928;
	color: #1A1A2E;
}

/* Boutons "Lire l'article" */
.cs-entry__discover-more .cs-btn,
.cs-entry__discover-more a,
.cs-button,
.wp-block-button__link {
	background: #FFC928;
	color: #1A1A2E !important;
	border-color: #FFC928;
}

.cs-entry__discover-more .cs-btn:hover,
.cs-entry__discover-more a:hover {
	background: linear-gradient(135deg, #FFD45A 0%, #FFC928 100%);
	color: #1A1A2E !important;
}

/* Barre de progression de lecture */
.cs-reading-progress-bar {
	background-color: #FFC928;
}

/* Soulignement actif dans le menu */
.cs-header .current-menu-item > a,
.cs-header .current-menu-ancestor > a {
	color: #FFC928;
}


/* ---------------------------------------------------------
   3. CORRECTIONS IMAGES
   Retire le recadrage carré sur les thumbnails des listes.
   Le filtre PHP force landscape-3-2 mais cette règle CSS
   protège aussi des cas non gérés.
   --------------------------------------------------------- */

/* Forcer le ratio 3:2 sur les thumbnails de liste d'articles */
.cs-entry__thumbnail .cs-overlay-ratio:not(.cs-ratio-landscape-16-9):not(.cs-ratio-portrait):not(.cs-ratio-portrait-2-3):not(.cs-ratio-landscape):not(.cs-ratio-landscape-3-2):not(.cs-ratio-landscape-21-9) {
	/* Neutralise un éventuel ratio carré résiduel */
	aspect-ratio: auto;
}

.cs-overlay-ratio.cs-ratio-square:before {
	/* Désactive le padding-top carré → passe en 3:2 */
	padding-top: 66.67%;
}

/* Images dans les cards : ne pas étirer */
.cs-entry__thumbnail img,
.cs-overlay-background img {
	object-fit: cover;
	width: 100%;
	height: 100%;
}


/* ---------------------------------------------------------
   4. CORRECTIONS LAYOUT — ESPACEMENT ET CARDS
   --------------------------------------------------------- */

/* Réduire l'espace blanc excessif entre le header et les articles */
.cs-site-content {
	padding-top: 2rem;
}

/* Harmoniser la hauteur des cards sans image */
.cs-entry__outer:not(:has(.cs-entry__thumbnail)) {
	min-height: auto;
}

/* Espace entre les articles de la liste */
.cs-hero-type-1 .cs-entry + .cs-entry,
.cs-entry__list .cs-entry + .cs-entry {
	margin-top: 2rem;
}

/* Image mise en avant de l'article (page article) :
   évite qu'elle soit trop grande sur mobile */
.cs-entry__header .cs-overlay-background img {
	max-height: 480px;
	object-fit: cover;
	object-position: center top;
}

/* Cards sans image : aligner le contenu proprement */
.cs-entry__outer:not(:has(.cs-entry__thumbnail)) .cs-entry__content {
	padding-top: 1rem;
}

/* Sidebar : espacement cohérent */
.cs-sidebar .widget + .widget {
	margin-top: 2rem;
}


/* ---------------------------------------------------------
   5. PARTAGE SOCIAL — MASQUER FACEBOOK ET X (TWITTER)
   Sécurité CSS en complément du override PHP.
   --------------------------------------------------------- */

.cs-share .cs-share__link:has(.cs-icon-twitter-x),
.cs-share .cs-share__link:has(.cs-icon-facebook) {
	display: none !important;
}

/* Fallback pour navigateurs sans support :has() */
.cs-icon-twitter-x,
.cs-icon-facebook {
	/* Les liens restent dans le DOM mais sont visuellement masqués */
}

.cs-share a[title*="Twitter"],
.cs-share a[title*="Facebook"],
.cs-share a[href*="twitter.com"],
.cs-share a[href*="facebook.com"] {
	display: none !important;
}


/* ---------------------------------------------------------
   6. FOOTER
   --------------------------------------------------------- */

.cs-footer {
	padding: 1.5rem 0;
}

.cs-footer__copyright {
	font-size: 0.875rem;
	opacity: 0.85;
}

.cs-footer__copyright a {
	color: #FFC928;
	text-decoration: none;
	font-weight: 600;
}

.cs-footer__copyright a:hover {
	text-decoration: underline;
}


/* ---------------------------------------------------------
   7. NAVIGATION, BREADCRUMBS ET PAGINATION
   --------------------------------------------------------- */

/* Séparateur breadcrumb */
.cs-breadcrumbs .cs-separator {
	margin: 0 0.4rem;
	opacity: 0.5;
}

/* Pagination */
.cs-pagination .page-numbers.current {
	background-color: #FFC928;
	color: #1A1A2E;
	border-color: #FFC928;
}

.cs-pagination .page-numbers:hover {
	background-color: #FFC928;
	color: #1A1A2E;
	border-color: #FFC928;
}

/* Menu : item actif */
.cs-header-nav .current-menu-item > a {
	color: #FFC928 !important;
}

/* Navigation Article suivant / Article précédent
   Icegram injecte des <div class="ig_inline_container"> vides comme enfants
   directs du grid CSS, ce qui décale les blocs prev/next dans les mauvaises
   colonnes. On les masque pour qu'ils ne participent pas au flux du Grid. */
.cs-entry-prev-next > .ig_inline_container {
	display: none !important;
}


/* ---------------------------------------------------------
   8. WPBAKERY — BOUTONS, IMAGES ET TYPOGRAPHIE
   Remplace le violet par défaut WPBakery (#5955D1) par le jaune BDP.
   Corrige les images carrées 150x150 des blocs vc_single_image.
   Réduit la taille des titres dans les CTA.
   Arrondit les coins des boutons WPBakery.
   Supprime l'alignement justifié dans les blocs VC.
   --------------------------------------------------------- */

/* ---------------------------------------------------------
   8. WPBAKERY — BOUTONS ET IMAGES
   Remplace le violet par défaut WPBakery (#5955D1) par le jaune BDP.
   Corrige les images carrées 150x150 des blocs vc_single_image.
   --------------------------------------------------------- */

/* Tous les boutons WPBakery → jaune plat, sans dégradé */
.vc_btn3.vc_btn3-style-fill,
.vc_btn3.vc_btn3-style-flat,
.vc_btn3.vc_btn3-style-modern,
.vc_btn3.vc_btn3-style-3d,
.vc_btn3.vc_btn3-style-classic,
.vc_btn3.vc_btn3-style-custom,
.vc_btn3:not(.vc_btn3-style-outline):not(.vc_btn3-style-ghost) {
	background-image: none !important;
}
.vc_btn3:not(.vc_btn3-style-custom):not(.vc_btn3-style-outline):not(.vc_btn3-style-ghost) {
	background-color: #FFC928 !important;
	color: #1A1A2E !important;
	border-color: #FFC928 !important;
}

/* Hover boutons thème Revision : le thème utilise un ::before qui passe à opacity:1
   avec background: var(--cs-color-button-hover). On surcharge ce pseudo-élément
   directement pour contourner les médias queries du thème parent. */
.cs-button::before,
.cs-entry__discover-more a::before,
button:not([class*="cs-offcanvas"]):not([class*="cs-header"])::before,
input[type=submit]::before {
	background: linear-gradient(180deg, #FFD45A 0%, #FFC820 100%) !important;
}

/* Hover boutons WPBakery (vc_btn3) — fond inline, pas de ::before */
.vc_btn3:hover,
.vc_btn3.vc_btn3-style-fill:hover,
.vc_btn3.vc_btn3-style-flat:hover,
.vc_btn3.vc_btn3-style-3d:hover,
.vc_btn3.vc_btn3-style-modern:hover,
.vc_btn3.vc_btn3-style-classic:hover,
.vc_btn3.vc_btn3-style-custom:hover,
.vc_general.vc_btn3:hover {
	background-color: #FFD45A !important;
	background-image: none !important;
	border-color: #FFD45A !important;
	color: #1A1A2E !important;
	box-shadow: none !important;
}

/* Boutons outline/ghost WPBakery → bordure et texte jaune */
.vc_btn3.vc_btn3-style-outline,
.vc_btn3.vc_btn3-style-ghost {
	border-color: #FFC928 !important;
	color: #FFC928 !important;
}

/* Images vc_single_image : ne pas forcer le crop carré */
.vc_single_image-wrapper img,
.wpb_single_image img,
.vc_single_image img {
	width: auto !important;
	max-width: 100% !important;
	height: auto !important;
	object-fit: contain;
}

/* Conteneur image WPBakery : centré et sans débordement */
.vc_single_image-wrapper,
.wpb_single_image .vc_figure {
	display: block;
	text-align: center;
}

/* CTA box WPBakery (vc_cta3) : harmoniser le fond */
.vc_cta3.vc_cta3-style-classic {
	border-radius: 4px;
}

/* Icônes WPBakery : couleur jaune si accentuation */
.vc_icon_element-icon {
	color: #FFC928 !important;
}

/* Boutons WPBakery : texte en gras (même font-weight que les boutons .cs-button "Lire aussi")
   Le thème définit --cs-font-primary-weight: 800 via le customizer. */
.vc_btn3,
.vc_general.vc_btn3 {
	font-weight: var(--cs-font-primary-weight, 800) !important;
}

/* Boutons WPBakery : coins arrondis
   js_composer.min.css force border-radius:0px sur .vc_btn3-shape-square,
   on surcharge avec !important sur TOUS les sélecteurs possibles. */
.vc_btn3,
.vc_btn3.vc_btn3-shape-square,
.vc_btn3.vc_btn3-shape-round,
.vc_btn3.vc_btn3-style-fill,
.vc_btn3.vc_btn3-style-flat,
.vc_btn3.vc_btn3-style-outline,
.vc_btn3.vc_btn3-style-ghost,
.vc_btn3.vc_btn3-style-3d,
.vc_btn3.vc_btn3-style-modern,
.vc_btn3.vc_btn3-style-classic,
.vc_btn3.vc_btn3-style-custom,
.vc_btn3.vc_btn3-size-sm,
.vc_btn3.vc_btn3-size-md,
.vc_btn3.vc_btn3-size-lg,
.vc_general.vc_btn3 {
	border-radius: 8px !important;
}

/* Titres dans les blocs CTA (vc_cta3)
   Structure réelle : .vc_cta3 > .vc_cta3-content > .vc_cta3-content-header > h2 (sans classe)
   1.4rem ≈ 22px — assez visible mais sans dominer le contenu */
.vc_cta3 h2,
.vc_cta3 h3,
.vc_cta3 .vc_cta3-content-header h2,
.vc_cta3 .vc_cta3-content-header h3,
.vc_cta3 .vc_cta3_title,
.vc_cta3 .vc_cta3_title h2 {
	font-size: 1.4rem !important;
	line-height: 1.4 !important;
}

/* Alignement justifié — supprimer dans tous les blocs WPBakery
   Inclut les titres de CTA qui héritent "justify" du thème via la classe vc_cta3-style-classic.
   Exception : les boutons (.vc_btn3, .cs-button) doivent rester centrés. */
.wpb_wrapper *:not(.vc_btn3):not(.vc_btn3 *):not(.cs-button):not(.cs-button *),
.vc_cta3 h2,
.vc_cta3 h3,
.vc_cta3 p,
.vc_cta3 .vc_cta3-content-header,
.vc_cta3 .vc_cta3-content-header *:not(.vc_btn3):not(.cs-button),
.vc_cta3 .vc_cta3-cont,
.vc_cta3 .vc_cta3-cont *:not(.vc_btn3):not(.cs-button),
.vc_column_container *:not(.vc_btn3):not(.vc_btn3 *):not(.cs-button) {
	text-align: left !important;
}
/* Boutons WPBakery et thème : texte toujours centré */
.vc_btn3,
.vc_btn3 *,
.cs-button,
.cs-button *,
.vc_cta3 .vc_btn3 {
	text-align: center !important;
}
/* Exception : titres centrés explicitement restent centrés */
.vc_custom_heading[style*="text-align: center"],
.wpb_wrapper .text-center {
	text-align: center !important;
}
/* Respect des style="text-align: center" inline dans WPBakery
   Spécificité (0,5,2) pour battre la règle .wpb_wrapper *:not(...) (0,5,2)
   → source order gagne puisque cette règle est déclarée après */
body .vc_row .vc_column-inner .wpb_wrapper .wpb_text_column p[style*="text-align: center"],
body .vc_row .vc_column-inner .wpb_wrapper .wpb_text_column p[style*="text-align:center"],
body .vc_row .vc_column-inner .wpb_wrapper .wpb_text_column [style*="text-align: center"],
body .vc_row .vc_column-inner .wpb_wrapper .vcex-icon-box p[style*="text-align: center"] {
	text-align: center !important;
}


/* ---------------------------------------------------------
   9. CORRECTIONS HOMEPAGE ET ARTICLES
   --------------------------------------------------------- */

/* Réduire l'espace entre l'image d'entête et le premier paragraphe
   L'élément responsable est .cs-main-content qui a margin-top: 64px par défaut */
.cs-main-content {
	margin-top: 1.5rem !important;
}

.cs-entry__content,
.cs-entry__body,
.entry-content {
	padding-top: 0.5rem !important;
}

/* Champ de recherche — layout flex pour que l'input prenne tout l'espace dispo */
.cs-search__group,
.cs-search__form .cs-form-group {
	display: flex !important;
	width: 100% !important;
	flex-wrap: nowrap !important;
	align-items: stretch !important;
	overflow: hidden !important;
}
.cs-search__input,
.cs-sidebar .cs-search__input,
input.cs-search__input {
	flex: 1 1 auto !important;
	min-width: 0 !important;   /* flex item peut rétrécir sous son min-content */
	width: auto !important;    /* annule tout calc() résiduel */
	font-size: 13px !important;
}
/* Bouton "Rechercher" → taille originale du thème (~134×50px), couleur jaune */
.cs-search__submit,
.cs-sidebar .cs-search__submit,
.search-widget .cs-search__submit {
	flex: 0 0 auto !important;
	background: #FFC928 !important;
	background-color: #FFC928 !important;
	color: #1A1A2E !important;
	border-color: #FFC928 !important;
	white-space: nowrap !important;
	/* padding et font-size non surchargés → hérite du thème (0.625rem 1.125rem) */
}

/* Logo bulle dans sidebar — taille maximale raisonnable */
.textwidget img,
.widget_text img {
	max-width: 160px !important;
	height: auto !important;
	display: block;
	margin: 0 auto 1rem;
}

/* Nom d'auteur — masqué via CSS (double sécurité avec PHP) */
.cs-meta-author,
.cs-entry__meta .cs-meta-author {
	display: none !important;
}

/* Bulle "X min de lecture" (sidebar sticky de l'article)
   Structure thème parent :
   - .cs-post-reading-time  → cercle principal 80×80px (agrandi à 96px)
   - ::after                → fond blanc interne (2px d'inset)
   - __border/__progress    → SVG anneau absolument positionné top:0/left:0
   Il faut synchroniser les 3 couches sur la nouvelle taille. */
.cs-entry__metabar .cs-reading-time-item .cs-post-reading-time,
.cs-post-reading-time {
	width: 96px !important;
	height: 96px !important;
	position: relative !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	overflow: hidden !important;
	padding: 1.25rem !important;
}
/* Fond blanc interne : 2px d'inset sur chaque côté → 92×92px */
.cs-entry__metabar .cs-reading-time-item .cs-post-reading-time::after,
.cs-post-reading-time::after {
	position: absolute !important;
	top: 2px !important;
	left: 2px !important;
	transform: none !important;   /* supprime le translate(-50%,-50%) cassé */
	width: 92px !important;
	height: 92px !important;
}
/* SVG anneau (__border et __progress) :
   Le SVG a width="80" height="80" codé en dur dans le HTML → cibler le <svg> lui-même.
   Le viewBox="0 0 80 80" garantit que le contenu (path centré à 40,40) scale proprement. */
.cs-entry__metabar .cs-reading-time-item .cs-post-reading-time__border,
.cs-entry__metabar .cs-reading-time-item .cs-post-reading-time__progress {
	width: 96px !important;
	height: 96px !important;
	overflow: visible !important;
}
.cs-entry__metabar .cs-reading-time-item .cs-post-reading-time__border svg,
.cs-entry__metabar .cs-reading-time-item .cs-post-reading-time__progress svg {
	width: 96px !important;
	height: 96px !important;
	display: block !important;
	overflow: visible !important;
}
.cs-entry__metabar .cs-reading-time-item .cs-post-reading-time__label,
.cs-post-reading-time__label {
	font-size: 13px !important;
	line-height: 1.3 !important;
	text-align: center !important;
	padding: 0 8px !important;
	word-break: break-word !important;
	hyphens: auto !important;
	position: relative !important;
	z-index: 1 !important;
}

/* "X Min Read" → stylistiquement cohérent */
.cs-meta-reading-time {
	font-style: italic;
	opacity: 0.8;
}

/* Image d'entête article — conserver le ratio d'origine,
   centrer le contenu sans rogner agressivement.
   Le thème parent utilise ::before + padding-top % pour créer l'aspect ratio.
   On supprime ce mécanisme pour laisser l'image dicter sa propre hauteur. */
.cs-entry__header .cs-overlay-background {
	max-height: none !important;
}
.cs-entry__header .cs-overlay-ratio {
	padding-top: 0 !important;
	height: auto !important;
}
/* Neutraliser le ::before du thème parent qui crée l'espace vide */
.cs-entry__header .cs-overlay-ratio::before {
	content: none !important;
	padding-top: 0 !important;
	display: none !important;
}
.cs-entry__header .cs-overlay-background img,
.cs-entry__header .wpex-bg-cover {
	position: static !important;
	width: 100% !important;
	height: auto !important;
	max-height: 600px;
	object-fit: cover;
	object-position: center center;
}
/* Articles sans image à la une : masquer le conteneur vide */
.cs-entry__header .cs-entry__thumbnail:empty {
	display: none !important;
}

/* Images vc_single_image — pas de crop carré forcé */
.vc_single_image-wrapper img,
.wpb_single_image img {
	width: auto !important;
	max-width: 100% !important;
	height: auto !important;
}

/* GIF animés — s'afficher à taille naturelle */
img[src$=".gif"] {
	width: auto !important;
	max-width: 100% !important;
	height: auto !important;
}

/* Titres H2 dans les articles : 30px, jaune */
.entry-content h2,
.cs-entry__content h2,
.wpb_wrapper h2,
.vc_column-inner h2 {
	font-size: 1.875rem !important;  /* 30px / 16 = 1.875rem */
	line-height: 1.3 !important;
	color: #FFC928 !important;
}
/* Indication entre parenthèses dans les H2 (ex: lexique) :
   reste entière sur sa ligne — ne se coupe jamais en milieu de parenthèse */
.entry-content h2 span span,
.wpb_wrapper h2 span span {
	display: inline-block !important;
	white-space: nowrap !important;
}

/* Annule le jaune/30px sur les titres des blocs "Article précédent / suivant"
   (h2.cs-entry__title dans .cs-entry-prev-next → couleur et taille du thème) */
.cs-entry-prev-next .cs-entry-prev-next__item .cs-entry__title {
	font-size: var(--cs-heading-6-font-size) !important;
	color: var(--cs-light-primary-color, #1A1A2E) !important;
	line-height: 1.3 !important;
}
.entry-content h3,
.cs-entry__content h3,
.wpb_wrapper h3,
.vc_column-inner h3 {
	font-size: 1.5rem !important;     /* 24px / 16 = 1.5rem */
	line-height: 1.35 !important;
}

/* Blocs vcex reconstruits — typographie cohérente */
.bdp-vcex-heading {
	margin: 1.5rem 0 0.75rem;
}
.bdp-alert a { color: inherit; text-decoration: underline; }
.bdp-icon-box p:last-child,
.bdp-teaser p:last-child { margin-bottom: 0; }


/* ---------------------------------------------------------
   9b. NEWSLETTER — BOUTON ICEGRAM
   Le bouton "M'inscrire" du formulaire Icegram Rainmaker
   hérite de text-align:left et padding:0, ce qui colle
   le texte à gauche sans marges. On centre et on aère.
   --------------------------------------------------------- */

/* #content (id stable WordPress) suffit à surpasser la spécificité du
   sélecteur WPBakery .wpb_wrapper :not(...) qui force text-align:left */
#content input.ig_button {
	text-align: center !important;
	padding: 0 1.25rem !important;
	cursor: pointer;
	letter-spacing: 0 !important;
}


/* ---------------------------------------------------------
   10b. BLOCS ICÔNES UNIFORMES (vcex_icon_box equal-height)
   Les vcex_icon_box dans une row equal_height ne s'étirent
   pas naturellement à 100% de la hauteur de leur colonne.
   La classe .uniform-icon-boxes force le remplissage complet.
   --------------------------------------------------------- */

.uniform-icon-boxes .wpb_wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.uniform-icon-boxes .bdp-icon-box {
    flex: 1;
    box-sizing: border-box;
}

/* ---------------------------------------------------------
   10c. PAIRE IMAGES A4 / BORDEREAU EASYRECO
   Force la même hauteur d'affichage pour les deux images
   côte à côte (Recommandé A4 = 350x465, Bordereau = 329x465).
   --------------------------------------------------------- */

.a4-bordereau-pair .vc_single_image-wrapper img {
    height: 380px !important;
    width: auto !important;
    max-width: 100%;
    display: block;
    margin: 0 auto;
}

/* ---------------------------------------------------------
   10d. TEASERS COLISSIMO / VOS AVANTAGES — TITRES RÉDUITS
   --------------------------------------------------------- */

.small-teaser-headings .bdp-teaser h4,
.small-teaser-headings .bdp-teaser h3,
.small-teaser-headings .bdp-teaser h2 {
    font-size: 14px !important;
    line-height: 1.3 !important;
}

/* ---------------------------------------------------------
   10e. VOS AVANTAGES — ICÔNES RÉDUITES ET LÉGENDES CENTRÉES
   --------------------------------------------------------- */

.avantages-row .bdp-teaser img {
    max-width: 70px !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
}

body .vc_row.avantages-row .vc_column-inner .wpb_wrapper .bdp-teaser,
body .vc_row.avantages-row .vc_column-inner .wpb_wrapper .bdp-teaser h4,
body .vc_row.avantages-row .vc_column-inner .wpb_wrapper .bdp-teaser h3,
body .vc_row.avantages-row .vc_column-inner .wpb_wrapper .bdp-teaser h2,
body .vc_row.avantages-row .vc_column-inner .wpb_wrapper .bdp-teaser p {
    text-align: center !important;
}

body .vc_row.avantages-row .vc_column-inner .wpb_wrapper .bdp-teaser h4 {
    margin-top: 12px !important;
}

/* ---------------------------------------------------------
   10e-bis. IMAGES CÔTE À CÔTE — HAUTEUR ÉGALE
   Dans les vc_row_inner à 2 colonnes, les images s'affichent
   à la même hauteur (230px) avec object-fit: cover pour éviter
   les décalages entre images de formats différents.
   --------------------------------------------------------- */
/* Images côte à côte dans les vc_row_inner (class réelle : .vc_row.vc_inner)
   — hauteur égale + légendes alignées verticalement en bas */
.vc_row.vc_inner .vc_col-sm-6 {
    display: flex !important;
    flex-direction: column !important;
}
.vc_row.vc_inner .vc_col-sm-6 .vc_column-inner {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}
.vc_row.vc_inner .vc_col-sm-6 .vc_column-inner > .wpb_wrapper {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}
/* Légende poussée en bas */
.vc_row.vc_inner .vc_col-sm-6 .wpb_text_column {
    margin-top: auto !important;
}
/* Image — pas de hauteur fixe, pas de recadrage */
.vc_row.vc_inner .vc_col-sm-6 .vc_figure {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
}
.vc_row.vc_inner .vc_col-sm-6 .vc_figure img {
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
}

/* ---------------------------------------------------------
   10f. CENTRAGE WPBakery — CORRECTIF GLOBAL (anti text-align:left !important)
   Corrige vc_single_image alignment="center" et vc_icon align="center"
   qui sont écrasés par la règle .wpb_wrapper :not(...){text-align:left!important}
   --------------------------------------------------------- */

body .vc_row .vc_column-inner .wpb_wrapper .vc_align_center .vc_figure {
    text-align: center !important;
}

body .vc_row .vc_column-inner .wpb_wrapper .icon-centered.vc_icon_element {
    text-align: center !important;
}

/* ---------------------------------------------------------
   10g. IMAGES — LIMITE TAILLE NATIVE (anti-pixelisation)
   Empêche l'upscaling des petites images affichées plein-largeur
   --------------------------------------------------------- */

body .vc_row .vc_column-inner .wpb_wrapper .img-max500 .vc_single_image-wrapper {
    text-align: center !important;
    max-width: 500px !important;
    width: 100% !important;
    margin: 0 auto !important;
    display: block !important;
}
body .vc_row .vc_column-inner .wpb_wrapper .img-max500 img {
    max-width: 500px !important;
    width: auto !important;
    height: auto !important;
    display: inline-block !important;
}

/* ---------------------------------------------------------
   10h. TABLEAUX — STYLE MODERNE (bdp-tableau)
   Tableau de comparaison éditoriel avec design propre
   --------------------------------------------------------- */

table.bdp-tableau {
    width: 100% !important;
    min-width: 480px !important;
    border-collapse: collapse !important;
    font-size: 13px !important;
    margin: 16px 0 !important;
    table-layout: auto !important;
}
table.bdp-tableau th,
table.bdp-tableau td {
    padding: 7px 9px !important;
    text-align: center !important;
    border: 1px solid #e0e0e0 !important;
    vertical-align: middle !important;
    line-height: 1.35 !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
}
/* Première colonne = libellés de ligne → alignée à gauche */
table.bdp-tableau th:first-child,
table.bdp-tableau td:first-child {
    text-align: left !important;
    background-color: #f5f6fa !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    white-space: nowrap !important;
    padding: 7px 8px !important;
}
/* En-têtes thead — inclut th:first-child pour battre la règle grise (0,2,1) */
table.bdp-tableau thead th,
table.bdp-tableau thead th:first-child {
    background-color: #ffc928 !important;
    color: #3d3d3d !important;
    font-weight: 700 !important;
    border-color: #e6b520 !important;
    text-align: center !important;
}
/* Alternance légère sur les lignes tbody */
table.bdp-tableau tbody tr:nth-child(even) td {
    background-color: #fafafa !important;
}
table.bdp-tableau tbody tr:nth-child(odd) td {
    background-color: #ffffff !important;
}
/* Responsive : scroll horizontal via le parent si le tableau déborde */
.wpb_wrapper:has(table.bdp-tableau) {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

/* ---------------------------------------------------------
   10h-bis. TABLEAUX — RESPONSIVE (anti-débordement)
   Les tableaux TablePress dont la largeur dépasse le conteneur
   deviennent scrollables horizontalement au lieu de déborder.
   --------------------------------------------------------- */

table.tablepress {
    width: 100% !important;
    max-width: 100% !important;
    border-collapse: collapse !important;
    font-size: 14px !important;
    margin: 16px 0 !important;
    table-layout: auto !important;
}
table.tablepress td,
table.tablepress th {
    padding: 9px 12px !important;
    border: 1px solid #e0e0e0 !important;
    vertical-align: middle !important;
    text-align: center !important;
    line-height: 1.35 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    font-size: 14px !important;
}
/* Centrage des cellules de données — spécificité (0,5,3) pour battre la règle WPBakery (0,5,2) */
body .vc_row .vc_column-inner .wpb_wrapper table.tablepress td:not(.column-1) {
    text-align: center !important;
}
/* En-tête (première ligne) — fond jaune */
table.tablepress .row-1 td,
table.tablepress .row-1 th {
    background-color: #ffc928 !important;
    color: #3d3d3d !important;
    font-weight: 700 !important;
    border-color: #e6b520 !important;
    text-align: center !important;
}
/* Première colonne — libellés gris clair */
table.tablepress .column-1 td,
table.tablepress td.column-1 {
    background-color: #f5f6fa !important;
    font-weight: 600 !important;
    text-align: left !important;
}
/* Alternance légère sur les lignes */
table.tablepress tr.even td { background-color: #fafafa !important; }
table.tablepress tr.odd td  { background-color: #ffffff !important; }
table.tablepress img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 auto;
}
/* Scroll horizontal sur le conteneur direct de la table si elle dépasse (géré via max-width:100% sur la table) */

/* ---------------------------------------------------------
   10i. ACCORDÉONS WPBakery — REDESIGN
   Améliore le rendu visuel des blocs tiroirs (vc_tta-accordion)
   --------------------------------------------------------- */

/* Conteneur global : espacement entre panels */
.vc_tta-accordion .vc_tta-panel {
    margin-bottom: 6px !important;
    border-radius: 6px !important;
    overflow: hidden !important;
}

/* En-tête du panel : fond doux, bordure gauche accentuée */
.vc_tta-accordion .vc_tta-panel-heading {
    background-color: #f5f6fa !important;
    border-left: 4px solid #ffc928 !important;
    border-bottom: 1px solid #e8e9ee !important;
    transition: background-color 0.2s ease !important;
}
.vc_tta-accordion .vc_tta-panel-heading:hover {
    background-color: #ecedf3 !important;
}

/* Panel actif (ouvert) */
.vc_tta-accordion .vc_tta-panel.vc_active .vc_tta-panel-heading {
    background-color: #ffc928 !important;
    border-left-color: #e6b520 !important;
}

/* Titre dans l'en-tête — padding-left généreux pour la flèche (icône abs. à left:20px, 12px large → texte dès 44px) */
.vc_tta-accordion .vc_tta-panel-title a {
    color: #3d3d3d !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    padding: 18px 20px 18px 48px !important;
    display: block !important;
    line-height: 1.4 !important;
}
.vc_tta-accordion .vc_tta-panel.vc_active .vc_tta-panel-title a {
    color: #3d3d3d !important;
}

/* Repositionner l'icône flèche pour qu'elle soit centrée verticalement */
.vc_tta-accordion .vc_tta-controls-icon {
    left: 18px !important;
    width: 14px !important;
    height: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

/* Corps du panel : fond blanc, bordure gauche jaune */
.vc_tta-accordion .vc_tta-panel-body {
    background-color: #ffffff !important;
    border-left: 4px solid #ffc928 !important;
    border-bottom: 1px solid #e8e9ee !important;
    padding: 16px 20px !important;
}

/* Icône flèche */
.vc_tta-accordion .vc_tta-controls-icon::before,
.vc_tta-accordion .vc_tta-controls-icon::after {
    border-color: #3d3d3d !important;
}

/* ---------------------------------------------------------
   10j. BOUTONS WPBakery — FIX CENTRAGE ET LARGEUR AUTOMATIQUE
   Spécificité (0,5,3) — html+body+div+element battent (0,5,0-2) !important
   --------------------------------------------------------- */

html body div.entry-content .vc_row .vc_column-inner .wpb_wrapper .vc_btn3-container {
    text-align: center !important;
}
html body div.entry-content .vc_row .vc_column-inner .wpb_wrapper .vc_btn3-container .vc_btn3 {
    width: auto !important;
    max-width: 420px !important;
    display: inline-block !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    line-height: 1.4 !important;
}

/* ---------------------------------------------------------
   10j-bis. IMAGES vc_single_image avec alignment="center"
   Spécificité (0,5,1) pour battre la règle wpb_wrapper *:not (0,5,0)
   --------------------------------------------------------- */

body .vc_row .vc_column-inner .wpb_wrapper .wpb_single_image.vc_align_center {
    text-align: center !important;
}
body .vc_row .vc_column-inner .wpb_wrapper .wpb_single_image.vc_align_center .vc_figure {
    display: inline-block !important;
}

/* ---------------------------------------------------------
   10k. BLOCS "EN CHIFFRES" — .bdp-chiffres
   Spécificité (0,6,1) pour battre wpb_wrapper *:not (0,5,0).
   Chaîne : body .vc_row .vc_column-inner .wpb_wrapper .bdp-chiffres .vc_col-sm-3 ...
   --------------------------------------------------------- */

/* Centrage du texte — spécificité (0,6,1) */
body .vc_row .vc_column-inner .wpb_wrapper .bdp-chiffres .vc_col-sm-3 .wpb_wrapper,
body .vc_row .vc_column-inner .wpb_wrapper .bdp-chiffres .vc_col-sm-3 .wpb_text_column,
body .vc_row .vc_column-inner .wpb_wrapper .bdp-chiffres .vc_col-sm-3 .wpb_text_column p {
    text-align: center !important;
}

/* Centrage du texte dans les blocs — spécificité (0,6,2) pour battre WPBakery */
body .vc_row .vc_column-inner .wpb_wrapper .bdp-chiffres .vc_col-sm-3 .wpb_text_column p {
    text-align: center !important;
}

/* Responsive mobile : 2 par ligne */
@media (max-width: 768px) {
    .bdp-chiffres .vc_col-sm-3 {
        width: 50% !important;
        margin-bottom: 12px !important;
    }
}

/* ---------------------------------------------------------
   10l. TITRE ENCART CTA (vc_cta3) — COULEUR NOIRE
   --------------------------------------------------------- */
.vc_cta3 h2,
.vc_cta3 h3 {
    color: #1a1a1a !important;
}

/* ---------------------------------------------------------
   10m. IMAGES ARTICLES — LARGEUR MAX
   --------------------------------------------------------- */

/* Bannière intro article */
.bdp-article-banner .vc_single_image-img {
    max-width: 500px !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
}

/* Screenshots de l'interface applicative (étapes tutoriel) */
.bdp-step-screenshot .vc_single_image-img {
    max-width: 400px !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    border-radius: 6px;
}

/* Tailles spécifiques par image */
.bdp-img-430 .vc_single_image-img,
.bdp-img-450 .vc_single_image-img,
.bdp-img-400 .vc_single_image-img,
.bdp-img-640 .vc_single_image-img {
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.10);
    border-radius: 6px;
}

.bdp-img-430 .vc_single_image-img { max-width: 430px !important; }
.bdp-img-450 .vc_single_image-img { max-width: 450px !important; }
.bdp-img-400 .vc_single_image-img { max-width: 400px !important; }
.bdp-img-640 .vc_single_image-img { max-width: 640px !important; }

/* Espace entre image et section suivante */
.bdp-img-430,
.bdp-img-450,
.bdp-img-400,
.bdp-img-640,
.bdp-step-screenshot,
.bdp-article-banner {
    margin-bottom: 48px !important;
}

/* ---------------------------------------------------------
   11. IMAGES WPBAKERY — ANTI-CROP GLOBAL
   Garantit qu'aucune image vc_single_image n'est rognée,
   qu'elle soit dans une colonne ou non, liée ou non.
   --------------------------------------------------------- */

.wpb_single_image .vc_figure,
.wpb_single_image figure.vc_figure {
    height: auto !important;
    overflow: visible !important;
}

.vc_single_image-img {
    object-fit: contain !important;
    height: auto !important;
    max-width: 100% !important;
}


/* ---------------------------------------------------------
   10. RESPONSIVE — CORRECTIONS MOBILES
   --------------------------------------------------------- */

@media (max-width: 768px) {
	/* Réduire la hauteur de l'image hero sur mobile */
	.cs-entry__header .cs-overlay-background img {
		max-height: 280px;
	}

	/* Pleine largeur pour les cards sur mobile */
	.cs-entry__thumbnail {
		width: 100%;
	}

	/* Footer lisible sur mobile */
	.cs-footer {
		text-align: center;
		padding: 1rem;
	}
}
