/* =====================================================
   COCKTAIL FACILE — Responsive Mobile
   Breakpoints : 768px (tablet) · 480px (small phone)
   ===================================================== */

/* ──────────────────────────────────────────────────────
   GLOBALS
   ────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  .cf-section {
    padding: 40px 0 !important;
  }
  .cf-section-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
  }
  .cf-section-title {
    font-size: 22px !important;
  }
  .cf-cards-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }
}
@media (max-width: 480px) {
  .cf-cards-grid {
    grid-template-columns: 1fr !important;
  }
}


/* ──────────────────────────────────────────────────────
   HERO HOME — mobile
   ────────────────────────────────────────────────────── */
@media (max-width: 768px) {

  /* ── Wrapper : dégagé du header fixe (10px wrap + 48px header + 10px) ── */
  .cf-hero {
    padding: 0 !important;
    overflow: visible !important;
    background: var(--cf-sable, #F5E6D0) !important;
  }
  /* Espace pour le header fixe */
  .cf-hero > .container {
    padding-top: 0 !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* Grid : colonne unique, image en premier */
  .cf-hero__grid {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    padding-top: 76px !important;
  }

  /* ── Visuel : image en carte avec border-radius ── */
  .cf-hero__visual {
    order: -1 !important;
    display: block !important;
    margin: 0 !important;
    position: relative !important;
  }
  .cf-hero__img {
    border-radius: 20px !important;
    aspect-ratio: unset !important;
    height: 68vw !important;
    min-height: 240px !important;
    max-height: 360px !important;
    overflow: hidden !important;
    position: relative !important;
  }
  .cf-hero__img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center 25% !important;
  }
  /* Dégradé bas de l'image */
  .cf-hero__img::after {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(
      to bottom,
      rgba(28,18,8,.0) 0%,
      rgba(28,18,8,.30) 55%,
      rgba(28,18,8,.75) 100%
    ) !important;
    pointer-events: none !important;
  }

  /* Badge recette — dans la carte image, en bas */
  .cf-hero__badge {
    position: absolute !important;
    left: 12px !important;
    right: 12px !important;
    bottom: 12px !important;
    border-radius: 14px !important;
    padding: 10px 12px 10px 14px !important;
    gap: 10px !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    background: rgba(20,12,4,.65) !important;
    border: 1px solid rgba(255,255,255,.12) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,.30) !important;
  }
  .cf-hero__badge-link {
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* ── Contenu textuel ── */
  .cf-hero__content {
    order: 0 !important;
    padding: 22px 4px 32px !important;
    background: var(--cf-sable, #F5E6D0) !important;
  }

  .cf-label {
    font-size: 10px !important;
    margin-bottom: 10px !important;
    letter-spacing: .12em !important;
  }

  .cf-hero__title {
    font-size: 28px !important;
    line-height: 1.15 !important;
    margin-bottom: 10px !important;
    letter-spacing: -.5px !important;
  }

  .cf-hero__desc {
    font-size: 14px !important;
    line-height: 1.6 !important;
    margin-bottom: 20px !important;
    color: var(--cf-grey) !important;
  }

  /* Boutons côte à côte */
  .cf-hero__actions {
    flex-direction: row !important;
    gap: 8px !important;
    margin-bottom: 22px !important;
  }
  .cf-hero__actions .cf-btn {
    flex: 1 !important;
    justify-content: center !important;
    padding: 12px 10px !important;
    font-size: 13.5px !important;
    white-space: nowrap !important;
  }

  /* Stats */
  .cf-hero__stats {
    display: flex !important;
    gap: 0 !important;
    padding-top: 18px !important;
    margin-bottom: 0 !important;
    border-top: 1px solid var(--cf-sable-dark, #E8D5C0) !important;
    justify-content: space-around !important;
  }
  .cf-hero__stat {
    flex: 1 !important;
    text-align: center !important;
    padding: 0 6px !important;
    position: relative !important;
  }
  .cf-hero__stat + .cf-hero__stat::before {
    content: '' !important;
    position: absolute !important;
    left: 0 !important; top: 15% !important; bottom: 15% !important;
    width: 1px !important;
    background: var(--cf-sable-dark, #E8D5C0) !important;
  }
  .cf-hero__stat strong {
    font-size: 22px !important;
    display: block !important;
    line-height: 1.2 !important;
    color: var(--cf-dark) !important;
  }
  .cf-hero__stat span {
    font-size: 10px !important;
    color: var(--cf-grey) !important;
    text-transform: uppercase !important;
    letter-spacing: .05em !important;
  }
}

/* Très petits écrans */
@media (max-width: 360px) {
  .cf-hero__actions {
    flex-direction: column !important;
  }
  .cf-hero__title {
    font-size: 24px !important;
  }
  .cf-hero__img {
    height: 75vw !important;
  }
}

/* ──────────────────────────────────────────────────────
   MOODS, BARMANS, CTA — home
   ────────────────────────────────────────────────────── */
@media (max-width: 768px) {

  /* Moods : scroll horizontal snap */
  .cf-moods-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 10px !important;
    margin-left: -16px !important;
    margin-right: -16px !important;
    padding: 4px 16px 14px !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-snap-type: x mandatory !important;
    scrollbar-width: none !important;
  }
  .cf-moods-grid::-webkit-scrollbar { display: none !important; }
  .cf-mood-card {
    flex: 0 0 auto !important;
    min-width: 124px !important;
    max-width: 140px !important;
    scroll-snap-align: start !important;
    padding: 18px 12px !important;
  }
  .cf-mood-card__desc { display: none !important; }
  .cf-mood-card__name { font-size: 13px !important; }

  /* Barmans : 2 colonnes */
  .cf-barmans-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }
  .cf-barman-card { padding: 16px 12px !important; }

  /* CTA section */
  .cf-cta-section__grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  .cf-cta-section__form {
    flex-direction: column !important;
    gap: 10px !important;
  }
  .cf-cta-section__form input {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .cf-cta-section__form .cf-btn {
    width: 100% !important;
    justify-content: center !important;
  }
  .cf-cta-section__title { font-size: 22px !important; }
}


/* ──────────────────────────────────────────────────────
   STATS BAR — scroll horizontal sur mobile
   ────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .cf-stats-bar { padding: 0 !important; }
  .cf-stats-bar__grid {
    display: flex !important;
    overflow-x: auto !important;
    gap: 0 !important;
    scrollbar-width: none !important;
    padding: 16px 0 !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .cf-stats-bar__grid::-webkit-scrollbar { display: none !important; }
  .cf-stats-item {
    flex: 0 0 auto !important;
    gap: 10px !important;
    padding: 0 20px !important;
    border-right: 1px solid rgba(255,255,255,.08) !important;
  }
  .cf-stats-item:last-child { border-right: none !important; }
  .cf-stats-item__icon { font-size: 20px !important; }
  .cf-stats-item__value { font-size: 13px !important; }
  .cf-stats-item__label { font-size: 10px !important; }
}


/* ──────────────────────────────────────────────────────
   FOOTER — accordion + brand centré
   ────────────────────────────────────────────────────── */
@media (max-width: 768px) {

  /* Padding bas pour laisser place à la bottom nav */
  .cf-footer {
    padding: 40px 0 88px !important;
  }

  /* Grille → 1 colonne */
  .cf-footer__grid {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }

  /* Colonne brand : centrée */
  .cf-footer__brand {
    text-align: center !important;
    padding-bottom: 28px !important;
    margin-bottom: 4px !important;
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
  }
  .cf-footer__moods { justify-content: center !important; }
  .cf-footer__social {
    justify-content: center !important;
    gap: 20px !important;
  }
  .cf-footer__social a svg {
    width: 22px !important;
    height: 22px !important;
  }
  .cf-footer__desc { max-width: 280px !important; margin-left: auto !important; margin-right: auto !important; }

  /* Colonnes liens : accordéon */
  .cf-footer__col {
    border-bottom: 1px solid rgba(255,255,255,.07) !important;
  }
  .cf-footer__col h5 {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    cursor: pointer !important;
    padding: 16px 0 !important;
    margin: 0 !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
  }
  .cf-footer__col h5::after {
    content: '+' !important;
    font-size: 20px !important;
    font-weight: 300 !important;
    color: rgba(255,255,255,.3) !important;
    line-height: 1 !important;
    transition: transform .2s !important;
    flex-shrink: 0 !important;
  }
  .cf-footer__col.cf-open h5::after {
    content: '−' !important;
    color: var(--cf-orange) !important;
  }

  /* Corps de chaque colonne : masqué par défaut sur mobile seulement */
  .cf-footer__col-body {
    display: none;
    padding-bottom: 16px;
  }
  .cf-footer__col.cf-open .cf-footer__col-body {
    display: block;
    animation: cf-slide-down .2s ease;
  }

  /* Bottom bar : centrée */
  .cf-footer__bottom {
    flex-direction: column !important;
    text-align: center !important;
    gap: 6px !important;
    padding-top: 20px !important;
    margin-top: 20px !important;
  }
}

@keyframes cf-slide-down {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Bouton filtres archive : caché sur desktop */
.cf-filter-toggle { display: none; }


/* ──────────────────────────────────────────────────────
   FICHE RECETTE — single-recette.php
   ────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .cf-recipe-hero { height: 300px !important; }

  .cf-recipe-meta { gap: 8px !important; }
  .cf-recipe-meta-actions {
    margin-left: 0 !important;
    width: 100% !important;
    margin-top: 6px !important;
  }
  .cf-recipe-meta-actions button {
    flex: 1 !important;
    justify-content: center !important;
  }

  .cf-recipe-layout {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  .cf-recipe-aside {
    position: static !important;
    top: auto !important;
  }
  .cf-recipe-hero h1 {
    font-size: 22px !important;
    line-height: 1.25 !important;
  }
}


/* ──────────────────────────────────────────────────────
   PROFIL BARMAN — single-barman.php
   ────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .cf-barman-hero { padding: 36px 0 32px !important; }
  .cf-barman-hero-inner {
    gap: 16px !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }
  .cf-barman-hero-inner .cf-barman-stats { justify-content: center !important; }

  .cf-barman-layout {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  .cf-barman-aside {
    position: static !important;
    top: auto !important;
  }
}


/* ──────────────────────────────────────────────────────
   CATALOGUE — archive-recette.php
   ────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .cf-archive-layout {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }
  .cf-archive-sidebar {
    position: static !important;
    top: auto !important;
    display: none !important;
  }
  .cf-archive-sidebar.is-open {
    display: block !important;
    margin-bottom: 20px !important;
  }
  .cf-filter-toggle { display: flex !important; }
  .cf-archive-mood-row {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    margin: 0 -16px !important;
    padding: 0 16px 4px !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }
  .cf-archive-mood-row::-webkit-scrollbar { display: none !important; }
  .cf-pill--mood {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }
}


/* ──────────────────────────────────────────────────────
   FOOTER SEO SECTIONS — villes & alcools
   ────────────────────────────────────────────────────── */
.cf-footer__seo-section {
    border-top: 1px solid rgba(255,255,255,.07);
    padding: 24px 0;
}
.cf-footer__seo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.cf-footer__seo-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    color: rgba(255,255,255,.35);
    text-transform: uppercase;
}
.cf-footer__seo-count {
    font-size: 11px;
    color: rgba(255,255,255,.2);
}
.cf-footer__seo-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 0;
    line-height: 1.8;
}
.cf-footer__seo-links a {
    font-size: 12px;
    color: rgba(255,255,255,.3);
    text-decoration: none;
    transition: color .15s;
    white-space: nowrap;
}
.cf-footer__seo-links a::after {
    content: '·';
    margin: 0 8px;
    color: rgba(255,255,255,.12);
}
.cf-footer__seo-links a:last-child::after { content: ''; margin: 0; }
.cf-footer__seo-links a:hover { color: var(--cf-orange); }

@media (max-width: 768px) {
    .cf-footer__seo-section {
        display: block;
        padding: 16px 0;
    }
    .cf-footer__seo-header {
        margin-bottom: 10px;
    }
    /* Sur mobile : pills compactes en grille */
    .cf-footer__seo-links {
        gap: 5px;
    }
    .cf-footer__seo-links a {
        font-size: 11px;
        background: rgba(255,255,255,.06);
        border: 1px solid rgba(255,255,255,.1);
        border-radius: 50px;
        padding: 3px 10px;
        white-space: nowrap;
        color: rgba(255,255,255,.4);
    }
    .cf-footer__seo-links a::after {
        content: '';
        margin: 0;
    }
    .cf-footer__seo-links a:hover {
        background: rgba(255,106,0,.12);
        border-color: rgba(255,106,0,.3);
    }
}

.cf-seo-voir-plus {
    background: none;
    border: 1px solid rgba(255,255,255,.15);
    color: rgba(255,255,255,.35);
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 50px;
    cursor: pointer;
    white-space: nowrap;
    transition: all .2s;
    margin-left: 4px;
}
.cf-seo-voir-plus:hover {
    color: var(--cf-orange);
    border-color: var(--cf-orange);
}

/* Footer language switcher */
.cf-footer__lang {
    display: flex;
    gap: 8px;
    align-items: center;
}
.cf-footer__lang-btn {
    font-size: 12px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 50px;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,.2);
    color: rgba(255,255,255,.45);
    transition: all .2s;
}
.cf-footer__lang-btn:hover {
    color: var(--cf-orange);
    border-color: var(--cf-orange);
}
.cf-footer__lang-btn.is-active {
    background: var(--cf-orange);
    border-color: var(--cf-orange);
    color: #fff;
}

/* === Correctif barre recette — override OPcache === */
.rqn { position: static !important; top: auto !important; }


/* === Contact page — responsive === */
@media (max-width: 768px) {
    .cf-grid-contact { grid-template-columns: 1fr !important; gap: 24px !important; }
    .cf-contact-row-2 { grid-template-columns: 1fr !important; }
}

/* === Blog articles grid — responsive === */
@media (max-width: 768px) {
    .cf-blog-articles-grid { grid-template-columns: 1fr 1fr !important; gap: 16px !important; }
}
@media (max-width: 480px) {
    .cf-blog-articles-grid { grid-template-columns: 1fr !important; }
}

/* === Archive recette — reduce mobile spacing === */
@media (max-width: 768px) {
    .cf-archive-content { padding-top: 20px !important; padding-bottom: 48px !important; }
}
