/* ==========================================================================
   AFECCAV — Design system (association académique)
   ========================================================================== */

:root {
  /* Couleur mère — bleu unique AFECCAV */
  --afeccav-blue: #202f5b;
  --afeccav-blue-dark: #182448;
  --afeccav-blue-mid: #2a3d6e;
  --afeccav-blue-light: #3d5285;
  --afeccav-blue-soft: #e8ebf2;
  --afeccav-blue-faint: #f2f4f8;

  /* Alias rétrocompat (même teinte) */
  --afeccav-navy: var(--afeccav-blue);
  --afeccav-navy-mid: var(--afeccav-blue);

  --afeccav-ice: #f3f4f8;
  --afeccav-surface: #ffffff;
  --afeccav-border: #cdd2de;
  --afeccav-border-soft: #e2e6ee;
  --afeccav-muted: #5c6478;
  --afeccav-text: #2c3448;
  --afeccav-gutter: clamp(1rem, 3vw, 3.125rem);

  /* Police mère — Montserrat unique */
  --afeccav-font: 'Montserrat', sans-serif;
  --afeccav-font-weight-light: 300;
  --afeccav-font-weight-regular: 400;
  --afeccav-font-weight-medium: 500;
  --afeccav-font-weight-semibold: 600;
  --afeccav-font-weight-bold: 700;
  --afeccav-font-weight-extrabold: 800;

  /* Alias rétrocompat (même famille) */
  --afeccav-font-display: var(--afeccav-font);

  --afeccav-radius: 6px;
  --afeccav-shadow: 0 4px 24px rgba(32, 47, 91, 0.08);
  --afeccav-header-brand-h: clamp(4.5rem, 11vw, 6.5rem);
}

body.afeccav-brand {
  color: var(--afeccav-text);
  font-family: var(--afeccav-font) !important;
}

/* Harmonise les polices héritées du thème (Work Sans, Poppins…) */
body.afeccav-brand .navbar-wp .dropdown-menu > li > a,
body.afeccav-brand .site-title,
body.afeccav-brand .entry-title,
body.afeccav-brand .mg-blog-post-box h1,
body.afeccav-brand .mg-blog-post-box h2,
body.afeccav-brand .mg-blog-post-box h3,
body.afeccav-brand .mg-blog-post-box h4,
body.afeccav-brand .mg-sec-title h4,
body.afeccav-brand .widget-title,
body.afeccav-brand button,
body.afeccav-brand input,
body.afeccav-brand select,
body.afeccav-brand textarea {
  font-family: var(--afeccav-font) !important;
}

/* —— Barre utilitaire —— */

body.afeccav-brand .mg-headwidget .mg-head-detail,
body.afeccav-brand .afeccav-head-detail {
  background: var(--afeccav-navy) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.35rem 0;
}

body.afeccav-brand .mg-head-detail .info-left li,
body.afeccav-brand .mg-head-detail .info-left li a,
body.afeccav-brand .mg-head-detail .info-left li span.time {
  font-size: 0.78rem !important;
  font-weight: 500;
  letter-spacing: 0.02em;
}

body.afeccav-brand .mg-head-detail .info-left li span.time {
  background: rgba(32, 47, 91, 0.35) !important;
  border-radius: 3px;
  padding: 0.15rem 0.45rem !important;
}

body.afeccav-brand .container-fluid {
  padding-left: var(--afeccav-gutter);
  padding-right: var(--afeccav-gutter);
}

/* —— Navigation (fallback si header inline non actif) —— */

body.afeccav-brand:not(.afeccav-header-inline) .mg-menu-full {
  box-shadow: 0 4px 16px rgba(32, 47, 91, 0.12);
}

body.afeccav-brand:not(.afeccav-header-inline) .mg-headwidget .navbar-wp {
  background: var(--afeccav-navy-mid) !important;
  min-height: 3rem;
}

body.afeccav-brand:not(.afeccav-header-inline) .mg-nav-widget-area-back {
  background-position: center 40% !important;
  background-size: cover !important;
}

