/*
Theme Name: Hypnose Ajaccio
Theme URI: https://ajaccio-hypnose.fr
Description: Thème sur mesure du cabinet de Bénédicte Magnan à Ajaccio. Design moderne « wellness », palette pastel inspirée du paysage ajaccien (olivier/maquis, pierre rose, immortelle).
Author: Bénédicte Magnan
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: hypnose-ajaccio
*/

/* ============================================================
   Tokens
============================================================ */
:root {
	/* Palette « paysage ajaccien » */
	--base: #FBF8F3;          /* blanc calcaire */
	--rose-pale: #F4E8E2;     /* pierre rosée pâle */
	--rose: #D2A293;          /* pierre rose marbré */
	--sable: #EBE0D4;
	--olive: #647445;         /* olivier · maquis */
	--olive-dark: #4E5A35;    /* maquis profond */
	--olive-pale: #E4E8D8;    /* lavis olivier */
	--immortelle: #E3B85A;    /* jaune immortelle */
	--ink: #2E3327;           /* maquis sombre (texte) */
	--ink-soft: #6A6A58;
	--white: #ffffff;

	--maxw: 1180px;
	--narrow: 760px;

	--r-lg: 32px;
	--r-md: 18px;
	--r-pill: 999px;

	--shadow-card: 0 18px 40px -22px rgba(46,51,39,.35);
	--shadow-soft: 0 10px 30px -18px rgba(46,51,39,.28);
	--shadow-lift: 0 26px 50px -24px rgba(46,51,39,.40);

	--font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
	--font-body: 'DM Sans', -apple-system, 'Segoe UI', Roboto, sans-serif;

	--ease: cubic-bezier(.22,.61,.36,1);
}

/* ============================================================
   Base
============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
	margin: 0;
	background: var(--base);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 1.06rem;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: 500;
	color: var(--ink);
	line-height: 1.12;
	letter-spacing: -0.01em;
	margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.6rem, 5.5vw, 4.2rem); }
h2 { font-size: clamp(2rem, 3.8vw, 3rem); }
h3 { font-size: 1.45rem; font-weight: 600; }
h4 { font-size: 1.12rem; font-weight: 600; font-family: var(--font-body); }

p { margin: 0 0 1.15rem; }
a { color: var(--olive); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--olive-dark); }
img { max-width: 100%; height: auto; display: block; }

ul, ol { margin: 0 0 1.15rem; padding-left: 1.3rem; }
li { margin-bottom: 0.4rem; }

blockquote {
	margin: 1.4rem 0;
	padding: 0.2rem 0 0.2rem 1.3rem;
	border-left: 3px solid var(--rose);
	font-family: var(--font-display);
	font-style: italic;
	font-size: 1.15rem;
	color: var(--ink-soft);
}
blockquote cite { display: block; margin-top: 0.5rem; font-style: normal; font-family: var(--font-body); font-weight: 700; font-size: 0.85rem; letter-spacing: .03em; }

::selection { background: var(--olive-pale); }

/* ============================================================
   Layout helpers
============================================================ */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.6rem; }
.wrap--narrow { max-width: var(--narrow); }

.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; position: relative; }
.section--alt { background: var(--rose-pale); }
.section--olive-pale { background: var(--olive-pale); }
.section--dark { background: var(--ink); color: #E9E6DC; }
.section--dark h2 { color: var(--white); }

/* Panneaux empilés à grands coins arrondis */
.rounded-top { border-radius: var(--r-lg) var(--r-lg) 0 0; margin-top: -2.5rem; }
.rounded-both { border-radius: var(--r-lg); }

.center { text-align: center; }
.eyebrow {
	display: inline-block;
	text-transform: uppercase;
	letter-spacing: 0.22em;
	font-size: 0.74rem;
	font-weight: 700;
	color: var(--olive);
	margin-bottom: 1rem;
}
.eyebrow::before { content: "❋  "; color: var(--rose); }
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--ink-soft); line-height: 1.6; }
.muted { color: var(--ink-soft); }
.stack-sm > * + * { margin-top: .8rem; }

