/* Fichier: style.css */
/* Styles globaux pour l'ensemble du site, harmonisés avec dashboard.php */

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --warning-gradient: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-light: rgba(255, 255, 255, 0.9);
    --shadow-light: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.2);

    /* Variables pour le mode clair (par défaut) */
    --color-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --color-white: #ffffff;
    --color-primary: #3b82f6;
    --color-gray: #6b7280;
    --color-gray-light: #e5e7eb;
    --text-color-dark: #111827; /* Couleur de texte foncée pour les éléments sur fond clair */
}

/* Mode sombre */
body.dark-mode {
    --color-bg: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --color-white: #374151;
    --color-primary: #60a5fa;
    --color-gray: #d1d5db;
    --color-gray-light: #4b5563;
    --text-color-dark: #f3f4f6; /* Couleur de texte claire pour les éléments sur fond sombre */
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--color-bg);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-light); /* Couleur de texte par défaut pour le corps */
    line-height: 1.5;
    overflow-x: hidden; /* Empêche le défilement horizontal */
    transition: background 0.5s ease; /* Transition douce pour le changement de thème */
}

/* Particules animées en arrière-plan */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 2;
}

/* Styles pour les sections principales (similaires aux cartes du dashboard) */
.main-content, .wrapper {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
    color: var(--text-light); /* Texte clair par défaut */
    transition: background 0.3s ease, border 0.3s ease, box-shadow 0.3s ease;
}

.main-content h1, .wrapper h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

.main-content p, .wrapper p {
    font-size: 1.1rem;
    opacity: 0.8;
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Boutons d'authentification */
.auth-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.auth-buttons a, .btn {
    background: var(--primary-gradient);
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    cursor: pointer;
}

.auth-buttons a:hover, .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Formulaires */
.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-light);
    font-weight: bold;
    opacity: 0.9;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%; /* Utiliser 100% pour la réactivité */
    padding: 10px;
    border: 1px solid var(--glass-border);
    border-radius: 8px; /* Rayon de bordure plus grand */
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.05); /* Fond légèrement transparent */
    color: var(--text-light);
    transition: all 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3); /* Anneau de focus */
}

.help-block {
    color: var(--secondary-gradient); /* Couleur d'erreur */
    font-size: 0.875rem;
    margin-top: 5px;
    display: block;
}

.link-text {
    margin-top: 20px;
    color: var(--text-light);
    opacity: 0.8;
}

.link-text a {
    color: var(--success-gradient); /* Couleur de lien différente pour les rendre plus visibles */
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.link-text a:hover {
    text-decoration: underline;
    color: #00f2fe; /* Couleur de survol pour les liens */
}

/* Bouton de thème (réutilisé du dashboard) */
.theme-toggle {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex; /* Pour centrer l'icône */
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-light);
}

.theme-toggle:hover {
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 768px) {
    .main-content, .wrapper {
        padding: 1.5rem;
        margin: 1rem;
    }

    .main-content h1, .wrapper h2 {
        font-size: 2rem;
    }

    .main-content p, .wrapper p {
        font-size: 1rem;
    }

    .auth-buttons {
        flex-direction: column;
    }

    .auth-buttons a, .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Animations (réutilisées du dashboard) */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slideInUp 0.6s ease-out forwards; /* Ajout de forwards pour que l'état final soit maintenu */
    opacity: 0; /* Commence invisible pour l'animation */
}


