/*
Theme Name: Fondation Merso
Theme URI: https://fondationmerso.com
Author: Fondation Merso
Description: Thème WordPress officiel de la Fondation Merso — porté depuis le site PHP sur-mesure. Tous les textes, coordonnées et réglages SMTP se modifient depuis Apparence > Merso Réglages, sans toucher au code.
Version: 1.0.0
Requires PHP: 7.4
Text Domain: merso
*/

/* ===========================================================
   FONDATION MERSO — Design tokens
   Palette drawn from the logo: rose-red heart, royal purple
   heart, gold ribbon, warm cream background.
   Display type: Poppins (warm, rounded, confident)
   Body type: Open Sans (calm, highly legible — important for
   an elderly-care audience)
   Signature element: the "ribbon arc" — a gold curved divider
   echoing the ribbon beneath the heart in the logo, used to
   stitch sections together instead of hard straight lines.
=========================================================== */

:root{
  --red: #D9455B;
  --red-dark: #B92F45;
  --purple: #6C3FA0;
  --purple-dark: #522E7A;
  --gold: #C9971C;
  --gold-light: #E8C158;
  --cream: #FBF1EE;
  --cream-deep: #F5E4DD;
  --ink: #34222A;
  --ink-soft: #6b5a61;
  --white: #ffffff;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(105, 40, 60, 0.10);
  --shadow-lg: 0 20px 50px rgba(105, 40, 60, 0.16);
  --font-display: 'Poppins', sans-serif;
  --font-body: 'Open Sans', sans-serif;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height:1.7;
  font-size: 16.5px;
}
h1,h2,h3,h4,h5{
  font-family: var(--font-display);
  color: var(--purple-dark);
  line-height:1.25;
  margin: 0 0 .6em;
}
h1{ font-weight:800; }
h2{ font-weight:700; }
h3{ font-weight:600; }
p{ margin:0 0 1em; }
a{ color: var(--red); text-decoration:none; }
img{ max-width:100%; display:block; }
ul{ padding-left: 1.2em; }
.container{ max-width:1180px; margin:0 auto; padding:0 24px; }

