/* ==========================================================================
   Pinte Besson — Carte des Mets
   Custom CSS pour YOOtheme Pro child theme
   Toutes les classes préfixées pb-carte- pour éviter les conflits UIkit
   ========================================================================== */

/* --- Variables --- */
:root {
    --pb-carte-bg: #161616;
    --pb-carte-surface: #212021;
    --pb-carte-surface-hover: #212021;
    --pb-carte-gold: #e2c19d;
    --pb-carte-gold-dim: rgba(226,193,157,0.3);
    --pb-carte-gold-hover: #d4ad82;
    --pb-carte-cream: #f5f0e8;
    --pb-carte-cream-dim: rgba(245,240,232,0.6);
    --pb-carte-muted: #8a8477;
    --pb-carte-divider: rgba(226,193,157,0.15);
    --pb-carte-font-display: 'Cinzel', serif;
    --pb-carte-font-body: 'Lato', sans-serif;
    --pb-carte-font-accent: 'Cormorant Garamond', serif;
    --pb-carte-tabs-height: 50px;
}

/* ==========================================================================
   HERO (section d'en-tête de la page carte)
   ========================================================================== */
.pb-carte-hero {
    position: relative;
    min-height: 45vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px 40px;
    overflow: hidden;
    background: var(--pb-carte-bg);
}

.pb-carte-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 0%, rgba(226,193,157,0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 100%, rgba(226,193,157,0.05) 0%, transparent 50%);
}

.pb-carte-hero-ornament {
    width: 40px;
    height: 1px;
    background: var(--pb-carte-gold);
    margin: 0 auto 20px;
    position: relative;
}

.pb-carte-hero-ornament::before,
.pb-carte-hero-ornament::after {
    content: '';
    position: absolute;
    top: -3px;
    width: 7px;
    height: 7px;
    border: 1px solid var(--pb-carte-gold);
    transform: rotate(45deg);
}

.pb-carte-hero-ornament::before { left: -12px; }
.pb-carte-hero-ornament::after { right: -12px; }

.pb-carte-hero-kicker {
    font-family: var(--pb-carte-font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--pb-carte-gold);
    margin-bottom: 16px;
    position: relative;
}

.pb-carte-hero h1 {
    font-family: var(--pb-carte-font-display);
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 400;
    color: var(--pb-carte-cream);
    letter-spacing: 2px;
    margin-bottom: 12px;
    position: relative;
}

.pb-carte-hero-subtitle {
    font-family: var(--pb-carte-font-accent);
    font-size: 20px;
    font-style: italic;
    color: var(--pb-carte-cream-dim);
    font-weight: 400;
    position: relative;
}

/* ==========================================================================
   NOTICE BAR
   ========================================================================== */
.pb-carte-notice {
    max-width: 780px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
    font-family: var(--pb-carte-font-accent);
    font-size: 16px;
    font-style: italic;
    color: var(--pb-carte-cream-dim);
    background: var(--pb-carte-bg);
}

.pb-carte-notice strong {
    font-style: normal;
    color: var(--pb-carte-cream);
}

/* ==========================================================================
   STICKY TABS WITH ARROWS
   ========================================================================== */
.pb-carte-tabs-wrapper {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(22,22,22,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--pb-carte-divider);
    transition: box-shadow 0.3s;
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

.pb-carte-tabs-wrapper.pb-carte-scrolled {
    box-shadow: 0 4px 30px rgba(0,0,0,0.6);
}

.pb-carte-tabs-container {
    position: relative;
    max-width: 960px;
    margin: 0 auto;
}

/* Arrow buttons */
.pb-carte-arrow {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 44px;
    z-index: 10;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pb-carte-gold);
    font-size: 18px;
    transition: opacity 0.3s, color 0.3s;
    background: transparent;
}

.pb-carte-arrow:hover {
    color: var(--pb-carte-cream);
}

.pb-carte-arrow-left {
    left: 0;
    background: linear-gradient(to right, rgba(22,22,22,0.95) 50%, transparent);
}

.pb-carte-arrow-right {
    right: 0;
    background: linear-gradient(to left, rgba(22,22,22,0.95) 50%, transparent);
}

.pb-carte-arrow.pb-hidden {
    opacity: 0;
    pointer-events: none;
}

.pb-carte-arrow svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

/* Scrollable tabs */
.pb-carte-tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-behavior: smooth;
    padding: 0 44px;
    -webkit-overflow-scrolling: touch;
}

