/* =============================================
   EDENN — MODÈLES DE PAGE ELEMENTOR (préfixe .ed-)
   =============================================
   Style calqué sur le site Edenn : fond sable, titres Cormorant
   en gras vert sauge, cartes crème aux coins arrondis (6px),
   boutons sauge du thème (.cta-button).

   Animations : apparition discrète au scroll (fondu + légère montée),
   uniquement si le JS est chargé, jamais dans l'éditeur Elementor,
   et désactivée si l'utilisateur préfère réduire les animations.
   ============================================= */

@font-face {
  font-family: 'Edenn Serif';
  src: url('../fonts/CormorantGaramond-VariableFont_wght.ttf') format('truetype');
  font-weight: 300 700;
  font-display: swap;
}

/* ========== TOKENS ==========
   Déclarés sur .ed-tpl (et non :root) pour suivre body.dark-mode. */
.ed-tpl {
  --ed-sage: var(--accent, #667863);       /* fonds : boutons, puces */
  --ed-sage-text: #56684F;                 /* texte vert : 4.75:1 sur sable, 5.7:1 sur crème */
  --ed-eyebrow-fg: #3F4D3D;                /* 6:1 sur sa pastille */
  --ed-eyebrow-bg: rgba(102, 120, 99, 0.14);
  --ed-cream: var(--bg, #FAF9F6);
  --ed-ink: var(--text, #343434);
  --ed-muted: var(--text-light, #5E5E57);
  --ed-line: rgba(52, 52, 52, 0.1);
  --ed-radius: 6px;
  --ed-serif: 'Edenn Serif', 'Cormorant Garamond 700', 'Cormorant Garamond', Georgia, serif;
  --ed-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ed-gutter: clamp(16px, 5vw, 48px);
}
/* Mode sombre : le fond gris du thème (#5E5E57) ne laisse pas assez de contraste,
   les sections des modèles passent sur un vert très sombre. */
body.dark-mode .ed-tpl {
  --ed-line: rgba(237, 235, 230, 0.14);
  --ed-sage-text: #B9C9B4;
  --ed-eyebrow-fg: #F0F4EE;
  --ed-eyebrow-bg: rgba(227, 235, 224, 0.12);
}
body.dark-mode .e-con.ed-section { background-color: #252B26; }

/* ========== STRUCTURE ========== */
.e-con.ed-section {
  padding: clamp(56px, 7vw, 96px) var(--ed-gutter);
}
.e-con.ed-wrap {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  gap: 40px;
}
.e-con.ed-narrow {
  width: 100%;
  max-width: 720px;
  margin-inline: auto;
  gap: 16px;
}
.e-con.ed-center { align-items: center; }

/* ========== TYPOGRAPHIE ========== */
.ed-tpl .elementor-heading-title {
  font-family: var(--ed-serif) !important;
  font-weight: 700;
  color: var(--ed-ink) !important;
  line-height: 1.25;
}
.ed-tpl .ed-title .elementor-heading-title {
  font-size: clamp(1.75rem, 2.6vw, 2.25rem);
  color: var(--ed-sage-text) !important;
}
body.dark-mode .ed-tpl .ed-title .elementor-heading-title { color: #DCE5D8 !important; }

/* Surtitre : petite étiquette sobre, coins 6px comme le reste du site */
.ed-tpl .ed-eyebrow .elementor-heading-title {
  display: inline-block;
  padding: 0.35em 0.8em;
  border-radius: var(--ed-radius);
  background: var(--ed-eyebrow-bg);
  font-family: 'Inter', sans-serif !important;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.04em;
  color: var(--ed-eyebrow-fg) !important;
}
.ed-tpl h3.elementor-heading-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.ed-tpl .elementor-widget-text-editor {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ed-muted);
}
.ed-tpl .elementor-widget-text-editor p { color: inherit; }
.ed-tpl .elementor-widget-text-editor p + p { margin-top: 0.9em; }
.ed-tpl .ed-lead { max-width: 60ch; }
.ed-tpl .ed-small { font-size: 0.9rem; line-height: 1.5; }

.ed-tpl .elementor-widget-text-editor ul {
  list-style: none;
  display: grid;
  gap: 0.5em;
  margin-top: 1em;
}
.ed-tpl .elementor-widget-text-editor ul li {
  position: relative;
  padding-left: 1.4em;
  color: var(--ed-ink);
}
.ed-tpl .elementor-widget-text-editor ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ed-sage);
}

/* ========== EN-TÊTES DE SECTION ========== */
.e-con.ed-head { gap: 10px; }
.e-con.ed-head--center {
  align-items: center;
  text-align: center;
}
.e-con.ed-head--center .ed-lead { margin-inline: auto; }

/* ========== BOUTONS (même rendu que .cta-button du thème) ========== */
.ed-tpl .ed-btn .elementor-button {
  display: inline-block;
  padding: 0.875em 2.5em;
  border: 0;
  border-radius: var(--ed-radius);
  background: var(--ed-sage);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: background-color 200ms ease, box-shadow 200ms ease, transform 200ms var(--ed-ease-out);
}
.ed-tpl .ed-btn .elementor-button:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .ed-tpl .ed-btn .elementor-button:hover {
    background: #56684F;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }
}
.ed-tpl a:focus-visible,
.ed-tpl button:focus-visible {
  outline: 2px solid var(--ed-sage);
  outline-offset: 3px;
}

/* ========== BANDEAU PARALLAXE (widget « Bandeau parallaxe ») ==========
   Hero (titre H1) et bandeaux citation. L'image est plus haute que le bandeau
   (selon --ed-px-speed) et le JS la décale avec transform au scroll. */
.e-con.ed-band { padding: 0; gap: 0; }

.ed-parallax {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  overflow: hidden;
  isolation: isolate;
  background: #2b332c;
  padding: clamp(48px, 8vw, 96px) var(--ed-gutter);
}
.ed-parallax--left  { justify-content: flex-start; text-align: left; }
.ed-parallax--center { text-align: center; }
.ed-parallax--right { justify-content: flex-end; text-align: right; }

.ed-parallax__media {
  position: absolute;
  inset: calc(var(--ed-px-speed, 0.1) * -100%) 0;
  z-index: -2;
  overflow: hidden;
  will-change: transform;
}
/* Image de fond en « cover » : !important pour passer devant
   « .elementor img { height: auto; max-width: 100% } » et les attributs width/height de WordPress */
.ed-parallax .ed-parallax__img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center;
  border-radius: 0 !important;
}
.ed-parallax__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 1;
}
/* Voile en dégradé (comme la première version) : léger en haut, dense en bas */
.ed-parallax--gradient .ed-parallax__overlay {
  background: linear-gradient(180deg, rgba(20, 28, 22, 0.45) 0%, rgba(20, 28, 22, 0.2) 40%, rgba(20, 28, 22, 0.78) 100%);
}
.ed-parallax--flat .ed-parallax__overlay { background: rgba(20, 28, 22, 0.55); }

/* Contenu calé en bas du bandeau */
.ed-parallax--bottom { align-items: flex-end; padding-bottom: clamp(56px, 10vh, 120px); }

/* Zoom arrière doux une fois l'image chargée (le JS pose .is-loaded) */
.ed-motion .ed-parallax--zoom .ed-parallax__img {
  transform: scale(1.08);
  transition: transform 2400ms var(--ed-ease-out);
}
.ed-motion .ed-parallax--zoom.is-loaded .ed-parallax__img { transform: none; }

.ed-parallax__content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 640px;
}
.ed-parallax--center .ed-parallax__content { align-items: center; }
.ed-parallax--right .ed-parallax__content  { align-items: flex-end; }
.ed-parallax--left .ed-parallax__content   { align-items: flex-start; }

