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


/* =========================
   HOME CARDS — FIN / RAFFINÉ
   Palette: noir / blanc / rouge #bf4526
========================= */

.H1 {
text-align: center;
}


.clb-cards::before {
  content: "";
  display: block;
  height: 48px;
}

.clb-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px;
}

/* Card raffinée */
.clb-card {
  background: #ffffff;
  border: 1px solid #eceff3;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 34px rgba(16, 24, 40, 0.06);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.clb-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 46px rgba(16, 24, 40, 0.10);
}

/* Image en haut, arrondie comme l’exemple */
.clb-card-media {
  padding: 16px 16px 0 16px; /* effet “cadre” blanc autour */
  background: #ffffff;
}

.clb-card-media img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
  border-radius: 14px;
}

/* Bandeau titre : blanc, texte rouge/noir + trait fin */
.clb-card-titlebar {
  position: relative;
  background: #ffffff;
  padding: 18px 18px 14px 18px;
  border-bottom: 1px solid #eef2f6;
}

.clb-card-titlebar h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: 0.01em;
  color: #0b0f14; /* noir élégant */
  text-align: center;
}

/* Trait fin sous le titre (style capture) */
.clb-card-titlebar::after {
  content: "";
  display: block;
  width: 70px;
  height: 2px;
  background: #bf4526;
  margin: 10px auto 0;
  border-radius: 999px;
  opacity: 0.95;
}

/* Médaillon discret, fin (au lieu du gros rond) */
.clb-card-badge {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 999px;

  display: grid;
  place-items: center;

  background: #ffffff;
  color: #bf4526;
  border: 2px solid #bf4526;
  box-shadow: 0 10px 22px rgba(16, 24, 40, 0.12);
  font-weight: 900;
}

/* Corps */
.clb-card-body {
  padding: 16px 18px 18px 18px;
  color: #1f2937;
  font-size: 13px;      /* plus petit, plus éditorial */
  line-height: 1.65;
  text-align: justify;    /* justification du texte */
}

.clb-card-body p {
  margin: 0 0 10px 0;
}

/* “EN SAVOIR PLUS” sans fond, style capture */
.clb-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  padding: 12px 10px;

  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;

  color: #bf4526;
  background: transparent;

  border-top: 1px dotted rgba(191, 69, 38, 0.35); /* filet fin */
  margin-top: 2px;

  transition: color 140ms ease, letter-spacing 140ms ease;
}

.clb-card-btn:hover {
  color: #0b0f14;
  letter-spacing: 0.08em;
}

/* On descend légèrement le titre */
.clb-card-titlebar h3 {
  margin-top: 6px;
}

/* Et on remonte très légèrement le picto pour garder l’équilibre */
.clb-card-badge {
  top: -2px;
}

/* Responsive */
/* Tablette */
@media (max-width: 1200px) {
  .clb-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 700px) {
  .clb-cards-grid {
    grid-template-columns: 1fr;
  }
}

.clb-cards .clb-container {
  max-width: 1400px; /* était 1200px */
}

/* =========================================================
   TITRE PLUS PETIT POUR LA CARD ECO RESP (3e card)
========================================================= */

.clb-cards-grid article:nth-child(3) .clb-card-titlebar h3 {
  font-size: 19px;      /* plus petit pour tenir sur 1 ligne */
  letter-spacing: 0.005em;
  white-space: nowrap; /* force une seule ligne */
}

/* =========================================================
   TITRE PLUS PETIT POUR LA CARD AVE (4e card)
========================================================= */

.clb-cards-grid article:nth-child(4) .clb-card-titlebar h3 {
  font-size: 19px;      /* plus petit pour tenir sur 1 ligne */
  letter-spacing: 0.005em;
  white-space: nowrap; /* force une seule ligne */
}

/* =========================
   GALERIE MOSAÏQUE (3 photos)
   3 slides -> 9 photos
========================= */

.clb-gallery {
  font-family: "Poppins", system-ui, -apple-system, sans-serif;
  background: #ffffff;
  padding: 44px 0 70px;
}

.clb-gallery-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.clb-gallery-title {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #0b0f14;
}

.clb-gallery-controls {
  display: inline-flex;
  gap: 10px;
}

.clb-gbtn {
  appearance: none;
  border: 1px solid #eceff3;
  background: #ffffff;
  color: #0b0f14;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(16,24,40,0.06);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.clb-gbtn:hover {
  transform: translateY(-1px);
  border-color: rgba(191,69,38,0.35);
  box-shadow: 0 14px 30px rgba(16,24,40,0.10);
}

/* IMPORTANT : viewport contraint */
.clb-gallery-viewport {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #eceff3;
  box-shadow: 0 16px 44px rgba(16,24,40,0.07);
  background: #fff;
}

/* Track = 3 slides horizontaux */
.clb-gallery-track {
  display: flex;
  width: 300%;
  transition: transform 420ms ease;
  transform: translateX(0);
}

/* =========================================================
   GALERIE — 3 PHOTOS IDENTIQUES CÔTE À CÔTE (PAR SLIDE)
========================================================= */

.clb-gallery-slide{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); /* 3 colonnes égales */
  gap: 12px;
  padding: 14px;
  background: #ffffff;
}

/* sécurité : si un 4e élément se glisse, on le cache */
.clb-gallery-slide > :nth-child(n+4){
  display: none !important;
}

.clb-tile{
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #f6f7f9;
  height: 300px; /* même hauteur pour les 3 */
}

.clb-tile img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.01);
  transition: transform 240ms ease;
}

.clb-tile:hover img{
  transform: scale(1.05);
}

/* =========================================================
   FIX SLIDER : 1 SLIDE = 100% (sinon tu vois 4 images)
========================================================= */

.clb-gallery-track{
  display: flex;
  width: 100% !important;   /* inutile d’avoir 300% si les slides font 100% */
}

.clb-gallery-slide{
  flex: 0 0 100% !important; /* <- LA LIGNE QUI MANQUE */
  width: 100% !important;    /* sécurité */
}

/* =========================================================
   LIGHTBOX (POP-UP IMAGE)
========================================================= */

.clb-gallery .clb-tile img {
  cursor: zoom-in;
}

.clb-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  place-items: center;
  padding: 28px;
  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(6px);
}

.clb-lightbox[aria-hidden="false"] {
  display: grid;
}

.clb-lightbox-img {
  max-width: min(1100px, 92vw);
  max-height: 86vh;
  width: auto;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.45);
}

.clb-lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.10);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.clb-lightbox-close:hover {
  background: rgba(255,255,255,0.18);
}


body.clb-lightbox-open {
  overflow: hidden;
}

/* =========================================================
   LIGHTBOX — LÉGENDE (ALT)
========================================================= */

.clb-lightbox-figure {
  margin: 0;
  text-align: center;
}

.clb-lightbox-caption {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.4;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  max-width: 900px;
}


/* Mobile */
@media (max-width: 900px) {
  .clb-gallery-slide {
    grid-template-columns: 1fr !important;
    grid-auto-rows: 220px !important;
  }
  .clb-gallery-slide > figure {
    height: 220px !important;
  }
}