/*
Theme Name:   MDS Group (Astra Child)
Template:     astra
Description:  Thème enfant Astra pour mds-group.tn — Direction A « Industriel ».
Author:       MDS Group
Version:      1.0.2
Text Domain:  mds-astra-child
*/

/* ---------- Tokens ---------- */
:root {
	--mds-navy: #151D2A;
	--mds-ink: #3A4050;
	--mds-muted: #5B6170;
	--mds-ground: #F4F3EF;
	--mds-line: #D9D6CE;
	--mds-accent: #B3400B;
	--mds-accent-light: #F2A26B;
	--mds-white: #FFFFFF;
	--mds-display: 'Archivo', sans-serif;
	--mds-body: 'Public Sans', sans-serif;
	--mds-gutter: 64px;
}

body {
	background: var(--mds-ground);
	color: var(--mds-navy);
	font-family: var(--mds-body);
}
h1, h2, h3, h4, .site-title {
	font-family: var(--mds-display);
	color: inherit;
	letter-spacing: -0.02em;
}
a { color: var(--mds-navy); }
a:hover, a:focus { color: var(--mds-accent); }

/* ---------- Layout helpers ---------- */
.mds-section { padding: 72px var(--mds-gutter); margin: 0 !important; }
.mds-section.is-white { background: var(--mds-white); }
.mds-section.is-dark { background: var(--mds-navy); color: var(--mds-white); }
.mds-section.is-dark p { color: #D4D7DE; }
.mds-kicker {
	font-size: 14px !important; font-weight: 600; letter-spacing: 2px;
	text-transform: uppercase; color: var(--mds-accent); margin: 0 0 12px !important;
}
.mds-section.is-dark .mds-kicker { color: var(--mds-accent-light); }
.mds-lead { font-size: 20px; line-height: 1.55; color: var(--mds-ink); max-width: 520px; }

/* ---------- Hero ---------- */
.mds-hero h1 { font-size: clamp(44px, 5.4vw, 68px); line-height: 1.02; font-weight: 800; margin: 0 0 24px; }
.mds-hero .wp-block-columns { align-items: center; gap: 56px; }
.mds-hero img { border-radius: 6px; width: 100%; height: 460px; object-fit: cover; }
.mds-card.mds-photo { background: var(--mds-navy) !important; border: 0 !important; min-height: 460px; display: flex; align-items: flex-end; }
.mds-card.mds-photo p { color: #C9CDD6; font-size: 14px; }
.mds-card.mds-photo:has(.mds-hero-logo) { align-items: center; justify-content: center; }
.mds-hero .mds-hero-logo { margin: 0; }
.mds-hero .mds-hero-logo img { width: 300px; max-width: 70%; height: auto; object-fit: contain; border-radius: 0; margin: 0 auto; display: block; }

/* Header logo (Astra Site Identity) */
.site-logo-img img, .custom-logo { max-height: 56px; width: auto; }

/* ---------- Buttons ---------- */
.wp-block-button .wp-block-button__link { border-radius: 4px; font-weight: 600; padding: 15px 28px; }
.mds-btn-primary .wp-block-button__link { background: var(--mds-navy); color: var(--mds-white); }
.mds-btn-primary .wp-block-button__link:hover { background: var(--mds-accent); color: var(--mds-white); }
.mds-btn-outline .wp-block-button__link { background: transparent; color: var(--mds-navy); border: 1.5px solid var(--mds-navy); }

/* ---------- Key figures ---------- */
.mds-stats { border-top: 2px solid var(--mds-navy); padding-top: 24px; }
.mds-stat-number { font-family: var(--mds-display); font-size: 44px !important; font-weight: 800; margin: 0 !important; line-height: 1.1; }
.mds-stat-label { font-size: 15px; color: var(--mds-ink); margin: 4px 0 0 !important; }

/* ---------- Cards ---------- */
.mds-card { background: var(--mds-ground); border-radius: 6px; padding: 28px; height: 100%; }
.mds-section:not(.is-white) .mds-card { background: var(--mds-white); border: 1px solid var(--mds-line); }
.mds-card.is-dark { background: var(--mds-navy); color: var(--mds-white); border: 0; }
.mds-card.is-dark p { color: #D4D7DE; }
.mds-card.is-dark .mds-step { color: var(--mds-accent-light); }
.mds-card h3 { font-size: 24px; margin: 8px 0; }
.mds-card p { font-size: 15px; line-height: 1.5; color: var(--mds-ink); margin: 0; }
.mds-step { font-size: 13px; font-weight: 600; color: var(--mds-accent); margin: 0 !important; }
.mds-brand-card { min-height: 240px; display: flex; flex-direction: column; justify-content: space-between; }
.mds-brand-card img { max-height: 56px; width: auto; }
.mds-link-arrow { font-weight: 600; color: var(--mds-accent) !important; }

/* ---------- References ---------- */
.mds-clients { font-family: var(--mds-display); font-size: 26px; line-height: 1.5; font-weight: 700; color: var(--mds-white) !important; }

/* ---------- Header / footer (Astra) ---------- */
.ast-primary-header-bar { border-bottom: 1px solid var(--mds-line); background: var(--mds-ground); }
.main-header-menu .menu-link { font-weight: 500; font-size: 15px; }
/* Language switcher (Polylang menu item) */
.main-header-menu .lang-item > a {
	border: 1.5px solid var(--mds-navy);
	border-radius: 4px;
	padding: 6px 14px !important;
	margin-left: 12px;
	font-size: 14px;
	line-height: 1.2;
}
.main-header-menu .lang-item > a:hover,
.main-header-menu .lang-item > a:focus {
	background: var(--mds-navy);
	color: var(--mds-white);
}
.site-footer { background: var(--mds-ground); border-top: 1px solid var(--mds-line); color: var(--mds-ink); font-size: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 781px) {
	:root { --mds-gutter: 20px; }
	.mds-section { padding: 48px var(--mds-gutter); }
	.mds-hero img, .mds-card.mds-photo { height: 280px; min-height: 280px; }
	.mds-hero .mds-hero-logo img { height: auto; width: 200px; }
	.ast-mobile-popup-content .lang-item > a,
	.ast-header-break-point .main-header-menu .lang-item > a { display: inline-block; margin: 12px 20px; }
	.mds-stat-number { font-size: 34px !important; }
}