/* Variables et reset */
:root {
    --primary: #8B4513;
    --secondary: #D2B48C;
    --accent: #A0522D;
    --light: #F5F5DC;
    --dark: #3E2723;
    --text: #333333;
    --white: #FFFFFF;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

/* Mobile First Approach */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.5;
    color: var(--text);
    background-color: var(--white);
    overflow-x: hidden;
    font-size: 1rem;
}

body.armenian {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, 'Arial Armenian', sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Typography Mobile First */
h1 {
    font-size: clamp(1.8rem, 6vw, 3.5rem);
    line-height: 1.2;
}

h2 {
    font-size: clamp(1.6rem, 5vw, 2.5rem);
    line-height: 1.3;
}

h3 {
    font-size: clamp(1.3rem, 4vw, 1.8rem);
    line-height: 1.3;
}

p, li, a {
    font-size: clamp(0.95rem, 3vw, 1.1rem);
    line-height: 1.6;
}

/* Header Mobile Optimized */
header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
    height: 70px;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    height: 100%;
    position: relative;
}

/* Logo avec image */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 200;
    color: var(--primary);
    z-index: 1001;
    text-decoration: none;
}

.logo img {
    height: 40px;
    width: auto;
    max-height: 100%;
    object-fit: contain;
}

.logo span {
    font-size: clamp(1.1rem, 4vw, 1.4rem);
    font-weight: 700;
    color: var(--primary);
}

/* Language Switcher */
.language-switcher {
    display: flex;
    align-items: center;
    margin-right: 15px;
    z-index: 1001;
    margin-left: auto;
}

.lang-btn {
    background: none;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: clamp(6px, 2vw, 8px) clamp(10px, 3vw, 15px);
    margin: 0 4px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    font-size: clamp(0.8rem, 3vw, 0.9rem);
}

.lang-btn.active {
    background-color: var(--primary);
    color: var(--white);
}

.lang-btn:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* Mobile Toggle */
.mobile-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 1001;
    background: transparent;
    border: none;
    order: 3;
}

.logo {
    font-size: clamp(1.0rem, 4vw, 0.8rem);
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    z-index: 1001;
}

.logo i {
    margin-right: 8px;
    font-size: clamp(1.0rem, 4vw, 1.0rem);
}

/* Language Switcher */
.language-switcher {
    display: flex;
    align-items: center;
    margin-right: 15px;
    z-index: 1001;
}

.lang-btn {
    background: none;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: clamp(6px, 2vw, 8px) clamp(10px, 3vw, 15px);
    margin: 0 4px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    font-size: clamp(0.8rem, 3vw, 0.9rem);
}

.lang-btn.active {
    background-color: var(--primary);
    color: var(--white);
}

.lang-btn:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* Mobile Menu - Default State */
.nav-menu {
    display: none;
}

.mobile-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 1001;
    background: transparent;
    border: none;
}

.mobile-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary);
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 2px;
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateX(-100%);
    transition: var(--transition);
    z-index: 999;
    padding: 20px;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu ul {
    text-align: center;
    width: 100%;
}

.mobile-menu li {
    margin: clamp(15px, 4vh, 25px) 0;
}

.mobile-menu a {
    font-size: clamp(1.1rem, 4vw, 1.4rem);
    font-weight: 600;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    padding: 12px 20px;
    display: block;
    width: 100%;
    border-radius: 8px;
}

.mobile-menu a:hover {
    color: var(--primary);
    background-color: var(--light);
}

/* Hero Section - RÈGLES UNIFIÉES */
.hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/atelier-tapissier.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 600px;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 70px; /* Pour compenser le header fixe */
}

/* Fallback si l'image ne se charge pas */
.hero.no-hero-bg {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%) !important;
}

/* Classe pour quand l'image est chargée (optionnelle) */
.hero.has-hero-bg {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/atelier-tapissier.jpg') !important;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    width: 100%;
    text-align: center;
    color: var(--white);
    padding: 20px;
}

