/**
 * comkuate-patches.css — Correctifs globaux Comkuate
 * Architecture "thème enfant" : toute correction ici, jamais inline.
 * Injecté via <link> dans les 25 pages HTML.
 * Versionné : v1.0 — 2026-03
 */

/* ═══════════════════════════════════════════════════════════
   1. MENU OVERLAY — Fond toujours sombre, texte blanc
   Surcharge le fond crème du mode clair + le bouton "Fermer"
   ═══════════════════════════════════════════════════════════ */

/* Fond toujours sombre (dark green) quelle que soit le thème */
.menu-overlay {
  background: rgba(11, 22, 16, .97) !important;
}

/* Logo blanc dans l'overlay */
.mo-logo-svg {
  fill: #fff !important;
  color: #fff !important;
}

/* Liens de navigation — toujours blancs */
.mo-link {
  color: #fff !important;
}
.mo-link span:nth-child(2) {
  color: #fff !important;
}
.mo-link:hover,
.menu-overlay.open .mo-link:hover {
  color: var(--orange) !important;
}

/* Numéros 01-05 — orange */
.mo-idx {
  color: var(--orange) !important;
}

/* Description à droite du lien — blanc semi-transparent */
.mo-link-sub {
  color: rgba(255, 255, 255, .42) !important;
}

/* Séparateurs entre liens — blanc discret */
.mo-nav-item {
  border-color: rgba(255, 255, 255, .07) !important;
}

/* Bouton FERMER — texte simple, sans bordure ni fond */
.mo-close {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  gap: 10px !important;
}
.mo-close-label {
  font-family: var(--fu) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: .1em !important;
  text-transform: uppercase !important;
  color: rgba(255, 255, 255, .7) !important;
}
.mo-close-x span {
  background: rgba(255, 255, 255, .7) !important;
}
.mo-close:hover .mo-close-label {
  color: #fff !important;
}
.mo-close:hover .mo-close-x span {
  background: #fff !important;
}

/* Header de l'overlay */
.mo-header {
  border-color: rgba(255, 255, 255, .08) !important;
}

/* Colonne sociale gauche */
.mo-social {
  border-color: rgba(255, 255, 255, .07) !important;
}
.mo-social-links a {
  color: rgba(255, 255, 255, .45) !important;
}
.mo-social-links a:hover {
  color: var(--orange) !important;
}

/* Colonne droite (Map, profil, contact) */
.mo-right {
  border-color: rgba(255, 255, 255, .07) !important;
  border-top-color: rgba(255, 255, 255, .07) !important;
}
.mo-map {
  filter: invert(.88) hue-rotate(180deg) saturate(.9) !important;
  border-color: rgba(255, 255, 255, .1) !important;
}
.mo-contact-lbl {
  color: var(--orange) !important;
}
.mo-contact-val,
.mo-contact-val a {
  color: rgba(255, 255, 255, .6) !important;
}
.mo-contact-val a:hover {
  color: #fff !important;
}
.mo-profile-card {
  background: rgba(255, 255, 255, .07) !important;
  border-color: rgba(255, 255, 255, .1) !important;
}
.mo-profile-card .fav-name {
  color: #fff !important;
}
.mo-profile-card .fav-role {
  color: rgba(255, 255, 255, .5) !important;
}
.mo-profile-card .fav-img {
  border-color: rgba(232, 96, 26, .45) !important;
}

/* Footer de l'overlay (copyright + horaires) */
.mo-footer {
  border-color: rgba(255, 255, 255, .07) !important;
  color: rgba(255, 255, 255, .35) !important;
}
.mo-footer a {
  color: rgba(255, 255, 255, .35) !important;
}
.mo-footer a:hover {
  color: rgba(255, 255, 255, .7) !important;
}

/* Lignes de grille décoratives */
.mo-grid-line {
  background: rgba(255, 255, 255, .03) !important;
}

/* Textes dans le widget météo de l'overlay */
.mo-body .wdgt {
  background: rgba(255, 255, 255, .05) !important;
  border-color: rgba(255, 255, 255, .1) !important;
}
.mo-body .wdgt-city,
.mo-body .wdgt-sv,
.mo-body .wdgt-temp {
  color: #fff !important;
}
.mo-body .wdgt-sl,
.mo-body .wdgt-desc {
  color: rgba(255, 255, 255, .5) !important;
}