.ed-tpl .ed-parallax__title {
  margin: 0;
  font-family: var(--ed-serif) !important;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  color: #fff !important;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}
.ed-parallax__text {
  margin: 0;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.5;
  color: #fff !important;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}
.ed-parallax__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}
.ed-parallax--center .ed-parallax__actions { justify-content: center; }
.ed-parallax--right .ed-parallax__actions  { justify-content: flex-end; }
.ed-parallax__btn {
  display: inline-block;
  padding: 0.875em 2.5em;
  border-radius: var(--ed-radius);
  background: var(--ed-sage);
  color: #fff !important;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: background-color 200ms ease, box-shadow 200ms ease, transform 200ms var(--ed-ease-out);
}
.ed-parallax__btn:active { transform: scale(0.97); }
/* Mobile : contenu centré et boutons empilés de même largeur */
@media (max-width: 767px) {
  .ed-parallax--left,
  .ed-parallax--right { justify-content: center; text-align: center; }
  .ed-parallax .ed-parallax__content { align-items: center; }
  .ed-parallax .ed-parallax__actions { flex-direction: column; align-items: stretch; width: 100%; max-width: 320px; }
  .ed-parallax__btn { text-align: center; }
}

/* Bouton secondaire : contour blanc (texte blanc lisible grâce au voile) */
.ed-parallax__btn--outline {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.9);
}
@media (hover: hover) and (pointer: fine) {
  .ed-parallax__btn:hover {
    background: #56684F;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }
  .ed-parallax__btn--outline:hover {
    background: #fff;
    color: #3F4D3D !important;
    box-shadow: inset 0 0 0 2px #fff, 0 4px 12px rgba(0, 0, 0, 0.3);
  }
}

/* Bandeau citation : titre plus discret, grand guillemet décoratif */
.ed-band--quote .ed-parallax__title { font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.3; }
.ed-band--quote .ed-parallax__text { font-weight: 600; font-size: 1rem; }
.ed-band--quote .ed-parallax__content { max-width: 820px; }
.ed-band--quote .ed-parallax__content::before {
  content: '“';
  font-family: var(--ed-serif);
  font-size: 5rem;
  font-weight: 700;
  line-height: 0.6;
  color: rgba(255, 255, 255, 0.6);
}

/* ========== CARTES / BLOCS CRÈME ========== */
.e-con.ed-box,
.e-con.ed-card {
  gap: 12px;
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--ed-radius);
  background: var(--ed-cream);
}
.e-con.ed-box--center {
  align-items: center;
  text-align: center;
  max-width: 820px;
  margin-inline: auto;
}

