/*
Theme Name:   MBR35 Child Theme
Theme URI:    https://mbr35.fr
Description:  Child theme de Hello Elementor pour la coopérative MBR35
Author:       MBR35
Template:     hello-elementor
Version:      1.0.0
Text Domain:  mbr35-child
*/

/* ============================================================
   VARIABLES GLOBALES — modifier ici pour changer tout le site
   ============================================================ */

:root {
  /* POLICE — changer uniquement cette ligne pour modifier toute la typo */
  --mbr-font-family: 'Roboto', sans-serif;

  /* COULEURS PRINCIPALES */
  --mbr-blue-dark:   #0E4A6E;   /* Fond footer, sections sombres */
  --mbr-blue-mid:    #1B5E8C;   /* Sections intermédiaires, fonds colorés */
  --mbr-green:       #6DBF44;   /* Boutons CTA, accents, icônes flèches */
  --mbr-green-dark:  #4A9F2E;   /* Hover boutons, liens actifs */

  /* COULEURS NEUTRES */
  --mbr-white:       #FFFFFF;
  --mbr-text:        #222222;   /* Corps de texte */
  --mbr-text-light:  #555555;   /* Texte secondaire */
  --mbr-bg-light:    #F7F7F7;   /* Fond sections claires */
  --mbr-border:      #E0E0E0;   /* Bordures légères */

  /* TYPOGRAPHIE */
  --mbr-size-h1:     2.5rem;
  --mbr-size-h2:     2rem;
  --mbr-size-h3:     1.4rem;
  --mbr-size-body:   1rem;
  --mbr-size-small:  0.875rem;
  --mbr-line-height: 1.7;

  /* ESPACEMENTS */
  --mbr-section-padding: 80px 0;
  --mbr-container-max:   1200px;
  --mbr-radius:          8px;
  --mbr-radius-card:     12px;
}


/* ============================================================
   RESET & BASE
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--mbr-font-family);
  font-size: var(--mbr-size-body);
  color: var(--mbr-text);
  line-height: var(--mbr-line-height);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--mbr-font-family);
  font-weight: 700;
  line-height: 1.25;
  color: var(--mbr-text);
}

h1 { font-size: var(--mbr-size-h1); }
h2 { font-size: var(--mbr-size-h2); }
h3 { font-size: var(--mbr-size-h3); }

p { margin-bottom: 1rem; }

a {
  color: var(--mbr-green-dark);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: var(--mbr-green); }

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


/* ============================================================
   HEADER / NAVIGATION
   ============================================================ */

.site-header {
  background: var(--mbr-white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Logo */
.site-header .site-logo img {
  max-height: 55px;
  width: auto;
}

/* Liens de navigation */
.elementor-nav-menu a {
  font-family: var(--mbr-font-family);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--mbr-text);
  transition: color 0.2s ease;
}
.elementor-nav-menu a:hover,
.elementor-nav-menu .current-menu-item > a {
  color: var(--mbr-green-dark);
}

/* Bouton "Nous contacter" dans le nav */
.nav-btn-contact a,
.elementor-button.nav-contact {
  background-color: var(--mbr-green) !important;
  color: var(--mbr-white) !important;
  border-radius: 30px !important;
  padding: 10px 22px !important;
  font-weight: 600 !important;
  transition: background-color 0.2s ease !important;
}
.nav-btn-contact a:hover,
.elementor-button.nav-contact:hover {
  background-color: var(--mbr-green-dark) !important;
}


/* ============================================================
   HERO / BANNER
   ============================================================ */

.mbr-hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.mbr-hero .hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(14, 74, 110, 0.45);
}

.mbr-hero .hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--mbr-white);
}


/* ============================================================
   SECTIONS GÉNÉRALES
   ============================================================ */

.elementor-section,
.e-container {
  max-width: var(--mbr-container-max);
}

/* Section fond bleu foncé (footer, sections colorées) */
.mbr-section-dark,
.elementor-section.mbr-bg-dark {
  background-color: var(--mbr-blue-dark);
  color: var(--mbr-white);
}
.mbr-section-dark h2,
.mbr-section-dark h3,
.mbr-section-dark p,
.elementor-section.mbr-bg-dark h2,
.elementor-section.mbr-bg-dark p {
  color: var(--mbr-white);
}

/* Section fond bleu moyen */
.mbr-section-mid {
  background-color: var(--mbr-blue-mid);
  color: var(--mbr-white);
}

/* Section fond gris clair */
.mbr-section-light {
  background-color: var(--mbr-bg-light);
}


/* ============================================================
   BOUTONS
   ============================================================ */

.elementor-button,
.wp-block-button__link,
button,
input[type="submit"] {
  font-family: var(--mbr-font-family) !important;
  border-radius: var(--mbr-radius) !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
}

/* Bouton primaire (vert) */
.elementor-button-primary,
.mbr-btn-primary {
  background-color: var(--mbr-green) !important;
  color: var(--mbr-white) !important;
  border: none !important;
}
.elementor-button-primary:hover,
.mbr-btn-primary:hover {
  background-color: var(--mbr-green-dark) !important;
}

/* Bouton secondaire (contour blanc) */
.mbr-btn-outline {
  background: transparent !important;
  border: 2px solid var(--mbr-white) !important;
  color: var(--mbr-white) !important;
  border-radius: 30px !important;
}
.mbr-btn-outline:hover {
  background: var(--mbr-white) !important;
  color: var(--mbr-blue-dark) !important;
}

/* Lien "Découvrir MBR →" */
.mbr-link-arrow {
  color: var(--mbr-green-dark);
  font-weight: 500;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease;
}
.mbr-link-arrow:hover { gap: 10px; }


/* ============================================================
   CARDS — Nos services, Actualités, Pôles métiers
   ============================================================ */

