/* ========================================
   RESET CSS - Normalisation et Styles de Base
   ======================================== */

/* Reset universel */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Optimisations pour les performances et CLS */
html {
    scroll-behavior: smooth;
    font-size: 16px; /* Base pour rem */
}

body {
    font-family: var(--font-family-primary), serif;
    line-height: var(--line-height-normal);
    color: var(--color-text);
    background-color: var(--color-bg);
    transition: background-color var(--transition-normal), color var(--transition-normal);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Images responsives */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Prévention du CLS pour les images */
.gallery-item img,
.footer-logo,
.logo-img {
    aspect-ratio: attr(width) / attr(height);
    object-fit: cover;
}

/* Amélioration de la performance des transitions */
*,
*::before,
*::after {
    will-change: auto;
}

/* Optimisation pour les éléments avec transform */
.gallery-item,
.menu-card,
.testimonial-card,
.reservation-btn,
.maps-button {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Typographie de base */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-secondary), serif;
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
    margin-bottom: var(--spacing-md);
    line-height: var(--line-height-relaxed);
}

/* Liens */
a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-dark);
}

/* Listes */
ul, ol {
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-lg);
}

li {
    margin-bottom: var(--spacing-xs);
}

/* Boutons de base */
button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* Inputs de base */
input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}


/* Focus visible pour l'accessibilité - seulement lors de navigation clavier */
:focus {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Sélection de texte */
::selection {
    background-color: var(--color-primary);
    color: white;
}

/* Scrollbar personnalisée - desktop uniquement */
@media (min-width: 769px) {
    ::-webkit-scrollbar {
        width: 8px;
    }

    ::-webkit-scrollbar-track {
        background: var(--color-bg-secondary);
    }

    ::-webkit-scrollbar-thumb {
        background: var(--color-secondary);
        border-radius: var(--border-radius-sm);
    }

    ::-webkit-scrollbar-thumb:hover {
        background: var(--color-secondary-dark);
    }
}

/* Désactiver scrollbar personnalisée sur mobile */
@media (max-width: 768px) {
    ::-webkit-scrollbar {
        width: 0px;
        background: transparent;
    }
    
    /* Fallback pour navigateurs qui ne supportent pas width: 0 */
    ::-webkit-scrollbar-track {
        background: transparent;
    }
    
    ::-webkit-scrollbar-thumb {
        background: transparent;
    }
    
    /* Utiliser scrollbar native sur mobile */
    * {
        scrollbar-width: thin;
        scrollbar-color: transparent transparent;
    }
} 