/*
    style.css - Module de style principal du site
    
    Ce module contient les styles globaux et communs 
    du site, ainsi que les variables CSS.

    @author Alexandre BURIN
    @version 1.0.0
*/

* {
    margin: 0;
    padding: 0;
    scrollbar-width: thin;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    /* Police système moderne, plus épurée et lisible que les anciennes listes */
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-dark);

    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

p {
    text-align: justify;
}

.hero-section p {
    text-align: center;
}

:root {
    --background-header-primary: #f5f5f5;
    --background-header-secondary: #333;
    /* Couleur gris clair épuré pour le fond du footer */
    --background-footer-primary: #e2e8f0; 
    
    /* Couleurs harmonisées avec le logo Terra & Harmonia */
    --primary-green: #7a9b6e;
    --primary-brown: #8b6f47;
    --accent-gold: #c9a961;
    --text-dark: #2d2d2d;
    --text-light: #ffffff;
    --border-light: rgba(122, 155, 110, 0.15);
    --hover-bg: rgba(122, 155, 110, 0.08);
}

/* Styles pour la section du haut de la page (header) */
header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.2rem 2rem;
    background: linear-gradient(135deg, var(--background-header-primary) 0%, #ffffff 100%);
    color: var(--background-header-secondary);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid var(--border-light);
}

.header-head-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.header-head-container h1 {
    max-width: 750px;
    font-weight: 600;
    font-size: 2.25rem;
    line-height: 1.3;
    color: var(--text-dark);
    letter-spacing: -0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    padding: 1rem 1.5rem;
    display: inline-block;
}

.header-logo {
    width: 150px;
    height: auto;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 2.5em;
    position: relative;
}

/* Bouton hamburger menu */
.hamburger-menu {
    display: none;
    background: transparent;
    border: 2px solid var(--primary-green);
    border-radius: 8px;
    width: 45px;
    height: 45px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--primary-green);
    font-size: 1.2rem;
    z-index: 1001;
}

.hamburger-menu:hover {
    background-color: var(--primary-green);
    color: white;
    transform: scale(1.05);
}

.hamburger-menu:active {
    transform: scale(0.95);
}

/* Navigation mobile */
.nav-mobile {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 1.5rem;
    min-width: 250px;
    z-index: 1000;
    border: 1px solid var(--border-light);
}

.nav-mobile.active {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navigation desktop */
.nav-desktop {
    display: flex;
}

/* Styles pour la barre de navigation */
.nav_bar {
    display: flex;
    gap: 0;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.nav_bar > * {
    position: relative;
}

.nav-separator {
    padding-right: 0;
    margin: 0 0.75rem;
    height: 20px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    border: 1.5px solid transparent;
    background-color: transparent;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    white-space: nowrap;
}

.nav-link:focus,
.nav-link:focus-visible {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    background-color: var(--primary-green);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
    color: var(--primary-green);
    background-color: var(--hover-bg);
    border-color: transparent;
}

.nav-link:hover::before {
    transform: scaleX(1);
}

.nav-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: fit-content;
}

.nav-item .nav-link {
    margin: 0;
    padding: 0.75rem 1.25rem;
}

.nav-item::after {
    content: '';
    position: absolute;
    top: 100%;
    left: -20px;
    right: -20px;
    height: 1.5rem;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    background-color: var(--background-header-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    min-width: 220px;
    z-index: 1000;
    padding: 0.75rem 0;
    border-radius: 12px;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(122, 155, 110, 0.2);
}

.dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.85rem 1.5rem;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.95rem;
    letter-spacing: 0.1px;
    transition: all 0.2s ease;
    position: relative;
    border-left: 3px solid transparent;
    margin: 0.2rem 0;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--primary-green);
    transform: scaleY(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--hover-bg);
    color: var(--primary-green);
    padding-left: 1.75rem;
}

.dropdown-item:hover::before {
    transform: scaleY(1);
}