.hero h1 {
    margin-bottom: clamp(15px, 4vh, 25px);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    margin-bottom: clamp(25px, 6vh, 35px);
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: var(--white);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.btn {
    background-color: var(--primary);
    color: var(--white);
    border: none;
    padding: clamp(12px, 3vw, 14px) clamp(24px, 5vw, 32px);
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: clamp(0.9rem, 3vw, 1rem);
    text-align: center;
    min-width: 160px;
}

.btn:hover {
    background-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
/* Buttons Mobile Optimized */
.btn {
    display: inline-block;
    padding: clamp(12px, 3vw, 14px) clamp(24px, 5vw, 32px);
    background-color: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: clamp(0.9rem, 3vw, 1rem);
    text-align: center;
    width: auto;
    min-width: 160px;
}

.btn:hover {
    background-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

/* Sections */
section {
    padding: clamp(50px, 10vh, 70px) 0;
}

.section-title {
    text-align: center;
    margin-bottom: clamp(30px, 8vh, 50px);
    position: relative;
}

.section-title h2 {
    color: var(--dark);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background-color: var(--primary);
    margin: 0 auto;
}

/* About Section */
.about {
    background-color: var(--light);
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: clamp(30px, 6vh, 40px);
}

.about-text h3 {
    margin-bottom: clamp(15px, 3vh, 20px);
    color: var(--dark);
}

.about-text p {
    margin-bottom: clamp(15px, 3vh, 20px);
}

/* About Section - Images */
.about-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    order: -1;
    min-height: 300px; /* Hauteur minimum */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light); /* Fond si l'image est petite */
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Remplit le conteneur */
    display: block;
    transition: var(--transition);
    min-height: 300px;
}

.about-image:hover img {
    transform: scale(1.05);
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(20px, 4vh, 25px);
}

.service-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    padding: clamp(25px, 5vh, 30px) clamp(15px, 3vw, 20px);
    position: relative;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: var(--primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

/* Service Icons - Agrandissement */
.service-icon {
    font-size: clamp(3rem, 8vw, 4rem); /* Agrandi */
    color: var(--primary);
    margin-bottom: clamp(15px, 3vh, 25px);
}


.service-card h3 {
    margin-bottom: clamp(12px, 2vh, 15px);
    color: var(--dark);
}

/* Specialization Section */
.specialization {
    background-color: var(--light);
}

.specialization-content {
    display: flex;
    flex-direction: column;
    gap: clamp(30px, 6vh, 40px);
}

.specialization-text h3 {
    margin-bottom: clamp(15px, 3vh, 20px);
    color: var(--dark);
}

.specialization-text ul {
    margin-bottom: clamp(20px, 4vh, 25px);
}

.specialization-text li {
    margin-bottom: clamp(10px, 2vh, 12px);
    position: relative;
    padding-left: 30px;
}

.specialization-text li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
    font-size: 1.2rem;
}
/* Specialization Section - Images */
.specialization-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    order: -1;
    min-height: 350px; /* Hauteur minimum plus grande pour les voitures */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light);
}

.specialization-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: var(--transition);
    min-height: 350px;
}

.specialization-image:hover img {
    transform: scale(1.05);
}

/* Gallery Section */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(15px, 3vh, 20px);
}
/* Gallery Section - Amélioration */
.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    height: 250px;
    box-shadow: var(--shadow);
    background-color: var(--light); /* Fond de secours */
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Changé de 'cover' pour mieux remplir */
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(139, 69, 19, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: var(--white);
    font-size: clamp(1.5rem, 5vw, 2rem);
}

/* Contact Section */
.contact-content {
    display: flex;
    flex-direction: column;
    gap: clamp(30px, 6vh, 40px);
}

.contact-info h3 {
    margin-bottom: clamp(15px, 3vh, 20px);
    color: var(--dark);
}

.contact-info p {
    margin-bottom: clamp(15px, 3vh, 20px);
}