/* ═══════════════════════════════════════════════════════════
   5. NAV MOBILE — Toggle pill glassmorphism + layout pleine largeur
   Reproduit nav-mobile-v1 sur pages principales (sans ce patch body)
   Renforce dark mode via #mainNav (spécificité > nav-dark-v1)
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  /* Nav-actions occupe toute la largeur + répartition space-between */
  .nav-actions {
    flex: 1 !important;
    justify-content: space-between !important;
    background: transparent !important;
    border: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 0 !important;
    gap: 6px !important;
  }
  /* Toggle glassmorphism pill */
  .nav-actions .theme-toggle {
    background: rgba(26, 50, 40, .07) !important;
    border: 1px solid rgba(26, 50, 40, .11) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    padding: 3px !important;
    border-radius: 100px !important;
  }
  /* Dark mode — #mainNav donne spécificité 1,2,0 > nav-dark-v1 (0,3,0) */
  [data-theme="dark"] #mainNav .nav-actions {
    background: transparent !important;
    border: none !important;
  }
  [data-theme="dark"] #mainNav .nav-actions .theme-toggle {
    background: rgba(255, 255, 255, .06) !important;
    border-color: rgba(255, 255, 255, .1) !important;
  }
}


/* ═══════════════════════════════════════════════════════════
   2. HEADER MOBILE — Nav compacte sur petits écrans
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
  /* Supprimer les séparateurs dans la nav */
  .nav-actions-sep {
    display: none !important;
  }

  /* Cacher le label "Menu" — spécificité élevée pour écraser nav-hamburger-v1 */
  .nav .menu-btn-label {
    display: none !important;
  }

  /* Theme toggle compact sur mobile */
  .theme-toggle {
    gap: 1px !important;
    padding: 2px !important;
  }
  .theme-btn {
    width: 26px !important;
    height: 26px !important;
  }

  /* Espacement compact */
  .nav-actions {
    gap: 8px !important;
  }

  /* Bouton "Projet" plus compact */
  .btn-nav {
    padding: 9px 16px !important;
    font-size: 12px !important;
  }

  /* Bouton Diagnostic (marketing-automation) — même largeur que btn-g/btn-o */
  .btn-diag {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Nav padding réduit */
  .nav {
    padding: 10px 18px !important;
  }
}


/* ═══════════════════════════════════════════════════════════
   3. FOOTER — Dégagements boutons flottants + mobile
   padding-left : bouton ⓘ cookies (left:32px, symétrique au back-to-top)
   ═══════════════════════════════════════════════════════════ */

/* Miroir du padding-right:72px (back-to-top) déjà défini par page */
.fbot {
  padding-left: 72px !important;
}

@media (max-width: 767px) {
  /* Masquer les liens tel/email dans ftop (déjà dans les fmob-btn) */
  .fcr {
    display: none !important;
  }

  /* Masquer le wordmark footer — icône seule suffit sur mobile */
  footer .footer-logo-svg {
    display: none !important;
  }

  /* Centrer le contenu de la 1re colonne footer */
  footer .ftop > div:first-child {
    text-align: center !important;
  }
  .ftag {
    text-align: center !important;
    max-width: 100% !important;
  }
  .fmob-addr {
    justify-content: center !important;
  }

  /* Masquer AGENCE et SUIVRE sur mobile (trop long, peu prioritaire) */
  .ftop > div:nth-child(4),
  .ftop > div:nth-child(5) {
    display: none !important;
  }

  /* Réorganiser : weather widget en dernier */
  .f-wdgt-col {
    order: 10 !important;
  }

  /* Espacements footer mobile */
  footer {
    padding: 0 0 20px !important;
  }
  .ftop {
    padding: 24px 20px 24px !important;
    gap: 24px !important;
  }
  .fbot {
    padding: 16px 20px !important;
  }

  /* Marges égales autour des boutons fmob-cta et du widget météo */
  .fmob-cta {
    padding: 30px 20px 0 !important;
    gap: 12px !important;
  }
  .f-wdgt-col {
    padding: 0 20px !important;
  }
  .f-wdgt-col .wdgt {
    width: 100% !important;
    min-height: auto !important;
    border-radius: var(--r) !important;
  }
}



