/* ========================================
   RESPONSIVE DESIGN
======================================== */

/* Force no horizontal overflow */
* {
    max-width: 100%;
}

img, video {
    max-width: 100%;
    height: auto;
}

/* Tablets and below (1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .configurator-container {
        grid-template-columns: 1fr;
    }

    .order-summary {
        position: relative;
        top: 0;
    }

    .pizzas-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }

    .hero-title {
        font-size: 4.5rem;
    }

    .hero-subtitle {
        font-size: 2rem;
    }

    .hero-badges {
        gap: 2rem;
    }
}

/* Mobile Landscape and below (768px) */
@media (max-width: 768px) {
    .container { padding: 0 10px; max-width: 100vw; width: 100%; overflow-x: hidden; }

    /* Navigation */
    .nav-container {
        padding: 1rem;
    }

    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        max-width: 100vw;
        height: calc(100vh - 80px);
        background: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        padding: 2rem;
        transition: left 0.3s;
        box-shadow: var(--shadow-lg);
        z-index: 999;
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
    }

    .nav-cta {
        display: none;
    }

    /* Hero */
    .hero { height: 100svh; width: 100%; overflow: hidden; }

    .hero-title {
        font-size: 2.8rem;
        letter-spacing: 0.05em;
    }

    .hero-subtitle {
        font-size: 1.3rem;
        letter-spacing: 0.2em;
    }

    .hero-tagline {
        font-size: 0.95rem;
    }

    /* Shorter typing width on mobile */
    .typing { --typing-width: 32ch; animation: typing 2.4s steps(32, end) 0.5s forwards, blink 0.8s step-end infinite 2.9s; }

    .hero-badges {
        flex-direction: row;
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .badge {
        flex: 0 0 auto;
    }

    .badge i {
        font-size: 2rem;
    }

    .badge span {
        font-size: 0.75rem;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
        padding: 0 20px;
        margin-top: 1rem;
    }

    .btn-hero {
        width: 100%;
    }

    /* Section Titles */
    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    /* About */
    .about-text {
        padding: 1rem;
    }

    .about-intro {
        font-size: 1.1rem;
    }

    .about-description {
        font-size: 1rem;
    }

    .about-awards {
        gap: 1rem;
    }

    .award-badge {
        height: 60px;
    }

    .image-frame img {
        height: 360px;
        object-position: center 5%;
    }

    /* Pizzas - Activer le carrousel sur mobile */
    .pizzas-grid {
        display: none;
    }

    .pizzas-carousel {
        display: block;
    }

    /* Configurator */
    .step-title {
        font-size: 1.2rem;
        padding: 1rem 1.5rem;
    }

    .step-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .bases-grid {
        grid-template-columns: 1fr;
    }

    .ingredients-categories {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .category-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .ingredients-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .ingredient-option {
        padding: 1rem 0.5rem;
    }

    .ingredient-name {
        font-size: 0.85rem;
    }

    /* Menu */
    .menu-grid {
        grid-template-columns: 1fr;
    }

    .menu-card {
        max-width: 500px;
        margin: 0 auto;
    }

    .boisson-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .item-desc {
        padding: 0;
    }

    /* Contact */
    .info-card {
        flex-direction: column;
        text-align: center;
    }

    .social-icons {
        align-items: stretch;
    }

    .map-container {
        min-height: 300px;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }

    /* Carrousel visible en mobile */
    #pizzasGrid { display: none; }
    #pizzasCarousel { display: block; width: 100%; max-width: 100vw; }
    .carousel-nav { display: flex; }
}

/* Mobile Portrait (480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .nav-container {
        padding: 1rem;
    }

    .nav-logo img {
        height: 70px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
        letter-spacing: 0.2em;
    }

    .hero-tagline {
        font-size: 0.9rem;
    }

    .badge i {
        font-size: 2rem;
    }

    .badge span {
        font-size: 0.8rem;
    }

    .btn-primary, .btn-secondary, .btn-hero {
        padding: 12px 30px;
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .about-intro {
        font-size: 1rem;
    }

    .about-description {
        font-size: 0.95rem;
    }

    .about-quote {
        font-size: 1rem;
        padding: 1.5rem;
    }

    .award-badge {
        height: 50px;
    }

    .pizza-name {
        font-size: 1.5rem;
    }

    .pizza-price {
        font-size: 1.3rem;
    }

    .pizza-description {
        font-size: 0.9rem;
    }

    .step-title {
        font-size: 1.1rem;
        padding: 1rem;
    }

    .ingredients-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.8rem;
    }

    .order-summary {
        padding: 1.5rem;
    }

    .summary-header h3 {
        font-size: 1.5rem;
    }

    .total-label {
        font-size: 1.3rem;
    }

    .total-price {
        font-size: 1.8rem;
    }

    .category-title {
        font-size: 2rem;
    }

    .menu-item-name {
        font-size: 1.3rem;
    }

    .wine-highlight {
        padding: 2rem;
    }

    .wine-highlight i {
        font-size: 2.5rem;
    }

    .wine-highlight p {
        font-size: 1.1rem;
    }

    .wine-price {
        font-size: 1.8rem;
    }

    .info-card {
        padding: 1.5rem;
    }

    .info-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }

    .info-content h4 {
        font-size: 1.1rem;
    }

    .info-content p,
    .info-content a {
        font-size: 1rem;
    }

    .call-button {
        width: 45px;
        height: 45px;
        bottom: 75px;
        right: 20px;
        font-size: 1.1rem;
        z-index: 1001 !important;
    }

    .scroll-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        z-index: 1001 !important;
    }
}

/* Extra Small Mobile (360px) */
@media (max-width: 360px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .pizza-image {
        height: 250px;
    }

    .menu-image {
        height: 200px;
    }

    .ingredients-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .ingredient-name {
        font-size: 0.8rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hero,
    .call-button,
    .scroll-top,
    .btn-primary,
    .btn-secondary,
    .btn-order,
    .hamburger,
    footer {
        display: none;
    }

    body {
        color: black;
        background: white;
    }

    .section-title {
        color: black;
    }

    .pizza-card,
    .menu-card,
    .info-card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}