/* Styles généraux */
:root {
    --primary-color: #6f80d5; 
    --secondary-color: #0d3888; 
    --accent-color: #8c6239; 
    --dark-color: #2c3e50; 
    --light-color: #f8f9fa; 
    --gray-color: #6c757d;
    --white: #ffffff;
    --shadow: 0 5px 15px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--white);
    padding-top: 100px;
    overflow-x: hidden;
    width: 100%;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

h1, h2, h3, h4 {
    margin-bottom: 15px;
    color: var(--dark-color);
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

h2:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--secondary-color);
}

h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

p {
    margin-bottom: 15px;
}

ul {
    list-style: none;
}

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

.text-center {
    text-align: center;
}

.btn {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background-color: #0a2d6e;
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

section {
    padding: 80px 0;
    width: 100%;
}

.section-light {
    background-color: var(--light-color);
}

/* Header - Version améliorée */
header {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--shadow);
    transition: var(--transition);
    transform: translateY(0);
}

header.hidden {
    transform: translateY(-100%);
}

header .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 15px;
    position: relative;
}

.logo-text2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 20px;
    text-align: center;
    display: block;
}

.logo-container {
    display: flex;
    justify-content: center;
    width: 100%;
    order: 1;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.logo-img {
    height: 60px;
    width: auto;
    max-width: 100%;
    margin: 0 auto;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    margin-top: 8px;
    text-align: center;
}

.logo-highlight {
    color: #8cbced;
}

/* Navigation responsive */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.8rem;
    cursor: pointer;
    position: absolute;
    right: 10px;
    top: 10px;
    z-index: 1001;
    padding: 5px;
    background-color: rgba(0,0,0,0.2);
    border-radius: 4px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
}

nav {
    width: 100%;
    display: flex;
    justify-content: center;
    order: 2;
}

nav ul {
    display: flex;
    gap: 25px;
    transition: var(--transition);
}

nav ul li {
    margin: 0;
}

nav ul li a {
    color: var(--white);
    font-weight: 500;
    transition: var(--transition);
    padding: 8px 0;
    position: relative;
    font-size: 1.1rem;
    display: block;
    white-space: nowrap;
}

nav ul li a:hover {
    color: var(--secondary-color);
}

nav ul li a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

nav ul li a:hover:after {
    width: 100%;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 500px;
    max-height: 800px;
    overflow: hidden;
    margin-top: -100px;
    padding-top: 100px;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

/* Slide 1 - Image de cartons */
.slide:nth-child(1) {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('image/https://images.unsplash.com/photo-1589923186741-b7d59d6b2c4c?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1770&q=80');
    background-size: cover;
    background-position: center;
}

/* Slide 2 - Image de maison vide */
.slide:nth-child(2) {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('image/https://images.unsplash.com/photo-1560518883-ce09059eeffa?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1770&q=80');
    background-size: cover;
    background-position: center;
}

/* Slide 3 - Image de recyclage */
.slide:nth-child(3) {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('image/https://images.unsplash.com/photo-1589923188900-85dae523342b?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1770&q=80');
    background-size: cover;
    background-position: center;
}

.slide-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    max-width: 90%;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    margin: 0 15px;
}

.slide-content h1 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.slide-content p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(111, 128, 213, 0.6), rgba(13, 56, 136, 0.4));
    z-index: 1;
}

.carousel-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    transform: translateY(-50%);
    z-index: 3;
}

.carousel-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
}

.carousel-btn:hover {
    background-color: var(--secondary-color);
    transform: scale(1.1);
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 3;
    gap: 10px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background-color: var(--secondary-color);
    transform: scale(1.2);
}

.dot:hover {
    background-color: var(--white);
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-top: 40px;
}

.service-card {
    background-color: var(--white);
    border-radius: 10px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    border-top: 4px solid var(--primary-color);
    height: 100%;
    opacity: 0;
    transform: translateY(20px);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.service-icon {
    font-size: 2rem;
    color: white;
    margin-bottom: 15px;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 50%;
}

/* Localisation Section */
#localisation {
    padding: 60px 0;
}

.localisation-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.localisation-text {
    text-align: center;
}

.localisation-text h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.map-container {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.map-responsive {
    position: relative;
    padding-bottom: 56.25%; /* Ratio 16:9 */
    height: 0;
    overflow: hidden;
}

.map-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Gallery Section */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.gallery-item {
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    transition: var(--transition);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(20px);
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

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

.gallery-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #e9ecef;
    color: var(--gray-color);
    font-size: 1rem;
    text-align: center;
    padding: 20px;
    height: 100%;
    border: 2px dashed #ccc;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
}

.gallery-placeholder:hover {
    background-color: #dee2e6;
    border-color: var(--primary-color);
}

.gallery-placeholder i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* Section Avis */
#avis {
    padding: 80px 0;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    align-items: center;
    margin-top: 40px;
}

.about-text {
    line-height: 1.8;
}

/* Contact Section */
.contact-info {
    background-color: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    border-left: 5px solid var(--secondary-color);
    margin-top: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
    padding: 15px;
    border-radius: 8px;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
}

.contact-item:hover {
    background-color: #f8f9fa;
}

.contact-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 20px;
    color: white;
    font-size: 1.2rem;
    box-shadow: var(--shadow);
}

