/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body */
body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    background-color: #eee;
    color: #333;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode {
    background-color: #252525;
    color: #e0e0e0;
}

/* Header */
.site-header {
    display: flex;
    background-color: #fff;
    padding: 0.8% 2% 0.8% 2%;
    display: flex;
    justify-content: space-between; /* Align site title, navigation, and dark mode toggle */
    align-items: center;
    width: 100%;
    border-bottom: 2px solid #ccc;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode .site-header {
    background-color: #333;
    border-bottom: 1px solid #444444;
}

.flotte{
    display: flex;
    float: left;
    margin-right: 10px;
}

/* Navigation */

.navigation {
    display: flex;
    gap: 15%;
    justify-content: flex-start; /* Align navigation links from left to right */
}

.nav-link {
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.3s, color 0.3s;
}

.nav-link.active,
.nav-link:hover {
    background-color:#eee;
}

body.dark-mode .nav-link:hover {
    background-color: #252525;
}


/* Navigation Logo */

.nav-link {
    padding: 10px;
    border-radius: 8px;
}

/* Main Section */
.main {
    padding: 3rem 2rem;
}

/* Hero Section */
.hero {
    background-color: #0a427e;
    color: white;
    text-align: center;
    padding: 4rem 2%;
    border-radius: 15px;
    margin-bottom: 4rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.hero .blue-btn {
    background-color: #007bff;
    color: white;
    padding: 15px 30px;
    font-size: 1.2rem;
    border-radius: 8px;
    transition: background-color 0.3s;
    text-decoration: none;
}

.hero .blue-btn:hover {
    background-color: #0056b3;
}

/* Hero-links Section */
.hero-links {
    background-color: #fff;
    color: #333;
    text-align: center;
    padding: 4rem 2rem;
    border-radius: 15px;
    margin-bottom: 4rem;
}

.hero-title-links {
    font-size: 2.7rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-description-links {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

/* Dark Mode Hero-links Section */

body.dark-mode .hero-links {
    background-color: #333;
    color: #e0e0e0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Hero-course Section */
.hero-course {
    background-color: #fff;
    color: #333;
    text-align: left;
    padding: 4rem 2rem;
    border-radius: 15px;
    margin-bottom: 4rem;
}

.hero-title-course {
    font-size: 2.7rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.hero-description-course {
    font-size: 1.6rem;
    margin-bottom: 2rem;
}

/* Dark Mode Hero-course Section */

body.dark-mode .hero-course {
    background-color: #333;
    color: #e0e0e0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}


/* Features Section */

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    justify-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    transition: transform 0.3s, background-color 0.3s ease, box-shadow 0.3s ease;
    height: 400px;
    width: 100%;
    color: #333;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.feature-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.feature-card .blue-btn {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    font-size: 1.1rem;
    border-radius: 8px;
    transition: background-color 0.3s;
    margin-top: auto;
    text-decoration: none;
}

.feature-card .blue-btn:hover {
    background-color: #0056b3;
}

/* Dark Mode Features Section */

body.dark-mode .feature-card {
    background-color: #333;
    color: #e0e0e0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

body.dark-mode .feature-card .blue-btn {
    background-color: #007bff;
}

body.dark-mode .feature-card .blue-btn:hover {
    background-color: #0056b3;
}


/* Features-links Section */

.features-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    justify-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card-links {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    transition: transform 0.3s, background-color 0.3s ease, box-shadow 0.3s ease;
    height: 400px;
    width: 100%;
    color: #333;
}

.feature-card-links:hover {
    transform: translateY(-10px);
}

.feature-title-links {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.feature-description-links {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.feature-card-links .blue-btn {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    font-size: 1.1rem;
    border-radius: 8px;
    transition: background-color 0.3s;
    margin-top: auto;
    text-decoration: none;
}

.feature-card-links .blue-btn:hover {
    background-color: #0056b3;
}

/* Dark Mode Features-links Section */

body.dark-mode .feature-card-links {
    background-color: #333;
    color: #e0e0e0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

body.dark-mode .feature-card-links .blue-btn {
    background-color: #007bff;
}

body.dark-mode .feature-card-links .blue-btn:hover {
    background-color: #0056b3;
}


/* Footer */

.footer {
    text-align: center;
    padding: 2% 1% 2% 1%;
    background-color: #f7f7f7;
    margin-top: 3%;
    font-size: 100%;
    color: #888;
    border-top: 2px solid #f0f0f0;
}

body.dark-mode .footer {
    background-color: #333;
    color: #f1f1f1;
    border-top: 1px solid #444444;
}

/* Responsive Design */

@media (max-width: 768px) {
    .features {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2rem;
    }

    .site-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .features-links {
        grid-template-columns: 1fr;
    }

    .hero-title-links {
        font-size: 2rem;
    }

    .site-title-links {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .features-course {
        grid-template-columns: 1fr;
    }

    .hero-title-course {
        font-size: 2rem;
    }

    .site-title-course {
        font-size: 1.5rem;
    }
}

/* Disable transitions during page load */

body.no-transition, 
body.no-transition * {
    transition: none !important;
}

/* Dark Mode Toggle */
.theme-toggle {
    margin-left: 2rem; /* Add space between navigation and toggle button */
}
/* Toggle Theme Button */

/* Dark Mode Toggle */
.theme-toggle {
    width: 60px;
    height: 30px;
    border-radius: 30px;
    background-color: #ccc;
    cursor: pointer;
    position: relative;
    transition: background-color 0.3s ease;
}

.theme-toggle .slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: white;
    transition: transform 0.3s ease;
}
*/
body.dark-mode .theme-toggle {
    background-color: #007bff;
}

body.dark-mode .theme-toggle .slider {
    transform: translateX(100px);
}

[data-theme='dark'] .theme-toggle {
    background-color: var(--accent-dark);
}

[data-theme='dark'] .theme-toggle .slider {
    transform: translateX(20px);
}

/* Style général du bouton */
.theme-toggle {
    width: 60px;  /* Taille du bouton */
    height: 30px;  /* Hauteur du bouton */
    background-color: #e0e0e0;  /* Couleur de fond par défaut (mode clair) */
    border-radius: 30px;  /* Bord arrondi */
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s ease;  /* Transition de la couleur de fond */
}

/* Style de la boule (slider) */
.theme-toggle .slider {
    width: 24px;  /* Largeur de la boule */
    height: 24px;  /* Hauteur de la boule */
    background-color: #fff;  /* Couleur de la boule */
    border-radius: 50%;  /* Forme ronde */
    position: absolute;
    top: 3px;  /* Placer la boule bien centrée dans le bouton */
    left: 3px;  /* Placer la boule à gauche au départ */
    transition: transform 0.3s ease, background-color 0.3s ease;  /* Transition du mouvement de la boule */
}

/* Mode sombre : Changement de couleur du bouton */
body.dark-mode .theme-toggle {
    background-color: #555;  /* Couleur de fond du bouton (plus foncé en mode sombre) */
}

/* Mode sombre : Déplacement de la boule vers la droite */
body.dark-mode .theme-toggle .slider {
    transform: translateX(30px);  /* Déplacer la boule vers la droite en mode sombre */
    background-color: #333;  /* Changer la couleur de la boule en mode sombre */
}

/* Retour au mode clair */
body:not(.dark-mode) .theme-toggle {
    background-color: #e0e0e0;  /* Rétablir la couleur de fond du bouton en mode clair */
}

/* Retour de la boule au début (gauche) en mode clair */
body:not(.dark-mode) .theme-toggle .slider {
    transform: translateX(0px);  /* Replacer la boule à gauche */
    background-color: #fff;  /* Couleur de la boule en mode clair */
}

/* Appliquer une classe "no-transition" avant que le thème ne soit appliqué */
body.no-transition {
    transition: none !important;
}

/* Empêcher les transitions pendant que le thème est appliqué */
body.dark-mode.no-transition {
    background-color: #252525;
    color: #e0e0e0;
}

body:not(.dark-mode).no-transition {
    background-color: #eee;
    color: #333;
}

/* Transition appliquée après que le thème soit chargé */
body:not(.no-transition) {
    transition: background-color 0.3s ease, color 0.3s ease;
}
