/* Styles personnalisés pour Astier Menuiserie - Multi-pages */

/* Texture bois pour header et footer */
.wood-texture-header {
    background: 
        /* Overlay sombre pour améliorer la lisibilité du texte */
        linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
        /* Image de fond bois */
        url('../images/fond-bois.jpg');
    background-size: auto 100%;
    background-position: left center;
    background-repeat: repeat-x;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2), inset 0 -1px 2px rgba(255, 255, 255, 0.1);
}

/* Pseudo-élément simplifié pour le header */
.wood-texture-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1));
    pointer-events: none;
}

.wood-texture-footer {
    background: 
        /* Overlay plus sombre pour le footer */
        linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
        /* Image de fond bois */
        url('../images/fond-bois.jpg');
    background-size: auto 100%;
    background-position: left center;
    background-repeat: repeat-x;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), inset 0 -1px 2px rgba(255, 255, 255, 0.05);
}

/* Pseudo-élément simplifié pour le footer */
.wood-texture-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.15));
    pointer-events: none;
}

/* Navigation avec texture bois */
.wood-texture-nav {
    background: 
        linear-gradient(90deg, transparent 0%, rgba(139, 69, 19, 0.3) 20%, transparent 40%, rgba(160, 82, 45, 0.4) 60%, transparent 80%, rgba(139, 69, 19, 0.3) 100%),
        linear-gradient(135deg, #8B4513 0%, #A0522D 50%, #8B4513 100%);
    background-size: 80px 100%, 100% 100%;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15), inset 0 -1px 1px rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(160, 82, 45, 0.5);
}

/* Layout global */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Navigation multi-pages */
.nav-link.active {
    background-color: #654321 !important;
    font-weight: 600;
}

/* Navigation mobile */
@media (max-width: 768px) {
    .wood-texture-nav .container {
        position: relative;
    }
    
    #navigation-menu {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: 
            linear-gradient(90deg, transparent 0%, rgba(139, 69, 19, 0.3) 20%, transparent 40%, rgba(160, 82, 45, 0.4) 60%, transparent 80%, rgba(139, 69, 19, 0.3) 100%),
            linear-gradient(135deg, #8B4513 0%, #A0522D 50%, #8B4513 100%);
        background-size: 80px 100%, 100% 100%;
        flex-direction: column;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 50;
        width: 100%;
    }
    
    #navigation-menu.show {
        display: flex !important;
        animation: slideDown 0.3s ease-out;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Styles pour le bouton hamburger */
    #mobile-menu-btn {
        display: block !important;
        color: #F5F5DC;
        font-size: 1.25rem;
        padding: 0.5rem;
        border-radius: 0.25rem;
        transition: background-color 0.2s ease;
    }
    
    #mobile-menu-btn:hover {
        background-color: #654321;
    }
    
    #navigation-menu li {
        width: 100%;
    }
    
    #navigation-menu .group:hover ul {
        position: static;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        background: 
            linear-gradient(90deg, transparent 0%, rgba(101, 67, 33, 0.4) 15%, transparent 30%, rgba(139, 69, 19, 0.3) 45%, transparent 60%, rgba(101, 67, 33, 0.5) 75%, transparent 100%),
            linear-gradient(135deg, #654321 0%, #8B4513 30%, #654321 60%, #5D4037 100%);
    }
}

/* Styles pour les onglets de navigation */
.nav-link.active {
    background-color: #654321;
    font-weight: 600;
}

/* Animation pour les sections */
.section-content {
    animation: fadeIn 0.5s ease-in-out;
}

.section-content.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Styles pour les boutons de filtre */
.gallery-filter-btn, .review-filter-btn {
    background-color: #f5f5dc;
    color: #654321;
    border: 2px solid #e6e6b8;
}

.gallery-filter-btn:hover, .review-filter-btn:hover {
    background-color: #e6e6b8;
    border-color: #8B4513;
}

.gallery-filter-btn.active, .review-filter-btn.active {
    background-color: #8B4513;
    color: #f5f5dc;
    border-color: #654321;
}

/* Styles pour les contenus de galerie */
.gallery-content {
    animation: fadeIn 0.3s ease-in-out;
}

.gallery-content.hidden {
    display: none !important;
}

/* Hover effects pour les cartes */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Styles pour les icônes */
.icon-spin {
    transition: transform 0.3s ease;
}

.icon-spin:hover {
    transform: rotate(360deg);
}

/* Styles pour les boutons */
.btn-wood {
    background: linear-gradient(135deg, #8B4513, #654321);
    color: #f5f5dc;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-wood:hover {
    background: linear-gradient(135deg, #654321, #8B4513);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(139, 69, 19, 0.3);
}

/* Responsive typography */
@media (max-width: 640px) {
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
}

/* Amélioration de l'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: 0;
}

/* Effets hover pour les éléments avec texture bois */
.wood-texture-header a:hover,
.wood-texture-nav a:hover {
    background: rgba(139, 69, 19, 0.2);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.wood-texture-footer a:hover {
    background: rgba(101, 67, 33, 0.3);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    transition: all 0.3s ease;
}

/* Amélioration des boutons avec texture bois */
.wood-texture-nav .nav-link:hover {
    background: 
        radial-gradient(ellipse at center, rgba(160, 82, 45, 0.4) 0%, transparent 70%),
        linear-gradient(135deg, rgba(139, 69, 19, 0.6) 0%, rgba(101, 67, 33, 0.4) 100%);
}

.wood-texture-nav .nav-link.active {
    background: 
        radial-gradient(ellipse at center, rgba(101, 67, 33, 0.6) 0%, transparent 70%),
        linear-gradient(135deg, rgba(101, 67, 33, 0.8) 0%, rgba(83, 53, 21, 0.6) 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Focus styles */
a:focus,
button:focus {
    outline: 2px solid #8B4513;
    outline-offset: 2px;
}

/* Hero Section avec background image */
.hero-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Text shadow pour le hero */
.text-shadow-lg {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7), 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.text-shadow {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Overlay pour améliorer la lisibilité */
.hero-overlay {
    background: linear-gradient(135deg, rgba(101, 67, 33, 0.8), rgba(139, 69, 19, 0.7));
}

/* Optimisation mobile pour les heroes */
@media (max-width: 768px) {
    /* Désactiver background-attachment: fixed sur mobile pour de meilleures performances */
    .hero-bg {
        background-attachment: scroll;
    }
    
    /* Améliorer la lisibilité sur petits écrans */
    .text-shadow-lg {
        text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8), 1px 1px 3px rgba(0, 0, 0, 0.6);
    }
}

/* Styles pour les images de hero responsives */
section.relative img {
    object-position: center;
}

@media (max-width: 640px) {
    section.relative img {
        object-position: center top;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f5f5dc;
}

::-webkit-scrollbar-thumb {
    background: #8B4513;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #654321;
}

/* Styles pour les images de galerie */
.gallery-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.gallery-image:hover {
    transform: scale(1.05);
}

/* Styles pour les images dans les items de galerie */
.gallery-item img {
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.02);
}

/* Styles pour les images d'aperçu */
.preview-image {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.preview-image:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Loading spinner (pour les futures fonctionnalités) */
.spinner {
    border: 3px solid #f5f5dc;
    border-top: 3px solid #8B4513;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Styles pour les messages/notifications */
.notification {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.notification.success {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.notification.error {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.notification.info {
    background-color: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}