/* ═══════════════════════════════════════════════════════════
   6. MENU OVERLAY MOBILE — Layout vertical + social horizontal
   Override landing pages (display:none) + social links après nav
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
  /* Layout vertical de l'overlay body */
  .mo-body {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    overflow-y: auto !important;
  }

  /* Ordre : nav (01-05) → social horizontal → right (map/contact) */
  .mo-nav  { order: 1 !important; }
  .mo-social {
    display: flex !important;
    order: 2 !important;
    border: none !important;
    padding: 12px 0 !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  /* Liens Instagram / LinkedIn / Behance en ligne + texte horizontal */
  .mo-social-links {
    flex-direction: row !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    padding: 0 24px !important;
  }
  .mo-social-links a {
    writing-mode: horizontal-tb !important;
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    font-size: 11px !important;
    letter-spacing: .06em !important;
    padding: 8px 14px !important;
    border-radius: 100px !important;
    border: 1px solid rgba(255,255,255,.14) !important;
    background: rgba(255,255,255,.06) !important;
  }
  .mo-social-links a svg { flex-shrink: 0; }
  .mo-right {
    display: flex !important;
    order: 3 !important;
  }
}


/* ═══════════════════════════════════════════════════════════
   4. DARK MODE — Overrides nav overlay (déjà géré par section 1)
   Conserver pour compatibilité avec patches inline existants
   ═══════════════════════════════════════════════════════════ */

/* La section 1 ci-dessus couvre tous les cas dark + light */
/* Ces règles assurent la compatibilité descendante */
[data-theme="dark"] .menu-overlay {
  background: rgba(11, 22, 16, .97) !important;
}
[data-theme="dark"] .mo-link {
  color: #fff !important;
}
[data-theme="dark"] .mo-link span:nth-child(2) {
  color: #fff !important;
}


/* ═══════════════════════════════════════════════════════════
   7. NAV DROPDOWN SERVICES — Glassmorphism desktop uniquement
   ═══════════════════════════════════════════════════════════ */

.nav-has-dd { position: relative; }

/* Pont invisible : maintient le :hover du <li> pendant que la souris
   traverse le gap entre le lien nav et le panneau (.nav-dd) */
.nav-has-dd::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 24px; /* couvre le gap de top: calc(100% + 18px) */
  display: none;
  z-index: 499;
}
.nav-has-dd:hover::after { display: block; }

/* Chevron après "Services" */
.nav-has-dd > a::after {
  content: '';
  display: inline-block;
  margin-left: 4px;
  width: 0; height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid currentColor;
  vertical-align: middle;
  opacity: .55;
  transition: transform .2s, opacity .2s;
}
.nav-has-dd:hover > a::after { transform: rotate(180deg); opacity: .9; }

/* Panneau glassmorphism */
.nav-dd {
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  width: 500px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(26, 50, 40, .1);
  border-radius: 20px;
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease .15s, transform .2s ease .15s; /* délai 150ms à la fermeture — évite le gap hover */
  box-shadow: 0 20px 60px rgba(0,0,0,.13), 0 4px 12px rgba(0,0,0,.06);
  z-index: 500;
}
[data-theme="dark"] .nav-dd {
  background: rgba(11, 22, 16, .93);
  border-color: rgba(255, 255, 255, .1);
}

/* Affichage au survol / focus */
.nav-has-dd:hover .nav-dd,
.nav-has-dd:focus-within .nav-dd {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
  transition: opacity .15s ease, transform .15s ease; /* pas de délai à l'ouverture */
}

/* Item */
.nav-dd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 13px;
  text-decoration: none;
  transition: background .18s;
}
.nav-dd-item:hover { background: rgba(26, 50, 40, .06); }
[data-theme="dark"] .nav-dd-item:hover { background: rgba(255, 255, 255, .07); }

