/* ============================================================
   ApéroBeauf — Layout
   ============================================================ */

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

/* ===== Top bar promo ===== */
.promo-bar {
  background: var(--ab-red);
  color: var(--ab-cream);
  text-align: center;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ===== Header ===== */
.site-header {
  background: var(--ab-blue);
  color: var(--ab-cream);
  padding: 30px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
}
.logo img { width: 50px; height: 50px; }
.logo-text {
  font-family: 'Anton', sans-serif;
  font-size: 26px;
  color: var(--ab-yellow);
  letter-spacing: 1px;
  line-height: 1;
}
.logo-text em {
  color: var(--ab-cream);
  font-style: normal;
}
.main-nav { display: flex; gap: 24px; flex-wrap: wrap; }
.main-nav a {
  color: var(--ab-cream) !important;
  font-weight: 600;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.main-nav a:hover {
  color: var(--ab-yellow) !important;
  text-decoration: none;
}

/* ===== Language switcher (FR / EN) ===== */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 16px;
  padding-left: 16px;
  border-left: 2px solid rgba(255,255,255,0.2);
}
.lang-switcher a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-decoration: none !important;
  padding: 4px 8px;
  border-radius: 4px;
  opacity: 0.55;
  transition: all 0.18s ease;
  color: var(--ab-cream) !important;
}
.lang-switcher a:hover {
  opacity: 0.95;
  background: rgba(255,255,255,0.08);
}
.lang-switcher a.active {
  opacity: 1;
  background: rgba(255,199,44,0.18);
  color: var(--ab-yellow) !important;
}
.lang-switcher .flag {
  width: 22px;
  height: 15px;
  display: inline-block;
  border-radius: 2px;
  border: 1px solid rgba(0,0,0,0.15);
  vertical-align: middle;
  object-fit: cover;
  line-height: 0;
}

@media (max-width: 768px) {
  .lang-switcher {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    margin-top: 8px;
  }
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--ab-yellow) 0%, var(--ab-yellow-light) 100%);
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -30px; right: -30px;
  width: 180px; height: 180px;
  background: var(--ab-red);
  border-radius: 50%;
  opacity: 0.15;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -40px; left: -40px;
  width: 240px; height: 240px;
  background: var(--ab-blue);
  border-radius: 50%;
  opacity: 0.1;
}
.hero-mascot {
  width: 280px;
  height: 280px;
  margin: 0 auto 28px;
  display: block;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.22));
}
.hero h1 {
  font-size: 64px;
  margin-bottom: 16px;
  color: var(--ab-blue);
  letter-spacing: -1px;
}
.hero .tagline {
  font-size: 22px;
  font-weight: 600;
  max-width: 600px;
  margin: 0 auto 32px;
  color: var(--ab-charcoal);
}
.hero .accent { color: var(--ab-red); font-style: italic; }

/* ===== Boutons ===== */
.btn {
  display: inline-block;
  padding: 16px 36px;
  font-family: 'Anton', sans-serif;
  font-size: 18px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none !important;
  border: 3px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-primary {
  background: var(--ab-red);
  color: var(--ab-cream) !important;
}
.btn-primary:hover {
  background: var(--ab-red-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}
.btn-secondary {
  background: transparent;
  color: var(--ab-blue) !important;
  border-color: var(--ab-blue);
}
.btn-secondary:hover {
  background: var(--ab-blue);
  color: var(--ab-cream) !important;
}

/* ===== Sections génériques ===== */
section { padding: 64px 0; }
section h2 {
  font-size: 42px;
  margin-bottom: 12px;
  text-align: center;
}
section .section-sub {
  text-align: center;
  font-size: 18px;
  margin-bottom: 40px;
  color: var(--ab-charcoal);
  font-weight: 500;
}

/* ===== Grilles ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

/* Les 4 pilliers sur la home : forcer 4 colonnes sur desktop */
.collections-grid .grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
}
@media (max-width: 800px) {
  .collections-grid .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }
}
@media (max-width: 500px) {
  .collections-grid .grid {
    grid-template-columns: 1fr !important;
  }
}

/* Cartes plus compactes pour tenir a 4 */
.collections-grid .collection-card {
  min-width: 0;
}
.collections-grid .collection-card-img {
  height: 160px;
}
.collections-grid .collection-card-img .emoji {
  font-size: 64px !important;
}
.collections-grid .collection-card h3 {
  font-size: 18px;
  padding: 14px 16px 4px;
}
.collections-grid .collection-card p {
  font-size: 13px;
  line-height: 1.45;
  padding: 0 16px 14px;
}