.dropdown-item:focus,
.dropdown-item:focus-visible {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Styles pour le bouton de toggle de thème */
#mode-toggle {
    background: transparent;
    border: 2px solid var(--primary-green);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--primary-green);
    position: relative;
}

#mode-toggle:hover {
    background-color: var(--primary-green);
    color: var(--background-header-primary);
    transform: scale(1.15);
    box-shadow: 0 6px 16px rgba(122, 155, 110, 0.3);
}

#mode-toggle:active {
    transform: scale(0.95);
}

#mode-toggle i {
    font-size: 1.2rem;
}

/* Tooltip pour le bouton jour/nuit */
#mode-toggle::before {
    content: 'Changer de thème';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background-color: var(--primary-green);
    color: var(--background-header-primary);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

#mode-toggle::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    border: 6px solid transparent;
    border-top-color: var(--primary-green);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    margin-bottom: 0.5rem;
}

#mode-toggle:hover::before,
#mode-toggle:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-15px);
}

/* Styles pour le pied de page (Footer) */
footer.site-footer {
    background: var(--background-footer-primary);
    color: var(--text-dark);
    padding: 4rem 2rem 3rem 2rem;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-top: 2px solid var(--primary-green);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.03);
}

.footer-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3rem;
    width: 100%;
    padding: 0 2rem;
}

.footer-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

/* Bloc Droits / Marque */
.footer-droits {
    align-items: flex-start;
}

.footer-brand {
    font-weight: 700;       
    font-size: 1.25rem;
    color: #000000;        
}

.footer-copyright {
    font-size: 0.9rem;
    color: #4a5568;       
}

/* Titres des colonnes */
.footer-contact h3,
.footer-liens h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-green); 
    margin: 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.85rem;
}

/* Bloc Contact */
.footer-contact {
    align-items: center;
}

.contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.contact-name, .contact-mail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-mail:hover {
    color: var(--primary-green);
}

.footer-icon {
    color: var(--primary-green);
    opacity: 0.9;
}

/* Bloc Liens / Navigation */
.footer-liens {
    align-items: flex-end;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.6rem;
}

.footer-nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 400;
    transition: all 0.25s ease;
    position: relative;
    padding-right: 5px;
}

.footer-nav a:hover {
    color: var(--primary-green);
    transform: translateX(-3px);
}

/* Styles pour la section principale */
main {
    flex: 1;
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Styles pour le lien retour en haut */
.lien-retour-haut {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.lien-retour-haut a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-brown) 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(122, 155, 110, 0.25);
}

.lien-retour-haut a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(122, 155, 110, 0.35);
}

.lien-retour-haut a:active {
    transform: translateY(0);
}

/* Styles pour la section comment contacter (commune à toutes les pages) */
.comment-contacter {
    background: linear-gradient(135deg, rgba(122, 155, 110, 0.06) 0%, rgba(201, 169, 97, 0.04) 100%);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    border: 2px solid var(--border-light);
    box-shadow: 0 6px 24px rgba(122, 155, 110, 0.1);
}

.comment-contacter h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 1.5rem;
    text-align: center;
    letter-spacing: -0.3px;
}

.comment-contacter p {
    font-size: 1.05rem;
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 1.25rem;
    text-align: center;
}

.contact-link {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    padding: 0.2rem 0.3rem;
    border-radius: 4px;
}

.contact-link:hover {
    color: var(--primary-brown);
    border-bottom-color: var(--primary-brown);
    background: linear-gradient(135deg, rgba(122, 155, 110, 0.1) 0%, rgba(201, 169, 97, 0.06) 100%);
}

/* Styles pour la section À propos */
.bloc-statistiques {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    padding: 3rem 2.5rem;
    margin-bottom: 2.5rem;
    border: 1px solid var(--border-light);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.fond-sombre {
    background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%);
}

.titre-section {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: -0.3px;
}

