/* ===== VARIABLES CSS COMMUNES ===== */
:root {
    /* Couleurs principales */
    --vert-principal: #2c5530;
    --vert-fonce: #2c5530;
    --vert-moyen: #4a7c59;
    --vert-clair: #6fa778;
    --vert-tres-clair: #e8f5e8;
    --vert-accent: #1e3a21;
    
    /* Couleurs neutres */
    --blanc: #ffffff;
    --gris-fonce: #333333;
    --gris-moyen: #666666;
    --gris-clair: #f8f9fa;
    --gris-tres-clair: #f0f0f0;
    --texte-fonce: #1a1a1a;
    --texte-moyen: #4b5563;
    --texte-clair: #6b7280;
    
    /* Couleurs d'accent */
    --bleu-excel: #217346;
    --orange-accent: #ff6b35;
    
    /* Typographie */
    --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-mono: 'Courier New', monospace;
    
    /* Espacements */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    
    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s ease;
    
    /* Ombres */
    --shadow-light: 0 2px 10px rgba(44, 85, 48, 0.1);
    --shadow-medium: 0 4px 20px rgba(44, 85, 48, 0.15);
    --shadow-strong: 0 8px 30px rgba(44, 85, 48, 0.2);
    
    /* Border radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

/* ===== RESET ET BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--gris-fonce);
    background-color: var(--blanc);
    overflow-x: hidden;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

body.page-loaded {
    opacity: 1;
}

body.page-leaving {
    opacity: 0;
}

/* Liens */
a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

/* Listes */
ul, ol {
    list-style: none;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Boutons */
button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition-smooth);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* ===== BOUTONS GÉNÉRIQUES ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--vert-fonce), var(--vert-moyen));
    color: var(--blanc);
    box-shadow: var(--shadow-light);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-secondary {
    background: transparent;
    color: var(--vert-fonce);
    border: 2px solid var(--vert-fonce);
}

.btn-secondary:hover {
    background: var(--vert-fonce);
    color: var(--blanc);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* ===== NAVIGATION COMMUNE ===== */
.navbar {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.logo-link {
    display: inline-block;
    cursor: pointer;
    transition: transform 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.logo-link:hover {
    transform: scale(1.05);
}

.logo-svg {
    height: 60px;
    width: 87px;
    margin-right: 14px;
    transition: transform 0.3s ease;
}

.logo-svg:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 50px;
}

.nav-link {
    text-decoration: none;
    color: var(--vert-principal);
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #2c5530;
}

/* Soulignage fixe pour la page active */
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #2c5530;
}

/* Animation de soulignage au hover pour les liens non-actifs */
.nav-link:not(.active)::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--vert-principal), var(--vert-moyen));
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center;
}

.nav-link:not(.active):hover::before {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
    min-width: 44px; /* Assurer une zone de clic suffisante */
    min-height: 44px;
    justify-content: center;
    align-items: center;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--vert-principal);
    margin: 3px 0;
    transition: 0.3s;
}

/* ===== FOOTER COMMUN ===== */
.footer {
    background: linear-gradient(135deg, var(--vert-fonce) 0%, var(--vert-accent) 100%);
    color: var(--blanc);
    padding: var(--spacing-xl) 0 var(--spacing-md);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    position: relative;
    z-index: 2;
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-sm);
    color: var(--blanc);
    position: relative;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--vert-clair);
    transition: var(--transition-smooth);
}

.footer-section:hover h3::after {
    width: 60px;
}

.footer-section p {
    margin-bottom: var(--spacing-sm);
    color: rgba(255, 255, 255, 0.8);
}

.footer-section:hover p {
    color: var(--blanc);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li:hover {
    transform: translateX(5px);
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition-smooth);
    position: relative;
}

.footer-section ul li a::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--vert-clair);
    transition: var(--transition-smooth);
}

.footer-section ul li a:hover {
    color: var(--blanc);
    transform: translateX(5px);
}

.footer-section ul li a:hover::before {
    width: 100%;
}

.footer-section i {
    color: var(--vert-clair);
    margin-right: var(--spacing-xs);
}

.footer-section:hover i {
    color: var(--blanc);
}

.footer-bottom {
    text-align: center;
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer:hover .footer-bottom p {
    color: rgba(255, 255, 255, 0.8);
}

/* ===== MEDIA QUERIES COMMUNES ===== */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 15px;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--blanc);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: var(--spacing-md) 0;
        z-index: 999;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu .nav-link {
        padding: 8px 0;
        display: block;
        width: 100%;
        border-bottom: 1px solid rgba(44, 85, 48, 0.1);
    }

    .nav-menu .nav-link:last-child {
        border-bottom: none;
    }

    .hamburger {
        display: flex !important;
        position: relative;
        z-index: 1001;
        /* Assurer une zone de touch optimale */
        touch-action: manipulation;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-xs);
    }

    .nav-container {
        padding: 0 10px;
    }

    .hamburger {
        margin-right: 5px;
    }

    .bar {
        width: 22px;
        height: 2px;
    }

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .btn-large {
        padding: 0.8rem 1.6rem;
        font-size: 1rem;
    }

    .footer-content {
        padding: 0 var(--spacing-xs);
    }
} 