@import url('https://fonts.googleapis.com/css2?family=Urbanist:wght@300;400;500;600;700&display=swap');

/* ========================================
   VARIABLES CSS - SERVICES
   ======================================== */
:root {
    --primary-green: #7d9b6d;
    --primary-green-light: #9bb88a;
    --primary-green-lighter: #b8d4a8;
    --primary-green-dark: #5f7a52;
    --primary-green-glow: rgba(125, 155, 109, 0.3);

    --bg-light: #f8faf7;
    --bg-card: #ffffff;
    --text-dark: #2d3a2a;
    --text-medium: #4a5a46;

    --shadow-sm: 0 2px 8px rgba(45, 58, 42, 0.06);
    --shadow-md: 0 4px 20px rgba(45, 58, 42, 0.08);
    --shadow-lg: 0 8px 40px rgba(45, 58, 42, 0.12);
    --shadow-glow: 0 0 30px rgba(125, 155, 109, 0.15);

    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

/* ========================================
   BASE
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Urbanist', sans-serif;
    background: linear-gradient(135deg, var(--bg-light) 0%, #eef3ec 100%);
    color: var(--text-dark);
    min-height: 100vh;
    line-height: 1.6;
}

/* ========================================
   HEADER
   ======================================== */
header {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    color: #ffffff;
    padding: 24px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.logo img {
    max-width: 140px;
    border-radius: var(--radius-md);
    transition: var(--transition-smooth);
}

.logo img:hover {
    transform: scale(1.05);
}

nav a {
    color: #ffffff;
    text-decoration: none;
    margin-top: 12px;
    display: inline-block;
    font-weight: 500;
    opacity: 0.9;
    transition: var(--transition-smooth);
}

nav a:hover {
    opacity: 1;
}

/* ========================================
   BOUTON RETOUR SERVICES
   ======================================== */
.button-services {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    color: white;
    text-decoration: none;
    transition: var(--transition-smooth);
    margin: 12px 0;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.button-services::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: var(--transition-smooth);
}

.button-services:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.button-services:hover::before {
    left: 100%;
}

/* ========================================
   MAIN
   ======================================== */
main {
    padding: 40px 24px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ========================================
   TITRES
   ======================================== */
h1 {
    color: var(--primary-green-dark);
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.service-section {
    margin: 48px 0;
}

.service-section h2 {
    color: var(--primary-green-dark);
    text-align: center;
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 32px;
    position: relative;
    display: inline-block;
    width: 100%;
}

.service-section h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-green-light), var(--primary-green));
    border-radius: 2px;
}

/* ========================================
   GRILLE DE SERVICES
   ======================================== */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.service-box {
    background: var(--bg-card);
    padding: 0;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition-smooth);
    overflow: hidden;
    position: relative;
}

.service-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green-light), var(--primary-green));
    opacity: 0;
    transition: var(--transition-smooth);
}

.service-box:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.service-box:hover::before {
    opacity: 1;
}

.service-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.service-box:hover .service-image {
    transform: scale(1.05);
}

.service-box h3 {
    color: var(--primary-green-dark);
    font-size: 1.15rem;
    font-weight: 600;
    padding: 20px;
    margin: 0;
}

.service-box p {
    color: var(--text-medium);
    padding: 0 20px 20px;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Conteneur pour l'image avec overflow hidden */
.service-box .image-container {
    overflow: hidden;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

/* ========================================
   LIENS SERVICES
   ======================================== */
.service-box a {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    text-align: center;
    padding: 24px 32px;
    background: linear-gradient(135deg, var(--primary-green-dark) 0%, #4a6340 100%);
    color: #ffffff;
    position: relative;
    width: 100%;
    margin-top: 60px;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

footer p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    header {
        padding: 20px 16px;
    }

    main {
        padding: 24px 16px;
    }

    h1 {
        font-size: 1.6rem;
    }

    .service-section h2 {
        font-size: 1.3rem;
    }

    .service-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .service-box h3 {
        font-size: 1.1rem;
        padding: 16px;
    }

    .service-image {
        height: 180px;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .service-box {
        animation: fadeInUp 0.5s ease-out;
        animation-fill-mode: both;
    }

    .service-box:nth-child(1) { animation-delay: 0.1s; }
    .service-box:nth-child(2) { animation-delay: 0.2s; }
    .service-box:nth-child(3) { animation-delay: 0.3s; }
    .service-box:nth-child(4) { animation-delay: 0.4s; }
    .service-box:nth-child(5) { animation-delay: 0.5s; }
    .service-box:nth-child(6) { animation-delay: 0.6s; }

    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}