.mbr-card {
  background: var(--mbr-white);
  border-radius: var(--mbr-radius-card);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.mbr-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.mbr-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* Cards pôles métiers (fond bleu, texte blanc sur l'image) */
.mbr-card-pole {
  position: relative;
  border-radius: var(--mbr-radius-card);
  overflow: hidden;
  aspect-ratio: 1;
}
.mbr-card-pole img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.mbr-card-pole:hover img { transform: scale(1.05); }

.mbr-card-pole .pole-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(14, 74, 110, 0.85));
  color: var(--mbr-white);
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  padding: 20px 10px 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Cards services (fond bleu foncé arrondi) */
.mbr-card-service {
  background: var(--mbr-blue-dark);
  border-radius: var(--mbr-radius-card);
  overflow: hidden;
  color: var(--mbr-white);
  text-align: center;
}
.mbr-card-service img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.mbr-card-service .service-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 14px 16px 6px;
  color: var(--mbr-white);
}
.mbr-card-service .service-text {
  font-size: 0.875rem;
  padding: 0 16px 20px;
  color: rgba(255,255,255,0.85);
  line-height: 1.6;
}


/* ============================================================
   CHIFFRES CLÉS (174 artisans, 37 salariés…)
   ============================================================ */

.mbr-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  padding: 40px 20px;
}

.mbr-stat-item {
  text-align: center;
}

.mbr-stat-number {
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--mbr-green);
  line-height: 1;
  font-family: var(--mbr-font-family);
}

.mbr-stat-label {
  font-size: 0.9rem;
  color: var(--mbr-text-light);
  margin-top: 6px;
}


/* ============================================================
   TIMELINE — Page Historique
   ============================================================ */

.mbr-timeline {
  position: relative;
  padding-left: 40px;
}

.mbr-timeline::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--mbr-green);
  border-radius: 2px;
}

.mbr-timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 30px;
  margin-bottom: 50px;
  align-items: start;
}

.mbr-timeline-item::before {
  content: '';
  position: absolute;
  left: -34px;
  top: 10px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--mbr-green);
  border: 3px solid var(--mbr-white);
  box-shadow: 0 0 0 2px var(--mbr-green);
}

.mbr-timeline-year {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--mbr-text);
}

.mbr-timeline-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--mbr-green-dark);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.mbr-timeline-text {
  font-size: 0.9rem;
  color: var(--mbr-text-light);
  line-height: 1.7;
}


/* ============================================================
   ICÔNES FLÈCHES (→ verts sur la maquette)
   ============================================================ */

.mbr-arrow-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--mbr-green);
  border-radius: 50%;
  color: var(--mbr-white);
  font-size: 0.9rem;
  margin-right: 10px;
  flex-shrink: 0;
}


/* ============================================================
   FORMULAIRE DE CONTACT
   ============================================================ */

.mbr-form input,
.mbr-form textarea,
.mbr-form select,
.wpcf7-form input,
.wpcf7-form textarea,
.wpforms-field input,
.wpforms-field textarea {
  font-family: var(--mbr-font-family) !important;
  border: 1px solid var(--mbr-border) !important;
  border-radius: var(--mbr-radius) !important;
  padding: 12px 16px !important;
  font-size: var(--mbr-size-body) !important;
  width: 100% !important;
  transition: border-color 0.2s ease !important;
  background: var(--mbr-white) !important;
}

.mbr-form input:focus,
.mbr-form textarea:focus,
.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
  outline: none !important;
  border-color: var(--mbr-blue-mid) !important;
  box-shadow: 0 0 0 3px rgba(27,94,140,0.1) !important;
}

.mbr-form label,
.wpcf7-form label,
.wpforms-field-label {
  font-family: var(--mbr-font-family) !important;
  font-weight: 500 !important;
  font-size: 0.9rem !important;
  color: var(--mbr-text) !important;
  margin-bottom: 6px !important;
  display: block !important;
}

.mbr-form .submit-btn,
.wpcf7-submit,
.wpforms-submit {
  background: var(--mbr-text) !important;
  color: var(--mbr-white) !important;
  border: none !important;
  border-radius: 30px !important;
  padding: 14px 40px !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: background 0.2s ease !important;
  width: 100% !important;
}
.mbr-form .submit-btn:hover,
.wpcf7-submit:hover,
.wpforms-submit:hover {
  background: var(--mbr-blue-dark) !important;
}


/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background-color: var(--mbr-blue-dark);
  color: var(--mbr-white);
  padding: 50px 0 30px;
}

.site-footer a {
  color: var(--mbr-white);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: underline;
  transition: opacity 0.2s ease;
}
.site-footer a:hover { opacity: 0.75; }

.site-footer .footer-logo img {
  max-height: 60px;
  width: auto;
}

.footer-nav-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--mbr-white);
  margin-bottom: 12px;
}

/* Icônes réseaux sociaux dans le footer */
.footer-social {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: var(--mbr-white);
  text-decoration: none;
  font-size: 1.1rem;
  transition: background 0.2s ease;
}
.footer-social a:hover {
  background: rgba(255,255,255,0.3);
  opacity: 1;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  :root {
    --mbr-size-h1: 2rem;
    --mbr-size-h2: 1.6rem;
  }
}

@media (max-width: 768px) {
  :root {
    --mbr-size-h1: 1.75rem;
    --mbr-size-h2: 1.4rem;
    --mbr-section-padding: 50px 0;
  }

  .mbr-timeline-item {
    grid-template-columns: 1fr;
  }

  .mbr-stats {
    gap: 24px;
  }

  .mbr-stat-number {
    font-size: 2.5rem;
  }
}

@media (max-width: 480px) {
  :root {
    --mbr-size-h1: 1.5rem;
    --mbr-size-h2: 1.25rem;
  }
}