/* ===== Cartes ===== */
.collection-card,
.product-card {
  background: white;
  border: 3px solid var(--ab-blue);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none !important;
  display: block;
  transition: all 0.2s ease;
  position: relative;
}
.collection-card:hover,
.product-card:hover {
  transform: translateY(-6px) rotate(-0.5deg);
  box-shadow: 8px 8px 0 var(--ab-yellow);
  text-decoration: none !important;
}
.collection-card-img,
.product-card-img {
  width: 100%;
  height: 240px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
}
.collection-card h3,
.product-card h3 {
  padding: 16px 20px 4px;
  font-size: 22px;
  color: var(--ab-blue);
}
.collection-card p,
.product-card p {
  padding: 0 20px 16px;
  color: var(--ab-charcoal);
  font-size: 15px;
}
.price {
  display: inline-block;
  background: var(--ab-yellow);
  color: var(--ab-blue);
  font-family: 'Anton', sans-serif;
  font-size: 22px;
  padding: 4px 14px;
  margin: 8px 20px 16px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}
.product-card-img .emoji {
  font-size: 96px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

/* ===== Footer ===== */
.site-footer {
  background: var(--ab-blue);
  color: var(--ab-cream);
  padding: 60px 0 20px;
  margin-top: 80px;
}
.site-footer h4 {
  color: var(--ab-yellow) !important;
  font-size: 18px;
  margin-bottom: 16px;
}
.site-footer a {
  color: var(--ab-cream) !important;
  display: block;
  padding: 4px 0;
  font-size: 15px;
}
.site-footer a:hover {
  color: var(--ab-yellow) !important;
  text-decoration: none;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 32px;
}
.copyright {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 14px;
  opacity: 0.8;
}

/* ===== Page produit ===== */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 48px 0;
  align-items: start;
}
.product-image-box {
  background: white;
  border: 3px solid var(--ab-blue);
  border-radius: 8px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 180px;
}
.product-category {
  display: inline-block;
  background: var(--ab-yellow);
  color: var(--ab-blue);
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  border-radius: 4px;
}
.product-info h1 { font-size: 38px; margin-bottom: 16px; }
.product-info .price-big {
  display: inline-block;
  background: var(--ab-red);
  color: var(--ab-cream);
  font-family: 'Anton', sans-serif;
  font-size: 36px;
  padding: 6px 20px;
  margin: 16px 0;
  border-radius: 4px;
}
.product-info .description { margin: 24px 0; line-height: 1.8; font-size: 16px; }
.btn-buy { width: 100%; font-size: 20px; padding: 20px; }

/* ===== Page collection ===== */
.collection-hero {
  background: var(--ab-yellow);
  padding: 16px 0;
  text-align: center;
  border-bottom: 4px solid var(--ab-blue);
}
.collection-hero h1 { font-size: 32px; margin-bottom: 4px; }
.collection-hero p { font-size: 14px; font-weight: 500; }
/* espace entre la bande rayon et la 1ere rangee de produits (toutes collections) */
.collection-hero + section.container { padding-top: 40px; }

.empty-state {
  padding: 60px 20px;
  text-align: center;
  background: white;
  border: 3px dashed var(--ab-blue);
  border-radius: 8px;
}
.empty-state p {
  font-size: 16px;
  color: var(--ab-blue);
  font-weight: 600;
}
.empty-state .emoji { font-size: 64px; display: block; margin-bottom: 12px; }

/* ===== Bloc humour (pour la home) ===== */
/* espace vertical des sections .featured (coups de coeur, avis, a ne pas rater) */
.featured { padding-top: 40px; padding-bottom: 48px; }

/* espace homogene autour des 4 piliers (ne pas coller le bandeau rouge) */
.collections-grid { padding-top: 28px; padding-bottom: 56px; }

.humor-banner {
  background: var(--ab-red);
  color: var(--ab-cream);
  padding: 48px 0;
  text-align: center;
}
.humor-banner h2 {
  color: var(--ab-yellow) !important;
  font-size: 36px;
  margin-bottom: 12px;
}
.humor-banner p {
  font-size: 18px;
  font-weight: 500;
  max-width: 700px;
  margin: 0 auto;
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
  .hero h1 { font-size: 40px; }
  .hero .tagline { font-size: 18px; }
  .hero-mascot { width: 200px; height: 200px; }
  section h2 { font-size: 32px; }
  .header-inner { flex-direction: column; align-items: flex-start; }
  .main-nav { gap: 16px; }
  .product-detail { grid-template-columns: 1fr; }
  .product-image-box { font-size: 100px; }
  .product-info h1 { font-size: 28px; }
}

