/*
Theme Name: Camp L'Avancée Bleue
Author: Vincent
Version: 1.0
Text Domain: camp-lavancee-bleue
*/

/* =========================================================
   RESET + TYPO
========================================================= */

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* =========================================================
   LAYOUT
========================================================= */

.clb-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================================
   HEADER
========================================================= */

.clb-header {
  position: relative;
  margin: 0;
  padding: 0;
}

/* -------------------------
   TOP BAR
------------------------- */

.clb-topbar {
  background: #ffffff;
  color: #0e2a47;
  border-bottom: 1px solid #e7edf3;
}

.clb-topbar-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-right: 190px;
  flex-wrap: nowrap;

  /* Menu à gauche + bloc droit poussé au max */
  justify-content: flex-start;
  padding-left: 0; /* alignement avec la mainbar */
}

.clb-topmenu {
  display: flex;
  align-items: center;
  gap: 14px;
  white-space: nowrap;
  flex: 0 1 auto;
}

.clb-topmenu a {
  color: #0e2a47;
  font-weight: 700;
  text-decoration: none;
}

.clb-topmenu a:hover { text-decoration: underline; }

.clb-sep { color: #95a6b7; }

/* Bloc droite (tel + réseaux) */
.clb-top-right {
  display: flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;

  margin-left: auto;     /* pousse à droite */
  margin-right: -150px;  /* rapproche du logo (ajuste si besoin) */
}

.clb-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: #0e2a47;
  text-decoration: none;
}

.clb-ico { display: inline-flex; }

.clb-socials {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.clb-social {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid #e7edf3;
  background: #ffffff;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: #0e2a47;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.clb-social:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.08);
}

/* -------------------------
   MAIN BAR / HERO
------------------------- */

.clb-mainbar {
  position: relative;
  margin: 0;
  padding: 0;

  background-image: url("http://www.campavanceebleue.com/wp-content/uploads/2025/12/campavanceebleue.jpg");
  background-size: cover;
  background-position: center;
}

.clb-mainbar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.22);
}

.clb-mainbar-inner {
  position: relative;
  z-index: 1;

  min-height: 380px;
  padding: 40px 190px 40px 0;

  display: flex;
  align-items: flex-start;

  padding-left: 0; /* alignement avec la topbar */
}