/* ---------- Topbar ---------- */
.topbar{ background: var(--purple-dark); color:#f2e7f5; font-size:.85rem; }
.topbar-inner{ display:flex; align-items:center; justify-content:space-between; padding:8px 24px; gap: 16px; flex-wrap: wrap;}
.topbar-item{ opacity:.92; }
.topbar-right{ margin-left:auto; display:flex; align-items:center; gap:8px; }
.lang-link{ color:#f2e7f5; opacity:.7; font-weight:600; letter-spacing:.03em; }
.lang-link.active, .lang-link:hover{ opacity:1; color: var(--gold-light); }
.lang-sep{ opacity:.4; }

/* ---------- Header / Nav ---------- */
.site-header{
  background: var(--white);
  position: sticky; top:0; z-index:100;
  box-shadow: 0 2px 18px rgba(105,40,60,.08);
}
.header-inner{ display:flex; align-items:center; justify-content:space-between; padding:10px 24px; }
.brand-logo{ height:80px; width:auto; }
.main-nav{ display:flex; align-items:center; gap: 6px; }
.main-nav a{
  color: var(--ink);
  font-family: var(--font-display);
  font-weight:600;
  font-size:.95rem;
  padding: 10px 14px;
  border-radius: 999px;
  transition: all .2s ease;
}
.main-nav a:hover{ background: var(--cream-deep); color: var(--red-dark); }
.main-nav a.active{ background: var(--red); color:#fff; }
.main-nav a.btn-nav-donate{
  background: var(--gold);
  color:#fff;
  margin-left:6px;
}
.main-nav a.btn-nav-donate:hover{ background: var(--gold-light); color:#fff; }
.main-nav a.btn-nav-donate.active{ background: var(--purple); }

.nav-toggle{ display:none; flex-direction:column; gap:5px; background:none; border:0; cursor:pointer; padding:8px; }
.nav-toggle span{ width:26px; height:3px; background: var(--purple-dark); border-radius:3px; }

/* ---------- Nav dropdown (About Us) ---------- */
.nav-dropdown{ position:relative; }
.nav-dropdown .dropdown-toggle{ display:inline-flex; align-items:center; gap:4px; }
.nav-dropdown .caret{ font-size:.7em; transition: transform .2s ease; }
.nav-dropdown .dropdown-menu{
  display:none;
  position:absolute; top:calc(100% + 8px); left:0;
  background: var(--white);
  border-radius:14px;
  box-shadow: 0 10px 30px rgba(105,40,60,.16);
  padding:8px;
  min-width:220px;
  z-index:200;
  flex-direction:column;
  gap:2px;
}
.nav-dropdown .dropdown-menu a{
  padding:10px 14px;
  border-radius:10px;
  white-space:nowrap;
  color: var(--ink);
}
.nav-dropdown .dropdown-menu a:hover{ background: var(--cream-deep); color: var(--red-dark); }
.nav-dropdown .dropdown-menu a.active{ background: var(--red); color:#fff; }
.nav-dropdown:hover .dropdown-menu{ display:flex; }
.nav-dropdown:hover .caret{ transform: rotate(180deg); }
.nav-dropdown.open .dropdown-menu{ display:flex; }
.nav-dropdown.open .caret{ transform: rotate(180deg); }

/* ---------- Buttons ---------- */
.btn{
  display:inline-block;
  font-family: var(--font-display);
  font-weight:600;
  padding: 14px 30px;
  border-radius: 999px;
  cursor:pointer;
  border: none;
  transition: transform .2s ease, box-shadow .2s ease;
  text-align:center;
}
.btn:hover{ transform: translateY(-2px); }
.btn-primary{ background: var(--red); color:#fff; box-shadow: 0 10px 24px rgba(217,69,91,.35); }
.btn-primary:hover{ background: var(--red-dark); color:#fff; }
.btn-secondary{ background:#fff; color: var(--purple-dark); box-shadow: var(--shadow); }
.btn-secondary:hover{ color: var(--red); }
.btn-gold{ background: var(--gold); color:#fff; box-shadow: 0 10px 24px rgba(201,151,28,.35);}
.btn-gold:hover{ background:var(--gold-light); color: #fff; }
.btn-outline{ background:transparent; border:2px solid var(--purple); color:var(--purple); padding:12px 28px;}
.btn-outline:hover{ background:var(--purple); color:#fff; }
.btn-block{ width:100%; }

/* ---------- Hero ---------- */
.hero{
  position:relative;
  background: linear-gradient(160deg, var(--cream) 0%, var(--cream-deep) 60%, #f3d9d2 100%);
  overflow:hidden;
  padding: 70px 0 110px;
}
.hero-inner{ display:grid; grid-template-columns: 1.1fr .9fr; gap:50px; align-items:center; }
.eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-family: var(--font-display); font-weight:700; font-size:.78rem;
  letter-spacing:.12em; text-transform:uppercase;
  color: var(--red-dark);
  background: rgba(217,69,91,.1);
  padding: 7px 16px; border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1{ font-size: clamp(2.1rem, 4vw, 3rem); margin-bottom:.4em; }
.hero .lead{ font-size:1.2rem; color: var(--ink-soft); margin-bottom: 1.6em; max-width: 46ch;}
.hero-actions{ display:flex; gap:14px; flex-wrap:wrap; }
.hero-art{ position:relative; }
.hero-art img{ border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.hero-badge{
  position:absolute; bottom:-24px; left:-24px;
  background: rgba(255,255,255,.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: var(--radius-sm);
  padding: 16px 20px; box-shadow: var(--shadow-lg);
  font-family: var(--font-display); font-weight:700;
  display:flex; align-items:center; gap:12px;
  max-width: 260px;
}
.hero-badge .dot{ width:12px;height:12px;border-radius:50%; background: var(--gold); flex:none; }

/* ---------- Ribbon arc divider (signature element) ---------- */
.ribbon-divider{ position:relative; height:70px; margin-top:-70px; z-index:2; }
.ribbon-divider svg{ width:100%; height:100%; display:block; }

/* ---------- Sections ---------- */
section{ padding: 80px 0; }
.section-cream{ background: var(--cream); }
.section-white{ background: #fff; }
.section-purple{ background: linear-gradient(135deg, var(--purple-dark), var(--purple)); color:#fff; }
.section-purple h2, .section-purple h3{ color:#fff; }
.section-head{ max-width: 720px; margin: 0 auto 50px; text-align:center; }
.section-head h2{ font-size: clamp(1.6rem, 3vw, 2.3rem); }
.section-head .eyebrow{ margin-bottom:14px; }
.section-head p{ color: var(--ink-soft); font-size:1.1rem; }

/* ---------- Quote block ---------- */
.quote-block{
  background:#fff;
  border-radius: var(--radius);
  padding: 40px 44px;
  box-shadow: var(--shadow);
  position:relative;
  border-left: 6px solid var(--gold);
  margin: 40px 0;
}
.quote-block p{ font-style:italic; font-size:1.15rem; color: var(--ink); margin-bottom:.6em;}
.quote-block cite{ font-family: var(--font-display); font-weight:700; color: var(--red-dark); font-style:normal;}

/* ---------- Cards ---------- */
.grid{ display:grid; gap: 28px; }
.grid-2{ grid-template-columns: 1fr 1fr; }
.grid-3{ grid-template-columns: repeat(3, 1fr); }
.grid-4{ grid-template-columns: repeat(4, 1fr); }

.card{
  background:#fff;
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover{ transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card .icon-badge{
  width:56px; height:56px; border-radius:16px;
  display:flex; align-items:center; justify-content:center;
  font-size:1.6rem; margin-bottom:18px;
  background: linear-gradient(135deg, var(--red), var(--gold));
  color:#fff;
}
.card h3{ font-size:1.15rem; margin-bottom:.5em; }
.card p{ color: var(--ink-soft); margin:0; font-size:.98rem; }

.promise-list{ list-style:none; padding:0; margin:0; display:grid; gap:14px; }
.promise-list li{
  display:flex; align-items:flex-start; gap:12px;
  font-family: var(--font-display); font-weight:600;
  color: var(--ink);
}
.promise-list li .check{
  flex:none; width:26px; height:26px; border-radius:50%;
  background: var(--gold); color:#fff; display:flex;
  align-items:center; justify-content:center; font-size:.8rem;
  margin-top:2px;
}

.steps-list{ list-style:none; padding:0; margin:0; display:grid; gap:22px; counter-reset: step; }
.steps-list li{
  display:flex; gap:18px; align-items:flex-start;
  counter-increment: step;
}
.steps-list li::before{
  content: counter(step);
  flex:none; width:38px; height:38px; border-radius:50%;
  background: linear-gradient(135deg, var(--red), var(--gold));
  color:#fff; font-family: var(--font-display); font-weight:700;
  display:flex; align-items:center; justify-content:center;
}
.steps-list li div h4{ margin:0 0 4px; font-family: var(--font-display); }
.steps-list li div p{ margin:0; color: var(--ink-soft); }

.problem-list{ list-style:none; padding:0; margin:0; display:grid; gap:12px; }
.problem-list li{ display:flex; gap:12px; align-items:flex-start; }
.problem-list li .bullet{ flex:none; width:8px; height:8px; border-radius:50%; background: var(--red); margin-top:9px;}

/* ---------- CTA banner ---------- */
.cta-banner{
  background: linear-gradient(120deg, var(--red) 0%, var(--purple) 100%);
  border-radius: var(--radius);
  padding: 56px 50px;
  color:#fff;
  display:flex; align-items:center; justify-content:space-between; gap: 30px; flex-wrap:wrap;
}
.cta-banner h2{ color:#fff; margin-bottom:.3em; }
.cta-banner p{ color: rgba(255,255,255,.88); margin:0; max-width: 50ch;}

/* ---------- Forms ---------- */
.form-card{
  background:#fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 44px; margin-bottom: 40px;
}
.form-section-title{
  font-family: var(--font-display); font-weight:700; color: var(--purple-dark);
  font-size:1.05rem;
  margin: 34px 0 18px;
  padding-bottom:10px;
  border-bottom: 2px solid var(--cream-deep);
}
.form-section-title:first-child{ margin-top:0; }
.form-row{ display:grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom:20px; }
.form-group{ margin-bottom:20px; }
.form-group label{
  display:block; font-family: var(--font-display); font-weight:600;
  font-size:.92rem; margin-bottom:7px; color: var(--ink);
}
.form-group .hint{ font-weight:400; color: var(--ink-soft); font-size: .85rem;}
input[type=text], input[type=email], input[type=tel], input[type=date],
input[type=number], input[type=time], textarea, select{
  width:100%;
  padding: 12px 14px;
  border: 1.5px solid #e7d7d3;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size:.98rem;
  background: var(--cream);
  color: var(--ink);
  transition: border-color .2s ease, background .2s ease;
}
input:focus, textarea:focus, select:focus{
  outline:none; border-color: var(--red); background:#fff;
}
textarea{ min-height:120px; resize: vertical; }
.checkbox-group{ display:flex; flex-wrap:wrap; gap: 10px 22px; }
.checkbox-item{ display:flex; align-items:center; gap:8px; font-size:.95rem; }
.checkbox-item input{ width:auto; accent-color: var(--red); }
.radio-group{ display:flex; flex-wrap:wrap; gap: 10px 24px; }
.radio-item{ display:flex; align-items:center; gap:8px; font-size:.95rem; }
.radio-item input{ width:auto; accent-color: var(--red); }
.form-note{
  background: var(--cream); border-left:4px solid var(--gold);
  padding: 14px 18px; border-radius: var(--radius-sm); font-size:.93rem;
  color: var(--ink-soft); margin-bottom: 24px;
}
.alert-success{
  background: #e7f6ec; border:1.5px solid #93d9ab; color:#245c37;
  padding:18px 22px; border-radius: var(--radius-sm); margin-bottom: 26px;
  font-weight:600; display:flex; gap:10px; align-items:center;
}
.alert-error{
  background: #fdeceb; border:1.5px solid #f3aba5; color:#8c2c22;
  padding:18px 22px; border-radius: var(--radius-sm); margin-bottom: 26px;
  font-weight:600;
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero{
  background: linear-gradient(135deg, var(--purple-dark), var(--purple) 55%, var(--red-dark));
  color:#fff;
  padding: 64px 0 90px;
  text-align:center;
}
.page-hero h1{ color:#fff; font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.page-hero p{ color: rgba(255,255,255,.85); max-width: 620px; margin: 10px auto 0; font-size:1.08rem; }

/* ---------- Contact / location ---------- */
.contact-info-card{
  background:#fff; border-radius: var(--radius); padding:34px; box-shadow: var(--shadow);
}
.contact-info-row{ display:flex; gap:14px; align-items:flex-start; margin-bottom:20px; }
.contact-info-row .ic{
  flex:none; width:42px; height:42px; border-radius:12px;
  background: var(--cream-deep); display:flex; align-items:center; justify-content:center;
  font-size:1.2rem;
}
.map-embed{ border-radius: var(--radius); overflow:hidden; box-shadow: var(--shadow); margin-top:24px; }
.map-embed iframe{ width:100%; height:320px; border:0; display:block; }

/* ---------- Gallery ---------- */
.gallery-grid{ display:grid; grid-template-columns: repeat(3, 1fr); gap:16px; }
.gallery-grid .g-item{
  aspect-ratio: 1; border-radius: var(--radius-sm); overflow:hidden;
  background: linear-gradient(135deg, var(--cream-deep), var(--gold-light));
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}
.gallery-grid .g-item:hover{ transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.gallery-grid .g-item img{ width:100%; height:100%; object-fit:cover; display:block; }

/* ---------- Footer ---------- */
.site-footer{ background: var(--ink); color: #e9dde0; padding-top: 60px; }
.footer-grid{ display:grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 40px; }
.footer-logo{ height:96px; margin-bottom:16px; border-radius:10px; }
.footer-col h4{ color:#fff; font-size:1rem; margin-bottom:16px; }
.footer-col a{ display:block; color:#cbb9be; margin-bottom:10px; font-size:.95rem; }
.footer-col a:hover{ color: var(--gold-light); }
.footer-col p{ color:#cbb9be; font-size:.92rem; }
.footer-cta{ color: var(--gold-light) !important; font-weight:700; margin-top:6px;}
.social-links{ display:flex; gap:12px; margin-top:16px; }
.social-links a{
  width:38px; height:38px; border-radius:50%; background: rgba(255,255,255,.08);
  display:flex; align-items:center; justify-content:center; color:#e9dde0;
}
.social-links a:hover{ background: var(--red); color:#fff; }
.footer-bottom{ border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; text-align:center; font-size:.85rem; color:#a9979d; }

/* ---------- Floating buttons ---------- */
.whatsapp-float{
  position:fixed; bottom:24px; left:24px; z-index:200;
  width:56px; height:56px; border-radius:50%; background:#25D366;
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 10px 24px rgba(37,211,102,.4);
}
.scroll-top{
  position:fixed; bottom:24px; right:24px; z-index:200;
  width:48px; height:48px; border-radius:50%; border:none;
  background: var(--purple); color:#fff; font-size:1.3rem; cursor:pointer;
  box-shadow: var(--shadow-lg); opacity:0; pointer-events:none; transition:opacity .25s ease, transform .25s ease;
}
.scroll-top.visible{ opacity:1; pointer-events:auto; }
.scroll-top:hover{ transform: translateY(-3px); }

/* ---------- Utility ---------- */
.text-center{ text-align:center; }
.mt-0{margin-top:0;}
.mb-0{margin-bottom:0;}

/* ---------- Admin options page (Merso Réglages) ---------- */
.merso-opt-wrap .nav-tab-wrapper{ margin-bottom:22px; }
.merso-opt-section{ background:#fff; border:1px solid #dcdcde; border-radius:8px; padding:24px 28px; max-width:900px; }
.merso-opt-field{ margin-bottom:18px; }
.merso-opt-field label{ display:block; font-weight:600; margin-bottom:5px; }
.merso-opt-field input[type=text], .merso-opt-field input[type=email], .merso-opt-field input[type=password], .merso-opt-field input[type=number], .merso-opt-field textarea{
  width:100%; max-width:640px; padding:8px 10px;
}
.merso-opt-field .desc{ color:#646970; font-size:.85rem; margin-top:4px; }
.merso-opt-group-title{ font-family: var(--font-display); font-weight:700; color: var(--purple-dark); font-size:1.1rem; margin: 30px 0 14px; padding-bottom:8px; border-bottom:2px solid #f0e2e6; }
.merso-opt-group-title:first-child{ margin-top:0; }

/* ---------- Responsive ---------- */
@media (max-width: 980px){
  .hero-inner{ grid-template-columns: 1fr; }
  .hero-art{ order:-1; }
  .grid-4{ grid-template-columns: repeat(2,1fr); }
  .grid-3{ grid-template-columns: repeat(2,1fr); }
  .grid-2{ grid-template-columns: 1fr; }
  .footer-grid{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px){
  .nav-toggle{ display:flex; }
  .main-nav{
    position:absolute; top:100%; left:0; right:0;
    background:#fff; flex-direction:column; align-items:stretch;
    padding: 10px 20px 20px; box-shadow: var(--shadow-lg);
    display:none;
  }
  .main-nav.open{ display:flex; }
  .main-nav a{ padding:12px 14px; }
  .nav-dropdown{ width:100%; }
  .nav-dropdown .dropdown-menu{
    position:static; box-shadow:none; display:none;
    padding:0 0 0 14px; min-width:0; background:transparent;
  }
  .nav-dropdown.open .dropdown-menu{ display:flex; }
  .nav-dropdown:hover .dropdown-menu{ display:none; }
  .nav-dropdown.open:hover .dropdown-menu{ display:flex; }
  .topbar-inner{ font-size:.75rem; }
  .form-row{ grid-template-columns: 1fr; }
  .grid-4, .grid-3{ grid-template-columns: 1fr 1fr; }
  .gallery-grid{ grid-template-columns: repeat(2,1fr); }
  .cta-banner{ flex-direction:column; text-align:center; padding: 40px 26px;}
  .footer-grid{ grid-template-columns: 1fr; text-align:center;}
  .social-links{ justify-content:center;}
  .contact-info-row{ text-align:left; }
}
