/* =========================================================
   AEHPI — Design system
   Identité cohérente avec EHPICENTRIA : sobre, classe, humaniste
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Palette */
  --ivory:        #FBF8F3;
  --ivory-soft:   #F5EFE4;
  --ink:          #1A1F2E;
  --ink-soft:     #2C3E5A;
  --gold:         #B8954A;
  --gold-soft:    #D4B373;
  --gold-light:   #EFE3C8;
  --muted:        #6B7280;
  --muted-light:  #9CA3AF;
  --line:         #E5DDD0;
  --white:        #FFFFFF;

  /* Typo */
  --font-serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;

  /* Échelle */
  --container: 1200px;
  --container-wide: 1400px;
  --radius: 4px;
  --radius-lg: 12px;

  /* Ombres */
  --shadow-sm: 0 1px 2px rgba(26,31,46,.06);
  --shadow:    0 4px 16px rgba(26,31,46,.08);
  --shadow-lg: 0 20px 60px rgba(26,31,46,.12);

  /* Transitions */
  --ease: cubic-bezier(.4, 0, .2, 1);
}

/* =========================================================
   Reset & base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color .2s var(--ease);
}
a:hover { color: var(--gold); }

h1, h2, h3, h4, h5 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 .6em;
  letter-spacing: -.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 400; }
h2 { font-size: clamp(2rem, 3.5vw, 2.8rem); font-weight: 400; }
h3 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); }
h4 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

::selection { background: var(--gold-light); color: var(--ink); }

/* =========================================================
   Container
   ========================================================= */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.container--wide { max-width: var(--container-wide); }
.container--narrow { max-width: 820px; }

/* =========================================================
   Header / Navigation
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 248, 243, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: padding .2s var(--ease);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 18px 24px;
  max-width: var(--container-wide);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--ink);
}

.brand__mark {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 500;
  color: var(--gold);
  line-height: 1;
  letter-spacing: -.02em;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: .04em;
}

.brand__tag {
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav__menu a {
  position: relative;
  padding: 10px 14px;
  font-size: .92rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: .01em;
}

.nav__menu a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 14px;
  right: 14px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform .25s var(--ease);
  transform-origin: center;
}

.nav__menu a:hover::after,
.nav__menu a.is-active::after { transform: scaleX(1); }

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav__toggle {
  display: none;
  background: none;
  border: 0;
  width: 44px; height: 44px;
  cursor: pointer;
  padding: 0;
}

.nav__toggle span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--ink);
  margin: 5px auto;
  transition: all .25s var(--ease);
}

.nav__toggle.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 26px;
  font-family: var(--font-sans);
  font-size: .92rem;
  font-weight: 500;
  letter-spacing: .03em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .25s var(--ease);
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: var(--ink);
  color: var(--ivory);
  border-color: var(--ink);
}
.btn--primary:hover {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn--gold {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}
.btn--gold:hover {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--ghost:hover {
  background: var(--ink);
  color: var(--ivory);
}

.btn--outline {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
}
.btn--outline:hover {
  background: var(--gold);
  color: var(--white);
}

.btn--lg { padding: 16px 36px; font-size: 1rem; }
.btn--sm { padding: 8px 18px; font-size: .85rem; }

.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* =========================================================
   Sections génériques
   ========================================================= */
.section {
  padding: clamp(60px, 9vw, 120px) 0;
}
.section--tight { padding: clamp(40px, 6vw, 80px) 0; }
.section--alt { background: var(--ivory-soft); }
.section--dark { background: var(--ink); color: var(--ivory); }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: var(--ivory); }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--gold);
  vertical-align: middle;
  margin-right: 12px;
  margin-bottom: 3px;
}

.section-title {
  margin-bottom: 18px;
}

.section-lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 720px;
  line-height: 1.7;
  margin-bottom: 56px;
}

.center { text-align: center; }
.center .section-lead { margin-left: auto; margin-right: auto; }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  padding: clamp(80px, 14vw, 180px) 0 clamp(80px, 12vw, 140px);
  overflow: hidden;
  background:
    radial-gradient(ellipse at top right, rgba(184,149,74,.08), transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(44,62,90,.05), transparent 50%),
    var(--ivory);
}

.hero::before {
  content: 'Æ';
  position: absolute;
  font-family: var(--font-serif);
  font-size: clamp(20rem, 50vw, 50rem);
  font-weight: 300;
  color: rgba(184,149,74,.04);
  top: 50%;
  right: -8%;
  transform: translateY(-50%);
  line-height: 1;
  pointer-events: none;
  z-index: 0;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: center;
}

.hero__title {
  font-size: clamp(2.6rem, 5.5vw, 4.6rem);
  font-weight: 400;
  line-height: 1.05;
  margin-bottom: 28px;
}

.hero__title em {
  font-style: italic;
  color: var(--gold);
  font-weight: 400;
}