.contact-details {
    margin-top: clamp(20px, 4vh, 30px);
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: clamp(15px, 3vh, 20px);
}

.contact-item i {
    font-size: 1.3rem;
    color: var(--primary);
    margin-right: 15px;
    width: 25px;
}

.contact-form {
    width: 100%;
}

.form-group {
    margin-bottom: clamp(20px, 4vh, 25px);
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: clamp(12px, 3vh, 15px);
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.2);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Footer Mobile Optimized */
footer {
    background-color: var(--dark);
    color: var(--white);
    padding: clamp(40px, 8vh, 50px) 0 25px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: clamp(30px, 6vh, 40px);
    margin-bottom: 40px;
}

.footer-column h3 {
    font-size: clamp(1.1rem, 4vw, 1.3rem);
    margin-bottom: clamp(15px, 3vh, 20px);
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary);
}

.footer-links li {
    margin-bottom: clamp(10px, 2vh, 12px);
}

.footer-links a {
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(40px, 8vw, 45px);
    height: clamp(40px, 8vw, 45px);
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
    font-size: 1.2rem;
}

.social-links a:hover {
    background-color: var(--primary);
    transform: translateY(-5px);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ========== TABLETTES ========== */
@media (min-width: 768px) {
    .container {
        width: 85%;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-content,
    .specialization-content,
    .contact-content {
        flex-direction: row;
        gap: 50px;
    }
    
    .about-image,
    .specialization-image {
        order: 0;
    }
    
    .footer-content {
        flex-direction: row;
        gap: 30px;
    }
}

/* ========== DESKTOP ========== */
@media (min-width: 992px) {
    .mobile-toggle,
    .mobile-menu {
        display: none !important;
    }
    
    .nav-menu {
        display: flex !important;
    }
    
    .nav-menu li {
        margin-left: 30px;
    }
    
    .nav-menu a {
        font-weight: 600;
        text-transform: uppercase;
        font-size: 0.9rem;
        letter-spacing: 1px;
        transition: var(--transition);
        position: relative;
        padding: 8px 0;
    }
    
    .nav-menu a:hover {
        color: var(--primary);
    }
    
    .nav-menu a::after {
        content: '';
        position: absolute;
        width: 0;
        height: 2px;
        background-color: var(--primary);
        bottom: 0;
        left: 0;
        transition: var(--transition);
    }
    
    .nav-menu a:hover::after {
        width: 100%;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========== GRANDS ÉCRANS ========== */
@media (min-width: 1200px) {
    .services-grid {
        gap: 40px;
    }
    
    .service-card {
        padding: 40px 30px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) {
    .btn:hover,
    .service-card:hover,
    .gallery-item:hover img,
    .about-image:hover img,
    .specialization-image:hover img,
    .social-links a:hover {
        transform: none;
    }
    
    .service-card:hover::before {
        transform: scaleX(1);
    }
    
    .gallery-item:hover .gallery-overlay {
        opacity: 1;
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero {
        background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/atelier-tapissier.jpg');
    }
}


/* Pour les écrans très larges */
@media (min-width: 2000px) {
    .hero {
        background-size: 100% auto !important;
    }
}


/* Header - Correction d'alignement */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    height: 100%;
    position: relative;
}

/* Ajustement du language switcher */
.language-switcher {
    display: flex;
    align-items: center;
    margin-left: auto; /* Pousse vers la droite */
    margin-right: 15px;
    z-index: 1001;
}

/* Menu desktop - repositionnement */
.nav-menu {
    display: none;
    align-items: center;
}

/* Sur mobile, réorganiser l'ordre des éléments */
@media (max-width: 991px) {
    .header-container {
        justify-content: space-between;
    }
    
    .logo {
        order: 1;
        flex: 1;
    }
    
    .language-switcher {
        order: 2;
        margin-left: 0;
    }
    
    .mobile-toggle {
        order: 3;
    }
}