/* ==========================================================================
   ARDA Health Care — base.css (chargé sur tout le site)
   Tokens, typographie, mise en page, composants partagés, en-tête, pied de page.
   RTL : propriétés logiques (inline/block) partout, aucun left/right en dur.
   ========================================================================== */

:root {
	/* Couleurs : alias courts des préréglages de theme.json */
	--petrol: var(--wp--preset--color--petrol, #005A76);
	--petrol-deep: var(--wp--preset--color--petrol-deep, #003A4C);
	--petrol-ink: var(--wp--preset--color--petrol-ink, #002A37);
	--turq: var(--wp--preset--color--turq, #00B9BE);
	--turq-ink: var(--wp--preset--color--turq-ink, #007F84);
	--white: #fff;
	--perle: var(--wp--preset--color--perle, #F3F6F7);
	--perle-2: var(--wp--preset--color--perle-2, #E7EEF0);
	--line: var(--wp--preset--color--line, #D5E0E4);
	--ink: var(--wp--preset--color--ink, #1E2E36);
	--muted: var(--wp--preset--color--muted, #5A6B73);
	--wa: #1F8F5F;

	--f-display: var(--wp--preset--font-family--display, "DM Serif Display", Georgia, serif);
	--f-body: var(--wp--preset--font-family--body, Barlow, "Segoe UI", Arial, sans-serif);
	--f-label: var(--wp--preset--font-family--label, "Barlow Semi Condensed", "Arial Narrow", Arial, sans-serif);

	--r-s: 12px;
	--r-m: 18px;
	--r-l: 24px;
	--wrap: 1240px;
	--prose: 760px;
	--gutter: max(20px, env(safe-area-inset-left, 0px));
	--header-h: 80px;
	--ease: cubic-bezier(.2, .7, .2, 1);
	--shadow-pop: 0 30px 60px -30px rgba(0, 42, 55, .3);
}

/* Arabe : police de repli lisible en attendant la police arabe dédiée */
:root:lang(ar) {
	--f-display: "Noto Kufi Arabic", "Segoe UI", Tahoma, sans-serif;
	--f-body: "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
	--f-label: "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}

/* ---------- Reset léger ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--white);
	color: var(--ink);
	font: 400 17px/1.6 var(--f-body);
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
/* Les zones sombres gardent la couleur de leur texte (prioritaire sur la couleur de lien de theme.json) */
.topbar a, .site-header a, .drawer a, .site-footer a, .btn, .link, .nav__card, .post-card__link { color: inherit; }
button { font: inherit; cursor: pointer; color: inherit; }
:focus-visible { outline: 2px solid var(--turq); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.icon { flex: none; }
[dir="rtl"] .icon--flip { transform: scaleX(-1); }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
	position: absolute; inset-inline-start: -9999px; top: 8px; z-index: 200;
	background: var(--petrol); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { inset-inline-start: 16px; }

/* ---------- Mise en page ---------- */
.wrap {
	max-width: var(--wrap);
	margin-inline: auto;
	padding-inline: max(20px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-right, 0px));
}
.sec { padding-block: clamp(72px, 9vw, 120px); }
.sec--perle { background: var(--perle); }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-block-end: 48px; }
.sec-head > * { min-width: 0; }

/* ---------- Typographie ---------- */
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 400; color: var(--petrol-ink); letter-spacing: -.01em; text-wrap: balance; margin-block: 0 .5em; }
.eyebrow { display: inline-block; font: 600 13px/1.2 var(--f-label); letter-spacing: .16em; text-transform: uppercase; color: var(--petrol); }
.h2 { font: 400 clamp(32px, 4.2vw, 50px)/1.06 var(--f-display); color: var(--petrol-ink); margin: 0; }
.h3 { font: 400 24px/1.15 var(--f-display); color: var(--petrol-ink); margin: 0; }
.rule { display: block; width: 56px; height: 3px; background: var(--turq); border-radius: 2px; margin-block-start: 18px; }
.lead { color: var(--muted); max-width: 58ch; margin: 0; font-size: 18px; }

/* ---------- Liens et boutons ---------- */
.link { display: inline-flex; align-items: center; gap: 10px; font: 600 15px var(--f-label); letter-spacing: .06em; text-transform: uppercase; color: var(--petrol); text-decoration: none; }
.circ { width: 36px; height: 36px; border: 1.5px solid currentColor; border-radius: 50%; display: grid; place-items: center; transition: background .3s var(--ease), color .3s; }
.link:hover .circ, a:hover > .link .circ { background: var(--petrol); color: #fff; }

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 50px; padding-inline: 26px; border-radius: 999px;
	font: 600 16px var(--f-label); letter-spacing: .04em; text-decoration: none;
	border: 1.5px solid transparent; transition: background .25s, color .25s, border-color .25s;
	white-space: nowrap;
}
.btn.btn--primary { background: var(--petrol); color: #fff; }
.btn.btn--primary:hover { background: var(--petrol-ink); }
.btn.btn--turq { background: var(--turq); color: var(--petrol-ink); }
.btn.btn--turq:hover { background: #fff; }
.btn.btn--ghost { border-color: currentColor; color: var(--petrol); background: transparent; }
.btn.btn--ghost:hover { background: var(--petrol); color: #fff; border-color: var(--petrol); }
.btn.btn--ghost-light { border-color: rgba(255,255,255,.7); color: #fff; background: transparent; }
.btn.btn--ghost-light:hover { background: #fff; color: var(--petrol-ink); }

/* ---------- Barre du haut ---------- */
.topbar { background: var(--petrol-ink); color: rgba(255,255,255,.82); font: 500 13.5px var(--f-body); }
.topbar__in { display: flex; gap: 28px; align-items: center; min-height: 38px; white-space: nowrap; }
.topbar a { text-decoration: none; }
.topbar a:hover { color: #fff; }
.topbar__sister { margin-inline-start: auto; color: #fff; display: inline-flex; gap: 6px; align-items: center; text-decoration: underline !important; text-underline-offset: 3px; }

/* ---------- En-tête ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: #fff; }
.site-header {
	position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
	background: rgba(255,255,255,.97); backdrop-filter: blur(10px);
	border-block-end: 1px solid var(--line);
	transition: box-shadow .3s;
}
.admin-bar .site-header { top: calc(32px + env(safe-area-inset-top, 0px)); }
.site-header.is-scrolled { box-shadow: 0 10px 30px -20px rgba(0,42,55,.35); }
.site-header__in { display: flex; align-items: center; gap: 28px; min-height: var(--header-h); }
.site-header__actions { display: flex; align-items: center; gap: 10px; margin-inline-start: 8px; }
.site-header__cta { min-height: 46px; padding-inline: 22px; }

.logo { display: inline-flex; flex-direction: column; text-decoration: none; line-height: 1; flex: none; }
.logo b { font: 700 32px/1 var(--f-label); letter-spacing: .08em; color: var(--petrol); }
.logo > span:not(.screen-reader-text) { font: 500 9.5px var(--f-body); letter-spacing: .42em; color: var(--turq-ink); margin-block-start: 4px; padding-inline-start: 2px; }
.logo--light b { color: #fff; }
.logo--light > span:not(.screen-reader-text) { color: var(--turq); }
.custom-logo-link { flex: none; display: block; }
.custom-logo { max-height: 56px; width: auto; }
.custom-logo-link.is-whitened .custom-logo { filter: brightness(0) invert(1); }

/* Menu principal */
.nav { margin-inline-start: auto; }
.nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 26px; align-items: center; }
.nav__item { position: relative; display: flex; align-items: center; gap: 4px; }
.nav__item.is-mega { position: static; }
.nav__link { font: 500 16px var(--f-body); color: var(--ink); text-decoration: none; padding-block: 28px; }
.nav__link:hover, .nav__item.is-current > .nav__link { color: var(--petrol); }
.nav__caret { background: none; border: 0; padding: 8px 2px; color: var(--muted); display: grid; place-items: center; transition: transform .25s; }
.nav__item.is-open > .nav__caret { transform: rotate(180deg); }
.nav__empty { margin: 0; font-size: 14px; }

.nav__panel {
	position: absolute; top: 100%; z-index: 5;
	background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-pop);
	opacity: 0; visibility: hidden; transform: translateY(-6px);
	transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
}
.nav__item:hover > .nav__panel,
.nav__item:focus-within > .nav__panel,
.nav__item.is-open > .nav__panel { opacity: 1; visibility: visible; transform: none; }
.nav__sub { list-style: none; margin: 0; padding: 0; }

/* Liste déroulante */
.nav__panel--list { inset-inline-start: -18px; width: 340px; border-radius: var(--r-m); padding: 8px; }
.nav__panel--list .nav__sub { display: grid; gap: 2px; }

/* Méga-menu */
.nav__panel--mega { inset-inline: 0; border-inline: 0; border-block-start: 0; }
.nav__panel--mega .nav__sub {
	max-width: var(--wrap); margin-inline: auto;
	padding: 28px max(20px, env(safe-area-inset-left, 0px));
	display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}

.nav__card { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: var(--r-s); text-decoration: none; }
.nav__card:hover { background: var(--perle); }
.nav__card b { display: block; font: 600 15px/1.3 var(--f-label); color: var(--petrol-ink); }
.nav__card small { display: block; color: var(--muted); font-size: 13px; line-height: 1.4; }
.nav__thumb { width: 72px; height: 54px; object-fit: cover; border-radius: 10px; background: var(--perle); flex: none; }

/* Icône liste de devis */
.quote-ico {
	position: relative; width: 46px; height: 46px; border-radius: 50%;
	border: 1.5px solid var(--line); display: grid; place-items: center;
	color: var(--petrol); background: #fff; flex: none; text-decoration: none;
}
.quote-ico:hover { border-color: var(--petrol); }
.quote-ico__badge.is-empty, .quote-ico__badge[hidden] { display: none; }
.quote-ico__badge {
	position: absolute; top: -4px; inset-inline-end: -4px; min-width: 20px; height: 20px; padding-inline: 5px;
	border-radius: 999px; background: var(--turq); color: var(--petrol-ink);
	font: 700 12px/20px var(--f-label); text-align: center;
}

.burger { display: none; width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; color: var(--petrol-ink); place-items: center; }

/* Menu mobile */
.drawer {
	position: fixed; inset: 0; z-index: 100; overflow-y: auto;
	background: var(--petrol-ink); color: #fff;
	padding: calc(18px + env(safe-area-inset-top, 0px)) max(24px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(24px, env(safe-area-inset-left, 0px));
	display: flex; flex-direction: column; gap: 24px;
}
.drawer.is-open { animation: drawer-in .35s var(--ease); }
@keyframes drawer-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.drawer__head { display: flex; justify-content: space-between; align-items: center; }
.drawer__close { width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.4); background: none; color: #fff; display: grid; place-items: center; }
.drawer__list, .drawer__list .sub-menu { list-style: none; margin: 0; padding: 0; }
.drawer__list > li > a { display: block; font: 400 30px/1.45 var(--f-display); text-decoration: none; }
.drawer__list .sub-menu { padding-inline-start: 18px; margin-block: 2px 10px; }
.drawer__list .sub-menu a { display: block; font: 500 17px/1.8 var(--f-body); color: rgba(255,255,255,.8); text-decoration: none; }
.drawer__foot { margin-block-start: auto; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.drawer__phone { color: #fff; font: 600 17px var(--f-label); letter-spacing: .04em; }
body.drawer-open { overflow: hidden; }

/* ---------- En-tête de page ---------- */
.crumbs { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--petrol); }
.crumbs [aria-current] { color: var(--ink); }
.page-head { padding-block: 26px clamp(40px, 5vw, 64px); background: linear-gradient(var(--perle), var(--perle)) bottom / 100% 1px no-repeat; }
.page-head .crumbs { margin-block-end: 28px; }
.page-head__title { font: 400 clamp(38px, 4.6vw, 60px)/1.04 var(--f-display); margin: 0; max-width: 20ch; }
.page-head__lead { color: var(--muted); font-size: 18px; max-width: 60ch; margin: 18px 0 0; }
.page-head--article .eyebrow { margin-block-end: 12px; }

/* ---------- Contenu de l'éditeur ---------- */
.entry-content { padding-block: clamp(40px, 6vw, 72px); }
.entry-content.is-layout-blocks { padding-block: 0; }
.entry-content > * {
	max-width: var(--prose);
	margin-inline: auto;
	padding-inline: max(20px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-right, 0px));
}
.entry-content > .alignwide { max-width: var(--wrap); }
.entry-content > .alignfull { max-width: none; padding-inline: 0; }
.entry-content > * + * { margin-block-start: 1.2em; }
.entry-content.is-layout-blocks > * + * { margin-block-start: 0; }
/* Paragraphe vide laissé par l'éditeur (touche Entrée) : ne crée pas de bande blanche entre les blocs. */
.entry-content.is-layout-blocks > p:empty, .entry-content.is-layout-blocks > p:has(> br:only-child) { display: none; }
/* Styles de texte de l'éditeur : faible priorité (:where) pour que les blocs gardent les leurs */
:where(.entry-content) > h2 { font-size: clamp(28px, 3.2vw, 38px); margin-block: 1.6em .5em; }
:where(.entry-content) > h3 { font-size: clamp(22px, 2.2vw, 26px); margin-block: 1.4em .4em; }
:where(.entry-content) > :is(p, ul, ol) { color: var(--ink); }
:where(.entry-content) > :is(p, ul, ol) a { color: var(--petrol); text-underline-offset: 3px; }
:where(.entry-content) > :is(ul, ol) { padding-inline-start: 1.3em; }
:where(.entry-content) > blockquote { border-inline-start: 3px solid var(--turq); padding-inline-start: 20px; font: 400 22px/1.35 var(--f-display); color: var(--petrol-ink); }
:where(.entry-content) > figure img, :where(.entry-content) > .wp-block-image img { border-radius: var(--r-m); }
:where(.entry-content) table { width: 100%; border-collapse: collapse; font-size: 15px; }
:where(.entry-content) :is(th, td) { text-align: start; padding: 11px 8px; border-block-end: 1px solid var(--line); }
.article-cover { margin-block: 0; }
.article-cover img { width: 100%; border-radius: var(--r-l); aspect-ratio: 16/8; object-fit: cover; }

/* ---------- Cartes d'articles ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card__link { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; text-decoration: none; background: #fff; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.post-card__link:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -24px rgba(0,58,76,.35); }
.post-card__media { aspect-ratio: 4/3; background: var(--perle); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card__body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card__title { font: 400 24px/1.15 var(--f-display); margin: 0; color: var(--petrol-ink); }
.post-card__body p { margin: 0; color: var(--muted); font-size: 15px; }
.post-card__chip { justify-self: start; align-self: flex-start; font: 600 12px var(--f-label); letter-spacing: .08em; text-transform: uppercase; color: var(--turq-ink); background: rgba(0,185,190,.12); padding: 5px 10px; border-radius: 999px; }
.post-card__meta { margin-block-start: auto; font-size: 13.5px; color: var(--muted); }
.post-card__body p { margin: 0; color: var(--muted); font-size: 15.5px; }
.post-card__body .link { margin-block-start: auto; }
.nav-links { display: flex; gap: 8px; justify-content: center; margin-block-start: 48px; }
.page-numbers { min-width: 44px; height: 44px; border-radius: 999px; border: 1.5px solid var(--line); display: grid; place-items: center; text-decoration: none; font: 600 15px var(--f-label); padding-inline: 12px; }
.page-numbers.current { background: var(--petrol); color: #fff; border-color: var(--petrol); }

/* ---------- 404 ---------- */
.notfound { padding-block: clamp(80px, 12vw, 160px); display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.notfound h1 { font-size: clamp(36px, 4.4vw, 56px); margin: 0; max-width: 18ch; }
.notfound__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-block-start: 10px; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--petrol-ink); color: rgba(255,255,255,.78); font-size: 15px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer__top { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr 1.1fr; gap: 40px; padding-block: 64px 44px; }
.site-footer__top > * { min-width: 0; }
.site-footer__brand p { margin: 18px 0 0; max-width: 32ch; }
.site-footer__title { font: 600 12.5px var(--f-label); letter-spacing: .16em; text-transform: uppercase; color: #fff; margin: 0 0 16px; }
.site-footer__menu, .site-footer__contact, .site-footer__legal, .socials { list-style: none; margin: 0; padding: 0; }
.site-footer__menu { display: grid; gap: 8px; }
.site-footer__contact { display: grid; gap: 12px; }
.site-footer__contact li { display: flex; gap: 10px; align-items: flex-start; }
.site-footer__contact .icon { margin-block-start: 4px; color: var(--turq); }
.socials { display: flex; gap: 10px; margin-block-start: 20px; }
.socials a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); display: grid; place-items: center; }
.socials a:hover { background: #fff; color: var(--petrol-ink); text-decoration: none; }
.partner { background: var(--petrol-deep); border-radius: var(--r-m); padding: 24px; display: flex; flex-direction: column; gap: 10px; text-decoration: none !important; }
.partner__eyebrow { font: 600 12.5px var(--f-label); letter-spacing: .16em; text-transform: uppercase; color: var(--turq); }
.partner b { font: 400 24px/1.1 var(--f-display); color: #fff; }
.partner span:last-child { display: inline-flex; gap: 6px; align-items: center; }
.site-footer__bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-block: 22px; border-block-start: 1px solid rgba(255,255,255,.1); font-size: 13.5px; }
.site-footer__legal { display: flex; gap: 22px; flex-wrap: wrap; }

/* WhatsApp flottant (mobile) */
.wa-float {
	position: fixed; z-index: 40; display: none;
	inset-inline-end: calc(18px + env(safe-area-inset-right, 0px));
	bottom: calc(18px + env(safe-area-inset-bottom, 0px));
	width: 58px; height: 58px; border-radius: 50%;
	background: var(--wa); color: #fff; place-items: center;
	box-shadow: 0 12px 26px -8px rgba(0,0,0,.4);
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
	.nav, .site-header__cta { display: none; }
	.site-header__actions { margin-inline-start: auto; }
	.burger { display: grid; }
	.site-footer__top { grid-template-columns: 1fr 1fr; }
	.post-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
	.topbar .hide-m { display: none; }
	.wa-float { display: grid; }
}
@media (max-width: 560px) {
	.topbar .hide-s { display: none; }
	.site-footer__top, .post-grid { grid-template-columns: 1fr; }
	.logo b { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Emplacement d'image vide (blocs) ---------- */
.ph { position: absolute; inset: 0; display: block; overflow: hidden; background: linear-gradient(135deg, #DCE6E9, #C7D5DA); }
.ph::before, .ph::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.28); }
.ph::before { clip-path: polygon(0 100%, 62% 22%, 100% 100%); }
.ph::after { clip-path: polygon(38% 0, 100% 0, 100% 58%); background: rgba(255,255,255,.18); }
.ph__tag { position: absolute; z-index: 1; inset-inline-start: 14px; bottom: 14px; max-width: calc(100% - 28px); background: rgba(255,255,255,.92); color: var(--muted); font: 500 12.5px/1.35 var(--f-body); padding: 7px 11px; border-radius: 9px; }
/* :where() = priorité nulle : la position définie par un bloc (absolute, sticky) l'emporte quel que soit l'ordre de chargement des CSS. */
:where(.media-box) { position: relative; overflow: hidden; background: var(--perle-2); }
.media-box > img, .media-box > video { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }

/* ---------- Curseur : point bleu qui suit la souris (souris uniquement) ---------- */
.cursor-dot { position: fixed; z-index: 9999; top: 0; left: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: rgba(0, 90, 118, .28); pointer-events: none; opacity: 0; transition: width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease), background .3s, opacity .3s; will-change: transform; }
.cursor-dot.is-visible { opacity: 1; }
.cursor-dot.is-hover { width: 12px; height: 12px; margin: -6px 0 0 -6px; background: rgba(0, 90, 118, .55); }
.cursor-dot.is-down { width: 8px; height: 8px; margin: -4px 0 0 -4px; }
.cursor-dot.is-dark { background: rgba(255, 255, 255, .3); }
.cursor-dot.is-dark.is-hover { background: rgba(255, 255, 255, .6); }
