/* ==========================================================================
   CVEP — styles communs
   Jetons, typographie, boutons, cartes partagées, en-tête, pied de page.
   Les styles propres à chaque section vivent dans blocks/<bloc>/style.css
   et ne sont chargés que sur les pages qui utilisent le bloc.
   Valeurs relevées sur les maquettes Figma (cadre 1440 px).
   ========================================================================== */

:root {
	/* Couleurs (variables Figma) */
	--c-green: #23463a;      /* Vert Foncé */
	--c-green-deep: #142922;
	--c-cream: #f7f4ee;      /* Beige */
	--c-gold: #a98a52;       /* Marron */
	--c-ink: #1c2620;        /* Black */
	--c-white: #fff;
	--c-muted: #6b716d;
	--c-line: rgba(20, 41, 34, .1);
	--c-line-gold: rgba(169, 138, 82, .2);
	--c-tag: rgba(169, 138, 82, .1);
	--c-tint: rgba(35, 70, 58, .05);
	--c-ok: #4e9a6b;
	--c-ok-bg: #e3eee6;

	/* Polices */
	--f-serif: "Gentium Book Basic", Georgia, "Times New Roman", serif;
	--f-sans: "Switzer", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	/* Échelle typographique : valeur maquette au-delà de 1440 px, réduite en mobile */
	--fs-hero: clamp(2.75rem, .5rem + 6.4vw, 6rem);       /* 96 */
	--fs-h1: clamp(2.375rem, 1rem + 3.4vw, 4rem);        /* 64 */
	--fs-h2-lg: clamp(2.25rem, 1rem + 3.4vw, 4rem);      /* 64 */
	--fs-h2: clamp(1.875rem, .9rem + 2.6vw, 3rem);       /* 48 */
	--fs-h3: clamp(1.625rem, .9rem + 2.1vw, 2.5rem);      /* 40 */
	--fs-h4: clamp(1.25rem, 1rem + .6vw, 1.5rem);      /* 24 */
	--fs-lead: clamp(1.0625rem, .9rem + .5vw, 1.25rem);     /* 20 */
	--fs-body: 1rem;                                       /* 16 */
	--fs-btn: clamp(1rem, .95rem + .2vw, 1.125rem);        /* 18 */
	--fs-small: .875rem;
	--fs-xs: .75rem;                                       /* 12 */

	/* Mise en page */
	--container: 1440px;
	--gutter: clamp(1rem, .6rem + 1.4vw, 1.5rem);          /* 24 */
	--section-y: clamp(2.5rem, 1.9rem + 1.8vw, 3.125rem);  /* 50 */
	--gap: 1.25rem;                                         /* 20 */
	--radius: 10px;
	--radius-pill: 40px;
	--header-h: 131px;
	--shadow-card: 0 4px 24px rgba(20, 41, 34, .06);
	--ease: cubic-bezier(.2, .7, .2, 1);
}

@media (max-width: 1024px) {
	:root { --header-h: 84px; }
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
	margin: 0;
	font-family: var(--f-sans);
	font-size: var(--fs-body);
	line-height: 1.5;
	color: var(--c-ink);
	background: var(--c-white);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--c-gold); outline-offset: 3px; }

.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; left: 1rem; top: -100px; z-index: 100;
	padding: .75rem 1rem; background: var(--c-green); color: var(--c-cream); border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

/* --------------------------------------------------------------------------
   Mise en page
   -------------------------------------------------------------------------- */
.container {
	width: 100%;
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(860px + 2 * var(--gutter)); }
.section { padding-block: var(--section-y); }
.section--dark { background: var(--c-green); color: var(--c-cream); }
.section--cream { background: var(--c-cream); }

/*
 * Blocs WordPress de base insérés entre deux sections (texte SEO, image, liste…) :
 * ils prennent la largeur de lecture et une mise en forme éditoriale.
 */