.titre-section-clair {
    color: var(--text-light);
}

.grille-apropos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.carte-apropos {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    border: 1.5px solid var(--border-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.carte-apropos:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(122, 155, 110, 0.15);
    border-color: var(--primary-green);
}

.carte-apropos h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-green);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-light);
}

.carte-apropos p {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
}

/* Responsive design */
@media (max-width: 1024px) {
    header {
        padding: 1rem 1.5rem;
    }

    .header-head-container h1 {
        font-size: 1.75rem;
    }

    .header-logo {
        width: 200px;
        height: auto;
    }

    .comment-contacter {
        padding: 2rem 1.5rem;
    }

    .comment-contacter h2 {
        font-size: 1.6rem;
    }

    .comment-contacter p {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    header {
        padding: 0.8rem 1rem;
    }

    .header-head-container {
        gap: 1rem;
    }

    .header-head-container h1 {
        font-size: 1.5rem;
        text-align: center;
    }

    .header-logo {
        width: 180px;
        height: auto;
    }

    .header-content {
        gap: 1rem;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .bloc-statistiques {
        padding: 2rem 1.5rem;
    }

    .titre-section {
        font-size: 1.6rem;
    }

    .grille-apropos {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .carte-apropos {
        padding: 1.5rem;
    }

    .carte-apropos h3 {
        font-size: 1.15rem;
    }

    .carte-apropos p {
        font-size: 0.95rem;
    }

    /* Afficher le hamburger menu sur mobile */
    .hamburger-menu {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Cacher la navigation desktop sur mobile */
    .nav-desktop {
        display: none;
    }

    /* Adapter la navigation mobile */
    .nav-mobile .nav_bar {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    .nav-mobile .nav-link {
        width: 100%;
        text-align: center;
        padding: 0.8rem;
    }

    .nav-mobile .nav-separator {
        display: none;
    }

    .nav-mobile .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        background: rgba(122, 155, 110, 0.1);
        margin-top: 0.5rem;
    }

    .footer-container {
        flex-direction: column;
        align-items: center;
        gap: 2.5rem;
    }

    .footer-section,
    .footer-droits,
    .footer-liens,
    .footer-nav {
        align-items: center;
        text-align: center;
    }

    .footer-nav a:hover {
        transform: scale(1.05);
    }

    .lien-retour-haut {
        padding-top: 1.5rem;
        margin-top: 1.5rem;
    }

    .lien-retour-haut a {
        padding: 0.65rem 1.25rem;
        font-size: 0.9rem;
    }

    .comment-contacter {
        padding: 2rem 1.5rem;
    }

    .comment-contacter h2 {
        font-size: 1.6rem;
    }

    .comment-contacter p {
        font-size: 1rem;
    }

    .contact-link {
        word-break: break-all;
        display: inline-block;
    }
}

@media (max-width: 480px) {
    header {
        padding: 0.6rem 0.8rem;
    }

    .header-head-container {
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .header-head-container h1 {
        font-size: 1.2rem;
        text-align: center;
        line-height: 1.4;
    }

    .header-logo {
        width: 150px;
        height: auto;
    }

    .header-content {
        flex-direction: column;
        gap: 0.75rem;
    }

    .nav_bar {
        flex-wrap: wrap;
        gap: 0.3rem;
    }

    .nav-link {
        padding: 0.5rem 0.7rem;
        font-size: 0.8rem;
    }
    
    .bloc-statistiques {
        padding: 1.5rem 1rem;
    }

    .titre-section {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
    }

    .carte-apropos {
        padding: 1.25rem;
    }

    .carte-apropos h3 {
        font-size: 1.1rem;
    }

    .comment-contacter {
        padding: 1.5rem 1rem;
    }

    .comment-contacter h2 {
        font-size: 1.4rem;
    }

    .comment-contacter p {
        font-size: 0.95rem;
    }
}