/* ============================================================
   Boutons
============================================================ */
.btn {
	display: inline-flex; align-items: center; gap: .5rem;
	background: var(--olive); color: var(--white);
	font-family: var(--font-body); font-weight: 700; font-size: .96rem;
	padding: 0.9rem 1.8rem; border-radius: var(--r-pill);
	border: 2px solid var(--olive); cursor: pointer;
	box-shadow: var(--shadow-soft);
	transition: transform .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); background: var(--olive-dark); border-color: var(--olive-dark); color: var(--white); box-shadow: var(--shadow-lift); }
.btn--ghost { background: transparent; color: var(--olive); box-shadow: none; }
.btn--ghost:hover { background: var(--olive); color: var(--white); }
.btn--immortelle { background: var(--immortelle); border-color: var(--immortelle); color: var(--ink); }
.btn--immortelle:hover { background: #d6a942; border-color: #d6a942; color: var(--ink); }
.btn--light { background: var(--white); color: var(--olive); border-color: var(--white); }
.btn--light:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btns { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.btns--center { justify-content: center; }

/* ============================================================
   Hero
============================================================ */
.hero { position: relative; overflow: hidden; padding: clamp(4rem, 7vw, 6.5rem) 0 clamp(3.5rem, 8vw, 6rem); }
.hero__inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero__content h1 { margin-bottom: .4em; }
.hero__content h1 em { font-style: italic; color: var(--olive); }
.hero__media { position: relative; display: flex; justify-content: center; }
.portrait {
	position: relative; z-index: 2;
	width: 100%; max-width: 420px;
	border-radius: 56% 44% 47% 53% / 53% 48% 52% 47%;
	box-shadow: var(--shadow-card);
	aspect-ratio: 1 / 1.05; object-fit: cover;
}
/* Forme organique douce derrière le portrait */
.hero__media::before {
	content: ""; position: absolute; z-index: 1;
	inset: -8% -6% -10% -8%;
	background: radial-gradient(120% 120% at 30% 20%, var(--olive-pale), var(--rose-pale));
	border-radius: 50% 50% 48% 52% / 55% 50% 50% 45%;
	transform: rotate(-6deg);
}
.hero__media .leaf { position: absolute; z-index: 3; font-size: 2rem; opacity:.9; }

/* ============================================================
   Cartes & grilles
============================================================ */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.6rem; }
.card {
	background: var(--white); border-radius: var(--r-md); padding: 2.2rem 1.9rem;
	box-shadow: var(--shadow-soft); border: 1px solid rgba(46,51,39,.05);
	transition: transform .25s var(--ease), box-shadow .25s var(--ease);
	position: relative; overflow: hidden;
}
.card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--olive); opacity: .9; }
.card:nth-child(2)::before { background: var(--rose); }
.card:nth-child(3)::before { background: var(--immortelle); }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.card__icon { font-size: 1.9rem; margin-bottom: .6rem; display: block; }
.card h3 { color: var(--olive); margin-bottom: .5rem; }
.card p { margin-bottom: .6rem; }
.card__more { font-family: var(--font-body); font-weight: 700; font-size: .92rem; }

/* Carte entièrement cliquable (« stretched link ») : tout le bloc mène au lien. */
.card, .post-card { cursor: pointer; }
.card .card__more::after,
.post-card h2 a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 3;
}
.card:focus-within, .post-card:focus-within { outline: 2px solid var(--olive); outline-offset: 3px; }
/* Le titre cliquable de l'article doit pouvoir « s'étendre » : repère de positionnement */
.post-card { position: relative; }

/* Bloc texte + image */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.feature__media img { border-radius: var(--r-md); box-shadow: var(--shadow-card); width: 100%; }
.feature--reverse .feature__media { order: 2; }
.feature--top { grid-template-columns: 1.3fr 0.9fr; align-items: start; }

/* Grande citation / déclaration */
.statement { max-width: 880px; margin: 0 auto; text-align: center; }
.statement p { font-family: var(--font-display); font-size: clamp(1.5rem, 3.2vw, 2.1rem); line-height: 1.35; font-style: italic; }

/* ============================================================
   Encadré (diplômes)
============================================================ */
.panel { background: var(--white); border-radius: var(--r-md); padding: clamp(1.8rem, 4vw, 2.8rem); box-shadow: var(--shadow-soft); }
.panel--rose { background: var(--rose-pale); box-shadow: none; }

