/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablettes et petits écrans */
@media (max-width: 1024px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
    }

    .container {
        padding: 0 var(--spacing-sm);
    }

    .section-title {
        font-size: 2.5rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-info {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile et petits écrans */
@media (max-width: 768px) {
    :root {
        --spacing-md: 1.5rem;
        --spacing-lg: 2.5rem;
        --spacing-xl: 3rem;
    }

    html {
        font-size: 14px;
    }

    /* Header mobile */
    .header-content {
        padding: 0.75rem 0;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .tagline {
        font-size: 0.7rem;
    }

    .menu-toggle {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: white;
        box-shadow: -5px 0 20px rgba(0,0,0,0.2);
        transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        padding: 0;
        z-index: 998;
        overflow-y: auto;
    }

    .nav.active {
        right: 0;
    }

    /* En-tête du menu avec drapeau italien */
    .nav::before {
        content: '';
        display: block;
        height: 8px;
        background: linear-gradient(90deg, var(--green-italy) 33.33%, var(--white-italy) 33.33%, var(--white-italy) 66.66%, var(--red-italy) 66.66%);
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
        align-items: flex-start;
        padding: 5rem 2rem 2rem 2rem;
    }

    .nav-link {
        width: 100%;
        padding: 1.25rem 0;
        font-size: 1.125rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        display: flex;
        align-items: center;
        gap: 1rem;
        transition: var(--transition);
    }

    .nav-link:hover {
        padding-left: 10px;
        color: var(--accent-color);
    }

    .nav-link.active {
        color: var(--accent-color);
        font-weight: 600;
        padding-left: 10px;
    }

    .nav-link::before {
        content: '';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        opacity: 0;
        transition: var(--transition);
    }

    .nav-link.active::before,
    .nav-link:hover::before {
        opacity: 1;
    }

    /* Hero mobile */
    .hero {
        min-height: 90vh;
        padding-top: 60px;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .flag-stripe {
        width: 60px;
        height: 6px;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
        padding: 1rem 1.5rem;
    }

    .hero-info {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .info-item {
        width: 100%;
        justify-content: center;
        font-size: 0.85rem;
        padding: 0.625rem 1rem;
    }

    /* Section headers mobile */
    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 0.813rem;
    }

    .title-decoration span {
        width: 40px;
    }

    .title-decoration i {
        font-size: 1.25rem;
    }

    /* About section mobile */
    .lead {
        font-size: 1.125rem;
    }

    .about-text p {
        font-size: 1rem;
    }

    .about-features {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    .feature {
        flex-direction: row;
        text-align: left;
        padding: var(--spacing-sm);
    }

    .feature i {
        font-size: 2.5rem;
    }

    /* Menu section mobile - Carrousel */
    .menu-filters {
        display: flex;
        gap: 0.75rem;
        padding: 0;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin: 0 calc(-1 * var(--spacing-md));
        padding: 0 var(--spacing-md) 1rem var(--spacing-md);
    }

    .menu-filters::-webkit-scrollbar {
        display: none;
    }

    .filter-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.875rem;
        flex-shrink: 0;
        min-width: auto;
        scroll-snap-align: start;
        white-space: nowrap;
    }

    .filter-btn i {
        font-size: 1.125rem;
    }

    /* Grille des plats en carrousel horizontal */
    .menu-grid {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: var(--spacing-sm);
        padding-bottom: 1rem;
        margin: 0;
        padding-left: calc((100vw - 85vw) / 2);
        padding-right: calc((100vw - 85vw) / 2);
    }

    .menu-grid::-webkit-scrollbar {
        display: none;
    }

    .menu-item {
        flex-shrink: 0;
        width: 85vw;
        max-width: 350px;
        scroll-snap-align: center;
    }

    .menu-item.hidden {
        display: none;
    }

    .menu-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    .menu-item-image {
        height: 200px;
    }

    .menu-item.boissons .menu-item-image {
        height: 200px;
        object-fit: contain;
        padding: 0.75rem;
        background: white;
    }

    .menu-item.boissons .menu-item-image-container {
        background: #f0f0f0;
    }

    .menu-item.desserts .menu-item-image {
        height: 200px;
        object-fit: contain;
        padding: 0.75rem;
        background: white;
    }

    .menu-item.desserts .menu-item-image-container {
        background: #f0f0f0;
    }

    .menu-item-content {
        padding: var(--spacing-sm);
    }

    .menu-item-name {
        font-size: 1.25rem;
    }

    .menu-item-price {
        font-size: 1.25rem;
    }

    .menu-item-description {
        font-size: 0.9rem;
    }

    /* Gallery mobile */
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    /* Contact mobile */
    .contact-info {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    .contact-card {
        padding: var(--spacing-sm);
    }

    .contact-icon {
        font-size: 2rem;
    }

    .contact-map {
        min-height: 300px;
    }

    /* Floating actions mobile */
    .floating-actions {
        right: 1rem;
        bottom: 1rem;
        gap: 0.75rem;
    }

    .floating-btn {
        width: 55px;
        height: 55px;
    }

    .floating-btn i {
        font-size: 1.25rem;
    }

    .call-btn .btn-text {
        display: none;
    }

    /* Scroll to top mobile */
    .scroll-top {
        bottom: 1rem;
        left: 1rem;
        width: 45px;
        height: 45px;
    }

    .scroll-top i {
        font-size: 1.125rem;
    }
}

    /* Carrousel smooth scroll */
    .menu-filters {
        scroll-behavior: smooth;
    }

/* Petits mobiles */
@media (max-width: 480px) {
    :root {
        --spacing-sm: 0.75rem;
        --spacing-md: 1rem;
        --spacing-lg: 2rem;
        --spacing-xl: 2.5rem;
    }

    html {
        font-size: 13px;
    }

    .logo h1 {
        font-size: 1.25rem;
    }

    .filter-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.813rem;
    }

    .menu-grid {
        padding-left: calc((100vw - 80vw) / 2);
        padding-right: calc((100vw - 80vw) / 2);
    }

    .menu-item {
        width: 80vw;
        max-width: 320px;
    }    .hero-title {
        font-size: 1.875rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-stars {
        font-size: 1rem;
        flex-wrap: wrap;
    }

    .rating-text {
        width: 100%;
        text-align: center;
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .btn {
        font-size: 0.9rem;
        padding: 0.875rem 1.25rem;
    }

    .filter-btn {
        padding: 0.625rem 1rem;
    }

    .menu-item-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .menu-item-price {
        align-self: flex-start;
    }

    .contact-card h3 {
        font-size: 1.125rem;
    }

    .social-link {
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }

    .floating-btn {
        width: 50px;
        height: 50px;
    }
}

/* Très grands écrans */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }

    .section-title {
        font-size: 3.5rem;
    }

    .hero-title {
        font-size: 5rem;
    }

    .menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

/* Hauteur d'écran pour mobile */
@media (max-height: 700px) and (max-width: 768px) {
    .hero {
        min-height: auto;
        padding: 6rem var(--spacing-md) 3rem;
    }

    .hero-content {
        padding: var(--spacing-sm);
    }

    .hero-title {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: var(--spacing-sm);
    }

    .hero-buttons {
        margin-bottom: var(--spacing-md);
    }

    .hero-scroll {
        display: none;
    }
}

/* Mode paysage mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 5rem var(--spacing-md) 2rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: var(--spacing-sm);
    }

    .hero-info,
    .hero-scroll {
        display: none;
    }

    .flag-decoration {
        margin-bottom: var(--spacing-sm);
    }

    .hero-buttons {
        margin-bottom: var(--spacing-sm);
    }
}

/* Print styles */
@media print {
    .header,
    .floating-actions,
    .scroll-top,
    .hero-buttons,
    .menu-filters,
    .order-btn,
    .gallery-overlay {
        display: none !important;
    }

    .hero {
        background: white;
        color: black;
        min-height: auto;
        padding: 2rem;
    }

    .section-title,
    .hero-title {
        color: black;
    }

    body {
        font-size: 12pt;
    }

    .menu-item {
        page-break-inside: avoid;
    }
}

/* Accessibilité - Réduction des animations */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero {
        background-attachment: scroll;
    }
}

/* Mode sombre (si activé par le système) */
@media (prefers-color-scheme: dark) {
    /* Optionnel : vous pouvez ajouter des styles pour le mode sombre ici */
    /* Pour l'instant, le site garde son design clair */
}

/* Optimisation pour les écrans tactiles */
@media (hover: none) and (pointer: coarse) {
    .floating-btn,
    .btn,
    .filter-btn,
    .nav-link {
        -webkit-tap-highlight-color: transparent;
    }

    .floating-btn:active {
        transform: scale(0.95);
    }

    .btn:active {
        transform: translateY(0) scale(0.98);
    }

    .menu-item:hover {
        transform: none;
    }

    .gallery-item:hover img {
        transform: none;
    }
}

/* Fix pour Safari */
@supports (-webkit-touch-callout: none) {
    .hero {
        background-attachment: scroll;
    }
}

/* Fix pour les notch des mobiles récents */
@supports (padding: max(0px)) {
    .header,
    .floating-actions,
    .scroll-top {
        padding-left: max(var(--spacing-md), env(safe-area-inset-left));
        padding-right: max(var(--spacing-md), env(safe-area-inset-right));
    }

    .hero-content {
        padding-left: max(var(--spacing-md), env(safe-area-inset-left));
        padding-right: max(var(--spacing-md), env(safe-area-inset-right));
    }
}