/* Variables CSS pour faciliter la gestion des couleurs et des polices */
:root {
    --primary-color: #8359f8;
    --primary-color222: #8547f8; /* Un violet doux, apaisant */
    --secondary-color: #9EC0FF; /* Un bleu clair complémentaire */
    --text-color: #333; /* Texte sombre pour un bon contraste */
    --background-color-light: #F9FAFB; /* Arrière-plan très clair */
    --background-color-dark: #1A202C; /* Arrière-plan sombre pour le mode nuit */
    --card-background-light: #FFF;
    --card-background-dark: #2D3748;
    --border-color-light: #E2E8F0;
    --border-color-dark: #4A5568;
    --link-color: var(--primary-color);
    --hover-color: #564DCC; /* Une teinte plus foncée du primaire */
    --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-dark: 0 4px 12px rgba(0, 0, 0, 0.3);

    --font-primary: 'Montserrat', sans-serif;
    --font-secondary: 'Cardo', serif; /* Pour les titres ou accents si désiré */
}


/* Styles pour le mode nuit (appliqués via JavaScript) */
body.dark-mode {
    --text-color: #E2E8F0;
    --background-color-light: var(--background-color-dark);
    --card-background-light: var(--card-background-dark);
    --border-color-light: var(--border-color-dark);
    --shadow-light: var(--shadow-dark);
}

/* Réinitialisation de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color-light);
    transition: background-color 0.3s ease, color 0.3s ease;
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: var(--link-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--hover-color);
}

/* --- En-tête (Header) --- */
.header {
    background-color: var(--background-color-light);
    padding: 20px 0;
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header__logo {
    font-family: var(--font-primary);
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
}

.header__menu-toggle {
    display: none; /* Masqué par défaut sur desktop, affiché sur mobile */
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 15px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.header__menu-toggle:hover {
    background-color: var(--primary-color);
    color: #FFF;
}

.header__nav {
    display: flex;
    gap: 25px;
    align-items: center;
    /* Assurez-vous que ces éléments sont visibles par défaut en desktop */
    opacity: 1;
    visibility: visible;
    position: static;
}

/* Styles pour les liens de navigation (s'il y en avait eu) */
.header__nav a {
    font-weight: 500;
    font-size: 17px;
    color: var(--text-color);
    position: relative;
    padding-bottom: 5px;
}

.header__nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease-in-out;
}

.header__nav a:hover::after {
    width: 100%;
}

/* Bouton Light/Dark Mode */
.theme-switch {
    position: relative;
    display: inline-block;
    width: 45px;
    height: 24px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color-dark);
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(21px);
}

/* Bouton de langue */
.lang-toggle-button {
    background-color: var(--primary-color);
    color: #FFF;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
    font-family: var(--font-primary);
    font-size: 14px;
    margin-left: 10px; /* Espace depuis le toggle de thème en desktop */
}

.lang-toggle-button:hover {
    background-color: var(--hover-color);
}

/* --- Section Héro (Hero Section) --- */
.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://images.unsplash.com/photo-1562797360-836d1b48801c?q=80&w=1176&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D') no-repeat center center/cover;
    min-height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #FFF;
    position: relative;
}

.hero__content {
    z-index: 1;
}

.hero__title {
    font-family: var(--font-primary);
    font-size: 60px;
    font-weight: bold;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero__subtitle {
    font-size: 22px;
    max-width: 700px;
    margin: 0 auto;
}

/* --- Sections d'outils (Tools Section) --- */
.tools-section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-family: var(--font-primary);
    font-size: 36px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.separator {
    width: 80px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 20px auto 40px auto;
    border: none;
}

.tools-category {
    margin-bottom: 60px;
}

.category-title {
    font-family: var(--font-primary);
    font-size: 28px;
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-color);
}

.category-description {
    text-align: center;
    font-size: 18px;
    margin-bottom: 30px;
    color: var(--text-color);
}

.button {
    display: block;
    width: fit-content;
    margin: 0 auto 40px auto;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: #FFF;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    text-align: center;
}

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

