/* ==========================================================================
   Mode cuisine lightbox — interface epuree etape par etape
   ========================================================================== */

/* Scroll lock */
html.cuisine-lightbox-open {
    overflow-y: scroll;
}

body.cuisine-lightbox-open {
    position: fixed;
    width: 100%;
    top: calc(var(--scroll-top, 0px) * -1);
}

/* Masquer la nav PWA quand la lightbox est ouverte */
body.cuisine-lightbox-open #pwaNavSections {
    display: none !important;
}

/* Loader */
.cuisine-lb-loader {
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cuisine-lb-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary-color, #ff6b6b);
    border-radius: 50%;
    animation: cuisineLbSpin 0.7s linear infinite;
}

@keyframes cuisineLbSpin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Lightbox container
   ========================================================================== */

.cuisine-lb {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: #1a1a1a;
    display: flex;
    flex-direction: column;
    color: #f0f0f0;
}

/* ==========================================================================
   Bouton fermer (croix) — style identique a #lightboxClose
   ========================================================================== */

.cuisine-lb-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.cuisine-lb-close svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.cuisine-lb-close:hover {
    background-color: rgba(255, 107, 107, 0.8);
    transform: rotate(90deg);
}

/* ==========================================================================
   Header
   ========================================================================== */

.cuisine-lb-header {
    flex-shrink: 0;
    padding: 12px 20px 8px;
    background: #222;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cuisine-lb-progress {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
}

.cuisine-lb-progress-seg {
    flex: 1;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.15);
    transition: background 0.3s ease;
}

.cuisine-lb-progress-seg.active {
    background: var(--primary-color, #ff6b6b);
}

/* ==========================================================================
   Contenu scrollable
   ========================================================================== */

.cuisine-lb-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 20px 30px;
}

.cuisine-lb-content {
    max-width: 700px;
    margin: 0 auto;
}

/* ==========================================================================
   Banniere grande etape
   ========================================================================== */

.cuisine-lb-grande-etape-banner {
    margin: 0 0 8px;
    padding: 18px 22px;
    display: flex;
    align-items: baseline;
    gap: 10px;
    justify-content: center;
}

.cuisine-lb-grande-etape-label {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary-color, #ff6b6b);
    font-weight: 700;
    white-space: nowrap;
}

.cuisine-lb-grande-etape-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    color: #fff;
    line-height: 1.3;
}

/* ==========================================================================
   Sous-etape
   ========================================================================== */


/* Image etape avec skeleton loader */
.cuisine-lb-step-image {
    position: relative;
    margin-bottom: 18px;
    border-radius: 12px;
    min-height: 200px;
    background: rgba(255, 255, 255, 0.04);
    animation: cuisineLbSkeleton 1.5s ease-in-out infinite;
}

.cuisine-lb-step-image.loaded {
    min-height: 0;
    background: none;
    animation: none;
}

@keyframes cuisineLbSkeleton {
    0%, 100% { background: rgba(255, 255, 255, 0.04); }
    50% { background: rgba(255, 255, 255, 0.08); }
}

.cuisine-lb-step-image img {
    width: 100%;
    max-height: 35vh;
    object-fit: contain;
    display: block;
    border-radius: 12px;
}

/* Description */
.cuisine-lb-step-desc {
    margin-bottom: 18px;
}

.cuisine-lb-step-desc p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.88);
    margin: 0;
}

/* ==========================================================================
   Ingredients de l'etape — quantites bien en evidence
   ========================================================================== */

.cuisine-lb-step-ingredients {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.cuisine-lb-ingredient {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px 10px 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
}

.cuisine-lb-ingredient-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: contain;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.08);
}

.cuisine-lb-ingredient-no-img {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
    font-size: 1rem;
}

.cuisine-lb-ingredient-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cuisine-lb-ingredient-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: #f0f0f0;
}

.cuisine-lb-ingredient-qty {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--primary-color, #ff6b6b);
}

/* ==========================================================================
   Timers
   ========================================================================== */