/* Pastilles */
.tags { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; margin-top: 1.6rem; }
.tag { display: inline-block; border: 1.5px solid var(--olive); color: var(--olive); border-radius: var(--r-pill); padding: .45rem 1.05rem; font-weight: 700; font-size: .9rem; transition: all .2s var(--ease); }
.tag:hover { background: var(--olive); color: var(--white); transform: translateY(-2px); }

/* ============================================================
   Témoignages
============================================================ */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.6rem; }
.quote { background: var(--white); border-radius: var(--r-md); padding: 2rem 1.8rem; box-shadow: var(--shadow-soft); position: relative; }
.quote::before { content: "“"; font-family: var(--font-display); font-size: 4rem; line-height: 1; color: var(--rose); position: absolute; top: .4rem; right: 1.2rem; opacity: .5; }
.quote__stars { color: var(--immortelle); letter-spacing: 2px; margin-bottom: .6rem; }
.quote p { font-size: .98rem; }
.quote__author { font-weight: 700; font-family: var(--font-body); margin: 0; }

/* ============================================================
   Accordéons (FAQ « En savoir plus »)
============================================================ */
.faq > details { background: var(--white); border-radius: var(--r-md); margin-bottom: .8rem; box-shadow: var(--shadow-soft); overflow: hidden; border: 1px solid rgba(46,51,39,.05); }
.faq > details > summary { cursor: pointer; list-style: none; position: relative; padding: 1.15rem 3rem 1.15rem 1.4rem; font-family: var(--font-body); font-weight: 700; color: var(--olive); transition: color .2s var(--ease); }
.faq > details > summary:hover { color: var(--olive-dark); }
.faq > details > summary::-webkit-details-marker { display: none; }
.faq > details > summary::after { content: ""; position: absolute; right: 1.3rem; top: 50%; width: 12px; height: 12px; border-right: 2.5px solid var(--olive); border-bottom: 2.5px solid var(--olive); transform: translateY(-65%) rotate(45deg); transition: transform .25s var(--ease); }
.faq > details[open] > summary::after { transform: translateY(-35%) rotate(225deg); }
.faq > details > .faq__body { padding: 0 1.4rem 1.3rem; }
.faq > details > .faq__body > *:first-child { margin-top: 0; }

/* ============================================================
   Galeries
============================================================ */
.gallery { display: grid; gap: 1rem; }
.gallery--3 { grid-template-columns: repeat(3, 1fr); }
.gallery img { border-radius: var(--r-md); width: 100%; object-fit: cover; box-shadow: var(--shadow-soft); }
.gallery--portrait img { aspect-ratio: 3/4; }
.gallery--landscape img { aspect-ratio: 4/3; }

/* Bloc info (coordonnées) */
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.info-grid h3 { color: var(--olive); font-family: var(--font-body); font-size: 1.05rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .4rem; }