.button--secondary {
    background-color: transparent;
    border: 2px solid #FFF;
    color: #FFF;
    padding: 15px 35px;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.button--secondary:hover {
    background-color: rgba(255,255,255,0.1);
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.card {
    background-color: var(--card-background-light);
    border: 1px solid var(--border-color-light);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.card__icon {
    font-size: 45px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.card__title {
    font-family: var(--font-primary);
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.card__description {
    font-size: 16px;
    color: var(--text-color);
}

.card .shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 100%);
    transform: rotate(45deg);
    transition: all 0.7s ease;
    opacity: 0;
}

.card:hover .shine {
    left: -10%;
    top: -10%;
    opacity: 1;
}

/* Style spécifique pour les cartes "Coming Soon" */
.card.coming-soon {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
}

.card.coming-soon::after {
    content: attr(data-after-content);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card.coming-soon:hover::after {
    opacity: 1;
}

.card.coming-soon:hover {
    transform: none;
    box-shadow: var(--shadow-light);
}


/* --- Section Contact (Contact Section) --- */
.contact-section {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    z-index: 1;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.video-background video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65);
    z-index: 2;
}

/* Style pour le container du contenu - DOIT être enfant direct de .contact-section */
.contact-section .container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    width: 100%;
    max-width: 800px;
    padding: 0 20px;
    box-sizing: border-box;
}

.contact-content {
    position: relative;
    z-index: 4;
    text-align: center;
    color: #FFF;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.9);
}

.contact-content h2 {
    font-family: var(--font-primary);
    font-size: 40px;
    margin-bottom: 30px;
    color: #FFF;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.9);
    font-weight: bold;
    letter-spacing: 1px;
}

.contact-content .button--secondary {
    background-color: transparent;
    border: 2px solid #FFF;
    color: #FFF;
    padding: 15px 35px;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    border-radius: 5px;
    transition: all 0.3s ease;
    display: inline-block;
}

.contact-content .button--secondary:hover {
    background-color: rgba(255,255,255,0.1);
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

/* --- Section À Propos (About Section) --- */
.about-section {
    padding: 60px 0;
    text-align: center;
}

.about-text {
    font-size: 18px;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-color);
}

/* --- Pied de page (Footer) --- */
.footer {
    background-color: var(--background-color-light);
    padding: 25px 0;
    text-align: center;
    border-top: 1px solid var(--border-color-light);
    position: relative;
    overflow: hidden;
}

.footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer__copyright {
    font-size: 15px;
    color: var(--text-color);
}

.footer__link {
    font-size: 15px;
    color: var(--link-color);
}

.footer__link:hover {
    color: var(--hover-color);
}



@media (max-width: 768px) {
    .header__nav {
        /* Par défaut, le menu de navigation est masqué en mobile */
        display: none; 
        flex-direction: column; /* Les éléments s'empilent verticalement quand le menu est ouvert */
        width: 100%;
        position: absolute;
        top: 60px; /* Positionne le menu sous le header */
        left: 0;
        background-color: var(--background-color-light);
        box-shadow: var(--shadow-light);
        padding: 20px 0;
        border-top: 1px solid var(--border-color-light);
        transition: transform 0.3s ease-out, opacity 0.3s ease-out;
        transform: translateY(-100%);
        opacity: 0;
    }

    .header__nav.is-open {
        display: flex; /* Affiche le menu quand la classe 'is-open' est ajoutée par JS */
        transform: translateY(0); /* Fait descendre le menu à sa position */
        opacity: 1;
    }

    /* Supprimez ces règles qui cachaient les boutons */
    /* 
    .header__nav:not(.is-open) .theme-switch,
    .header__nav:not(.is-open) .lang-toggle-button {
        display: none;
    }
    */

    /* Styles pour les boutons de thème et de langue dans le menu mobile */
    .header__nav .theme-switch,
    .header__nav .lang-toggle-button {
        margin: 10px auto; /* Ajoute un espace vertical et centre horizontalement */
        width: fit-content; /* S'adapte au contenu pour le centrage */
    }

    /* Ajustements pour les éléments de navigation individuels dans le menu mobile */
    .header__nav a {
        padding: 10px 20px;
        text-align: center;
        width: 100%;
    }

    /* Le bouton hamburger est visible en mode mobile */
    .header__menu-toggle {
        display: block; 
    }

    /* Le bouton de langue n'a pas de marge à gauche dans le menu mobile */
    .lang-toggle-button {
        margin-left: 0; 
    }

    .hero__title {
        font-size: 45px;
    }

    .hero__subtitle {
        font-size: 18px;
    }

    .section-title {
        font-size: 30px;
    }

    .category-title {
        font-size: 24px;
    }

    .card {
        padding: 20px;
    }

    .card__icon {
        font-size: 35px;
    }

    .card__title {
        font-size: 20px;
    }

    .contact-content h2 {
        font-size: 30px;
    }
}
@media (max-width: 480px) {
    .header__logo {
        font-size: 24px;
    }

    .hero__title {
        font-size: 35px;
    }

    .hero__subtitle {
        font-size: 16px;
    }

    .card-grid {
        grid-template-columns: 1fr; /* Une seule colonne sur très petits écrans */
    }

    .contact-content h2 {
        font-size: 24px;
    }

    .button--secondary {
        font-size: 16px;
        padding: 12px 25px;
    }

    .footer__inner {
        flex-direction: column;
    }
}