.e-con.ed-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.e-con.ed-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.e-con.ed-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Module de réservation (shortcode [weeben_booking]) : largeur pleine, marge confortable */
.e-con.ed-booking { padding: clamp(20px, 3vw, 40px); min-height: 240px; }
.ed-booking .elementor-shortcode { width: 100%; }
.e-con.ed-grid > .e-con { width: auto; min-width: 0; }

/* Widget « Lignes d’infos » (horaires, fiche soin, coordonnées) */
.ed-rows { margin: 0; }
.ed-rows__row {
  display: flex;
  flex-wrap: wrap;            /* valeur longue : passe sous le libellé */
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--ed-line);
}
.ed-rows__row:last-child { border-bottom: 0; }
.ed-rows dt { color: var(--ed-muted); font-weight: 400; }
.ed-rows dd { margin: 0 0 0 auto; color: var(--ed-ink); font-weight: 600; text-align: right; }
.ed-rows a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--ed-line); }
@media (hover: hover) and (pointer: fine) {
  .ed-rows a:hover { color: var(--ed-sage-text); text-decoration-color: currentColor; }
}

/* ========== SOINS (widget « Services en colonnes » du thème) ========== */
.ed-services .service-item a { display: block; }
.ed-services .service-title { font-family: var(--ed-serif) !important; font-weight: 700; margin-top: 1rem; }
/* 5 ou 6 soins : deux rangées de 3 plutôt que 4 + 2 */
@media (min-width: 768px) {
  .ed-services .edenn-services-columns:has(> .service-item:nth-child(5)) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
/* Mobile : 2 colonnes pour éviter une longue liste */
@media (max-width: 767px) {
  .ed-services .edenn-services-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
  .ed-services .service-item { padding: 1rem 0.25rem; }
  .ed-services .service-image { width: 110px; height: 110px !important; }
}

/* ========== IMAGE + TEXTE ========== */
.e-con.ed-split {
  flex-direction: row;
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}
.e-con.ed-split--reverse { flex-direction: row-reverse; }
.e-con.ed-split--top { align-items: flex-start; }
.e-con.ed-split > .e-con { flex: 1 1 0; min-width: 0; }
.e-con.ed-split__text { gap: 16px; align-items: flex-start; }

.ed-tpl .ed-img img {
  display: block;
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  aspect-ratio: 1 / 1;
  object-fit: cover !important;
  border-radius: var(--ed-radius) !important;
}
.ed-tpl .ed-img--portrait img { aspect-ratio: 4 / 5; }

.ed-sticky {
  position: sticky !important;
  top: 120px;
}

/* ========== TARIFS (widget « Liste de tarifs ») ========== */
.ed-prices { list-style: none; margin: 0; padding: 0; }
.ed-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--ed-line);
}
.ed-price:last-child { border-bottom: 0; }
.ed-price__info,
.ed-price__end { display: flex; flex-direction: column; gap: 2px; }
.ed-price__info { min-width: 0; }
.ed-price__end { flex: 0 0 auto; align-items: flex-end; text-align: right; }
.ed-price__name {
  font-family: var(--ed-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ed-ink);
}
.ed-price__desc { font-size: 0.9rem; line-height: 1.5; color: var(--ed-muted); }
.ed-price__value {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ed-sage-text);
  white-space: nowrap;
}

