/* Ludécode – Onglets Pilules (v1.1) – design à plat, sans ombre.
   Couleurs et formes : variables CSS posées par le module.
   Polices : réglées dans l'onglet Avancé du module (Divi les applique avec !important). */

.ldc-tabs {
	--ldc-btn-bg: #ffffff;
	--ldc-btn-hover: #d8f7e9;
	--ldc-btn-border: #07140b;
	--ldc-active-bg: #07140b;
	--ldc-active-text: #ffffff;
	--ldc-marker: #f5a524;
	--ldc-panel-bg: #ffffff;
	--ldc-panel-border: #07140b;
	--ldc-check: #1fa463;
	--ldc-bar-bg: #07140b;
	--ldc-dot1: #f5a524;
	--ldc-dot2: #6d4fd8;
	--ldc-dot3: #e4455c;
	--ldc-radius: 28px;
	--ldc-img-w: 38%;
	--ldc-align: center;

	width: 100%;
	box-sizing: border-box;
}

.ldc-tabs *,
.ldc-tabs *::before,
.ldc-tabs *::after {
	box-sizing: border-box;
	text-shadow: none;
	box-shadow: none;
}

/* ---------- Barre de boutons ---------- */

.ldc-tabs .ldc-tabs-nav {
	display: flex;
	flex-wrap: wrap;
	justify-content: var(--ldc-align);
	gap: 14px;
	margin: 0 0 clamp(24px, 3.5vw, 40px);
	padding: 0;
}

.ldc-tabs .ldc-tab-btn {
	appearance: none;
	-webkit-appearance: none;
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	margin: 0;
	padding: 0.8em 1.6em;
	border: 2px solid var(--ldc-btn-border);
	border-radius: 999px;
	background: var(--ldc-btn-bg);
	color: #07140b;
	font-family: inherit;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: 0;
	text-transform: none;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.ldc-tabs .ldc-tab-icon {
	font-size: 1.25em;
	line-height: 1;
}

.ldc-tabs .ldc-tab-btn:hover {
	background: var(--ldc-btn-hover);
}

/* Bouton actif : plein, avec un petit carré « pixel » devant le titre */
.ldc-tabs .ldc-tab-btn.is-active,
.ldc-tabs .ldc-tab-btn.is-active:hover {
	background: var(--ldc-active-bg);
	border-color: var(--ldc-active-bg);
	color: var(--ldc-active-text) !important;
}

.ldc-tabs .ldc-tab-btn.is-active .ldc-tab-label::before {
	content: "";
	display: inline-block;
	width: 0.42em;
	height: 0.42em;
	margin-right: 0.6em;
	background: var(--ldc-marker);
	vertical-align: 0.08em;
}

.ldc-tabs .ldc-tab-btn:focus-visible {
	outline: 3px solid var(--ldc-marker);
	outline-offset: 3px;
}

/* ---------- Panneau (fenêtre) ---------- */

.ldc-tabs .ldc-tabs-panels {
	background: var(--ldc-panel-bg);
	border: 2px solid var(--ldc-panel-border);
	border-radius: var(--ldc-radius);
	overflow: hidden;
}

/* Barre de titre façon fenêtre de jeu rétro : trois carrés */
.ldc-tabs .ldc-bar {
	display: flex;
	align-items: center;
	gap: 8px;
	height: 38px;
	padding: 0 20px;
	background: var(--ldc-bar-bg);
}

.ldc-tabs .ldc-bar i {
	display: block;
	width: 12px;
	height: 12px;
	margin: 0;
	padding: 0;
	border-radius: 0;
}

.ldc-tabs .ldc-bar i:nth-child(1) { background: var(--ldc-dot1); }
.ldc-tabs .ldc-bar i:nth-child(2) { background: var(--ldc-dot2); }
.ldc-tabs .ldc-bar i:nth-child(3) { background: var(--ldc-dot3); }

.ldc-tabs .ldc-tabs-stage {
	padding: clamp(24px, 4.5vw, 56px);
}

.ldc-tabs .ldc-tab-panel {
	display: flex;
	align-items: center;
	gap: clamp(24px, 5vw, 64px);
}

.ldc-tabs .ldc-tab-panel[hidden] {
	display: none !important;
}

.ldc-tabs .ldc-tab-panel.is-entering {
	animation: ldc-tab-in 0.3s ease both;
}

@keyframes ldc-tab-in {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: none; }
}

/* ---------- Image à gauche ---------- */

.ldc-tabs .ldc-tab-media {
	flex: 0 0 var(--ldc-img-w);
	max-width: var(--ldc-img-w);
	margin: 0;
	padding: 0;
}

.ldc-tabs .ldc-tab-media img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border: 3px solid var(--ldc-panel-border);
	border-radius: 20px;
}

/* ---------- Texte à droite ---------- */

.ldc-tabs .ldc-tab-text {
	flex: 1 1 0;
	min-width: 0;
}

.ldc-tabs .ldc-tab-title {
	margin: 0 0 0.5em;
	padding: 0;
	color: #07140b;
	font-size: 34px;
	font-weight: 700;
	line-height: 1.15;
}

.ldc-tabs .ldc-tab-body {
	color: #3a4655;
	font-size: 18px;
	line-height: 1.7;
}

.ldc-tabs .ldc-tab-body > :first-child { margin-top: 0; }
.ldc-tabs .ldc-tab-body > :last-child  { margin-bottom: 0; }

.ldc-tabs .ldc-tab-body p {
	margin: 0 0 1em;
	padding: 0;
}

.ldc-tabs .ldc-tab-body strong {
	color: #07140b;
}

/* Listes à puces : pastilles ✓ */
.ldc-tabs .ldc-tab-body ul {
	list-style: none;
	margin: 1.1em 0 0;
	padding: 0;
}

.ldc-tabs .ldc-tab-body ul li {
	position: relative;
	margin: 0 0 0.6em;
	padding: 0 0 0 2.2em;
	font-weight: 600;
	color: #07140b;
}

.ldc-tabs .ldc-tab-body ul li::before {
	content: "✓";
	position: absolute;
	left: 0;
	top: 0.18em;
	display: grid;
	place-items: center;
	width: 1.5em;
	height: 1.5em;
	border-radius: 50%;
	background: var(--ldc-check);
	color: #ffffff;
	font-size: 0.75em;
	font-weight: 800;
	line-height: 1;
}

/* ---------- Mobile ---------- */

@media (max-width: 767px) {
	.ldc-tabs .ldc-tabs-nav { gap: 10px; }

	.ldc-tabs .ldc-tab-btn {
		font-size: 16px;
		padding: 0.75em 1.2em;
	}

	.ldc-tabs .ldc-tab-panel {
		flex-direction: column;
		align-items: stretch;
	}

	.ldc-tabs .ldc-tab-media {
		flex-basis: auto;
		max-width: 100%;
	}

	.ldc-tabs .ldc-tab-title { font-size: 26px; }
	.ldc-tabs .ldc-tab-body  { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.ldc-tabs .ldc-tab-btn { transition: none; }
	.ldc-tabs .ldc-tab-panel.is-entering { animation: none; }
}
