/* ============================================================================
   CORRECTIONS POUR 3 TÂCHES
   ============================================================================ */

/* ────────────────────────────────────────────────────────────────────────────
   TÂCHE 1 — HERO : Réduction taille police des gros titres
   ──────────────────────────────────────────────────────────────────────────── */

/* Réduction de la taille de police des titres hero */
.hero-m30 h1 {
  font-size: 36px !important; /* Réduit de 44px à 36px */
}

@media(max-width: 900px) {
  .hero-m30 h1 {
    font-size: 28px !important; /* Réduit de 32px à 28px */
  }
}

@media(max-width: 640px) {
  .hero-m30 h1 {
    font-size: 22px !important; /* Réduit de 26px à 22px */
  }
}

/* ────────────────────────────────────────────────────────────────────────────
   TÂCHE 1 — HERO : "digitale" toujours coupé
   Correction du débordement du titre dans le hero
   ──────────────────────────────────────────────────────────────────────────── */

/* Étape 1 & 3 : Conteneur grid du hero */
.hero-inner,
.hero-m30-inner {
  display: grid !important;
  grid-template-columns: minmax(0, 55%) minmax(0, 45%) !important;
  align-items: center !important;
  overflow: visible !important;
  position: relative;
}

/* Enlever overflow:hidden sur les parents directs du hero */
.hero-m30 {
  overflow: visible !important;
}

/* Étape 2 : Gestion des z-index */
.hero-text,
.hero-m30-inner h1,
.hero-m30-inner .hero-intro {
  position: relative;
  z-index: 2 !important;
}

.hero-img {
  position: relative;
  z-index: 1 !important;
}

/* Étape 4 : Propriétés du titre h1 */
#hero-title,
.hero-m30-inner h1 {
  overflow: visible !important;
  overflow-wrap: normal !important;
  word-break: keep-all !important;
  white-space: normal !important;
  width: auto !important;
  max-width: none !important;
  position: relative;
}

/* Étape 5 : Conteneur image en position relative */
.hero-img,
.hero-image,
.hero-visual {
  position: relative !important;
  width: 100%;
  height: 100%;
}

.hero-img img,
.hero-image img,
.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative !important; /* Enlever position:absolute/fixed */
}

/* Supprimer tout débordement sur les ancêtres */
body > * {
  overflow-x: visible;
}

/* ────────────────────────────────────────────────────────────────────────────
   TÂCHE 2 — CORRIGER LE ZIGZAG PLEINE LARGEUR
   Correction du padding sur .wrap intérieur à .zigzag-section
   ──────────────────────────────────────────────────────────────────────────── */

/* Correction ciblée : uniquement le .wrap directement dans .zigzag-section */
.zigzag-section > .wrap {
  max-width: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100% !important;
}

/* Si padding résiduel persiste sur un ancêtre */
.zigzag-section {
  margin-left: calc(-1 * var(--PX, 0px)) !important;
  margin-right: calc(-1 * var(--PX, 0px)) !important;
  width: 100vw !important;
  max-width: 100vw !important;
  position: relative;
}

/* S'assurer que les blocs zigzag prennent toute la largeur */
.zigzag-section .zz-block:first-child {
  margin-left: 0 !important;
  padding-left: 0 !important;
}

/* ────────────────────────────────────────────────────────────────────────────
   TÂCHE 3 — ORGANIGRAMME HIÉRARCHIQUE
   Remplacement de la section Structure Organisationnelle
   ──────────────────────────────────────────────────────────────────────────── */

/* Conteneur principal de l'organigramme */
.org-chart {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 20px;
  font-family: var(--fb);
}

/* Niveau 0 — Direction Générale */
.org-level-0 {
  background: #111;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 700;
  text-align: center;
  margin: 0 auto 40px;
  display: inline-block;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}
.org-level-0::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 20px;
  background: #e2e2e2;
}

/* Niveau 1 — Pôles */
.org-level-1 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.org-pole {
  background: #fff0f0;
  color: #c0392b;
  border: 1px solid #fcc;
  border-radius: 8px;
  font-weight: 600;
  padding: 10px 20px;
  text-align: center;
  position: relative;
}

.org-pole::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 20px;
  background: #e2e2e2;
}

/* Branches horizontales depuis niveau 0 */
.org-chart::before {
  content: '';
  position: absolute;
  top: 80px;
  left: 15%;
  right: 15%;
  height: 2px;
  background: #e2e2e2;
  z-index: -1;
}

/* Niveau 2 — Départements */
.org-departments {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  margin-top: 20px;
}

.org-department {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  color: #111;
  padding: 8px 16px;
  font-size: 16px;
  position: relative;
}

.org-department::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 20px;
  width: 2px;
  height: 10px;
  background: #e2e2e2;
}

/* Niveau 3 — Services/Cellules */
.org-services {
  margin-top: 12px;
  padding-left: 20px;
}

.org-service {
  color: #c0392b;
  font-size: 0.85rem;
  padding-left: 16px;
  position: relative;
  margin-bottom: 8px;
}

.org-service::before {
  content: '→';
  position: absolute;
  left: 0;
  top: 0;
  color: #c0392b;
  font-weight: 600;
}

/* Connexions verticales pour le niveau 3 */
.org-department::after {
  content: '';
  position: absolute;
  left: 20px;
  top: 100%;
  width: 2px;
  height: 15px;
  background: #e2e2e2;
}

.org-department:last-child::after {
  display: none;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .org-level-1 {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .org-chart::before {
    display: none;
  }
  
  .org-pole {
    margin-bottom: 20px;
  }
  
  .org-pole::before {
    display: none;
  }
  
  .org-level-0::after {
    display: none;
  }
}

@media (max-width: 640px) {
  .org-chart {
    padding: 20px 10px;
  }
  
  .org-level-0 {
    padding: 10px 16px;
    font-size: 14px;
    margin-bottom: 30px;
  }
  
  .org-pole {
    padding: 8px 16px;
    font-size: 14px;
  }
  
  .org-department {
    padding: 6px 12px;
    font-size: 14px;
  }
  
  .org-service {
    font-size: 13px;
    padding-left: 12px;
  }
}

/* Suppression de l'ancienne liste verticale */
.organization-list,
.org-structure-list {
  display: none !important;
}

/* Affichage du nouvel organigramme */
.org-chart {
  display: block !important;
}