/* ============================================================
   En-tête
============================================================ */
.site-header { position: sticky; top: 0; z-index: 200; background: rgba(251,248,243,.82); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .3s var(--ease), box-shadow .3s var(--ease); }
.site-header.is-scrolled { border-bottom-color: var(--sable); box-shadow: 0 6px 20px -16px rgba(46,51,39,.5); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: .55rem 0; }
.brand { display: flex; align-items: center; gap: .7rem; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--ink); }
.brand img { width: 50px; height: 50px; border-radius: 50%; }
.brand span small { display: block; font-family: var(--font-body); font-size: .72rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.nav { display: flex; align-items: center; gap: 1.8rem; }
.nav a { font-family: var(--font-body); font-weight: 600; color: var(--ink); }
.nav a:not(.btn):hover { color: var(--olive); }
.nav a.btn { color: var(--white); padding: .6rem 1.3rem; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .5rem; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .25s var(--ease), opacity .25s var(--ease); }

/* ============================================================
   Pied de page
============================================================ */
.site-footer { background: var(--ink); color: #DAD6CB; padding: clamp(3rem,6vw,4.5rem) 0 2rem; }
.site-footer a { color: #DAD6CB; }
.site-footer a:hover { color: var(--immortelle); }
.site-footer h3 { color: var(--white); font-family: var(--font-display); font-weight: 500; font-size: 1.3rem; }
.foot-cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2.5rem; }
.foot-cols ul { list-style: none; padding: 0; margin: 0; font-size: .95rem; }
.foot-cols li { margin-bottom: .45rem; }
.foot-bottom { text-align: center; font-size: .82rem; color: #948f83; border-top: 1px solid #43473a; margin-top: 2.8rem; padding-top: 1.6rem; }

/* Réseaux sociaux */
.social { display: flex; gap: .7rem; margin-top: .3rem; }
.site-footer .social__btn {
	width: 42px; height: 42px; border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	background: rgba(255,255,255,.08); color: #DAD6CB;
	transition: background-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
/* Sélecteur plus spécifique que ".site-footer a:hover" pour garder l'icône lisible. */
.site-footer .social__btn:hover { background: var(--immortelle); color: var(--ink); transform: translateY(-3px); }

/* ============================================================
   Barre RDV mobile
============================================================ */
/* Bouton flottant « Rendez-vous » (mobile) : pastille compacte, coin bas-droite. */
.mobile-cta {
	display: none;
	position: fixed; z-index: 300;
	left: auto; right: 1rem;
	bottom: calc(1rem + env(safe-area-inset-bottom));
}
.mobile-cta .btn {
	gap: 0.45rem;
	padding: 0.7rem 1.15rem;
	font-size: 0.92rem;
	border-radius: 999px;
	box-shadow: 0 10px 24px -8px rgba(46,51,39,.5);
}
.mobile-cta .btn svg { flex: none; }
.mobile-cta .btn:hover { transform: none; } /* pas de "lift" au survol pour un bloc fixe */
.mobile-cta .btn:active { transform: scale(.95); }

/* ============================================================
   Blog
============================================================ */
.posts { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.8rem; }
.post-card { background: var(--white); border-radius: var(--r-md); padding: 1.9rem; box-shadow: var(--shadow-soft); transition: transform .25s var(--ease), box-shadow .25s var(--ease); display: flex; flex-direction: column; overflow: hidden; }
.post-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }
/* Image mise en avant : pleine largeur de la carte, recadrée uniformément. */
.post-card__media { margin: -1.9rem -1.9rem 1.4rem; line-height: 0; }
.post-card__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
/* « Lire l'article » toujours collé en bas, pour des cartes homogènes. */
.post-card .card__more { margin-top: auto; padding-top: .7rem; }
.post-card h2 { font-size: 1.4rem; margin-bottom: .3rem; }
.post-card h2 a { color: var(--ink); }
.post-card h2 a:hover { color: var(--olive); }
.post-meta { font-size: .82rem; color: var(--ink-soft); margin-bottom: .9rem; text-transform: uppercase; letter-spacing: .05em; }

/* Navigation entre articles (bas de l'article) — cartes image + maison centrale */
.post-nav {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: stretch;
	gap: 1rem;
	margin-top: 2.5rem;
}
.post-nav__link {
	position: relative;
	display: flex; flex-direction: column; justify-content: space-between; gap: .5rem;
	min-height: 132px;
	padding: 1.1rem 1.4rem;
	border-radius: var(--r-md);
	overflow: hidden;
	background-color: var(--ink);
	background-size: cover; background-position: center;
	box-shadow: var(--shadow-soft);
	text-decoration: none;
	transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.post-nav__link--noimg { background-image: linear-gradient(135deg, var(--olive-dark), var(--ink)); }
/* Voile uniforme pour la lisibilité du texte sur l'image */
.post-nav__link::before {
	content: ""; position: absolute; inset: 0;
	background: rgba(46,51,39,.46);
	transition: background .2s var(--ease);
}
.post-nav__link > * { position: relative; z-index: 1; }
.post-nav__link:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.post-nav__link:hover::before { background: rgba(46,51,39,.56); }
.post-nav__link--next { text-align: right; align-items: flex-end; }
.post-nav__dir {
	font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em;
	color: var(--immortelle);
	text-shadow: 0 1px 5px rgba(0,0,0,.45);
}
.post-nav__title {
	color: #fff; font-family: var(--font-display); font-size: 1.05rem; line-height: 1.3;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
	text-shadow: 0 1px 6px rgba(0,0,0,.4);
}
/* Bouton maison central → page Blog */
.post-nav__home {
	align-self: center; justify-self: center;
	display: inline-flex; align-items: center; justify-content: center;
	width: 3.2rem; height: 3.2rem; flex: none;
	border-radius: var(--r-pill);
	background: var(--white); color: var(--olive);
	border: 2px solid var(--olive);
	box-shadow: var(--shadow-soft);
	transition: transform .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease);
}
.post-nav__home:hover { background: var(--olive); color: var(--white); transform: translateY(-2px); }
.post-nav__home svg { width: 1.4rem; height: 1.4rem; }
@media (max-width: 600px) {
	.post-nav { grid-template-columns: 1fr; }
	.post-nav__spacer { display: none; }
	.post-nav__link--next { text-align: left; align-items: flex-start; }
}
.entry { max-width: var(--narrow); margin: 0 auto; }
.entry h2 { margin-top: 2.2rem; }
.entry img { border-radius: var(--r-md); }
.page-head { text-align: center; max-width: var(--narrow); margin: 0 auto; }

/* ============================================================
   Bloc CTA « Prendre rendez-vous » — autonome et réutilisable
============================================================ */
.cta-panel {
	margin: 3.5rem auto 0;
	background: var(--ink);
	color: #E9E6DC;
	border-radius: var(--r-lg);
	box-shadow: var(--shadow-lift);
	padding: clamp(2.4rem, 6vw, 3.6rem) clamp(1.6rem, 5vw, 3rem);
	text-align: center;
}
.cta-panel .eyebrow { color: var(--immortelle); }
.cta-panel .eyebrow::before { color: var(--rose); }
.cta-panel h2 { color: var(--white); margin: 0 0 .6rem; }
.cta-panel p { color: #cfcabe; max-width: 44ch; margin: 0 auto; line-height: 1.7; }
.cta-panel__actions {
	display: flex; flex-wrap: wrap; gap: 1rem;
	justify-content: center; align-items: center;
	margin-top: 1.9rem;
}
.cta-panel__actions .btn { min-width: 12rem; justify-content: center; }
/* Bouton « Réserver en ligne » : masqué tant que le site de réservation n'est pas prêt.
   Pour l'activer : retirer cette règle (ou la passer en display:inline-flex). */
.cta-panel__online { display: none; }
@media (max-width: 480px) {
	.cta-panel__actions { flex-direction: column; }
	.cta-panel__actions .btn { width: 100%; }
}

/* ============================================================
   Responsive
============================================================ */
@media (max-width: 900px) {
	.hero__inner, .feature, .feature--reverse .feature__media { grid-template-columns: 1fr; }
	.feature__media { order: -1; }
	.hero__media { order: -1; }
	.info-grid { grid-template-columns: 1fr; gap: 1.4rem; }
	.gallery--3 { grid-template-columns: repeat(2, 1fr); }
	.foot-cols { grid-template-columns: 1fr 1fr; }

	/* Menu mobile : overlay plein écran */
	.nav {
		position: fixed; inset: 0;
		width: 100%; height: 100vh; height: 100dvh;
		flex-direction: column; align-items: center; justify-content: center;
		gap: 2rem; padding: 2rem;
		background: var(--base); z-index: 190;
		opacity: 0; visibility: hidden; transform: translateY(-10px);
		transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
	}
	.nav.is-open { opacity: 1; visibility: visible; transform: none; }
	.nav a { font-size: 1.6rem; }
	.nav a.btn { font-size: 1.05rem; white-space: nowrap; margin-top: .6rem; }
	.nav-toggle { display: block; z-index: 210; }
	/* hamburger -> croix quand le menu est ouvert */
	body.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
	body.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
	body.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
	body.menu-open { overflow: hidden; }
	.mobile-cta { display: block; }
	/* Réserve un peu d'espace pour la pastille RDV flottante (coin bas-droite). */
	.site-footer { padding-bottom: calc(4rem + env(safe-area-inset-bottom)); }
}
@media (max-width: 540px) {
	.foot-cols { grid-template-columns: 1fr; gap: 1.6rem; }
	.gallery--3 { grid-template-columns: 1fr 1fr; }
	.brand span small { display: none; }
	/* Une seule colonne sur très petit écran (évite tout débordement des grilles auto). */
	.cards, .quotes, .posts { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
	* { scroll-behavior: auto !important; transition: none !important; }
}
