/* FOBAK V129.6.74 — Mobile Visual Fixes & Imperfections Correction
   Corrections visuelles ciblées: accueil mobile, carrousel, header public,
   responsables, boutons flottants, ticker, dashboard production/sécurité.
   CSS uniquement, pas de JS destructif, sélecteurs précis, tout accessible.
*/

/* ============================================================
   1. ACCUEIL MOBILE: SUPPRIMER GRAND ESPACE BLANC HEADER->CARROUSEL
   ============================================================ */
@media screen and (max-width: 860px) {
  .page-index.public-layout .home-premium-v129663 > .home-hero-carousel,
  .page-index.public-layout .home-premium-v129663 > .public-carousel-compact.home-hero-carousel {
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-radius: 0 0 20px 20px !important;
  }

  .page-index.public-layout .home-premium-v129663 > .home-hero-carousel {
    aspect-ratio: 4 / 3 !important;
    min-height: 280px !important;
  }
}

@media screen and (max-width: 480px) {
  .page-index.public-layout .home-premium-v129663 > .home-hero-carousel {
    aspect-ratio: 4 / 3 !important;
    min-height: 240px !important;
    border-radius: 0 0 18px 18px !important;
  }
}

/* ============================================================
   2. CARROUSEL: EMPÊCHER CHEVAUCHEMENT TEXTE, RÉDUIRE MOBILE, DOTS PETITS
   ============================================================ */