.site-main > :not(.cvep-b):not(script):not(style) {
	max-width: calc(860px + 2 * var(--gutter));
	margin-inline: auto;
	padding-inline: var(--gutter);
}
.site-main > :not(.cvep-b) + :not(.cvep-b) { margin-top: 1.25rem; }
.site-main > .cvep-b + :not(.cvep-b) { margin-top: var(--section-y); }
.site-main > :not(.cvep-b) + .cvep-b { margin-top: var(--section-y); }
.site-main > h2:not(.cvep-b) { font: 400 var(--fs-h3)/1.15 var(--f-serif); }
.site-main > h3:not(.cvep-b) { font: 400 var(--fs-h4)/1.2 var(--f-serif); }
.site-main > p:not(.cvep-b), .site-main > ul:not(.cvep-b), .site-main > ol:not(.cvep-b) { font-size: var(--fs-lead); line-height: 1.55; }

/* --------------------------------------------------------------------------
   Typographie
   -------------------------------------------------------------------------- */
.hero-title, .h1, .h2, .h2-lg, .h3, .h4 { font-family: var(--f-serif); font-weight: 400; letter-spacing: 0; }
.hero-title { font-size: var(--fs-hero); line-height: 1; }
.h1 { font-size: var(--fs-h1); line-height: 1.08; }
.h2-lg { font-size: var(--fs-h2-lg); line-height: 1.1; }
.h2 { font-size: var(--fs-h2); line-height: 1.15; }
.h3 { font-size: var(--fs-h3); line-height: 1.18; }
.h4 { font-size: var(--fs-h4); line-height: 1.25; }
.eyebrow {
	font-family: var(--f-sans);
	font-size: var(--fs-body);
	line-height: 1.3;
	text-transform: uppercase;
	color: var(--c-gold);
	margin-bottom: .625rem;
}
.lead { font-size: var(--fs-lead); line-height: 1.3; }
.text { font-size: var(--fs-lead); line-height: 1.3; }
.text p + p, .lead p + p { margin-top: 1.3em; }
.text strong, .lead strong { font-weight: 600; }
.text-sm { font-size: var(--fs-body); line-height: 1.4; }
.muted { color: var(--c-muted); }

/* Texte éditorial long (pages légales, contenus libres) */
.prose { font-size: var(--fs-lead); line-height: 1.6; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font: 400 var(--fs-h3)/1.15 var(--f-serif); margin-top: 1.6em; }
.prose h3 { font: 400 var(--fs-h4)/1.2 var(--f-serif); margin-top: 1.4em; }
.prose a { color: var(--c-green); }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose-page .h1 { margin-bottom: 1.5rem; }

/* --------------------------------------------------------------------------
   Boutons
   -------------------------------------------------------------------------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .625rem;
	padding: 15px 20px;
	border: 1px solid transparent;
	border-radius: var(--radius-pill);
	font-family: var(--f-sans);
	font-size: var(--fs-btn);
	font-weight: 500;
	line-height: 1.33;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn .icon { width: 1.25em; height: 1.25em; flex: none; }
.btn--primary { background: var(--c-green); color: var(--c-cream); }
.btn--primary:hover { background: var(--c-green-deep); }
.btn--light { background: var(--c-cream); color: var(--c-green); }
.btn--light:hover { background: var(--c-white); }
.btn--outline { border-color: var(--c-green); color: var(--c-green); background: transparent; }
.btn--outline:hover { background: var(--c-green); color: var(--c-cream); }
.btn--outline-light { border-color: var(--c-cream); color: var(--c-cream); background: transparent; }
.btn--outline-light:hover { background: var(--c-cream); color: var(--c-green); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--gap); align-items: center; }

/* Flèche dans un cercle (cartes) */
.arrow-circle {
	display: inline-grid; place-items: center; flex: none;
	width: 50px; height: 50px; border-radius: 50%;
	border: 1px solid currentColor;
	transition: background-color .2s var(--ease), color .2s var(--ease);
}
.arrow-circle .icon { width: 24px; height: 24px; }