/* ========== PARCOURS (widget « Parcours ») ========== */
.ed-timeline { list-style: none; margin: 0; padding: 0; }
.ed-tl {
  display: flex;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--ed-line);
}
.ed-tl:last-child { border-bottom: 0; }
.ed-tl__year { flex: 0 0 4rem; font-weight: 600; color: var(--ed-sage-text); }
.ed-tl__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ed-tl__title { font-family: var(--ed-serif); font-size: 1.2rem; font-weight: 700; color: var(--ed-ink); }
.ed-tl__text { font-size: 0.9rem; line-height: 1.5; color: var(--ed-muted); }

/* ========== NOTE ========== */
.ed-tpl .ed-note {
  padding: 20px 24px;
  border-left: 3px solid var(--ed-sage);
  border-radius: var(--ed-radius);
  background: var(--ed-cream);
  font-size: 0.95rem;
}

/* ========== CARTE GOOGLE ========== */
.ed-map { overflow: hidden; border-radius: var(--ed-radius); }
.ed-map iframe { display: block; }

/* ========== CRÉDITS PHOTOS (bas de page) ========== */
.e-con.ed-credits {
  padding: 20px var(--ed-gutter);
  border-top: 1px solid var(--ed-line);
  text-align: center;
}
.ed-tpl.ed-credits .elementor-widget-text-editor { font-size: 0.85rem; color: var(--ed-muted); }
body.dark-mode .e-con.ed-credits { background-color: #252B26; }
.ed-credits a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .ed-credits a:hover { color: var(--ed-sage-text); }
}

/* =============================================
   FINITIONS
   ============================================= */