.hero__lead {
  font-size: 1.2rem;
  color: var(--muted);
  margin-bottom: 40px;
  max-width: 540px;
}

.hero__ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero__visual {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__badge {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  background: rgba(251, 248, 243, .96);
  backdrop-filter: blur(8px);
  padding: 18px 22px;
  border-radius: var(--radius);
  border-left: 3px solid var(--gold);
}

.hero__badge-eyebrow {
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 4px;
}

.hero__badge-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--ink);
}

/* Hero metrics */
.hero__metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}

.metric__value {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3vw, 2.6rem);
  color: var(--gold);
  line-height: 1;
  margin-bottom: 6px;
}

.metric__label {
  font-size: .85rem;
  color: var(--muted);
  letter-spacing: .04em;
}

/* =========================================================
   Cards — grilles thématiques
   ========================================================= */
.grid {
  display: grid;
  gap: 32px;
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all .35s var(--ease);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gold-soft);
}

.card__media {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--ivory-soft);
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}

.card:hover .card__media img { transform: scale(1.04); }

.card__body {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card__eyebrow {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

.card__title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 10px;
  color: var(--ink);
}

.card__text {
  color: var(--muted);
  font-size: .95rem;
  margin-bottom: 18px;
  flex: 1;
}

.card__link {
  align-self: flex-start;
  font-size: .9rem;
  font-weight: 500;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: all .2s var(--ease);
}

.card__link::after {
  content: '→';
  transition: transform .25s var(--ease);
}

.card__link:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.card__link:hover::after { transform: translateX(4px); }

/* Card variant with no media */
.card--plain {
  padding: 36px 32px;
}
.card--plain .card__title { margin-bottom: 14px; }

/* Card audience (parents / ados / enfants / adultes) */
.card--audience {
  text-align: center;
  padding: 0 0 28px;
  background: var(--white);
}

.card--audience .card__media {
  aspect-ratio: 1/1;
  border-radius: 50%;
  width: 180px;
  height: 180px;
  margin: 32px auto 24px;
}

.card--audience .card__title {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.card--audience .card__text {
  padding: 0 24px;
  margin-bottom: 18px;
}

/* =========================================================
   Feature row
   ========================================================= */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.feature--reverse .feature__visual { order: 2; }

.feature__visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 5/4;
}

.feature__visual img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.feature__body h2 { margin-bottom: 20px; }

.feature__list {
  list-style: none;
  padding: 0;
  margin: 24px 0;
}

.feature__list li {
  padding: 10px 0 10px 30px;
  position: relative;
  border-bottom: 1px solid var(--line);
}

.feature__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 18px;
  width: 16px;
  height: 1px;
  background: var(--gold);
}

.feature__list li:last-child { border-bottom: 0; }

/* =========================================================
   Quote / Témoignage
   ========================================================= */
.quote {
  padding: 60px 0;
  text-align: center;
  position: relative;
}

.quote::before {
  content: '"';
  font-family: var(--font-serif);
  font-size: 8rem;
  color: var(--gold);
  line-height: .8;
  display: block;
  margin-bottom: 10px;
  opacity: .4;
}

.quote__text {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.4;
  max-width: 820px;
  margin: 0 auto 24px;
  color: var(--ink);
}

.quote__author {
  font-size: .9rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

/* =========================================================
   CTA band
   ========================================================= */
.cta-band {
  background: var(--ink);
  color: var(--ivory);
  padding: clamp(60px, 8vw, 100px) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: 'Æ';
  position: absolute;
  font-family: var(--font-serif);
  font-size: 30rem;
  font-weight: 300;
  color: rgba(184,149,74,.05);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  line-height: 1;
  pointer-events: none;
}

.cta-band__inner { position: relative; z-index: 1; }

.cta-band h2 { color: var(--ivory); margin-bottom: 16px; }

.cta-band p {
  color: rgba(251,248,243,.75);
  max-width: 620px;
  margin: 0 auto 36px;
  font-size: 1.1rem;
}

.cta-band .btn--primary {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--white);
}
.cta-band .btn--primary:hover {
  background: var(--ivory);
  color: var(--ink);
  border-color: var(--ivory);
}

.cta-band .btn--ghost {
  color: var(--ivory);
  border-color: rgba(251,248,243,.4);
}
.cta-band .btn--ghost:hover {
  background: var(--ivory);
  color: var(--ink);
  border-color: var(--ivory);
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: #14182A;
  color: rgba(251,248,243,.75);
  padding: 80px 0 32px;
  font-size: .92rem;
}

.site-footer a { color: rgba(251,248,243,.75); }
.site-footer a:hover { color: var(--gold); }

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 56px;
  margin-bottom: 56px;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.footer__brand .brand__mark { color: var(--gold); }