@media screen and (max-width: 860px) {
  .home-premium-hero .slide-message {
    position: absolute !important;
    bottom: 12px !important;
    left: 10px !important;
    right: 10px !important;
    padding: 12px 14px !important;
    border-radius: 12px !important;
    border-left: 3px solid #ffd21e !important;
    background: rgba(6, 25, 45, 0.88) !important;
    max-width: none !important;
  }

  .home-premium-hero .slide-message .slide-kicker {
    font-size: 0.75rem !important;
    opacity: 0.85 !important;
  }

  .home-premium-hero .slide-message strong {
    font-size: clamp(1.05rem, 2.8vw, 1.4rem) !important;
    line-height: 1.15 !important;
    margin: 4px 0 2px !important;
    text-wrap: balance !important;
  }

  .home-premium-hero .slide-message > span:last-child {
    font-size: 0.8rem !important;
    line-height: 1.3 !important;
    margin-top: 3px !important;
    opacity: 0.88 !important;
    max-height: 2.4em !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Dots beaucoup plus petits */
  .home-premium-hero .carousel-dots {
    gap: 4px !important;
    bottom: 8px !important;
  }

  .home-premium-hero .carousel-dots button {
    width: 6px !important;
    height: 6px !important;
  }

  .home-premium-hero .carousel-dots button.is-active {
    width: 16px !important;
    height: 6px !important;
    border-radius: 3px !important;
  }

  /* Contrôles discrets */
  .home-premium-hero .carousel-control {
    width: 36px !important;
    height: 36px !important;
    font-size: 16px !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
  }

  .home-premium-hero .carousel-control.prev {
    left: 8px !important;
  }

  .home-premium-hero .carousel-control.next {
    right: 8px !important;
  }
}

@media screen and (max-width: 480px) {
  .home-premium-hero .slide-message {
    bottom: 8px !important;
    left: 8px !important;
    right: 8px !important;
    padding: 10px 12px !important;
  }

  .home-premium-hero .slide-message strong {
    font-size: clamp(0.95rem, 2.4vw, 1.2rem) !important;
  }

  .home-premium-hero .carousel-control {
    width: 32px !important;
    height: 32px !important;
    font-size: 14px !important;
  }

  .home-premium-hero .carousel-dots button {
    width: 5px !important;
    height: 5px !important;
  }

  .home-premium-hero .carousel-dots button.is-active {
    width: 12px !important;
    height: 5px !important;
  }
}

/* ============================================================
   3. HEADER PUBLIC MOBILE: RÉDUIRE HAUTEUR, ÉVITER TEXTE TRONQUÉ
   ============================================================ */
@media screen and (max-width: 860px) {
  .site-header.public-header {
    padding: 5px 6px !important;
    gap: 4px !important;
    min-height: auto !important;
  }

  .site-header.public-header .brand-block {
    text-align: center !important;
    flex: 1 !important;
    min-width: 0 !important;
  }

  .site-header.public-header .brand-block strong {
    font-size: 11px !important;
    letter-spacing: 0.2px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .site-header.public-header .brand-block span {
    font-size: 8px !important;
    display: block !important;
    opacity: 0.85 !important;
  }

  .site-header.public-header .brand-block em {
    display: none !important;
  }

  .site-header.public-header .logo-box {
    width: 36px !important;
    height: 36px !important;
    flex-shrink: 0 !important;
  }

  .site-header.public-header .flag-mini {
    width: 44px !important;
    height: 28px !important;
    flex-shrink: 0 !important;
  }
}

@media screen and (max-width: 480px) {
  .site-header.public-header .brand-block strong {
    font-size: 10px !important;
  }

  .site-header.public-header .brand-block span {
    font-size: 7px !important;
  }

  .site-header.public-header .logo-box {
    width: 34px !important;
    height: 34px !important;
  }

  .site-header.public-header .flag-mini {
    width: 40px !important;
    height: 26px !important;
  }
}

/* ============================================================
   4. RESPONSABLES: CARTES COMPACTES, RÉDUIRE ESPACES BLANCS
   ============================================================ */
@media screen and (max-width: 860px) {
  .fobak-home-governance {
    padding: 22px 16px !important;
    width: calc(100% - 24px) !important;
    margin: 28px auto !important;
  }

  .fobak-home-governance-heading {
    gap: 10px !important;
    margin-bottom: 18px !important;
    padding-bottom: 14px !important;
  }

  .fobak-home-governance h2 {
    font-size: 1.3rem !important;
    margin: 4px 0 0 !important;
  }

  .fobak-home-governance p {
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
  }

  .fobak-president-intro {
    gap: 14px !important;
    margin: 16px 0 24px !important;
    padding: 16px !important;
    border-radius: 14px !important;
  }

  .fobak-president-visual {
    flex-direction: row !important;
    gap: 10px !important;
  }

  .fobak-president-intro-photo {
    width: 100px !important;
    height: 125px !important;
    border-radius: 10px !important;
    border: 2px solid #fff !important;
  }

  .fobak-leader-logo-space {
    width: 40px !important;
    height: 40px !important;
    flex-shrink: 0 !important;
  }

  .fobak-leader-logo-space img {
    width: 100% !important;
    height: 100% !important;
  }

  .fobak-president-copy h2 {
    font-size: 1.15rem !important;
    margin: 4px 0 2px !important;
  }

  .fobak-president-copy strong {
    font-size: 0.85rem !important;
    margin-bottom: 8px !important;
  }

  .fobak-president-copy p {
    font-size: 0.85rem !important;
    line-height: 1.5 !important;
    margin: 8px 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  .fobak-leadership-order {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    margin-top: 16px !important;
  }

  .fobak-leadership-card {
    padding: 14px !important;
    border-radius: 14px !important;
  }

  .fobak-leader-visual {
    gap: 8px !important;
    margin-bottom: 10px !important;
  }

  .fobak-leadership-photo {
    width: 110px !important;
    height: 110px !important;
    border-radius: 12px !important;
    border: 2px solid rgba(11, 66, 195, 0.2) !important;
  }

  .fobak-leadership-body h3 {
    font-size: 1rem !important;
    margin: 6px 0 2px !important;
  }

  .fobak-leadership-body strong {
    font-size: 0.8rem !important;
    margin-bottom: 6px !important;
  }

  .fobak-leadership-body p {
    font-size: 0.8rem !important;
    line-height: 1.4 !important;
    margin: 6px 0 8px !important;
    -webkit-line-clamp: 3 !important;
  }

  .fobak-leadership-body a {
    font-size: 0.8rem !important;
  }
}

@media screen and (max-width: 480px) {
  .fobak-leadership-order {
    grid-template-columns: 1fr !important;
  }

  .fobak-president-intro {
    grid-template-columns: 1fr !important;
  }

  .fobak-president-visual {
    flex-direction: column !important;
    gap: 8px !important;
    align-items: center !important;
  }

  .fobak-president-intro-photo {
    width: 90px !important;
    height: 115px !important;
  }
}

/* ============================================================
   5. BOUTONS FLOTTANTS: ÉVITER CHEVAUCHEMENT, POSITIONS DISTINCTES
   ============================================================ */
.floating-help {
  position: fixed !important;
  bottom: 18px !important;
  right: 14px !important;
  z-index: 200 !important;
  width: 50px !important;
  height: 50px !important;
  border-radius: 50% !important;
  display: grid !important;
  place-items: center !important;
  font-size: 24px !important;
  background: #0b66c3 !important;
  color: #fff !important;
  box-shadow: 0 8px 24px rgba(11, 102, 195, 0.3) !important;
  text-decoration: none !important;
  transition: 0.3s ease !important;
}

.floating-help:hover {
  transform: scale(1.1) !important;
  box-shadow: 0 12px 32px rgba(11, 102, 195, 0.4) !important;
}

.floating-help span {
  display: none !important;
}

/* Autre bouton flottant (si présent): différente position */
.install-pwa-button {
  position: fixed !important;
  bottom: 18px !important;
  right: 74px !important;
  z-index: 200 !important;
}

@media screen and (max-width: 480px) {
  .floating-help {
    bottom: 14px !important;
    right: 10px !important;
    width: 46px !important;
    height: 46px !important;
    font-size: 20px !important;
  }

  .install-pwa-button {
    right: 64px !important;
  }
}

/* ============================================================
   6. BARRE COMMUNIQUÉS: RÉDUIRE HAUTEUR MOBILE
   ============================================================ */
@media screen and (max-width: 860px) {
  .communique-ticker {
    height: auto !important;
    min-height: 24px !important;
    max-height: 24px !important;
    padding: 0 8px !important;
    font-size: 12px !important;
  }

  .ticker-track {
    font-size: 12px !important;
  }

  .ticker-track span {
    padding-left: 100% !important;
  }

  body.public-layout.has-ticker,
  body.admin-layout.has-ticker {
    padding-bottom: 24px !important;
  }

  .workspace-content.has-ticker,
  .public-content.has-ticker {
    padding-bottom: 24px !important;
  }
}

@media screen and (max-width: 480px) {
  .communique-ticker {
    min-height: 22px !important;
    max-height: 22px !important;
    padding: 0 6px !important;
    font-size: 11px !important;
  }

  body.public-layout.has-ticker,
  body.admin-layout.has-ticker {
    padding-bottom: 22px !important;
  }
}

/* ============================================================
   7. DASHBOARD PRODUCTION: CARTES COMPACTES, RÉDUIRE PADDING
   ============================================================ */
@media screen and (max-width: 860px) {
  .admin-shortcut {
    padding: 14px 12px !important;
    border-radius: 14px !important;
    gap: 10px !important;
  }

  .admin-shortcut span {
    font-size: 1.2rem !important;
    width: 32px !important;
  }

  .admin-shortcut strong {
    font-size: 0.95rem !important;
    line-height: 1.2 !important;
  }

  .admin-shortcut small {
    font-size: 0.8rem !important;
    line-height: 1.3 !important;
  }

  .admin-action-grid {
    gap: 12px !important;
  }

  .kpi-grid.production-checks {
    gap: 12px !important;
  }

  .kpi-card {
    padding: 12px 10px !important;
    gap: 10px !important;
  }

  .kpi-icon {
    width: 48px !important;
    height: 48px !important;
    font-size: 24px !important;
  }

  .kpi-card > div {
    min-width: 0 !important;
  }

  .kpi-card small {
    font-size: 0.8rem !important;
  }

  .kpi-card strong {
    font-size: 1rem !important;
  }

  .kpi-card span {
    font-size: 0.8rem !important;
  }

  .panel-card {
    padding: 14px !important;
  }

  .panel-head {
    gap: 8px !important;
    margin-bottom: 10px !important;
  }

  .panel-card h2 {
    font-size: 1.05rem !important;
    margin: 0 !important;
  }

  .dash-list {
    gap: 8px !important;
    padding: 8px 0 !important;
  }

  .dash-list strong {
    font-size: 0.95rem !important;
  }

  .dash-list small {
    font-size: 0.8rem !important;
  }
}

@media screen and (max-width: 480px) {
  .admin-action-grid {
    grid-template-columns: 1fr !important;
  }

  .admin-shortcut {
    padding: 12px 10px !important;
  }

  .admin-shortcut span {
    font-size: 1rem !important;
    width: 28px !important;
  }

  .admin-shortcut strong {
    font-size: 0.9rem !important;
  }

  .admin-shortcut small {
    font-size: 0.75rem !important;
  }

  .production-checks {
    grid-template-columns: 1fr !important;
  }

  .kpi-card {
    padding: 10px 8px !important;
  }

  .kpi-icon {
    width: 44px !important;
    height: 44px !important;
    font-size: 20px !important;
  }
}

/* ============================================================
   8. SUPPRESSION ESPACES FANTÔMES CIBLÉE ACCUEIL
   ============================================================ */
.page-index.public-layout .home-premium-v129663 {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.page-index.public-layout .home-premium-hero:first-child {
  margin-top: 0 !important;
}