/* Pastilles (spécialités, prestations) */
.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
	display: inline-flex; align-items: center;
	padding: 10px; border-radius: 30px;
	background: var(--c-tag); color: var(--c-green);
	font-size: var(--fs-xs); line-height: 1.2;
}
.tag--lg { padding: 10px 16px; font-size: var(--fs-body); color: var(--c-ink); }
.tag--upper { text-transform: uppercase; font-size: var(--fs-small); color: var(--c-ink); }

.avatar { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; background: #e9e4da; }
.avatar--empty { display: block; }

/* --------------------------------------------------------------------------
   Grilles de cartes
   -------------------------------------------------------------------------- */
.grid { display: grid; gap: var(--gap); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 960px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

/* Carte chirurgien ------------------------------------------------------- */
.card-surgeon {
	position: relative;
	display: flex; flex-direction: column;
	background: var(--c-cream);
	border: 1px solid var(--c-line-gold);
	border-radius: var(--radius);
	overflow: hidden;
}
.card-surgeon__media { aspect-ratio: 449 / 330; background: #efeae0; overflow: hidden; }
.card-surgeon__media img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform .6s var(--ease); }
.card-surgeon:hover .card-surgeon__media img { transform: scale(1.03); }
.card-surgeon__body { display: flex; flex-direction: column; gap: 20px; flex: 1; padding: 10px; }
.card-surgeon__name { font: 400 var(--fs-h4)/1.25 var(--f-serif); }
.card-surgeon__name a { text-decoration: none; }
.card-surgeon__name a::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* toute la carte est cliquable */
.card-surgeon__booking {
	position: relative; z-index: 2;
	display: flex; align-items: center; gap: 10px;
	margin-top: auto;
	padding: 10px; border-radius: var(--radius);
	background: var(--c-tint); color: var(--c-green);
	font-size: var(--fs-xs); font-weight: 500; text-decoration: none;
	transition: background-color .2s var(--ease);
}
.card-surgeon__booking:hover { background: rgba(35, 70, 58, .1); }
.card-surgeon__booking .icon { width: 24px; height: 24px; flex: none; }
.card-surgeon__booking .icon:last-child { margin-left: auto; }
.grid--4 .card-surgeon__media { aspect-ratio: 331 / 330; }

/* Carte expertise -------------------------------------------------------- */
.card-expertise {
	position: relative;
	display: flex;
	border-radius: var(--radius);
	border: 1px solid var(--c-line);
	text-decoration: none;
	overflow: hidden;
	isolation: isolate;
}
.card-expertise--lg {
	flex-direction: column; justify-content: space-between; gap: 40px;
	min-height: 476px;
	padding: 50px 20px 20px;
	background: var(--c-green); color: var(--c-cream);
}
.card-expertise--lg::before, .card-expertise--lg::after {
	content: ""; position: absolute; z-index: -1;
	width: 328px; height: 328px; border-radius: 50%;
	border: 1px solid var(--c-gold);
	right: -100px;
}
.card-expertise--lg::before { top: -165px; }
.card-expertise--lg::after { bottom: -150px; right: -140px; }
.card-expertise--lg .card-expertise__icon { width: 90px; height: 90px; color: var(--c-gold); }
.card-expertise--lg .card-expertise__title { font: 400 var(--fs-h2)/1.15 var(--f-serif); }
.card-expertise--lg .card-expertise__text { margin-top: 30px; max-width: 26em; font-size: var(--fs-lead); line-height: 1.3; }
.card-expertise--lg:hover .arrow-circle { background: var(--c-cream); color: var(--c-green); }

.card-expertise--sm {
	align-items: center; gap: 20px;
	padding: 20px;
	background: var(--c-cream); color: var(--c-ink);
}
.card-expertise--sm .card-expertise__icon { width: 70px; height: 70px; flex: none; color: var(--c-green); }
.card-expertise--sm .card-expertise__body { flex: 1; display: grid; gap: 10px; }
.card-expertise--sm .card-expertise__title { font: 400 var(--fs-h4)/1.2 var(--f-serif); }
.card-expertise--sm .card-expertise__text { font-size: var(--fs-body); line-height: 1.3; }
.card-expertise--sm .arrow-circle { color: var(--c-green); }
.card-expertise--sm:hover .arrow-circle { background: var(--c-green); color: var(--c-cream); }

/* Carte établissement ---------------------------------------------------- */
.card-etab {
	position: relative;
	display: flex; flex-direction: column;
	background: var(--c-cream);
	border: 1px solid var(--c-line-gold);
	border-radius: var(--radius);
	box-shadow: var(--shadow-card);
	overflow: hidden;
}
.card-etab[hidden] { display: none; }
.card-etab__media { aspect-ratio: 451 / 250; overflow: hidden; }
.card-etab__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card-etab:hover .card-etab__media img { transform: scale(1.03); }
.card-etab__body { display: flex; flex-direction: column; gap: 14px; flex: 1; padding: 20px; }
.card-etab__title { font: 400 var(--fs-h4)/1.25 var(--f-serif); color: var(--c-green); }
.card-etab__address { display: flex; gap: 12px; font-size: var(--fs-body); line-height: 1.3; color: var(--c-muted); font-style: normal; }
.card-etab__address .icon { width: 24px; height: 24px; flex: none; color: var(--c-green); }
.robot-badge {
	display: flex; align-items: center; gap: 12px;
	padding: 6px 12px; border-radius: 4px;
	background: var(--c-ok-bg); border: 1px solid rgba(78, 154, 107, .25);
}
.robot-badge .icon { width: 36px; height: 36px; flex: none; color: var(--c-green); }
.robot-badge__name { display: block; font-size: var(--fs-body); }
.robot-badge__state { display: block; font-size: var(--fs-xs); color: var(--c-ok); }
.robot-badge--off { background: #f0e9dc; border-color: var(--c-line-gold); }
.robot-badge--off .robot-badge__state { color: var(--c-muted); }
.card-etab__team { border-top: 1px solid var(--c-line-gold); padding-top: 14px; }
.card-etab__team-title { font-size: var(--fs-body); margin-bottom: 14px; }
.card-etab__avatars { display: flex; flex-wrap: wrap; gap: 6px 10px; }
.card-etab__avatars li { width: 80px; display: grid; justify-items: center; gap: 6px; text-align: center; font-size: var(--fs-xs); line-height: 1.3; color: var(--c-muted); }
.card-etab__link {
	display: flex; align-items: center; justify-content: space-between; gap: 10px;
	margin-top: auto; padding-top: 14px; border-top: 1px solid var(--c-line-gold);
	font-size: var(--fs-lead); font-weight: 500; color: var(--c-green); text-decoration: none;
}
.card-etab__link::after { content: ""; position: absolute; inset: 0; }
.card-etab__link .icon { width: 24px; height: 24px; transition: transform .2s var(--ease); }
.card-etab:hover .card-etab__link .icon { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   En-tête
   -------------------------------------------------------------------------- */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: var(--c-cream); color: var(--c-green);
	transition: box-shadow .2s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--c-line); }
.site-header__inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.site-logo { display: inline-flex; align-items: center; gap: 8px; color: var(--c-green); text-decoration: none; flex: none; }
.site-logo__picto { width: 41px; height: 41px; }
.site-logo__text { display: grid; line-height: 1; text-transform: uppercase; }
.site-logo__name { font-size: 18px; font-weight: 500; letter-spacing: -.01em; }
.site-logo__place { font-size: 9px; letter-spacing: .12em; margin-top: 4px; }
.site-logo--light { color: var(--c-cream); }

.site-nav { flex: 1; display: flex; justify-content: center; }
.site-nav__list { display: flex; gap: 32px; }
.site-nav__list a {
	font-size: var(--fs-body); text-transform: uppercase; text-decoration: none;
	padding-block: 6px; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
	transition: background-size .25s var(--ease);
}
.site-nav__list a:hover, .site-nav__list .current-menu-item > a, .site-nav__list .current-menu-ancestor > a, .site-nav__list .current_page_parent > a { background-size: 100% 1px; }
.site-nav__cta { display: none; }
.site-header__cta { text-transform: uppercase; font-size: var(--fs-body); padding: 15px 20px; }
.site-header__toggle { display: none; }

@media (max-width: 1024px) {
	.site-header__inner { justify-content: space-between; }
	.site-header__cta { display: none; }
	.site-header__toggle {
		display: grid; place-items: center;
		width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%;
		background: var(--c-green); color: var(--c-cream); cursor: pointer;
	}
	.burger, .burger::before, .burger::after, .burger span { display: block; width: 20px; height: 1.5px; background: currentColor; transition: transform .25s var(--ease), opacity .2s; }
	.burger { position: relative; background: none; }
	.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
	.burger::before { top: -6px; }
	.burger::after { top: 6px; }
	[aria-expanded="true"] .burger span { opacity: 0; }
	[aria-expanded="true"] .burger::before { transform: translateY(6px) rotate(45deg); }
	[aria-expanded="true"] .burger::after { transform: translateY(-6px) rotate(-45deg); }

	.site-nav {
		position: fixed; inset: var(--header-h) 0 0; z-index: 49;
		flex-direction: column; justify-content: flex-start; gap: 32px;
		padding: 32px var(--gutter) 48px;
		background: var(--c-cream);
		overflow-y: auto;
		visibility: hidden; opacity: 0; transform: translateY(-8px);
		transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s .25s;
	}
	.site-nav.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
	.site-nav__list { flex-direction: column; gap: 4px; }
	.site-nav__list a { display: block; padding-block: 14px; font: 400 var(--fs-h3)/1.1 var(--f-serif); text-transform: none; border-bottom: 1px solid var(--c-line); background: none; }
	.site-nav__cta { display: inline-flex; align-self: flex-start; }
	body.nav-open { overflow: hidden; }
}

/* --------------------------------------------------------------------------
   Pied de page
   -------------------------------------------------------------------------- */
.site-footer { background: var(--c-green); color: var(--c-cream); padding-block: 40px 24px; margin-top: var(--gap); }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__top { display: grid; grid-template-columns: 296px 1fr; gap: 24px; align-items: start; }
.site-footer__cols { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
.site-footer__title { font-size: var(--fs-lead); margin-bottom: 28px; }
.site-footer__col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; font-size: var(--fs-body); }
.site-footer__bottom {
	display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
	margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(247, 244, 238, .3);
	font-size: var(--fs-body);
}
.site-footer__legal { display: flex; flex-wrap: wrap; gap: 8px 40px; }
@media (max-width: 1100px) {
	.site-footer__top { grid-template-columns: 1fr; gap: 40px; }
	.site-footer__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 40px; }
}
@media (max-width: 640px) {
	.site-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.site-footer__legal { gap: 8px 24px; }
}

/* --------------------------------------------------------------------------
   Utilitaires
   -------------------------------------------------------------------------- */
.media-cover { position: relative; overflow: hidden; }
.media-cover > img { width: 100%; height: 100%; object-fit: cover; }
.rounded { border-radius: var(--radius); }

/* Apparition douce au défilement (activée par main.js, sans effet si JS absent) */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Surtitres sur fond vert : or éclairci pour un contraste lisible (4,8:1, AA) — même teinte que la maquette sur fond clair. */
body .section--dark .eyebrow, body .cta__panel .eyebrow, body .approach .eyebrow, body .robot .eyebrow, body .steps--dark .eyebrow, body .site-footer .eyebrow { color: #c9ad78; opacity: 1; }
