
/* =========================================================
   CRITT — STRUCTURE 3 ZONES FONCTIONNELLES
   ========================================================= */

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:#fff}

.zone{
  width:100%;
  position:relative;
  display:block;
  overflow:visible;
}

.zone-haute{
  z-index:50;
  background:#fff;
}

.zone-centrale{
  z-index:10;
  background:#fff;
}

.zone-basse{
  z-index:5;
  background:#061B2E;
}

/* Empêche les chevauchements entre zones */
#section-haute,
#section-centrale,
#section-basse{
  clear:both;
}

/* Evite les marges négatives héritées */
#section-centrale > *:first-child{
  margin-top:0;
}

#section-basse > *:first-child{
  margin-top:0;
}

/* Images fluides */
img{
  max-width:100%;
  height:auto;
}

/* Boutons et menus actifs */
a, button{
  cursor:pointer;
}

/* Responsive sécurité */
@media(max-width:900px){
  .zone{
    overflow:hidden;
  }
}


/* Correction : la section centrale ne doit jamais afficher l'entête */
#section-centrale header,
#section-centrale .topbar,
#section-centrale .navrow,
#section-centrale .site-header,
#section-centrale .main-header,
#section-centrale .header,
#section-centrale .navbar,
#section-centrale .navigation{
  display:none !important;
}


/* Bandeau supérieur CRITT ajouté en section haute */
.critt-topbar{
  width:100%;
  min-height:36px;
  background:#031421;
  color:#ffffff;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:32px;
  padding:0 42px;
  font-size:13px;
  font-weight:600;
  line-height:1.2;
  letter-spacing:.01em;
  box-sizing:border-box;
  position:relative;
  z-index:100;
}

.critt-topbar a{
  color:#ffffff;
  text-decoration:none;
  white-space:nowrap;
}

.critt-topbar span{
  white-space:nowrap;
}

.critt-topbar a:hover{
  color:#00C4B8;
}

@media(max-width:900px){
  .critt-topbar{
    justify-content:center;
    flex-wrap:wrap;
    gap:12px 18px;
    padding:10px 20px;
    text-align:center;
  }
}


/* =====================================================
   CORRECTION : LARGEUR IDENTIQUE DES 3 ZONES
   ===================================================== */

#section-haute,
#section-centrale,
#section-basse{
    width:100%;
    max-width:1024px;
    margin-left:auto;
    margin-right:auto;
}

/* Empêche toute différence de largeur */
.zone-haute,
.zone-centrale,
.zone-basse{
    box-sizing:border-box;
    overflow:hidden;
}

/* Bandeau supérieur aligné sur la largeur du site */
.critt-topbar{
    width:100%;
    box-sizing:border-box;
}

/* Footer aligné sur la largeur centrale */
#section-basse{
    background:#061B2E;
}


/* =====================================================
   SOLUTION PROFESSIONNELLE :
   HEADER STICKY + FOOTER ALIGNÉ SUR LA LARGEUR DU SITE
   ===================================================== */

/* Le site reste centré et toutes les zones gardent la même largeur */
#section-haute,
#section-centrale,
#section-basse{
  width:100%;
  max-width:1024px;
  margin-left:auto;
  margin-right:auto;
  box-sizing:border-box;
}

/* Header toujours visible au scroll */
#section-haute{
  position:sticky;
  top:0;
  z-index:9999;
  background:#ffffff;
  box-shadow:0 8px 24px rgba(6,27,46,.12);
}

/* Préserve le rendu propre du bandeau de contact */
.critt-topbar{
  width:100%;
  max-width:1024px;
  margin-left:auto;
  margin-right:auto;
  box-sizing:border-box;
}

/* La section centrale ne passe jamais sous le header */
#section-centrale{
  position:relative;
  z-index:1;
  background:#ffffff;
}

/* Footer même largeur, même alignement que le contenu */
#section-basse{
  position:relative;
  z-index:2;
  background:#061B2E;
  overflow:hidden;
}

/* Empêche les débordements visuels */
.zone-haute,
.zone-centrale,
.zone-basse{
  overflow:hidden;
}

/* Mobile : header non bloquant, largeur fluide */
@media(max-width:900px){
  #section-haute{
    position:sticky;
    top:0;
  }

  #section-haute,
  #section-centrale,
  #section-basse,
  .critt-topbar{
    max-width:100%;
  }
}


/* =====================================================
   CORRECTION MENU RESPONSIVE
   Le menu haut reste visible lorsque la fenêtre est réduite
   ===================================================== */

