/* ==========================================================================
   ORIZON — Design system
   Direction « Clinique lumineuse » : professionnelle, médicale et chaleureuse.
   Titres légers en Albert Sans, vert forêt, formes adoucies, surfaces blanches
   sur fonds crème. L'arc du logo reste un repère discret.
   Les valeurs de base proviennent de theme.json (variables --wp--preset--*).
   ========================================================================== */

/* ---------- 1. Jetons ---------- */
:root {
	--c-encre: var(--wp--preset--color--encre, #1C211C);
	--c-foret-profond: var(--wp--preset--color--foret-profond, #2E352D);
	--c-foret: var(--wp--preset--color--foret, #424B41);
	--c-mousse: var(--wp--preset--color--mousse, #5D6757);
	--c-sauge: var(--wp--preset--color--sauge, #A9B3A0);
	--c-sauge-pale: var(--wp--preset--color--sauge-pale, #DDE2D5);
	--c-lumiere: var(--wp--preset--color--lumiere, #91C158);
	--c-lumiere-fonce: var(--wp--preset--color--lumiere-fonce, #436A26);
	--c-sable: var(--wp--preset--color--sable, #D9CBB2);
	--c-lin: var(--wp--preset--color--lin, #EAE3D4);
	--c-creme: var(--wp--preset--color--creme, #F4EFE5);
	--c-papier: var(--wp--preset--color--papier, #FAF8F3);
	--c-blanc: #FFFFFF;

	--ff-display: var(--wp--preset--font-family--display, Georgia, serif);
	--ff-sans: var(--wp--preset--font-family--sans, Arial, sans-serif);
	--ff-mono: var(--wp--preset--font-family--mono, monospace);

	/* Échelle typographique fluide (375 px → 1440 px) — sobre et lisible */
	--fs-xs: 0.8125rem;
	--fs-s: 0.9375rem;
	--fs-m: clamp(1rem, 0.96rem + 0.19vw, 1.125rem);
	--fs-l: clamp(1.125rem, 1.06rem + 0.28vw, 1.3125rem);
	--fs-xl: clamp(1.375rem, 1.28rem + 0.47vw, 1.75rem);
	--fs-2xl: clamp(1.875rem, 1.6rem + 1.25vw, 2.75rem);
	--fs-3xl: clamp(2.25rem, 1.85rem + 1.8vw, 3.5rem);
	--fs-display: clamp(2.5rem, 1.95rem + 2.4vw, 4.125rem);

	--sp-2xs: var(--wp--preset--spacing--10, 0.5rem);
	--sp-xs: var(--wp--preset--spacing--20, 1rem);
	--sp-s: var(--wp--preset--spacing--30, 1.5rem);
	--sp-m: var(--wp--preset--spacing--40, 2.5rem);
	--sp-l: var(--wp--preset--spacing--50, 4.5rem);
	--sp-xl: var(--wp--preset--spacing--60, 7.5rem);
	--sp-2xl: var(--wp--preset--spacing--70, 11rem);

	--gutter: clamp(1.25rem, 0.5rem + 3.2vw, 3rem);
	--gap: clamp(1rem, 0.5rem + 2vw, 2rem);
	--container: 78rem;
	--container-wide: 90rem;
	--container-narrow: 46rem;
	--header-h: 7.25rem;

	/* Formes : adoucies, jamais en pilule */
	--radius-s: 8px;
	--radius: 14px;
	--radius-l: 24px;
	--line-w: 1px;
	--shadow: 0 1px 2px rgb(46 53 45 / 0.04), 0 12px 32px -16px rgb(46 53 45 / 0.18);
	--shadow-l: 0 2px 4px rgb(46 53 45 / 0.04), 0 30px 60px -30px rgb(46 53 45 / 0.28);

	/* Sigle Orizon (arc + O), version claire et version pour fonds foncés */
	--o-symbol: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 74.94 104.34'%3E%3Cpath d='M9.95,24.78C14.2,14.11,24.33,7.11,37.47,7.11s23.27,7,27.52,17.67h8.16C68.5,9.97,55.07,0,37.47,0S6.44,9.97,1.79,24.78H9.95Z' fill='%23a0d038'/%3E%3Cpath d='M0,67.73C0,46.62,15.51,31.12,37.47,31.12s37.47,15.5,37.47,36.61-15.5,36.61-37.47,36.61S0,88.83,0,67.73ZM67.19,67.73c0-17.02-12.17-29.51-29.72-29.51s-29.72,12.49-29.72,29.51,12.17,29.5,29.72,29.5S67.19,84.74,67.19,67.73Z' fill='%23557e52'/%3E%3C/svg%3E");
	--o-symbol-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 74.94 104.34'%3E%3Cpath d='M9.95,24.78C14.2,14.11,24.33,7.11,37.47,7.11s23.27,7,27.52,17.67h8.16C68.5,9.97,55.07,0,37.47,0S6.44,9.97,1.79,24.78H9.95Z' fill='%23a0d038'/%3E%3Cpath d='M0,67.73C0,46.62,15.51,31.12,37.47,31.12s37.47,15.5,37.47,36.61-15.5,36.61-37.47,36.61S0,88.83,0,67.73ZM67.19,67.73c0-17.02-12.17-29.51-29.72-29.51s-29.72,12.49-29.72,29.51,12.17,29.5,29.72,29.5S67.19,84.74,67.19,67.73Z' fill='%23DDE2D5'/%3E%3C/svg%3E");
	--ease: cubic-bezier(0.22, 1, 0.36, 1);
	--ease-io: cubic-bezier(0.65, 0, 0.35, 1);
	--dur-s: 0.25s;
	--dur-m: 0.5s;
	--dur-l: 0.9s;
}

/* ---------- 2. Thèmes de section ---------- */
.o-theme--papier,
.o-theme--creme,
.o-theme--lin,
.o-theme--sauge,
body {
	--bg: var(--c-papier);
	--fg: var(--c-foret-profond);
	--heading: var(--c-foret);
	--fg-soft: var(--c-mousse);
	--line: rgb(66 75 65 / 0.14);
	--line-strong: rgb(66 75 65 / 0.3);
	--surface: var(--c-blanc);
	--surface-soft: var(--c-creme);
	--accent: var(--c-lumiere-fonce);
	--sun: var(--c-lumiere);
	--btn-bg: var(--c-foret);
	--btn-fg: var(--c-blanc);
	--btn-bg-hover: var(--c-foret-profond);
	--focus: var(--c-foret);
	color-scheme: light;
}
.o-theme--creme { --bg: var(--c-creme); --surface-soft: var(--c-papier); }
.o-theme--lin { --bg: var(--c-lin); --surface-soft: var(--c-creme); --line: rgb(66 75 65 / 0.16); }
.o-theme--sauge { --bg: var(--c-sauge-pale); --surface-soft: var(--c-papier); --fg-soft: #4C5647; --line: rgb(66 75 65 / 0.18); }

.o-theme--foret,
.o-theme--encre {
	--bg: var(--c-foret);
	--fg: var(--c-creme);
	--heading: var(--c-blanc);
	--fg-soft: var(--c-sauge-pale);
	--line: rgb(244 239 229 / 0.18);
	--line-strong: rgb(244 239 229 / 0.4);
	--surface: rgb(255 255 255 / 0.06);
	--surface-soft: var(--c-foret-profond);
	--accent: var(--c-lumiere);
	--btn-bg: var(--c-lumiere);
	--btn-fg: var(--c-encre);
	--btn-bg-hover: var(--c-creme);
	--focus: var(--c-lumiere);
	color-scheme: dark;
}
.o-theme--encre { --bg: var(--c-foret-profond); --fg-soft: var(--c-sauge); }

/* ---------- 3. Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
	margin: 0;
	background: var(--c-papier);
	color: var(--c-foret-profond);
	font-family: var(--ff-sans);
	font-size: var(--fs-m);
	line-height: 1.65;
	font-feature-settings: "kern", "liga";
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	overflow-x: clip;
}

img,
svg,
video,
iframe { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
:where(ul[class], ol[class]) { list-style: none; padding: 0; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }

button { font: inherit; color: inherit; }

::selection { background: var(--c-lumiere); color: var(--c-encre); }

:focus-visible {
	outline: 2px solid var(--focus, var(--c-foret));
	outline-offset: 3px;
	border-radius: var(--radius-s);
}

.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;
}
.screen-reader-text:focus {
	position: fixed !important;
	top: 1rem;
	left: 1rem;
	z-index: 1000;
	width: auto;
	height: auto;
	clip: auto;
	padding: 0.75rem 1rem;
	background: var(--c-foret);
	color: var(--c-blanc);
	font-size: var(--fs-s);
	text-decoration: none;
	border-radius: var(--radius-s);
}

/* ---------- 4. Mise en page ---------- */
.o-block {
	position: relative;
	background-color: var(--bg);
	color: var(--fg);
	isolation: isolate;
}

.o-wrap {
	width: min(100% - 2 * var(--gutter), var(--container));
	margin-inline: auto;
}
.o-wrap--wide { width: min(100% - 2 * var(--gutter), var(--container-wide)); }
.o-wrap--narrow { width: min(100% - 2 * var(--gutter), var(--container-narrow)); }
.o-wrap--bleed { width: 100%; }

.o-grid {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: var(--gap);
}

.o-pt--aucun { padding-top: 0; }
.o-pt--s { padding-top: var(--sp-m); }
.o-pt--m { padding-top: var(--sp-l); }
.o-pt--l { padding-top: var(--sp-xl); }
.o-pt--xl { padding-top: var(--sp-2xl); }
.o-pb--aucun { padding-bottom: 0; }
.o-pb--s { padding-bottom: var(--sp-m); }
.o-pb--m { padding-bottom: var(--sp-l); }
.o-pb--l { padding-bottom: var(--sp-xl); }
.o-pb--xl { padding-bottom: var(--sp-2xl); }

.o-horizon {
	display: block;
	height: var(--line-w);
	background: var(--line);
	border: 0;
	margin: 0;
}

/* Surfaces : cartes blanches adoucies */
.o-card-surface {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-l);
}

/* ---------- 5. Typographie ---------- */
.o-title {
	font-family: var(--ff-sans);
	font-weight: 350;
	line-height: 1.14;
	letter-spacing: -0.022em;
	color: var(--heading);
	text-wrap: balance;
	font-kerning: normal;
	overflow-wrap: break-word;
}
.o-title strong,
.o-title b { font-weight: 550; }
.o-title--display { font-size: var(--fs-display); font-weight: 300; line-height: 1.08; letter-spacing: -0.03em; }
.o-title--3xl { font-size: var(--fs-3xl); font-weight: 300; line-height: 1.1; letter-spacing: -0.028em; }
.o-title--2xl { font-size: var(--fs-2xl); }
.o-title--xl { font-size: var(--fs-xl); font-weight: 450; line-height: 1.25; letter-spacing: -0.012em; }
.o-title--l { font-size: var(--fs-l); font-weight: 550; line-height: 1.3; letter-spacing: -0.005em; }

/* Surtitre : petite étiquette verte, sobre */
.o-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	margin-bottom: 0.25rem;
	font-family: var(--ff-sans);
	font-size: var(--fs-xs);
	font-weight: 650;
	line-height: 1.3;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--accent);
}
.o-eyebrow::before {
	content: "";
	flex: none;
	width: 0.8rem;
	height: 1.12rem;
	background: var(--o-symbol-current, var(--o-symbol)) center / contain no-repeat;
	transform: translateY(-0.08rem);
}
/* Sigle sur fond foncé : O clair */
.o-theme--foret,
.o-theme--encre { --o-symbol-current: var(--o-symbol-dark); }
.o-theme--papier,
.o-theme--creme,
.o-theme--lin,
.o-theme--sauge { --o-symbol-current: var(--o-symbol); }

.o-lede {
	font-size: var(--fs-l);
	line-height: 1.6;
	color: var(--fg-soft);
	max-width: 40rem;
	text-wrap: pretty;
}

.o-small { font-size: var(--fs-s); color: var(--fg-soft); }
.o-mono { font-family: var(--ff-mono); font-size: var(--fs-xs); letter-spacing: 0.02em; }

/* Mot surmonté de l'arc du logo (option « Mot sous l'arc ») */
.o-sun-word { white-space: nowrap; }
.o-sun { position: relative; display: inline-block; }
.o-sun::before {
	content: "";
	position: absolute;
	left: 50%;
	bottom: calc(100% - 0.14em);
	width: min(0.9em, 60%);
	aspect-ratio: 2 / 1;
	border: 0.06em solid var(--sun);
	border-bottom: 0;
	border-radius: 2em 2em 0 0;
	transform: translateX(-50%);
}
.o-sun--letter::before { width: 0.5em; bottom: calc(100% - 0.36em); border-width: 0.05em; }
.o-sun--upper::before { width: 0.66em; bottom: calc(100% - 0.06em); }

/* Texte riche */
.o-prose { max-width: 68ch; text-wrap: pretty; }
.o-prose > * + * { margin-top: 1em; }
.o-prose h2,
.o-prose h3 {
	font-family: var(--ff-sans);
	font-weight: 450;
	line-height: 1.25;
	letter-spacing: -0.012em;
	color: var(--heading);
	margin-top: 1.8em;
}
.o-prose h2 { font-size: var(--fs-xl); }
.o-prose h3 { font-size: var(--fs-l); }
.o-prose h4 { font-size: var(--fs-m); font-weight: 600; margin-top: 1.6em; color: var(--heading); }
.o-prose h2 + *,
.o-prose h3 + *,
.o-prose h4 + * { margin-top: 0.6em; }
.o-prose > :first-child { margin-top: 0; }
.o-prose ul,
.o-prose ol { padding-left: 0; list-style: none; }
.o-prose li { position: relative; padding-left: 1.9em; }
.o-prose li + li { margin-top: 0.5em; }
.o-prose ul > li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.3em;
	width: 1.15em;
	height: 1.15em;
	border-radius: 50%;
	background:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4.5 8.2 2.3 2.3 4.7-5' fill='none' stroke='%23436A26' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 72% no-repeat,
		rgb(145 193 88 / 0.22);
}
.o-theme--foret .o-prose ul > li::before,
.o-theme--encre .o-prose ul > li::before {
	background:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4.5 8.2 2.3 2.3 4.7-5' fill='none' stroke='%2391C158' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 72% no-repeat,
		rgb(145 193 88 / 0.18);
}
.o-prose ol { counter-reset: o-ol; }
.o-prose ol > li { counter-increment: o-ol; }
.o-prose ol > li::before {
	content: counter(o-ol);
	position: absolute;
	left: 0;
	top: 0.25em;
	display: grid;
	place-items: center;
	width: 1.3em;
	height: 1.3em;
	border-radius: 50%;
	font-size: 0.8em;
	font-weight: 600;
	color: var(--accent);
	background: rgb(145 193 88 / 0.22);
}
.o-prose a { color: var(--accent); text-decoration-thickness: 1px; }
.o-prose a:hover { text-decoration-thickness: 2px; }
.o-prose strong { font-weight: 600; color: var(--heading); }
.o-prose blockquote {
	font-size: var(--fs-l);
	line-height: 1.5;
	padding: 1rem 1.25rem;
	background: var(--surface-soft);
	border-radius: var(--radius);
	border-left: 3px solid var(--sun);
}

/* ---------- 6. Boutons et liens ---------- */
.o-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1.25rem;
}

.o-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	min-height: 3.125rem;
	padding: 0.8rem 1.4rem;
	font-family: var(--ff-sans);
	font-size: var(--fs-s);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.005em;
	text-decoration: none;
	border: 1px solid transparent;
	border-radius: 10px;
	cursor: pointer;
	transition: background-color var(--dur-s) ease, color var(--dur-s) ease, border-color var(--dur-s) ease;
}
.o-btn .o-btn__icon { width: 1.05rem; height: 1.05rem; transition: transform var(--dur-m) var(--ease); }
.o-btn:hover .o-btn__icon { transform: translateX(0.2rem); }
.o-btn:active { transform: translateY(1px); }

.o-btn--primary { background: var(--btn-bg); color: var(--btn-fg); box-shadow: 0 8px 20px -12px rgb(46 53 45 / 0.55); }
.o-btn--primary:hover { background: var(--btn-bg-hover); color: var(--btn-fg); }
.o-theme--foret .o-btn--primary:hover,
.o-theme--encre .o-btn--primary:hover { color: var(--c-encre); }

.o-btn--secondary { background: var(--surface); color: var(--heading); border-color: var(--line-strong); }
.o-btn--secondary:hover { border-color: var(--heading); }

.o-btn--light { background: var(--c-blanc); color: var(--c-foret); }
.o-btn--light:hover { background: var(--c-creme); }

/* Lien texte : vert, flèche qui avance */
.o-btn--text {
	min-height: 2.75rem;
	padding: 0.5rem 0;
	gap: 0.45rem;
	justify-content: flex-start;
	color: var(--accent);
	border: 0;
	border-radius: 0;
	text-decoration: underline;
	text-decoration-color: transparent;
	text-underline-offset: 0.3em;
	transition: text-decoration-color var(--dur-s);
}
.o-btn--text:hover { text-decoration-color: currentColor; }

.o-icon { width: 1.25rem; height: 1.25rem; flex: none; }

/* Pastille d'icône (cercle vert pâle) */
.o-badge-icon {
	display: grid;
	place-items: center;
	flex: none;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 50%;
	color: var(--c-lumiere-fonce);
	background: rgb(145 193 88 / 0.18);
}
.o-badge-icon .o-icon { width: 1.25rem; height: 1.25rem; }
.o-theme--foret .o-badge-icon,
.o-theme--encre .o-badge-icon { color: var(--c-lumiere); background: rgb(145 193 88 / 0.14); }

/* ---------- 7. Formulaires (Contact Form 7 et natifs) ---------- */
.o-field,
.wpcf7-form p { margin: 0 0 1.25rem; }

label,
.o-label {
	display: block;
	margin-bottom: 0.4rem;
	font-size: var(--fs-s);
	font-weight: 550;
	color: var(--heading);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="number"],
select,
textarea {
	width: 100%;
	min-height: 3.125rem;
	padding: 0.75rem 1rem;
	font: inherit;
	font-size: 1rem;
	color: var(--c-foret-profond);
	background: var(--c-blanc);
	border: 1px solid var(--line-strong);
	border-radius: 10px;
	transition: border-color var(--dur-s), box-shadow var(--dur-s);
	appearance: none;
}
textarea { min-height: 9rem; resize: vertical; }
input:hover,
select:hover,
textarea:hover { border-color: var(--c-mousse); }
input:focus-visible,
select:focus-visible,
textarea:focus-visible { outline: none; border-color: var(--c-foret); box-shadow: 0 0 0 3px rgb(145 193 88 / 0.45); }
input[type="checkbox"],
input[type="radio"] { width: 1.1rem; height: 1.1rem; accent-color: var(--c-foret); }

input[type="submit"],
button[type="submit"],
.wpcf7-submit {
	min-height: 3.125rem;
	padding: 0.8rem 1.5rem;
	font: 600 var(--fs-s)/1.2 var(--ff-sans);
	color: var(--btn-fg);
	background: var(--btn-bg);
	border: 0;
	border-radius: 10px;
	cursor: pointer;
	transition: background-color var(--dur-s);
}
input[type="submit"]:hover,
button[type="submit"]:hover,
.wpcf7-submit:hover { background: var(--btn-bg-hover); }

.wpcf7-not-valid-tip { font-size: var(--fs-xs); color: #9B2C1F; margin-top: 0.35rem; }
.o-theme--foret .wpcf7-not-valid-tip,
.o-theme--encre .wpcf7-not-valid-tip { color: #F2B8A8; }
.wpcf7 form .wpcf7-response-output { margin: 1rem 0 0; padding: 0.9rem 1rem; border-radius: 10px; }

/* ---------- 8. Images ---------- */
.o-media {
	position: relative;
	overflow: hidden;
	background: var(--c-sauge-pale);
	border-radius: var(--radius-l);
}
.o-media > img,
.o-media > picture > img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.o-ratio--portrait { aspect-ratio: 4 / 5; }
.o-ratio--paysage { aspect-ratio: 3 / 2; }
.o-ratio--carre { aspect-ratio: 1; }
.o-ratio--haut { aspect-ratio: 2 / 3; }

/* Forme « arche » : sommet très adouci */
.o-arch { border-radius: 12rem 12rem var(--radius-l) var(--radius-l); }

.o-caption {
	margin-top: 0.75rem;
	font-size: var(--fs-xs);
	color: var(--fg-soft);
}

/* ---------- 9. Animations (amélioration progressive, discrètes) ---------- */
@media (prefers-reduced-motion: no-preference) {
	.js [data-motion] .o-reveal {
		opacity: 0;
		transform: translate3d(0, 1rem, 0);
		transition:
			opacity var(--dur-l) var(--ease) calc(var(--i, 0) * 70ms),
			transform var(--dur-l) var(--ease) calc(var(--i, 0) * 70ms);
	}
	.js [data-motion] .o-reveal-img {
		opacity: 0;
		transform: scale(0.98);
		transition: opacity 1s var(--ease) calc(var(--i, 0) * 90ms), transform 1.2s var(--ease) calc(var(--i, 0) * 90ms);
	}
	.js [data-motion] .o-reveal-line {
		transform: scaleX(0);
		transform-origin: 0 50%;
		transition: transform 1.1s var(--ease-io) calc(var(--i, 0) * 70ms);
	}

	.js [data-motion].is-inview .o-reveal { opacity: 1; transform: none; }
	.js [data-motion].is-inview .o-reveal-img { opacity: 1; transform: none; }
	.js [data-motion].is-inview .o-reveal-line { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* ---------- 10. Aide éditeur ---------- */
.o-placeholder {
	padding: 2rem;
	font-size: var(--fs-s);
	color: var(--fg-soft);
	border: 1px dashed var(--line-strong);
	border-radius: var(--radius);
	text-align: center;
}