.contact-text {
    flex: 1;
}

.contact-text h4 {
    margin-bottom: 5px;
}

.contact-text a {
    color: var(--secondary-color);
}

.contact-text a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 50px 0 0;
    margin-top: 60px;
    width: 100%;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
    padding: 0 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.footer-about {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-about .logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
}

.footer-about .logo-img {
    height: 50px;
    margin-bottom: 10px;
}

.footer-links h3, .footer-contact h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a:hover {
    color: var(--secondary-color);
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.footer-contact i {
    color: var(--secondary-color);
    width: 20px;
}

.copyright {
    text-align: center;
    padding: 20px;
    border-top: 1px solid #444;
    font-size: 0.9rem;
    color: #aaa;
    background-color: rgba(0, 0, 0, 0.2);
    width: 100%;
}

/* =============================== */
/* MEDIA QUERIES POUR RESPONSIVE */
/* =============================== */

/* Pour tablettes et écrans moyens */
@media (max-width: 992px) {
    body {
        padding-top: 90px;
    }
    
    .hero {
        margin-top: -90px;
        padding-top: 90px;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .slide-content h1 {
        font-size: 2rem;
    }
    
    .services-grid {
        gap: 20px;
    }
    
    .service-card {
        padding: 20px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .gallery-item {
        height: 250px;
    }
    
    section {
        padding: 60px 0;
    }
}

/* Pour mobiles (768px et moins) */
@media (max-width: 768px) {
    body {
        padding-top: 80px;
        font-size: 15px;
    }
    
    .hero {
        margin-top: -80px;
        padding-top: 80px;
        min-height: 400px;
        max-height: 500px;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .header-top {
        margin-bottom: 10px;
        flex-wrap: wrap;
    }
    
    .logo-container {
        width: calc(100% - 60px);
        justify-content: center;
    }
    
    .logo-img {
        height: 50px;
    }
    
    .logo-text {
        font-size: 1.3rem;
        margin-top: 5px;
    }
    
    /* Navigation mobile */
    nav {
        position: static;
        order: 3;
        margin-top: 0;
        width: 100%;
        display: block;
    }
    
    nav ul {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--dark-color);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        box-shadow: var(--shadow);
        z-index: 999;
        display: flex;
        height: 0;
        overflow: hidden;
    }
    
    nav ul.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        height: auto;
        min-height: 300px;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
    
    nav ul li {
        margin: 10px 0;
        width: 100%;
        text-align: center;
    }
    
    nav ul li a {
        padding: 12px 20px;
        display: block;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    nav ul li:last-child a {
        border-bottom: none;
    }
    
    section {
        padding: 50px 0;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.6rem;
        margin-bottom: 25px;
    }
    
    h2:after {
        width: 60px;
        bottom: -8px;
    }
    
    .slide-content {
        padding: 15px;
        max-width: 95%;
    }
    
    .slide-content h1 {
        font-size: 1.6rem;
        margin-bottom: 10px;
    }
    
    .slide-content p {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .carousel-controls {
        padding: 0 5px;
    }
    
    .carousel-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .carousel-dots {
        bottom: 15px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 30px;
    }
    
    .service-icon {
        font-size: 1.8rem;
        width: 60px;
        height: 60px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .gallery-item {
        height: 220px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .contact-info {
        padding: 20px;
        margin-top: 10px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 15px;
    }
    
    .footer-about, .footer-links, .footer-contact {
        text-align: center;
    }
    
    .contact-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .contact-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .localisation-content {
        gap: 20px;
    }
    
    .map-responsive {
        padding-bottom: 75%;
    }
}

/* Pour petits mobiles (576px et moins) */
@media (max-width: 576px) {
    body {
        padding-top: 70px;
        font-size: 14px;
    }
    
    .hero {
        margin-top: -70px;
        padding-top: 70px;
        min-height: 350px;
        max-height: 450px;
    }
    
    .container {
        width: 95%;
        padding: 0 10px;
    }
    
    .logo-img {
        height: 45px;
    }
    
    .logo-text {
        font-size: 1.2rem;
    }
    
    nav ul {
        top: 70px;
    }
    
    h1 {
        font-size: 1.6rem;
    }
    
    h2 {
        font-size: 1.4rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .slide-content h1 {
        font-size: 1.4rem;
    }
    
    .slide-content p {
        font-size: 0.9rem;
    }
    
    section {
        padding: 40px 0;
    }
    
    .service-card {
        padding: 20px 15px;
    }
    
    .gallery-item {
        height: 200px;
    }
    
    .contact-info {
        padding: 15px;
    }
    
    .copyright {
        font-size: 0.8rem;
        padding: 15px;
    }
}

/* Pour très petits écrans (moins de 400px) */
@media (max-width: 400px) {
    .logo-text {
        font-size: 1.1rem;
    }
    
    .slide-content h1 {
        font-size: 1.2rem;
    }
    
    .carousel-btn {
        width: 32px;
        height: 32px;
    }
    
    .gallery-grid {
        gap: 10px;
    }
    
    .gallery-item {
        height: 180px;
    }
    
    .service-icon {
        font-size: 1.6rem;
        width: 50px;
        height: 50px;
    }
    
    .logo-text2 {
        font-size: 2rem;
    }
}