/* ──────────────────────────────────────────────────────────────────────
 * MJ Services 13 — Brand overrides
 *
 * Override des variables CSS de style.css (héritées du template Atout
 * Toiture) pour aligner sur la charte réelle du WordPress actuel :
 *   primary  #29B682 (vert menthe vif)
 *   dark     #0D744E (vert sapin)
 *   accent   #FFBC7D (pêche/abricot)
 *   text     #242424
 *   font     Urbanist
 *   boutons  pill (border-radius 99px)
 *
 * Chargé APRÈS style.css → wins par cascade naturelle.
 * ────────────────────────────────────────────────────────────────────── */

/* Urbanist — self-hosted WOFF2 (variable font, 2 fichiers, ~43 Ko total) */
@font-face {
  font-family: 'Urbanist';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/urbanist-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Urbanist';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/urbanist-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Override des vars --at-* du template */
  --at-red:         #29B682;  /* primary vert menthe */
  --at-red-dark:    #0D744E;  /* hover / active vert sapin */
  --at-red-light:   #5BCD9A;  /* accents subtils */

  --at-gold:        #FFBC7D;  /* accent pêche */
  --at-gold-dark:   #E69A5C;

  --at-text:        #242424;
  --at-grey:        #242424;
  --at-grey-2:      #4A4A4A;
  --at-grey-3:      #7A7A7A;

  --at-cream:       #FAFAF7;  /* fond crème neutre */
  --at-cream-2:     #ECF8F3;  /* fond sections alternées teinté vert très pâle */
  --at-white:       #FFFFFF;
  --at-border:      #D7EDE2;  /* bordure teintée vert très pâle */

  /* Variables MJ-spécifiques */
  --mj-primary:     #29B682;
  --mj-dark:        #0D744E;
  --mj-accent:      #FFBC7D;
}

