/**
 * Base — typographie DM Sans, liens, éléments de contenu.
 * Le !important sur les font-family est nécessaire pour battre le CSS
 * dynamique d'Extra (Google Fonts inlinées). Les icônes (ETmodules,
 * FontAwesome) ne sont jamais ciblées.
 */

body.bt-theme {
	font-family: var(--bt-font) !important;
	font-size: var(--bt-font-size-base);
	line-height: var(--bt-line-height-base);
	color: var(--bt-color-text);
	background-color: var(--bt-color-background) !important;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

/* Typo générale : tout hérite de DM Sans sauf les polices d'icônes */
.bt-theme h1,
.bt-theme h2,
.bt-theme h3,
.bt-theme h4,
.bt-theme h5,
.bt-theme h6,
.bt-theme p,
.bt-theme li,
.bt-theme input,
.bt-theme textarea,
.bt-theme select,
.bt-theme button:not([class*="et-pb-icon"]),
.bt-theme .et_pb_text,
.bt-theme .et_pb_module {
	font-family: var(--bt-font) !important;
}

/* Titres — style Bitelo : semi-bold, serrés */
.bt-theme h1,
.bt-theme h2,
.bt-theme h3,
.bt-theme h4,
.bt-theme h5,
.bt-theme h6 {
	color: var(--bt-color-heading);
	line-height: var(--bt-line-height-tight);
	font-weight: 600;
	letter-spacing: -0.02em;
}

/* Échelle typographique Bitelo (h1 72 / h2 64 / h3 48 / h4 32 / h5 24 /
   h6 20), en clamp pour rester raisonnable sur petits écrans. Sans
   !important : une taille définie explicitement dans un module Divi
   reste prioritaire. */
.bt-theme h1 { font-size: clamp(2.4rem, 5vw, 4.5rem); }
.bt-theme h2 { font-size: clamp(2rem, 4.2vw, 4rem); }
.bt-theme h3 { font-size: clamp(1.4rem, 2.4vw, 2.25rem); }
.bt-theme h4 { font-size: 2rem; font-weight: 500; }
.bt-theme h5 { font-size: 1.5rem; font-weight: 400; }
.bt-theme h6 { font-size: 1.25rem; font-weight: 400; }

/* Titres du bandeau héro : Extra les fige petits et maigres (26px/400),
   on impose la présence Bitelo */
.bt-theme .et_pb_slide_description h1,
.bt-theme .et_pb_slide_description h2 {
	font-size: clamp(1.8rem, 3.4vw, 3.25rem) !important;
	font-weight: 600 !important;
	line-height: 1.15 !important;
	letter-spacing: -0.02em;
}

/* Liens du contenu */
.bt-theme #main-content a:not(.et_pb_button):not(.button) {
	color: var(--bt-color-accent);
	transition: color var(--bt-transition-fast);
}

.bt-theme #main-content a:not(.et_pb_button):not(.button):hover {
	color: var(--bt-color-accent-hover);
}

/* Focus clavier visible */
.bt-theme a:focus-visible,
.bt-theme button:focus-visible,
.bt-theme input:focus-visible,
.bt-theme select:focus-visible,
.bt-theme textarea:focus-visible,
.bt-theme [tabindex]:focus-visible {
	outline: 2px solid var(--bt-color-accent);
	outline-offset: 2px;
	border-radius: var(--bt-radius-sm);
}

.bt-theme ::selection {
	background-color: var(--bt-color-accent);
	color: #ffffff;
}

/* Images fluides + arrondi doux par défaut dans le contenu */
.bt-theme #main-content img {
	max-width: 100%;
	height: auto;
}

.bt-theme .entry-content img,
.bt-theme .et_pb_image img {
	border-radius: var(--bt-radius-md);
}

/* Séparateurs */
.bt-theme #main-content hr {
	border: 0;
	border-top: 1px solid var(--bt-color-border);
	margin: var(--bt-spacing-xl) 0;
}

/* Citations */
.bt-theme #main-content blockquote {
	border-left: 4px solid var(--bt-color-accent);
	background: var(--bt-color-surface-alt);
	border-radius: 0 var(--bt-radius-md) var(--bt-radius-md) 0;
	padding: var(--bt-spacing-md) var(--bt-spacing-lg);
	margin: var(--bt-spacing-lg) 0;
	font-style: italic;
}

/* Code */
.bt-theme #main-content code,
.bt-theme #main-content pre {
	background: var(--bt-color-dark);
	color: #eaeaea;
	border-radius: var(--bt-radius-sm);
	font-size: var(--bt-font-size-sm);
	font-family: ui-monospace, "Cascadia Code", Consolas, monospace !important;
}

.bt-theme #main-content code {
	padding: 0.15em 0.4em;
}

.bt-theme #main-content pre {
	padding: var(--bt-spacing-md);
	overflow-x: auto;
}

/* Tableaux */
.bt-theme #main-content table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	border: 1px solid var(--bt-color-border);
	border-radius: var(--bt-radius-md);
	overflow: hidden;
	background: var(--bt-color-surface);
	box-shadow: var(--bt-shadow-sm);
}

.bt-theme #main-content table th {
	background: var(--bt-color-surface-alt);
	color: var(--bt-color-heading);
	font-weight: 600;
	text-align: left;
	padding: 0.75rem 1rem;
	border-bottom: 1px solid var(--bt-color-border);
}

.bt-theme #main-content table td {
	padding: 0.75rem 1rem;
	border-bottom: 1px solid var(--bt-color-border);
}

.bt-theme #main-content table tr:last-child td {
	border-bottom: 0;
}

.bt-theme #main-content table tbody tr:hover {
	background: var(--bt-color-accent-soft);
}

/* Listes du contenu — puces accent comme Bitelo */
.bt-theme .entry-content ul:not([class]) {
	list-style: disc;
	padding-left: 1.5rem;
	margin-bottom: var(--bt-spacing-md);
}

.bt-theme .entry-content ul:not([class]) li::marker {
	color: var(--bt-color-accent);
}

/* Iframes vidéo responsive (règle héritée) */
.bt-theme .wp-block-embed__wrapper iframe {
	max-width: 100%;
}