.footer__brand .brand__name { color: var(--ivory); }
.footer__brand .brand__tag { color: rgba(251,248,243,.55); }

.footer__about {
  color: rgba(251,248,243,.65);
  line-height: 1.7;
  max-width: 360px;
}

.footer__title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--ivory);
  margin-bottom: 20px;
}

.footer__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer__list li { padding: 5px 0; }

.footer__contact p { margin: 6px 0; }
.footer__contact strong { color: var(--ivory); font-weight: 500; }

.footer__bottom {
  padding-top: 28px;
  border-top: 1px solid rgba(251,248,243,.1);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: .85rem;
  color: rgba(251,248,243,.5);
}

/* =========================================================
   Banner (page subhero)
   ========================================================= */
.page-banner {
  background:
    radial-gradient(ellipse at top right, rgba(184,149,74,.1), transparent 60%),
    var(--ivory);
  padding: clamp(80px, 12vw, 140px) 0 clamp(50px, 7vw, 80px);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.page-banner::before {
  content: 'Æ';
  position: absolute;
  font-family: var(--font-serif);
  font-size: 30rem;
  color: rgba(184,149,74,.04);
  right: -5%;
  top: 50%;
  transform: translateY(-50%);
  line-height: 1;
  pointer-events: none;
}

.page-banner__inner {
  position: relative;
  z-index: 1;
  max-width: 840px;
}

.page-banner h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  margin-bottom: 16px;
}

.page-banner__lead {
  font-size: 1.25rem;
  color: var(--muted);
  max-width: 680px;
  line-height: 1.6;
}

.breadcrumb {
  font-size: .82rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
}

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span { color: var(--gold); }

/* =========================================================
   Prose (long-form text)
   ========================================================= */
.prose {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--ink);
}

.prose h2 {
  margin-top: 2.6em;
  margin-bottom: .6em;
  padding-top: .8em;
}

.prose h3 {
  margin-top: 2em;
  margin-bottom: .4em;
}

.prose p { margin-bottom: 1.4em; }

.prose ul, .prose ol {
  padding-left: 1.6em;
  margin-bottom: 1.6em;
}

.prose li { margin-bottom: .5em; }

.prose blockquote {
  border-left: 3px solid var(--gold);
  margin: 2em 0;
  padding: 1em 1.6em;
  background: var(--ivory-soft);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink-soft);
}

.prose strong { color: var(--ink); font-weight: 600; }

.prose a {
  color: var(--gold);
  border-bottom: 1px solid var(--gold-light);
  padding-bottom: 1px;
}
.prose a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* =========================================================
   Tables
   ========================================================= */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
  margin: 24px 0;
}

.table th, .table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.table th {
  background: var(--ivory-soft);
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1rem;
  color: var(--ink);
}

.table tr:hover td { background: var(--ivory-soft); }

/* =========================================================
   Sidebar layout (pour pages avec contenu + sidebar)
   ========================================================= */
.with-sidebar {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 64px;
}

.sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
}

.sidebar__title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: var(--ink);
}

.sidebar__list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
}

.sidebar__list li {
  border-bottom: 1px solid var(--line);
}

.sidebar__list a {
  display: block;
  padding: 10px 0;
  font-size: .92rem;
  color: var(--muted);
}

.sidebar__list a:hover,
.sidebar__list a.is-active {
  color: var(--gold);
}

/* =========================================================
   Animations on scroll
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .hero__inner { grid-template-columns: 1fr; gap: 48px; }
  .hero__visual { max-width: 560px; }
  .feature { grid-template-columns: 1fr; gap: 40px; }
  .feature--reverse .feature__visual { order: 0; }
  .with-sidebar { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 768px) {
  body { font-size: 16px; }

  .nav__menu {
    position: fixed;
    top: 73px;
    left: 0;
    right: 0;
    background: var(--ivory);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    padding: 24px 24px 32px;
    gap: 4px;
    align-items: stretch;
    transform: translateY(-110%);
    transition: transform .35s var(--ease);
    box-shadow: var(--shadow-lg);
  }

  .nav__menu.is-open { transform: translateY(0); }

  .nav__menu li { width: 100%; }

  .nav__menu a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    font-size: 1rem;
  }

  .nav__menu a::after { display: none; }

  .nav__menu .nav__cta {
    margin-top: 16px;
    justify-content: center;
  }

  .nav__toggle { display: block; }

  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }

  .hero__metrics { grid-template-columns: 1fr; gap: 16px; }

  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .footer__bottom { flex-direction: column; text-align: center; }
}

/* =========================================================
   Utility
   ========================================================= */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.text-muted { color: var(--muted); }
.text-gold { color: var(--gold); }
.text-center { text-align: center; }
.hidden { display: none; }

.divider {
  text-align: center;
  margin: 40px 0;
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 1.6rem;
  letter-spacing: 1em;
}