.clb-hero {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.clb-brand {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.04em;

  color: #ffffff;
  text-decoration: none;
  text-shadow: 0 6px 18px rgba(0,0,0,0.35);
}

/* CTA Accueil */
.clb-cta {
  position: absolute;
  left: 50%;
  top: 62%;
  transform: translateX(-50%);
  z-index: 2;

  background: rgba(255,255,255,0.96);
  color: #0e2a47;

  padding: 18px 34px;
  border-radius: 14px;
  border: 1px solid #e7edf3;

  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-decoration: none;

  box-shadow: 0 16px 34px rgba(0,0,0,0.2);
}

.clb-cta:hover {
  transform: translateX(-50%) translateY(-2px);
}

/* Titre pages (hors accueil) */
.clb-page-title-wrap {
  position: absolute;
  left: 50%;
  top: 62%;
  transform: translateX(-50%);
  z-index: 2;
}

.clb-page-title {
  margin: 0;
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 0.04em;

  color: #ffffff;
  text-align: center;

  text-shadow: 0 6px 18px rgba(0,0,0,0.35);
}

/* Logo AVE flottant */
.clb-logo-floating {
  position: absolute;
  right: 32px;
  top: 12px;
  z-index: 20;

  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.clb-logo-floating img {
  height: 130px;
  width: auto;
  display: block;
  filter: drop-shadow(0 12px 30px rgba(0,0,0,0.35));
}

/* =========================================================
   KILL GAP (WP / GUTENBERG) : espace blanc sous header
========================================================= */

header.clb-header {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* Wrappers WP fréquents */
#page,
.site,
.site-content,
.content-area,
.site-main,
.wp-site-blocks,
.wp-block-post-content,
.entry-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Main */
main,
main.page {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Premier bloc du contenu (Gutenberg) */
main.page > :first-child,
main.page > :first-child > :first-child,
main.page .wp-block-post-content > :first-child,
main.page .entry-content > :first-child {
  margin-top: 0 !important;
  margin-block-start: 0 !important;
  padding-top: 0 !important;
}

/* Élément juste après le header (peu importe wrapper) */
header.clb-header + * {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

header.clb-header + * main,
header.clb-header + * .site-main,
header.clb-header + * .wp-site-blocks,
header.clb-header + * .wp-block-post-content,
header.clb-header + * .entry-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

header.clb-header + * main > :first-child,
header.clb-header + * main > :first-child > :first-child,
header.clb-header + * .wp-block-post-content > :first-child,
header.clb-header + * .entry-content > :first-child {
  margin-top: 0 !important;
  margin-block-start: 0 !important;
  padding-top: 0 !important;
}

/* =========================================================
   MOBILE FIX (TOPBAR / CTA / LOGO)
========================================================= */

@media (max-width: 900px) {

  /* ---------- TOPBAR : menu utilisable ---------- */
  .clb-topbar-inner{
    padding-right: 24px;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
  }

  /* Menu : soit wrap propre, soit scroll (ici wrap propre) */
  .clb-topmenu{
    flex: 1 1 100%;
    flex-wrap: wrap;
    row-gap: 8px;
    column-gap: 10px;
    white-space: normal;
  }

  /* On cache les séparateurs | sur mobile (ça pollue) */
  .clb-sep{
    display: none;
  }

  .clb-topmenu a{
    font-size: 14px;
    padding: 6px 10px;
    border: 1px solid #e7edf3;
    border-radius: 999px;
    background: #fff;
    line-height: 1;
  }

  /* Bloc droite : sur une ligne, à droite */
  .clb-top-right{
    margin-left: auto;
    margin-right: 0;
    gap: 10px;
  }

  .clb-phone span{
    font-size: 14px;
  }

  /* ---------- MAINBAR : hauteur + contenu ---------- */
  .clb-mainbar-inner{
    min-height: 220px;
    padding: 22px 24px;
    align-items: flex-start;
  }

  .clb-brand{
    font-size: 24px;
    line-height: 1.05;
  }

  /* ---------- CTA : plus petit + bloc normal ---------- */
  .clb-cta{
    position: static;
    transform: none;
    display: inline-flex;
    align-self: center;     /* centre le bouton sans centrer le titre */
    margin-top: 18px;

    width: auto;
    max-width: 92%;
    padding: 12px 18px;
    font-size: 13px;
    border-radius: 12px;
  }

  /* Titre page (hors accueil) : même logique que CTA */
  .clb-page-title-wrap{
    position: static;
    transform: none;
    margin-top: 18px;
    align-self: center;
    max-width: 92%;
    text-align: center;
  }

  .clb-page-title{
    font-size: 26px;
    text-align: center;
  }

  /* ---------- LOGO : plus de "floating" sur mobile ---------- */
  .clb-logo-floating{
    position: static;
    margin: 10px 0 0;
    align-self: flex-end;   /* à droite */
  }

  .clb-logo-floating img{
    height: 78px;           /* taille maîtrisée */
  }
}

/* Très petit mobile */
@media (max-width: 420px){
  .clb-brand{ font-size: 18px; }
  .clb-logo-floating img{ height: 70px; }
}

/* =========================================================
   MOBILE BURGER MENU
========================================================= */

.clb-burger { display: none; }
.clb-mobile-menu { display: none; }

@media (max-width: 900px){

  /* Topbar : 1 ligne */
  .clb-topbar-inner{
    padding-right: 24px;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: center;
  }

  /* On cache le menu desktop */
  .clb-topmenu{ display: none; }

  /* Bouton burger visible à droite */
  .clb-burger{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid #e7edf3;
    background: #fff;
    cursor: pointer;
    margin-left: auto; /* pousse à droite */
  }

  .clb-burger-ico{
    width: 18px;
    height: 2px;
    background: #0e2a47;
    border-radius: 999px;
    position: relative;
    display: block;
  }
  .clb-burger-ico::before,
  .clb-burger-ico::after{
    content:"";
    position:absolute;
    left:0;
    width: 18px;
    height: 2px;
    background: #0e2a47;
    border-radius: 999px;
  }
  .clb-burger-ico::before{ top: -6px; }
  .clb-burger-ico::after{ top: 6px; }

  /* Dropdown menu */
  .clb-mobile-menu{
    display: block;
    position: absolute;
    right: 24px;
    top: 56px;
    width: min(320px, calc(100vw - 48px));
    background: #fff;
    border: 1px solid #e7edf3;
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(16,24,40,0.14);
    padding: 10px;
    z-index: 999;
  }
  .clb-mobile-menu[hidden]{ display:none; }

  .clb-mobile-menu a{
    display: block;
    padding: 12px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: #0e2a47;
    font-weight: 800;
  }
  .clb-mobile-menu a:hover{
    background: #f7f8fb;
  }

  /* Tel + réseaux : restent accessibles, mais plus compacts */
  .clb-top-right{
    margin-left: 0;
    gap: 10px;
  }
  .clb-phone span{ font-size: 14px; }

  /* Hero */
  .clb-mainbar-inner{
    min-height: 220px;
    padding: 22px 24px;
  }

  .clb-brand{
    font-size: 24px;
    line-height: 1.05;
  }

  /* CTA plus petit */
  .clb-cta{
    position: static;
    transform: none;
    display: inline-flex;
    align-self: center;
    margin-top: 16px;
    padding: 12px 18px;
    font-size: 13px;
    max-width: 92%;
  }

  /* IMPORTANT : le logo reste à cheval, donc on le repositionne ABSOLUTE
     mais en bas de la topbar (pas sous le contenu) */
  .clb-logo-floating{
    position: absolute;
    right: 14px;
    top: 44px; /* chevauche topbar + mainbar */
    z-index: 50;
  }
  .clb-logo-floating img{
    height: 74px; /* taille maîtrisée */
  }
}

/* très petit */
@media (max-width: 420px){
  .clb-phone span{ display:none; } /* garde l’icône pour gagner de la place */
}

/* =========================================================
   MOBILE — BURGER À DROITE DES RÉSEAUX
========================================================= */

@media (max-width: 900px){

  /* On contrôle l’ordre des éléments */
  .clb-topmenu    { order: 1; }
  .clb-top-right  { order: 2; }
  .clb-burger     { order: 3; }

  /* Le bouton burger ne pousse plus tout */
  .clb-burger{
    margin-left: 8px; /* petit espace après les réseaux */
  }

  /* Le bloc droite (tel + réseaux) garde sa place */
  .clb-top-right{
    margin-left: auto; /* pousse le groupe tel+réseaux à droite */
  }
}

/* =========================================================
   MOBILE — TITRE MAINBAR PLUS PETIT
========================================================= */

@media (max-width: 900px){

  .clb-brand{
    font-size: 21px;      /* ↓ plus discret */
    letter-spacing: 0.03em;
    line-height: 1.05;
  }

  .clb-brand-break{
    display: block;
    margin-top: 2px;
  }
  
}


