/* Variables CSS pour les couleurs */
:root {
    --color-primary: #8B4513; /* SaddleBrown */
    --color-secondary: #D2B48C; /* Tan */
    --color-accent: #F4A460; /* SandyBrown */
    --color-text: #362E2B; /* Dark Brown */
    --color-background: #FFF8DC; /* Cornsilk */
    --color-light-background: #FDF5E6; /* OldLace */
    --color-white: #FFFFFF;
    --color-black: #000000;

    --font-family-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    --font-family-serif: Georgia, "Times New Roman", Times, serif;
}

/* Réinitialisation de base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-sans);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Conteneur général */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* Typographie */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-serif);
    color: var(--color-primary);
    margin-bottom: 0.8em;
    line-height: 1.2;
}

h1 {
    font-size: 2.2rem;
}

h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1.5em;
}

h3 {
    font-size: 1.7rem;
    text-align: center;
    margin-bottom: 1.2em;
}

p {
    margin-bottom: 1em;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover,
a:focus {
    text-decoration: underline;
    outline: none;
}

/* Boutons */
.btn {
    display: inline-block;
    background-color: var(--color-accent);
    color: var(--color-white);
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
    font-weight: bold;
    border: 2px solid var(--color-accent);
}

.btn:hover,
.btn:focus {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    text-decoration: none;
    outline: none;
}

/* Header */
header {
    background-color: var(--color-white);
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    color: var(--color-primary);
    text-decoration: none;
}

.logo img {
    margin-right: 0.5rem;
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

.logo h1 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--color-primary);
}

.menu-toggle {
    display: none; /* Masqué par défaut sur desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--color-primary);
    font-size: 1.5rem;
}

.menu-toggle svg {
    display: block;
    width: 24px;
    height: 24px;
}

#main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

#main-nav a {
    color: var(--color-text);
    font-weight: bold;
    padding: 0.5rem 0;
    display: block;
    position: relative;
}

#main-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: width 0.3s ease;
}

#main-nav a:hover::after,
#main-nav a:focus::after {
    width: 100%;
}

/* Sections générales */
section {
    padding: 4rem 0;
}

section:nth-of-type(even) {
    background-color: var(--color-light-background);
}

/* Section Hero */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><defs><linearGradient id="g" x1="0%" y1="0%" x2="0%" y2="100%"><stop offset="0%" stop-color="%23D2B48C"/><stop offset="100%" stop-color="%23FDF5E6"/></linearGradient></defs><rect x="0" y="0" width="100" height="100" fill="url(%23g)"/></svg>');
    background-size: cover;
    background-position: center;
    color: var(--color-white);
    text-align: center;
    padding: 6rem 1rem;
}

.hero h2 {
    font-size: 3rem;
    color: var(--color-white);
    margin-bottom: 0.5em;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Section À Propos */
.about p {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Section Produits */
.products h3 {
    margin-bottom: 2rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.product-item {
    background-color: var(--color-white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease;
}

.product-item:hover {
    transform: translateY(-5px);
}

.product-item img {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.product-item h4 {
    font-size: 1.4rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

/* Section Horaires */
.hours .container {
    text-align: center;
}

.hours h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.hours h3 img {
    width: 30px;
    height: 30px;
    color: var(--color-primary);
}

.hours ul {
    list-style: none;
    padding: 0;
    max-width: 300px;
    margin: 1.5rem auto;
    text-align: left;
}

.hours ul li {
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--color-secondary);
}

.hours ul li:last-child {
    border-bottom: none;
}

.hours .intro-text, .hours .note {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-style: italic;
    color: #555;
}

/* Section Contact */
.contact .container {
    text-align: center;
}

.contact h3 {
    margin-bottom: 2rem;
}

.contact-info {
    max-width: 500px;
    margin: 0 auto 2rem auto;
    text-align: left;
    background-color: var(--color-white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.contact-info p:last-child {
    margin-bottom: 0;
}

.contact-info img {
    width: 30px;
    height: 30px;
    color: var(--color-primary);
    flex-shrink: 0;
}

.contact-info a {
    word-break: break-all;
}

.contact-note {
    font-style: italic;
    color: #555;
}

/* Footer */
footer {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 2rem 0;
    text-align: center;
    position: relative;
}

footer p {
    margin: 0;
}

.back-to-top {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background-color: var(--color-accent);
    color: var(--color-white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.back-to-top:hover,
.back-to-top:focus {
    background-color: var(--color-secondary);
    outline: none;
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    display: block;
}

/* Accessibilité */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Media Queries pour le responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 2.2rem;
    }

    .hero {
        padding: 4rem 1rem;
    }

    .hero h2 {
        font-size: 2.5rem;
    }

    .logo h1 {
        font-size: 1.3rem;
    }

    .menu-toggle {
        display: block; /* Affiche le bouton sur mobile */
    }

    header .container {
        flex-wrap: nowrap;
    }

    #main-nav {
        flex-basis: 100%;
        order: 3; /* Place la nav en dessous du logo et du toggle */
        height: 0;
        overflow: hidden;
        transition: height 0.3s ease-out, opacity 0.3s ease-out;
        opacity: 0;
        visibility: hidden;
    }

    #main-nav.active {
        height: auto;
        opacity: 1;
        visibility: visible;
    }

    #main-nav ul {
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
        background-color: var(--color-white);
        border-top: 1px solid var(--color-secondary);
    }

    #main-nav a {
        padding: 0.8rem 1rem;
        width: 100%;
        text-align: center;
    }

    #main-nav a::after {
        display: none;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .back-to-top {
        bottom: 0.5rem;
        right: 0.5rem;
        width: 35px;
        height: 35px;
    }

    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    section {
        padding: 3rem 0;
    }

    .logo h1 {
        font-size: 1.2rem;
    }

    .logo img {
        width: 40px;
        height: 40px;
    }

    h3 {
        font-size: 1.5rem;
    }
}