.cuisine-lb-timers {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.cuisine-lb-timer-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: rgba(66, 133, 244, 0.15);
    border: 1.5px solid rgba(66, 133, 244, 0.3);
    border-radius: 25px;
    color: #8ab4f8;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cuisine-lb-timer-btn:hover {
    background: rgba(66, 133, 244, 0.25);
    border-color: rgba(66, 133, 244, 0.5);
}

.cuisine-lb-timer-btn.running {
    background: rgba(66, 133, 244, 0.25);
    border-color: #4285f4;
    color: #fff;
    animation: cuisineLbPulse 2s ease-in-out infinite;
}

.cuisine-lb-timer-btn.finished {
    background: rgba(76, 175, 80, 0.2);
    border-color: #4caf50;
    color: #81c784;
    animation: none;
}

@keyframes cuisineLbPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(66, 133, 244, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(66, 133, 244, 0); }
}

.cuisine-lb-timer-play {
    font-size: 0.8rem;
}

.cuisine-lb-timer-clock {
    font-size: 0.85rem;
    opacity: 0.6;
}

/* ==========================================================================
   Navigation (style auth-badge du hamburger)
   ========================================================================== */

.cuisine-lb-nav {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin: 24px 0;
}

.cuisine-lb-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 45%;
    padding: 13px 60px;
    border-radius: 10px;
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #f0f0f0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cuisine-lb-nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.cuisine-lb-nav-btn:first-child:not(:last-child) {
    margin-right: auto;
}

.cuisine-lb-nav-btn-primary {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    border-color: #ff6b6b;
    color: white;
}

.cuisine-lb-nav-btn-primary:hover {
    background: linear-gradient(135deg, #ff5252 0%, #ff4444 100%);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
    border-color: #ff5252;
    color: white;
}

/* ==========================================================================
   Zone pub (entre contenu et navigation)
   ========================================================================== */

.cuisine-lb-ad {
    display: flex;
    justify-content: center;
    margin: 24px 0 0;
    padding-bottom: 30px;
    min-height: 280px;
}


/* ==========================================================================
   Ecran final — Felicitations
   ========================================================================== */

.cuisine-lb-final {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 60vh;
    padding: 40px 20px;
}

.cuisine-lb-final-emoji {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: cuisineLbBounce 0.6s ease;
}

@keyframes cuisineLbBounce {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.cuisine-lb-final-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 12px;
}

.cuisine-lb-final-text {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.6;
    margin: 0 0 36px;
}

.cuisine-lb-final-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 340px;
}

.cuisine-lb-final-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 24px;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    border: 2px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: #f0f0f0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cuisine-lb-final-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

.cuisine-lb-final-btn-primary {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    border-color: #ff6b6b;
    color: white;
}

.cuisine-lb-final-btn-primary:hover {
    background: linear-gradient(135deg, #ff5252 0%, #ff4444 100%);
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.4);
    border-color: #ff5252;
}

.cuisine-lb-final-btn-retour {
    margin-top: 8px;
    border-color: rgba(255, 255, 255, 0.08);
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    font-size: 0.92rem;
}

.cuisine-lb-final-btn-retour:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.04);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (min-width: 768px) {
    .cuisine-lb-scroll {
        padding: 0 40px 30px;
    }

    .cuisine-lb-header {
        padding: 16px 40px 10px;
    }

    .cuisine-lb-step-image img {
        max-height: 35vh;
    }
}

@media (max-width: 480px) {
    .cuisine-lb-header {
        padding: 10px 14px 6px;
    }

    .cuisine-lb-scroll {
        padding: 0 14px 20px;
    }

    .cuisine-lb-grande-etape-title {
        font-size: 1.05rem;
    }

    .cuisine-lb-step-desc p {
        font-size: 0.95rem;
    }

    .cuisine-lb-step-image img {
        max-height: 30vh;
    }

    .cuisine-lb-nav-btn {
        padding: 11px 12px;
        font-size: 13.5px;
    }
}