.pb-carte-tabs::-webkit-scrollbar { display: none; }

.pb-carte-tab {
    flex-shrink: 0;
    padding: 15px 20px;
    font-family: var(--pb-carte-font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--pb-carte-muted);
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    transition: color 0.3s, background 0.3s;
    white-space: nowrap;
}

.pb-carte-tab:hover {
    color: var(--pb-carte-gold);
    background: #212021;
}

.pb-carte-tab.pb-carte-active {
    color: var(--pb-carte-gold);
}

.pb-carte-tab.pb-carte-active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 2px;
    background: var(--pb-carte-gold);
    transition: all 0.3s;
}

/* ==========================================================================
   PARALLAX BANNER
   ========================================================================== */
.pb-carte-parallax {
    position: relative;
    height: 340px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

.pb-carte-parallax-bg {
    position: absolute;
    inset: -60px 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    will-change: transform;
}

/* iOS fallback — background-attachment: fixed non supporté */
@supports (-webkit-touch-callout: none) {
    .pb-carte-parallax-bg {
        background-attachment: scroll;
        inset: 0;
    }
}

.pb-carte-parallax::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(22,22,22,0.4) 0%,
        rgba(22,22,22,0.7) 50%,
        rgba(22,22,22,0.95) 100%
    );
    z-index: 1;
}

.pb-carte-parallax-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 20px;
}

.pb-carte-parallax-content h2 {
    font-family: var(--pb-carte-font-display);
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 400;
    letter-spacing: 2px;
    color: var(--pb-carte-cream);
    margin: 0 0 8px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.pb-carte-parallax-content p {
    font-family: var(--pb-carte-font-accent);
    font-size: 19px;
    font-style: italic;
    color: var(--pb-carte-cream-dim);
    margin: 0;
}

.pb-carte-ornament-line {
    display: block;
    width: 50px;
    height: 1px;
    background: var(--pb-carte-gold-dim);
    margin: 14px auto 0;
}

/* ==========================================================================
   MENU SECTION (zone des plats sous chaque banner)
   ========================================================================== */
.pb-carte-section {
    max-width: 780px;
    margin: 0 auto;
    padding: 50px 20px 30px;
    background: var(--pb-carte-bg);
}

/* Sous-catégorie (ex: "Les Fondues", "Les Croûtes") */
.pb-carte-subcategory {
    margin-bottom: 45px;
}

.pb-carte-subcategory-title {
    font-family: var(--pb-carte-font-display);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--pb-carte-gold);
    padding-bottom: 12px;
    margin: 0 0 22px;
    border-bottom: 1px solid var(--pb-carte-divider);
}

/* ==========================================================================
   MENU ITEM (ligne plat + prix)
   ========================================================================== */
.pb-carte-item {
    padding: 13px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: background 0.2s, padding 0.2s, margin 0.2s;
}

.pb-carte-item:hover {
    background: var(--pb-carte-surface-hover);
    margin: 0 -16px;
    padding: 13px 16px;
    border-radius: 4px;
    border-bottom-color: transparent;
}

/* Ligne 1 : nom + dots + prix */
.pb-carte-item-header {
    display: flex;
    align-items: baseline;
}

.pb-carte-item-name {
    font-family: var(--pb-carte-font-body);
    font-size: 15.5px;
    font-weight: 400;
    color: var(--pb-carte-cream);
}

.pb-carte-item-dots {
    flex: 1;
    min-width: 20px;
    border-bottom: 1px dotted rgba(226,193,157,0.18);
    margin: 0 10px;
    align-self: baseline;
    position: relative;
    top: -4px;
}