/* ───── Typographie ──────────────────────────────────────────────────── */
:root {
  --ff-sans: "Urbanist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ff-serif: "Urbanist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
body,
input, textarea, select, button {
  font-family: var(--ff-sans);
}
h1, h2, h3, h4, .display {
  font-family: var(--ff-sans);
  font-weight: 700;
  letter-spacing: -0.015em;
}
h4 {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* ───── Boutons pill ─────────────────────────────────────────────────── */
.btn,
.btn--cta,
.btn--ghost,
.elementor-button {
  border-radius: 99px;
  padding: 14px 28px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.btn--cta {
  background: var(--mj-primary);
  border: 1px solid var(--mj-primary);
  color: #fff;
}
.btn--cta:hover {
  background: var(--mj-dark);
  border-color: var(--mj-dark);
  color: #fff;
  transform: translateY(-1px);
}
.btn--ghost {
  background: transparent;
  border: 1.5px solid var(--mj-primary);
  color: var(--mj-primary);
}
.btn--ghost:hover {
  background: var(--mj-primary);
  color: #fff;
}

/* ───── Header phone : lien propre (pas un bouton plein, sinon doublon CTA) ───── */
.header__phone {
  background: transparent;
  color: var(--mj-dark);
  padding: 0.5rem 0.75rem;
  border-radius: 99px;
  border: 1.5px solid transparent;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.header__phone svg {
  color: var(--mj-primary);
}
.header__phone:hover {
  background: rgba(41,182,130,0.08);
  border-color: var(--mj-primary);
  color: var(--mj-dark);
}
.header__phone:hover svg {
  color: var(--mj-dark);
}

/* FAB téléphone (cercle flottant bas-droite) : reste vert plein pour visibilité */
.fab {
  background: var(--mj-primary);
  color: #fff;
}
.fab:hover {
  background: var(--mj-dark);
}

/* sticky-tel (héritage template) : neutralisé sur tous écrans (remplacé par sticky-cta + FAB) */
.sticky-tel { display: none !important; }

/* ───── Links ────────────────────────────────────────────────────────── */
a { color: var(--mj-dark); }
a:hover { color: var(--mj-primary); }
.eyebrow { color: var(--mj-primary); }

/* ───── Section --red (renamed conceptuellement en bandeau "urgence/CTA") ─ */
.section--red,
.urgence-banner {
  background: var(--mj-primary);
  color: #fff;
}
.section--red h1, .section--red h2, .section--red h3,
.urgence-banner h1, .urgence-banner h2, .urgence-banner h3 {
  color: #fff;
}

/* CTA final — palette douce avec accent pêche */
.cta-final {
  background: linear-gradient(135deg, var(--mj-primary) 0%, var(--mj-dark) 100%);
  color: #fff;
}
.cta-final h2,
.cta-final .eyebrow { color: #fff; }
.cta-final p { color: rgba(255, 255, 255, 0.92); }
.cta-final .btn--ghost {
  background: transparent;
  border: 1.5px solid #fff;
  color: #fff;
}
.cta-final .btn--ghost:hover {
  background: #fff;
  color: var(--mj-dark);
}

/* ───── Service cards — accent border-radius ─────────────────────────── */
.service-card,
.usp-card,
.gallery__item {
  border-radius: 16px;
  overflow: hidden;
}
.service-card__img picture,
.service-card__img img,
.gallery__item picture,
.gallery__item img {
  border-radius: 0;
}

/* ───── USP cards — touche vert subtil ───────────────────────────────── */
.usp-card {
  background: #fff;
  border: 1px solid var(--at-border);
  box-shadow: 0 2px 12px rgba(13, 116, 78, 0.06);
}
.usp-card__icon {
  color: var(--mj-primary);
}

/* ───── Footer — fond sombre vert sapin pour contraste fort ──────────── */
.footer {
  background: var(--mj-dark);
  color: #E8F5EE;
}
.footer h4 {
  color: #fff;
}
.footer a {
  color: #E8F5EE;
}
.footer a:hover {
  color: #fff;
}
/* Override systématique de tout texte foncé hérité de style.css dans le footer */
.footer__col li,
.footer__col ul li,
.footer__zone,
.footer__tagline,
.footer__hours,
.footer__contact,
.footer__contact a,
.footer__contact li {
  color: rgba(232, 245, 238, 0.88);
}
.footer__siret {
  color: rgba(232, 245, 238, 0.65);
}
.footer__bottom {
  border-top-color: rgba(232, 245, 238, 0.15);
  color: rgba(232, 245, 238, 0.7);
}
.footer__contact-btn {
  color: #E8F5EE;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}
.footer__contact-btn:hover {
  color: #fff;
}

/* ───── Header nav : dropdown "Prestations" CSS pur ─────────────────────
 * Desktop : hover ouvre le dropdown sous "Prestations", sans gap (pas de
 * trou de souris). Caret SVG bien visible. Active indicator vert.
 * Mobile (burger) : le dropdown s'aplatit en liste indentée sous "Prestations",
 * pas de positionnement absolute.
 */
.header__nav-group {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.header__nav-link--has-dropdown {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}
.header__nav-caret {
  display: inline-block;
  transition: transform 0.2s ease;
  color: var(--mj-primary);
}
.header__nav-group:hover .header__nav-caret,
.header__nav-group:focus-within .header__nav-caret {
  transform: rotate(-180deg);
  color: var(--mj-dark);
}

.header__dropdown {
  position: absolute;
  top: 100%;              /* directement sous le lien — pas de gap */
  left: -0.75rem;
  margin-top: 6px;        /* petit décalage visuel */
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(13,116,78,0.20);
  padding: 0.5rem;
  min-width: 280px;
  display: none;
  z-index: 30;
  border: 1px solid rgba(13,116,78,0.10);
}
/* Hack hover-gap : un pseudo-element invisible couvre la zone entre lien et dropdown */
.header__dropdown::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0; right: 0;
  height: 12px;
}
.header__nav-group:hover .header__dropdown,
.header__nav-group:focus-within .header__dropdown {
  display: block;
}

.header__dropdown-link {
  display: block;
  padding: 0.65rem 0.9rem;
  font-size: 0.93rem;
  color: var(--at-grey);
  border-radius: 8px;
  border-bottom: 0 !important;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.header__dropdown-link:hover {
  background: rgba(41,182,130,0.10);
  color: var(--mj-dark);
}
.header__nav-group.is-active > .header__nav-link {
  color: var(--mj-dark);
  font-weight: 600;
}
.header__nav-group.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 1.6em; bottom: -6px;
  height: 2px; background: var(--mj-primary);
}

/* ───── Mobile : burger menu — dropdown s'aplatit en accordéon ───── */
@media (max-width: 800px) {
  .header__nav-group {
    display: block;
    width: 100%;
    border-bottom: 1px solid var(--at-border);
  }
  .header__nav-link--has-dropdown {
    width: 100%;
    justify-content: space-between;
    padding: 1rem 0;
  }
  /* Sur mobile : dropdown TOUJOURS visible en accordéon ouvert sous "Prestations" */
  .header__dropdown {
    position: static;
    display: block;        /* toujours déplié */
    box-shadow: none;
    background: rgba(41,182,130,0.05);
    padding: 0.25rem 0 0.75rem 1.25rem;
    min-width: 0;
    margin-top: 0;
    border: 0;
    border-radius: 0;
  }
  .header__dropdown::before { display: none; }
  .header__dropdown-link {
    padding: 0.7rem 0.5rem;
    font-size: 1rem;
    border-bottom: 1px dashed rgba(13,116,78,0.12) !important;
  }
  .header__dropdown-link:last-child { border-bottom: 0 !important; }
  /* La rotation du caret en accordéon ouvert : vers le bas */
  .header__nav-caret { transform: rotate(0deg) !important; }
  /* Active indicator (la barre verte) — vire-le sur mobile car bizarre */
  .header__nav-group.is-active::after { display: none; }
}

/* ───── Bandeau cookies CNIL ────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  background: #fff;
  border-top: 4px solid var(--mj-primary);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.18);
  padding: 1rem 1.25rem;
  color: var(--at-grey);
}
.cookie-banner__inner {
  max-width: 1280px; margin-inline: auto;
  display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;
  justify-content: space-between;
}
.cookie-banner__text { flex: 1 1 320px; font-size: 0.92rem; line-height: 1.5; }
.cookie-banner__text strong { color: var(--mj-dark); }
.cookie-banner__text p { margin: 0.3rem 0 0 0; }
.cookie-banner__text a { color: var(--mj-dark); text-decoration: underline; }
.cookie-banner__actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.cookie-banner__btn {
  border-radius: 99px;
  padding: 0.7rem 1.3rem;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  border: 1.5px solid var(--mj-primary);
  transition: background 0.15s, color 0.15s;
}
.cookie-banner__btn--accept {
  background: var(--mj-primary); color: #fff;
}
.cookie-banner__btn--accept:hover { background: var(--mj-dark); border-color: var(--mj-dark); }
.cookie-banner__btn--refuse {
  background: transparent; color: var(--mj-dark);
}
.cookie-banner__btn--refuse:hover { background: rgba(13,116,78,0.08); }
@media (max-width: 720px) {
  /* Décale le bandeau cookies au-dessus du sticky CTA mobile */
  .cookie-banner { bottom: 60px; }
}

/* ───── Mobile : tel visible dans le header (icône cliquable) + sticky CTA devis ───── */
.sticky-cta {
  display: none;
}
@media (max-width: 800px) {
  /* Sur mobile le .header__phone est caché par style.css (display:none).
     On compense en injectant une icône tel cliquable visible dans le header bar,
     accessible avant même d'ouvrir le burger. */
  .header__phone-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px; height: 42px;
    margin-right: 0.25rem;
    border-radius: 50%;
    background: rgba(41,182,130,0.12);
    color: var(--mj-dark);
    border: 1.5px solid var(--mj-primary);
    transition: background 0.15s;
  }
  .header__phone-mobile:hover,
  .header__phone-mobile:focus {
    background: var(--mj-primary);
    color: #fff;
  }
  .header__phone-mobile svg { width: 18px; height: 18px; }

  /* Sticky bas de page : "Demander un devis" plein largeur (action conversion) */
  .sticky-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 40;
    padding: 1rem 1.25rem;
    background: var(--mj-primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border: 0;
    border-radius: 0;
    cursor: pointer;
    box-shadow: 0 -4px 16px rgba(13,116,78,0.25);
  }
  .sticky-cta:hover,
  .sticky-cta:focus { background: var(--mj-dark); color: #fff; }
  /* FAB tel masqué sur mobile (l'icône tel header + le numéro dans le burger suffisent — pas besoin de 3 actions tel) */
  .fab { display: none; }
}

/* Sur desktop, .header__phone-mobile est inutile */
.header__phone-mobile { display: none; }

/* ───── Hero amélioré — fond crème teinté ────────────────────────────── */
.home-hero {
  background: linear-gradient(180deg, #FAFAF7 0%, #ECF8F3 100%);
}
.home-hero h1 {
  color: var(--mj-dark);
}

/* ───── Theme-color meta (mobile bar) — déjà géré dans config.php BRAND_GREEN */

/* ───── Box-shadows : remplacement des rgba(218,41,28,…) en dur dans style.css ───── */
.eeat-card::before {
  box-shadow: 0 4px 12px rgba(41, 182, 130, 0.28);
}
.eeat-card:hover::before {
  box-shadow: 0 6px 20px rgba(13, 116, 78, 0.45);
}
.sticky-tel {
  box-shadow: 0 -4px 16px rgba(41, 182, 130, 0.30);
}

/* ───── Chantier card (réalisations) — re-tinter les fallbacks ──────── */
.chantier-card .chantier-card__cta,
.chantier-card__cta {
  background: var(--mj-primary);
  color: #fff;
  border-color: var(--mj-primary);
}
.chantier-card .chantier-card__cta:hover,
.chantier-card__cta:hover {
  background: var(--mj-dark);
  border-color: var(--mj-dark);
}