/* Icône */
.nav-dd-icon {
  width: 36px; height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(26, 50, 40, .08);
  display: flex; align-items: center; justify-content: center;
  color: var(--green);
  transition: background .18s, color .18s;
}
[data-theme="dark"] .nav-dd-icon { background: rgba(255,255,255,.09); color: rgba(232,228,219,.8); }
.nav-dd-item:hover .nav-dd-icon { background: var(--orange); color: #fff; }

/* Texte */
.nav-dd-txt { display: flex; flex-direction: column; gap: 2px; }
.nav-dd-txt strong {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 13px; font-weight: 700;
  color: var(--green); line-height: 1.2;
}
[data-theme="dark"] .nav-dd-txt strong { color: rgba(232,228,219,.92); }
.nav-dd-txt span {
  font-family: 'DM Sans', sans-serif;
  font-size: 11.5px;
  color: rgba(26, 50, 40, .5); line-height: 1.3;
}
[data-theme="dark"] .nav-dd-txt span { color: rgba(232,228,219,.45); }

/* Dropdown Blog — colonne unique compacte */
.nav-dd-blog {
  width: 290px;
  grid-template-columns: 1fr;
}

/* Masqué sur mobile — le menu overlay gère les landing pages */
@media (max-width: 1024px) {
  .nav-dd { display: none !important; }
  .nav-has-dd > a::after { display: none; }
}


/* ═══════════════════════════════════════════════════════════
   8. DIAGNOSTIC POPUP — Masquer panneau gauche sur mobile
   Le panneau stats (.tf-left) s'empile en haut et bloque le form
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
  .tf-wrap .tf-left { display: none !important; }
}


/* ═══════════════════════════════════════════════════════════
   10. NAV — Indicateur page active : soulignement droit
   Remplace le pilule/point par un underline pleine largeur
   ═══════════════════════════════════════════════════════════ */

.nav-links a[aria-current="page"]::after {
  content: '' !important;
  display: block !important;
  position: absolute !important;
  bottom: -2px !important;
  left: 0 !important;
  right: 0 !important;
  width: auto !important;
  height: 2px !important;
  background: var(--orange) !important;
  border-radius: 0 !important;
  border: none !important;
  margin: 0 !important;
  opacity: 1 !important;
  transform: none !important;
  vertical-align: unset !important;
}


/* ═══════════════════════════════════════════════════════════
   11. ARTICLES BLOG — Auteur masqué en mobile
   Sur mobile la sidebar empile sous l'article : auteur hors-contexte
   Le CTA newsletter reste visible
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .art-sidebar .art-author { display: none !important; }
}


/* ═══════════════════════════════════════════════════════════
   12. CARDS ARTICLES — Toute la carte cliquable (pas juste "Lire →")
   Pseudo-élément overlay sur a.cc-read couvre toute la carte .cc
   ═══════════════════════════════════════════════════════════ */

.cc { position: relative; }
.cc .cc-read { position: relative; z-index: 1; }
.cc .cc-read::after {
  content: '';
  position: absolute;
  inset: 0;           /* couvre la carte .cc entière (grâce à position:relative) */
  z-index: 0;
  cursor: pointer;
}


/* ═══════════════════════════════════════════════════════════
   9. SOMMAIRE ARTICLES — État actif + hover (JS: toc-nav-v1)
   ═══════════════════════════════════════════════════════════ */

.toc-card .ls .li {
  transition: background .15s, color .15s;
  border-radius: 8px;
  padding: 5px 8px !important;
  margin: 0 -8px;
  cursor: default;
}
.toc-card .ls .li[role="link"] {
  cursor: pointer;
}
.toc-card .ls .li[role="link"]:hover {
  background: rgba(26,50,40,.06);
}
.toc-card .ls .li[role="link"]:hover .ltit {
  color: var(--text) !important;
}
.toc-card .ls .li.toc-active {
  background: rgba(232,96,26,.09) !important;
}
.toc-card .ls .li.toc-active .lnum {
  color: var(--orange) !important;
}
.toc-card .ls .li.toc-active .ltit {
  color: var(--text) !important;
  font-weight: 700 !important;
}
[data-theme="dark"] .toc-card .ls .li[role="link"]:hover {
  background: rgba(255,255,255,.05);
}
[data-theme="dark"] .toc-card .ls .li.toc-active {
  background: rgba(232,96,26,.14) !important;
}