/* Le header peut passer sur plusieurs lignes sans masquer le menu */
#section-haute,
#section-haute *,
.zone-haute,
.zone-haute *{
  box-sizing:border-box;
}

/* Les navigations restent visibles et se réorganisent */
#section-haute nav,
#section-haute .nav,
#section-haute .navbar,
#section-haute .navigation,
.zone-haute nav,
.zone-haute .nav,
.zone-haute .navbar,
.zone-haute .navigation{
  display:flex !important;
  flex-wrap:wrap !important;
  align-items:center !important;
  justify-content:center !important;
  gap:10px 18px !important;
  max-width:100% !important;
  overflow:visible !important;
}

/* Les lignes internes du header peuvent s'adapter */
#section-haute .navrow,
#section-haute .header,
#section-haute .site-header,
.zone-haute .navrow,
.zone-haute .header,
.zone-haute .site-header{
  height:auto !important;
  min-height:72px !important;
  display:flex !important;
  flex-wrap:wrap !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:14px 22px !important;
  overflow:visible !important;
}

/* Liens du menu lisibles en largeur réduite */
#section-haute nav a,
#section-haute .nav a,
.zone-haute nav a,
.zone-haute .nav a{
  display:inline-flex !important;
  white-space:nowrap !important;
  font-size:12px !important;
  line-height:1.2 !important;
}

/* Le bouton CTA reste visible mais peut passer sous le menu */
#section-haute .cta,
#section-haute .header-cta,
.zone-haute .cta,
.zone-haute .header-cta{
  display:inline-flex !important;
  white-space:nowrap !important;
}

/* Mobile/tablette : menu toujours visible, en grille propre */
@media(max-width:900px){
  #section-haute{
    position:sticky !important;
    top:0 !important;
  }

  #section-haute nav,
  #section-haute .nav,
  .zone-haute nav,
  .zone-haute .nav{
    display:flex !important;
    width:100% !important;
    order:3 !important;
    justify-content:center !important;
    padding:8px 0 4px !important;
  }

  #section-haute nav a,
  #section-haute .nav a,
  .zone-haute nav a,
  .zone-haute .nav a{
    font-size:11px !important;
    padding:6px 8px !important;
  }

  #section-haute .brand,
  .zone-haute .brand{
    flex:1 1 auto !important;
  }

  #section-haute .brand img,
  .zone-haute .brand img{
    max-width:180px !important;
    height:auto !important;
  }

  #section-haute .cta,
  #section-haute .header-cta,
  .zone-haute .cta,
  .zone-haute .header-cta{
    order:2 !important;
    font-size:11px !important;
    padding:9px 12px !important;
  }
}

/* Très petit écran : menu en 2 colonnes au lieu de disparaître */
@media(max-width:560px){
  #section-haute nav,
  #section-haute .nav,
  .zone-haute nav,
  .zone-haute .nav{
    display:grid !important;
    grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
    gap:6px !important;
  }

  #section-haute nav a,
  #section-haute .nav a,
  .zone-haute nav a,
  .zone-haute .nav a{
    justify-content:center !important;
    text-align:center !important;
    white-space:normal !important;
    border:1px solid rgba(0,196,184,.25) !important;
    border-radius:6px !important;
  }

  .critt-topbar{
    font-size:11px !important;
  }
}


/* =====================================================
   LOGOS INSTITUTIONNELS HEADER — FEDER / RÉGION
   ===================================================== */
.institutional-logos{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  margin-left:18px !important;
  margin-right:18px !important;
  flex:0 0 auto !important;
  max-width:240px !important;
}

.institutional-logos img{
  height:58px !important;
  width:auto !important;
  display:block !important;
  object-fit:contain !important;
}

/* Alignement dans les lignes header existantes */
#section-haute .navrow,
.zone-haute .navrow,
header .navrow{
  display:flex !important;
  align-items:center !important;
  flex-wrap:wrap !important;
  gap:18px !important;
}

#section-haute .brand,
.zone-haute .brand,
header .brand{
  display:flex !important;
  align-items:center !important;
  flex:0 0 auto !important;
}

@media(max-width:1100px){
  .institutional-logos{
    max-width:190px !important;
    margin-left:8px !important;
    margin-right:8px !important;
  }

  .institutional-logos img{
    height:46px !important;
  }
}

@media(max-width:760px){
  .institutional-logos{
    order:2 !important;
    width:100% !important;
    max-width:100% !important;
    justify-content:center !important;
    margin:8px 0 !important;
  }

  .institutional-logos img{
    height:42px !important;
  }
}