body.afeccav-brand:not(.afeccav-header-inline) .mg-nav-widget-area-back .inner {
  padding: 1.1rem 0 !important;
  min-height: var(--afeccav-header-brand-h);
  display: flex;
  align-items: center;
}

body.afeccav-brand:not(.afeccav-header-inline) .mg-nav-widget-area-back .overlay .inner {
  background: linear-gradient(
    105deg,
    rgba(32, 47, 91, 0.94) 0%,
    rgba(32, 47, 91, 0.82) 42%,
    rgba(32, 47, 91, 0.55) 100%
  ) !important;
}

body.afeccav-brand:not(.afeccav-header-inline) .mg-nav-widget-area .navbar-header .site-description {
  font-size: 0.88rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 400;
  max-width: 28rem;
}

body.afeccav-brand:not(.afeccav-header-inline) .mg-headwidget .navbar-wp .navbar-nav > li > a {
  font-family: var(--afeccav-font);
  font-size: 0.78rem !important;
  font-weight: var(--afeccav-font-weight-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82) !important;
  padding: 0.85rem 1.1rem !important;
  line-height: 1.4 !important;
  border-bottom: 3px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

body.afeccav-brand:not(.afeccav-header-inline) .mg-headwidget .navbar-wp .navbar-nav > li > a:hover,
body.afeccav-brand:not(.afeccav-header-inline) .mg-headwidget .navbar-wp .navbar-nav > li > a:focus {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border-bottom-color: rgba(255, 255, 255, 0.35);
}

body.afeccav-brand:not(.afeccav-header-inline) .mg-headwidget .navbar-wp .navbar-nav > .active > a,
body.afeccav-brand:not(.afeccav-header-inline) .mg-headwidget .navbar-wp .navbar-nav > .active > a:hover,
body.afeccav-brand:not(.afeccav-header-inline) .mg-headwidget .navbar-wp .navbar-nav > .active > a:focus {
  color: #fff !important;
  background: transparent !important;
  border-bottom-color: var(--afeccav-blue) !important;
}

body.afeccav-brand .mg-headwidget .navbar-wp .navbar-nav > li > a.homebtn span {
  font-size: 1rem;
}

body.afeccav-brand .mg-search-box .msearch,
body.afeccav-brand .btn-bell.btn-theme {
  color: rgba(255, 255, 255, 0.75) !important;
  opacity: 1;
}

body.afeccav-brand .mg-search-box .msearch:hover,
body.afeccav-brand .btn-bell.btn-theme:hover {
  color: #fff !important;
}

/* Masque la cloche newsletter si lien vide / placeholder */
body.afeccav-brand .btn-bell.btn-theme[href="#"],
body.afeccav-brand .btn-bell.btn-theme[href=""] {
  display: none !important;
}

/* —— Footer cohérent —— */

body.afeccav-brand footer .mg-footer-widget-area,
body.afeccav-brand footer .overlay {
  background-color: var(--afeccav-navy-mid) !important;
}

body.afeccav-brand footer .custom-logo-link,
body.afeccav-brand footer .custom-logo,
body.afeccav-brand footer .mg-footer-bottom-area a.navbar-brand,
body.afeccav-brand footer .mg-footer-bottom-area img.custom-logo {
  display: none !important;
}

@media (max-width: 991px) {
  body.afeccav-brand .mg-nav-widget-area .navbar-header {
    align-items: flex-start;
    text-align: left;
  }

  body.afeccav-brand .mg-headwidget .navbar-wp .navbar-nav > li > a {
    font-size: 0.82rem !important;
    border-bottom: 0;
    border-left: 3px solid transparent;
  }

  body.afeccav-brand .mg-headwidget .navbar-wp .navbar-nav > .active > a {
    border-left-color: var(--afeccav-blue);
  }
}

@media (max-width: 640px) {
  body.afeccav-brand {
    --afeccav-gutter: 1rem;
  }
}