/* esat-badge-css — Label ESAT (e-commerce responsable & inclusif) */
.esat-badge-footer{display:flex;justify-content:center;margin:1.6rem auto 0;padding-top:1.3rem;border-top:1px solid rgba(255,255,255,.18);}
.esat-badge-footer a{display:flex;flex-direction:column;align-items:center;gap:.5rem;text-decoration:none;color:inherit;max-width:300px;text-align:center;}
.esat-badge-footer img{width:140px;height:auto;background:#fff;border-radius:12px;padding:7px;box-shadow:0 2px 10px rgba(0,0,0,.15);transition:transform .2s;}
.esat-badge-footer a:hover img{transform:scale(1.04);}
.esat-badge-footer span{font-size:.72rem;line-height:1.3;opacity:.85;}
.esat-badge-hero{display:flex;flex-direction:column;align-items:center;text-align:center;gap:1rem;margin:2.5rem auto 1rem;max-width:680px;}
.esat-badge-hero img{width:min(420px,85%);height:auto;background:#fff;border-radius:18px;padding:12px;box-shadow:0 8px 30px rgba(0,0,0,.16);}
.esat-badge-hero-cap{font-size:1.05rem;line-height:1.6;color:var(--ab-blue);max-width:600px;}
@media(max-width:768px){.esat-badge-footer img{width:120px;}}

/* esat-v2 — logo transparent (header + footer sans cadre) */
.esat-header-logo{display:inline-flex;align-items:center;margin-left:1.1rem;}
.esat-header-logo img{height:46px;width:auto;display:block;transition:transform .2s;}
.esat-header-logo:hover img{transform:scale(1.06);}
.esat-badge-footer img{background:none!important;padding:0!important;box-shadow:none!important;width:165px!important;border-radius:0!important;}
.esat-badge-footer span{display:none!important;}
.esat-badge-hero img{background:none!important;box-shadow:none!important;padding:0!important;}
@media(max-width:768px){.esat-header-logo img{height:38px;}.esat-badge-footer img{width:140px!important;}}

/* esat-v3 — tailles logos header (ApéroBeauf +35%, ESAT aligné même niveau) */
.header-inner{align-items:center;}
.main-nav{align-items:center;}
.logo img{width:104px!important;height:104px!important;}
.logo-text{font-size:42px!important;}
.esat-header-logo{margin-left:1.3rem;}
.esat-header-logo img{height:84px!important;}
@media(max-width:768px){
  .logo img{width:88px!important;height:88px!important;}
  .logo-text{font-size:37px!important;}
  .esat-header-logo img{height:64px!important;}
}

/* esat-v4 — alignement logo ESAT header (même niveau que ApéroBeauf, à droite) */
@media(min-width:901px){
  .header-inner{flex-wrap:nowrap;}
  .main-nav{flex:1 1 auto;justify-content:flex-end;}
}
.esat-header-logo{margin-left:1.2rem;flex:0 0 auto;align-self:center;}

/* esat-v5 — menu desktop sur 2 lignes, espacement homogene (saut de ligne force avant L'Intello) */
@media(min-width:901px){
  .main-nav{
    display:flex;
    flex-wrap:wrap;
    justify-content:flex-start;
    align-items:center;
    column-gap:28px;
    row-gap:10px;
    flex:0 1 auto;
  }
  .main-nav .nav-break{ flex-basis:100%; width:100%; height:0; margin:0; padding:0; border:0; }
}

/* ===== mobile-v6 — header compact + menu hamburger (<=900px) + hero réduit ===== */
.nav-toggle-cb { display: none; }
.nav-burger { display: none; }
@media (max-width: 900px) {
  .site-header { padding: 10px 0 !important; }
  .header-inner { flex-direction: row !important; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
  .logo { order: 1; }
  .logo img { width: 46px !important; height: 46px !important; }
  .logo-text { font-size: 24px !important; }
  .nav-burger { display: block; order: 2; font-size: 30px; line-height: 1; color: var(--ab-cream); cursor: pointer; padding: 2px 10px; -webkit-tap-highlight-color: transparent; user-select: none; }
  .esat-header-logo { display: none !important; }
  .main-nav { order: 3; flex-basis: 100%; width: 100%; display: none !important; flex-direction: column !important; align-items: stretch !important; gap: 0; margin-top: 6px; }
  #nav-toggle:checked ~ .main-nav { display: flex !important; }
  .main-nav .nav-break { display: none !important; }
  .main-nav a { padding: 13px 6px; border-top: 1px solid rgba(255,255,255,.12); font-size: 15px; }
  .lang-switcher { margin: 6px 0 0 !important; padding: 10px 0 0 !important; border-top: 1px solid rgba(255,255,255,.2) !important; border-left: none !important; }
  /* hero réduit */
  .hero { padding: 40px 0 !important; }
  .hero-mascot { width: 150px !important; height: 150px !important; margin-bottom: 16px !important; }
  .hero h1 { font-size: 30px !important; }
}

/* mobile-v6b — fiches produits : nav prev/next empilees pleine largeur (anti-debordement horizontal) */
@media (max-width: 900px) {
  .product-nav-top, .product-nav { flex-direction: column !important; align-items: stretch !important; gap: 8px !important; }
  .product-nav-top a, .product-nav a { white-space: normal !important; width: 100% !important; box-sizing: border-box; justify-content: center; text-align: center; }
}