/* Rythme : une section sur deux sur fond crème, ses cartes passent en sable */
.e-con.ed-section.ed-alt { background-color: var(--ed-cream); }
.ed-alt .e-con.ed-card,
.ed-alt .e-con.ed-box,
.ed-alt .ed-note { background: var(--bg-light, #E8E4DC); }
body.dark-mode .e-con.ed-section.ed-alt { background-color: #2C332D; }
body.dark-mode .ed-alt .e-con.ed-card,
body.dark-mode .ed-alt .e-con.ed-box { background: #1E2420; }

/* Filet sous les titres de section */
.e-con.ed-head .ed-title .elementor-heading-title::after,
.e-con.ed-split__text .ed-title .elementor-heading-title::after,
.e-con.ed-narrow > .ed-title .elementor-heading-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 2px;
  margin-top: 14px;
  background: var(--ed-sage);
  border-radius: 2px;
}
.e-con.ed-head--center .ed-title .elementor-heading-title::after { margin-inline: auto; }

/* Paragraphe d'introduction (Présentation) */
.ed-narrow:not(.ed-legal) > .elementor-widget-text-editor:not(.ed-note) p:first-child {
  font-family: var(--ed-serif);
  font-size: clamp(1.25rem, 1.8vw, 1.45rem);
  font-weight: 600;
  line-height: 1.5;
  color: var(--ed-ink);
}

/* Image latérale : cadre décalé + zoom léger au survol */
.e-con.ed-split__media { position: relative; }
.e-con.ed-split__media:has(> .ed-img)::before {
  content: '';
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 1px solid var(--ed-sage);
  border-radius: var(--ed-radius);
  opacity: 0.5;
  pointer-events: none;
}
.ed-split--reverse .e-con.ed-split__media:has(> .ed-img)::before { inset: 18px 18px -18px -18px; }
.ed-split__media .ed-img { position: relative; overflow: hidden; border-radius: var(--ed-radius); }
.ed-split__media .ed-img img { transition: transform 700ms var(--ed-ease-out); }

/* Soins : médaillon crème autour des images rondes */
.ed-services .service-image {
  border: 6px solid var(--ed-cream);
  box-shadow: 0 8px 24px -12px rgba(52, 52, 52, 0.35);
}
.ed-services .service-item a:focus-visible { outline-offset: 6px; border-radius: 50%; }

/* Cartes : filet sauge en tête, légère élévation au survol */
.e-con.ed-card {
  border-top: 3px solid var(--ed-sage);
  box-shadow: 0 1px 2px rgba(52, 52, 52, 0.05);
  transition: transform 250ms var(--ed-ease-out), box-shadow 250ms var(--ed-ease-out);
}
.e-con.ed-box { box-shadow: 0 1px 2px rgba(52, 52, 52, 0.05); }

/* Bloc rendez-vous : double cadre fin */
.e-con.ed-box--center {
  position: relative;
  padding: clamp(36px, 5vw, 56px);
}
.e-con.ed-box--center::after {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid var(--ed-line);
  border-radius: 4px;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .e-con.ed-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px -20px rgba(52, 52, 52, 0.35);
  }
  .ed-split__media .ed-img:hover img { transform: scale(1.03); }
}

@media (max-width: 767px) {
  /* Le cadre décalé déborderait sur les marges */
  .e-con.ed-split__media:has(> .ed-img)::before { display: none; }
}

/* ========== APPARITION AU SCROLL ========== */
.ed-js .ed-reveal,
.ed-js .ed-stagger > .elementor-element {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition: opacity 600ms var(--ed-ease-out), transform 600ms var(--ed-ease-out);
}
.ed-js .ed-stagger > .elementor-element {
  transition-delay: calc(var(--ed-i, 0) * 80ms);
}
.ed-js .ed-reveal.is-in,
.ed-js .ed-stagger.is-in > .elementor-element {
  opacity: 1;
  transform: none;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .e-con.ed-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ed-sticky { position: static !important; }
}
@media (max-width: 767px) {
  .e-con.ed-split,
  .e-con.ed-split--reverse { flex-direction: column; align-items: stretch; }
  .e-con.ed-grid,
  .e-con.ed-grid--2,
  .e-con.ed-grid--4 { grid-template-columns: minmax(0, 1fr); }
  .ed-price { align-items: flex-start; }
  .ed-tl { flex-direction: column; gap: 4px; }
  .ed-tpl .ed-img img { aspect-ratio: 4 / 3; }
}

@media (prefers-reduced-motion: reduce) {
  .ed-js .ed-reveal,
  .ed-js .ed-stagger > .elementor-element {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .ed-tpl .ed-btn .elementor-button,
  .ed-parallax__btn,
  .e-con.ed-card,
  .ed-split__media .ed-img img { transition: none; }
}
