/* ==========================================================================
   E-Diaspora — styles de theme
   ========================================================================== */

:root {
  --ed-radius: 18px;
  --ed-radius-lg: 26px;
  --ed-radius-sm: 12px;
  --ed-t: 200ms cubic-bezier(.2,.7,.3,1);
  --ed-shadow: 0 1px 2px rgba(15,31,25,.04), 0 10px 30px rgba(15,31,25,.07);
  --ed-shadow-lg: 0 4px 8px rgba(15,31,25,.05), 0 24px 60px rgba(15,31,25,.14);
}

body { -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; }

/* Contenu redactionnel : largeur de lecture confortable */
.ed-prose { --wp--style--global--content-size: 860px; }

/* En-tetes de section */
.ed-section-head { max-width: 760px; margin-bottom: clamp(2.5rem, 4vw, 3.75rem); }
.ed-section-head.is-centered { margin-left: auto; margin-right: auto; }
.ed-lead { font-size: clamp(1.0625rem, 1rem + .35vw, 1.25rem); line-height: 1.65; }
.ed-section-label {
  display: inline-block; font-size: .75rem; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--wp--preset--color--primary); margin: 0 0 12px;
}
.ed-section-label.is-light { color: #7ee2ac; }
.ed-muted { color: var(--wp--preset--color--muted); }

/* ==========================================================================
   Header
   ========================================================================== */
.ed-topbar a { color: inherit; opacity: .92; }
.ed-topbar p { margin: 0; }
.ed-header {
  position: sticky; top: 0; z-index: 60;
  border-bottom: 1px solid var(--wp--preset--color--line);
  backdrop-filter: saturate(160%) blur(10px);
  background: rgba(255,255,255,.9) !important;
}
.ed-header .wp-block-navigation a { color: var(--wp--preset--color--ink); }
.ed-header .wp-block-navigation a:hover { color: var(--wp--preset--color--primary); text-decoration: none; }
.ed-header .wp-block-navigation .current-menu-item > a { color: var(--wp--preset--color--primary); }
.ed-nav-wrap { gap: 30px; }
.ed-btn-accent .wp-block-button__link {
  background: var(--wp--preset--color--accent);
  box-shadow: 0 8px 22px rgba(245,130,32,.3);
}
.ed-btn-accent .wp-block-button__link:hover { background: #E0700F; }
.ed-btn-light .wp-block-button__link {
  color: #fff !important; border-color: rgba(255,255,255,.55) !important; background: rgba(255,255,255,.06);
}
.ed-btn-light .wp-block-button__link:hover { background: rgba(255,255,255,.16); border-color: #fff !important; }
.wp-block-site-logo img { display: block; height: auto; }
/* Le nom du site sert de logo tant qu'aucune image n'a ete definie. */
.ed-header .wp-block-site-title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.ed-header .wp-block-group:has(.wp-block-site-logo img) .ed-hide-when-logo { display: none; }
@media (max-width: 900px) {
  .ed-topbar { display: none; }
  .ed-nav-wrap .wp-block-buttons { display: none; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.ed-hero { position: relative; isolation: isolate; color: #fff; overflow: hidden; }
.ed-hero-bg {
  position: absolute; inset: 0; z-index: -2;
  background-size: cover; background-position: center 42%;
  transform: scale(1.03);
}
.ed-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(100deg, rgba(15,31,25,.97) 0%, rgba(15,31,25,.93) 38%, rgba(15,31,25,.66) 64%, rgba(15,31,25,.48) 100%),
    linear-gradient(to top, rgba(8,18,13,.72), transparent 58%);
}
.ed-hero::after {
  content: ""; position: absolute; z-index: -1; right: -8%; top: -20%;
  width: 640px; height: 640px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245,130,32,.28), transparent 62%);
  pointer-events: none;
}
.ed-hero h1, .ed-hero p, .ed-hero li { color: #fff; }
.ed-hero h1 { text-wrap: balance; }
.ed-hero .ed-eyebrow {
  display: inline-block; padding: 7px 16px; border-radius: 999px;
  background: rgba(0,149,75,.22); border: 1px solid rgba(126,226,172,.38); color: #a9f0c8;
  font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  backdrop-filter: blur(4px);
}
.ed-underline { position: relative; white-space: nowrap; }
.ed-underline::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .04em; height: .28em;
  background: rgba(245,130,32,.85); border-radius: 3px; z-index: -1;
}
.ed-hero-points {
  list-style: none; display: flex; flex-wrap: wrap; gap: 10px 26px;
  margin: 28px 0 0; padding: 0; font-size: .875rem;
}
.ed-hero-points li { display: flex; align-items: center; gap: 8px; opacity: .92; }
.ed-hero-points li::before { content: "✓"; color: #7ee2ac; font-weight: 800; }

.ed-hero-card {
  background: #fff; color: var(--wp--preset--color--ink);
  border-radius: var(--ed-radius-lg); padding: 30px;
  box-shadow: var(--ed-shadow-lg);
}
.ed-hero-card p, .ed-hero-card h2, .ed-hero-card li, .ed-hero-card strong { color: var(--wp--preset--color--ink); }
.ed-hero-steps { list-style: none; margin: 20px 0 0; padding: 0; }
.ed-hero-steps li { display: flex; gap: 14px; align-items: flex-start; padding: 11px 0; border-top: 1px solid #eef2f0; font-size: .9rem; line-height: 1.5; }
.ed-hero-steps li:first-child { border-top: 0; padding-top: 0; }
.ed-hero-steps span {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  background: var(--wp--preset--color--primary-soft); color: var(--wp--preset--color--primary-dark);
  display: grid; place-items: center; font-size: .78rem; font-weight: 800;
}

/* ==========================================================================
   Bandeau de reassurance
   ========================================================================== */
.ed-trust { border-bottom: 1px solid var(--wp--preset--color--line); }
.ed-trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 26px; }
.ed-trust-grid > div { display: flex; gap: 14px; align-items: flex-start; }
.ed-trust-ico {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: var(--wp--preset--color--primary-soft); font-size: 1.15rem;
}
.ed-trust-grid strong { display: block; font-size: .95rem; margin-bottom: 2px; }
.ed-trust-grid div div { font-size: .8125rem; color: var(--wp--preset--color--muted); line-height: 1.5; }

/* ==========================================================================
   Cartes generiques
   ========================================================================== */
.ed-card {
  background: #fff; border: 1px solid var(--wp--preset--color--line);
  border-radius: var(--ed-radius); padding: 26px;
  transition: transform var(--ed-t), box-shadow var(--ed-t), border-color var(--ed-t);
  height: 100%;
}
.ed-card:hover { transform: translateY(-4px); box-shadow: var(--ed-shadow-lg); border-color: transparent; }

.ed-mini-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px 26px; margin-top: 30px; }
.ed-mini-grid > div { padding-left: 18px; border-left: 2px solid var(--wp--preset--color--primary); }
.ed-mini-grid strong { display: block; font-size: .95rem; margin-bottom: 3px; }
.ed-mini-grid span { font-size: .85rem; color: var(--wp--preset--color--muted); line-height: 1.55; }
@media (max-width: 640px) { .ed-mini-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Images
   ========================================================================== */
.ed-figure-stack { position: relative; margin: 0; }
.ed-figure-stack > img:first-of-type {
  width: 100%; border-radius: var(--ed-radius-lg); display: block;
  box-shadow: var(--ed-shadow-lg); object-fit: cover; aspect-ratio: 6/5;
}
.ed-figure-inset {
  position: absolute; right: -6%; bottom: 14%; width: 44%;
  border-radius: var(--ed-radius); border: 6px solid #fff; display: block;
  box-shadow: var(--ed-shadow-lg); object-fit: cover; aspect-ratio: 4/3;
}
.ed-figure-stack figcaption {
  margin-top: 18px; font-size: .8125rem; color: var(--wp--preset--color--muted);
  max-width: 60%; line-height: 1.5;
}
.ed-figure-tall { margin: 32px 0 0; }
.ed-figure-tall img {
  width: 100%; border-radius: var(--ed-radius-lg); display: block;
  object-fit: cover; aspect-ratio: 4/5; box-shadow: var(--ed-shadow);
}
@media (max-width: 900px) {
  .ed-figure-inset { display: none; }
  .ed-figure-stack figcaption { max-width: 100%; }
  .ed-figure-tall { display: none; }
}

.ed-photo-duo { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; align-items: center; }
.ed-photo-duo img { width: 100%; border-radius: var(--ed-radius); object-fit: cover; display: block; box-shadow: var(--ed-shadow-lg); }
.ed-photo-duo img:first-child { aspect-ratio: 4/5; }
.ed-photo-duo img:last-child { aspect-ratio: 1/1; transform: translateY(24px); }
@media (max-width: 640px) { .ed-photo-duo img:last-child { display: none; } .ed-photo-duo { grid-template-columns: 1fr; } }

/* ==========================================================================
   Workflow
   ========================================================================== */
.ed-steps { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 30px; }
.ed-step { position: relative; }
.ed-step h3 { font-size: 1.125rem; margin: 0 0 8px; }
.ed-step p { margin: 0; font-size: .9rem; color: var(--wp--preset--color--muted); line-height: 1.6; }
.ed-num {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  font-weight: 800; font-size: 1.15rem; background: var(--wp--preset--color--accent); color: #fff;
  margin-bottom: 20px; box-shadow: 0 8px 22px rgba(245,130,32,.32); position: relative; z-index: 2;
}
@media (min-width: 900px) {
  .ed-step::before {
    content: ""; position: absolute; top: 25px; left: 60px; right: -30px; height: 2px; z-index: 1;
    background: repeating-linear-gradient(90deg, #cfdcd6 0 7px, transparent 7px 15px);
  }
  .ed-step:last-child::before { display: none; }
}
@media (max-width: 900px) { .ed-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .ed-steps { grid-template-columns: 1fr; } }

/* ==========================================================================
   Chiffres cles
   ========================================================================== */
.ed-stats-band { position: relative; isolation: isolate; color: #fff; overflow: hidden; }
.ed-band-bg { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; }
.ed-stats-band::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(9,28,20,.94), rgba(0,78,41,.86));
}
.ed-stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 34px; }
.ed-stat p { margin: 10px 0 0; font-size: .875rem; line-height: 1.6; color: rgba(255,255,255,.82); }
.ed-stat-num {
  display: block; font-family: var(--wp--preset--font-family--display);
  font-size: clamp(2.6rem, 1.8rem + 2.8vw, 4rem); font-weight: 800; line-height: 1;
  color: var(--wp--preset--color--accent);
}
@media (max-width: 900px) { .ed-stats-grid { grid-template-columns: repeat(2, 1fr); } }

/* ==========================================================================
   Mission
   ========================================================================== */
.ed-mission h2, .ed-mission p { color: #fff; }
.ed-mission p:not(.ed-section-label) { color: rgba(255,255,255,.84); }

/* ==========================================================================
   Temoignages
   ========================================================================== */
.ed-quotes { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }
.ed-quote {
  background: #fff; border: 1px solid var(--wp--preset--color--line);
  border-radius: var(--ed-radius); padding: 30px; margin: 0;
  transition: transform var(--ed-t), box-shadow var(--ed-t);
}
.ed-quote:hover { transform: translateY(-4px); box-shadow: var(--ed-shadow-lg); }
.ed-quote p { font-size: .95rem; line-height: 1.7; margin: 14px 0 0; }
.ed-stars { color: var(--wp--preset--color--accent); letter-spacing: 3px; font-size: .95rem; }
.ed-quote cite { display: block; margin-top: 20px; padding-top: 16px; border-top: 1px solid #eef2f0; font-style: normal; font-weight: 700; font-size: .9rem; }
.ed-quote cite span { display: block; font-weight: 400; color: var(--wp--preset--color--muted); font-size: .8rem; margin-top: 2px; }
@media (max-width: 900px) { .ed-quotes { grid-template-columns: 1fr; } }

/* ==========================================================================
   FAQ
   ========================================================================== */
.ed-faq details {
  border: 1px solid var(--wp--preset--color--line); border-radius: var(--ed-radius-sm);
  padding: 18px 22px; margin-bottom: 12px; background: #fff; transition: border-color var(--ed-t);
}
.ed-faq details[open] { border-color: var(--wp--preset--color--primary); box-shadow: var(--ed-shadow); }
.ed-faq summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 18px; font-size: .975rem; }
.ed-faq summary::-webkit-details-marker { display: none; }
.ed-faq summary::after { content: "+"; font-size: 1.45rem; line-height: 1; color: var(--wp--preset--color--primary); flex: 0 0 auto; }
.ed-faq details[open] summary::after { content: "\2013"; }
.ed-faq details p { margin: 14px 0 0; color: var(--wp--preset--color--muted); font-size: .9rem; line-height: 1.7; }

/* ==========================================================================
   CTA
   ========================================================================== */
.ed-cta { position: relative; isolation: isolate; color: #fff; overflow: hidden; }
.ed-cta .ed-band-bg { filter: saturate(.9); }
.ed-cta::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(120deg, rgba(0,71,37,.95), rgba(0,105,55,.88));
}
.ed-cta h2, .ed-cta p { color: #fff; }
.ed-cta h2 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 3rem); }

/* ==========================================================================
   Entetes de page
   ========================================================================== */
.ed-page-head { border-bottom: 1px solid var(--wp--preset--color--line); }
.ed-page-head h1 { margin: 0; }
.ed-page-head.is-hero h1 { margin-bottom: 14px; }
.ed-service-head { border-bottom: 1px solid var(--wp--preset--color--line); }

/* ==========================================================================
   Footer
   ========================================================================== */
.ed-footer a { color: rgba(255,255,255,.76); }
.ed-footer a:hover { color: #fff; }
.ed-footer .ed-footer-list { list-style: none; padding: 0; margin: 16px 0 0; }
.ed-footer .ed-footer-list li { margin-bottom: 9px; font-size: .9rem; }
.ed-footer p { color: rgba(255,255,255,.76); }