.pb-carte-item-price {
    font-family: var(--pb-carte-font-body);
    font-size: 15.5px;
    font-weight: 700;
    color: var(--pb-carte-gold);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Ligne 2+ : description, badges, notes (pleine largeur) */
.pb-carte-item-details {
    padding-top: 4px;
}

.pb-carte-item-desc {
    font-family: var(--pb-carte-font-accent);
    font-size: 15px;
    font-style: italic;
    color: var(--pb-carte-muted);
    line-height: 1.5;
}

/* ==========================================================================
   BADGES (Nouveau, Maison, Végétarien)
   ========================================================================== */
.pb-carte-item-badges {
    display: flex;
    gap: 6px;
    margin-top: 5px;
}

.pb-carte-badge {
    display: inline-block;
    font-family: var(--pb-carte-font-body);
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 2px;
    border: 1px solid;
}

.pb-carte-badge-nouveau {
    color: var(--pb-carte-gold);
    border-color: rgba(226,193,157,0.35);
}

.pb-carte-badge-veg {
    color: #7da87d;
    border-color: rgba(125,168,125,0.35);
}

.pb-carte-badge-maison {
    color: var(--pb-carte-cream-dim);
    border-color: rgba(245,240,232,0.18);
}

/* ==========================================================================
   MENU SET / FORMULE (encadré spécial)
   ========================================================================== */
.pb-carte-menu-set {
    background: var(--pb-carte-surface);
    border: 1px solid var(--pb-carte-divider);
    border-radius: 6px;
    padding: 30px;
    margin: 30px 0;
    text-align: center;
}

.pb-carte-menu-set-title {
    font-family: var(--pb-carte-font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--pb-carte-gold);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0 0 18px;
}

.pb-carte-menu-set-items {
    font-family: var(--pb-carte-font-accent);
    font-size: 17px;
    color: var(--pb-carte-cream-dim);
    line-height: 2;
}

.pb-carte-menu-set-items .pb-carte-sep {
    display: block;
    margin: 2px auto;
    color: var(--pb-carte-gold-dim);
    font-size: 12px;
    letter-spacing: 6px;
}

.pb-carte-menu-set-price {
    margin-top: 18px;
    font-family: var(--pb-carte-font-display);
    font-size: 26px;
    font-weight: 700;
    color: var(--pb-carte-gold);
}

/* ==========================================================================
   NOTES
   ========================================================================== */

/* Note de section (type "note") */
.pb-carte-section-note {
    padding: 14px 0;
    font-family: var(--pb-carte-font-accent);
    font-size: 15px;
    font-style: italic;
    color: var(--pb-carte-cream-dim);
    line-height: 1.6;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.pb-carte-section-note strong {
    display: block;
    font-family: var(--pb-carte-font-body);
    font-style: normal;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--pb-carte-muted);
    margin-bottom: 4px;
}

/* Note sous un plat normal */
.pb-carte-item-note {
    font-family: var(--pb-carte-font-accent);
    font-size: 13.5px;
    font-style: italic;
    color: var(--pb-carte-muted);
    margin-top: 4px;
    line-height: 1.5;
}

/* Note sous une formule/coffret */
.pb-carte-menu-set-note {
    font-family: var(--pb-carte-font-accent);
    font-size: 14px;
    font-style: italic;
    color: var(--pb-carte-muted);
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--pb-carte-divider);
    line-height: 1.6;
}

/* ==========================================================================
   SCROLL PROGRESS BAR
   ========================================================================== */
.pb-carte-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--pb-carte-gold);
    z-index: 11;
    width: 0%;
    transition: width 0.1s linear;
    opacity: 0.5;
    pointer-events: none;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 600px) {
    .pb-carte-hero {
        min-height: 35vh;
        padding: 40px 16px 30px;
    }

    .pb-carte-tabs {
        padding: 0 36px;
    }

    .pb-carte-tab {
        padding: 13px 12px;
        font-size: 10px;
        letter-spacing: 1.5px;
    }

    .pb-carte-arrow {
        width: 36px;
    }

    .pb-carte-parallax {
        height: 240px;
    }

    .pb-carte-section {
        padding: 35px 16px 20px;
    }

    .pb-carte-item:hover {
        margin: 0 -10px;
        padding: 13px 10px;
    }

    .pb-carte-menu-set {
        padding: 22px 16px;
    }
}

@media (min-width: 601px) and (max-width: 960px) {
    .pb-carte-parallax {
        height: 280px;
    }
}

/* ==========================================================================
   PRINT
   ========================================================================== */
@media print {
    .pb-carte-tabs-wrapper,
    .pb-carte-progress {
        display: none;
    }

    .pb-carte-parallax {
        height: auto;
        padding: 20px;
        background: #eee;
        width: auto;
        margin-left: 0;
    }

    .pb-carte-parallax-bg {
        display: none;
    }

    .pb-carte-parallax::after {
        display: none;
    }

    .pb-carte-parallax-content h2 {
        color: #000;
        text-shadow: none;
    }

    .pb-carte-parallax-content p {
        color: #555;
    }

    .pb-carte-section {
        background: #fff;
    }

    .pb-carte-item-name {
        color: #000;
    }

    .pb-carte-item-price {
        color: #000;
    }
}