/* ===== GLOBAL RESET & BASE STYLES ===== */
:root {
    --primary-color: #2C943C;
    --secondary-color: #1E6B2B;
    --dark-color: #1A1A1A;
    --light-color: #F5F5F5;
    --accent-color: #FF6B00;
    --text-color: #333;
    --white: #FFFFFF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--light-color);
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===== HEADER STYLES ===== */
.main-header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-logo {
    height: 60px;
    width: auto;
    transition: transform 0.3s;
}

.main-logo:hover {
    transform: scale(1.05);
}

/* Navigation */
.main-nav ul {
    display: flex;
    list-style: none;
    justify-content: center;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.main-nav a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: var(--primary-color);
}

.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-color);
    background: none;
    border: none;
}

/* ===== HERO SECTIONS ===== */
.hero,
.page-hero {
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 6rem 2rem;
    text-align: center;
}

.page-hero {
    padding: 4rem 2rem;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1,
.page-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p,
.page-hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.8rem 1.8rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.cta-button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* ===== SECTION STYLES ===== */
.section {
    padding: 4rem 0;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
    font-size: 2rem;
    position: relative;
}

.section h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: var(--primary-color);
    margin: 1rem auto 0;
}

/* ===== SERVICES PAGE STYLES ===== */
.services-page {
    padding: 3rem 0;
}

.service-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.service-card.reverse {
    direction: rtl;
}

.service-card.reverse > * {
    direction: ltr;
}

.service-image {
    height: 100%;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-content {
    padding: 2rem;
}

.service-content h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.service-features {
    margin: 2rem 0;
    padding-left: 1.5rem;
}

.service-features li {
    margin-bottom: 1rem;
    position: relative;
    line-height: 1.6;
}

.service-features li::before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
    position: absolute;
}

/* ===== FACTORY PAGE STYLES ===== */
.factory-page {
    padding: 3rem 0;
}

.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.equipment-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.equipment-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.equipment-image {
    height: 200px;
    overflow: hidden;
}

.equipment-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.equipment-card:hover .equipment-image img {
    transform: scale(1.05);
}

.equipment-details {
    padding: 1.5rem;
}

.equipment-details h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.equipment-specs {
    list-style: none;
    padding-left: 0;
}

.equipment-specs li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1.2rem;
    line-height: 1.5;
}

.equipment-specs li::before {
    content: "→";
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

/* ===== CONTACT PAGE STYLES ===== */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 2rem 0;
}

.contact-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.contact-form h2,
.contact-info h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: flex;
    gap: 1.5rem;
}

.form-row .form-group {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    transition: border-color 0.3s;
    font-size: 1rem;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(44, 148, 60, 0.2);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-details address p,
.business-hours li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: flex-start;
    gap: 0rem;
}

.contact-details a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-details a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.contact-map {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    height: 300px;
}

.business-hours ul {
    list-style: none;
}

.business-hours li {
    padding: 0.3rem 0;
}

/* Form Messages */
.form-message {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    color: white;
    text-align: center;
}

.form-message.success {
    background-color: #2C943C;
}

.form-message.error {
    background-color: #dc3545;
}

/* Loading state */
button[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}

.error-message {
    color: red;
    font-size: 0.8rem;
    display: block;
    margin-top: 0.3rem;
}

/* ===== FOOTER STYLES ===== */
.main-footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-logo img {
    height: 50px;
    margin-bottom: 1rem;
}

.slogan {
    font-style: italic;
    opacity: 0.8;
    max-width: 250px;
}

.footer-contact h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.copyright {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 992px) {
    .service-card,
    .service-card.reverse {
        grid-template-columns: 1fr;
        direction: ltr;
    }
    
    .service-image {
        height: 300px;
    }
}

@media (max-width: 768px) {
    header {
        position: relative;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        gap: 1.5rem;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        z-index: 99;
    }
    
    .main-nav ul.show {
        transform: translateY(0);
        display: flex;
    }
    
    .main-nav a {
        font-size: 1.1rem;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero,
    .page-hero {
        padding: 4rem 1rem;
    }
    
    .hero h1,
    .page-hero h1 {
        font-size: 2rem;
    }
    
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
    
    .slogan {
        margin: 0 auto;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .equipment-grid {
        grid-template-columns: 1fr;
    }
    
    .slider-container img {
        height: 300px;
    }
    
    .mission-grid,
    .ressources-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .column-image img {
        max-height: 250px;
    }

    .hero h1,
    .page-hero h1 {
        font-size: 1.8rem;
    }
    
    .section h2 {
        font-size: 1.5rem;
    }
    
    .service-content {
        padding: 1.5rem;
    }
    
    .service-content h2 {
        font-size: 1.5rem;
    }

    .equipment-image {
        height: 180px;
    }
    
    .slider-container img {
        height: 200px;
    }
    
    .about-section h2 {
        font-size: 1.5rem;
    }

    .usine-gallery img {
        height: 200px;
    }
}

/* ===== ABOUT PAGE STYLES ===== */
.about-page {
    padding: 3rem 0;
}

.about-section {
    margin-bottom: 4rem;
}

.about-section h2 {
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--primary-color);
    font-size: 2rem;
    position: relative;
}

.about-section h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: var(--primary-color);
    margin: 1rem auto 2rem;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.about-text {
    max-width: 800px;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Image Slider */
.image-slider {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.slider-container {
    display: flex;
    animation: slide 15s infinite;
    width: 300%;
}

.slider-container img {
    width: 33.33%;
    height: 400px;
    object-fit: cover;
}

@keyframes slide {
    0%, 30% { transform: translateX(0); }
    33%, 63% { transform: translateX(-33.33%); }
    66%, 97% { transform: translateX(-66.66%); }
}

/* Mission Grid */
.mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.mission-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-align: center;
}

.mission-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.mission-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Ressources */
.ressources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.ressource-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.ressource-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    text-align: center;
}
.ressource-card p {
    text-align: justify;
}

/* Usine Gallery */
.usine-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.usine-gallery img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.usine-gallery img:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* ===== REALISATIONS PAGE STYLES ===== */
.realisations-page {
    padding: 3rem 0;
}

.realisations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.realisation-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.realisation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.realisation-image {
    height: 200px;
    overflow: hidden;
}

.realisation-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.realisation-card:hover .realisation-image img {
    transform: scale(1.05);
}

.realisation-content {
    padding: 1.5rem;
}

.realisation-content h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.realisation-specs {
    list-style: none;
    padding-left: 0;
}

.realisation-specs p {
    margin-bottom: 0.8rem;
    position: relative;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
    .realisations-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== VIDEO HERO STYLES ===== */
.video-hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-hero video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 1;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 2;
}

.video-hero .hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    padding: 0 2rem;
    max-width: 800px;
}

.video-hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.video-hero p {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== VALEURS SECTION ===== */
.valeurs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.valeur-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.valeur-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.valeur-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.valeur-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* ===== PRODUITS SECTION ===== */
.produits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.produit-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.produit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.produit-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.produit-card > div {
    padding: 1.5rem;
}

.produit-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.cta-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.cta-link:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

/* ===== CTA SECTION ===== */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta-section h2 {
    color: white !important;
}

.cta-section p {
    opacity: 0.9;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button.secondary {
    background: white;
    color: var(--primary-color);
}

.cta-button.secondary:hover {
    background: rgba(255,255,255,0.9);
}

/* Responsive */
@media (max-width: 768px) {
    .video-hero h1 {
        font-size: 2rem;
    }
    
    .video-hero p {
        font-size: 1.2rem;
    }
    
    .valeurs-grid,
    .produits-grid {
        grid-template-columns: 1fr;
    }
}