/* style.css */

@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;700;900&family=Poppins:wght@400;600;800&display=swap');

/* ==================================== */
/* 🎨 Variables Globales (Couleurs, Fonts, etc.) */
/* ==================================== */
:root {
    /* Colors (Darker Theme) */
    --color-background: #001F5C; /* Bleu Marine très foncé */
    --color-background-light: #0B3D91; /* Bleu foncé pour dégradé */
    --color-button: #3DA9FC; /* Bleu vif pour les actions */
    --color-icon: #FFB703; /* Jaune/Or pour les accents et icônes */
    --color-card-bg: #FFFFFF;
    --color-text-white: #FFFFFF;
    --color-text-paragraph: #5F6C7B;    
    --color-text-title: #333333;    
    --color-logout: #ff5757;    

    /* Fonts */
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Nunito Sans', sans-serif;

    /* Shadows & Transitions */
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
    --border-radius-main: 20px;
}

/* ==================================== */
/* 🔄 Réinitialisation & Styles de Base */
/* ==================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    /* Fond par défaut pour les pages INTÉRIEURES (dégradé bleu) */
    background: linear-gradient(135deg, var(--color-background), var(--color-background-light));    
    min-height: 100vh;
    color: var(--color-text-white);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- Utility Classes & Base Styles --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.card {
    background-color: var(--color-card-bg);
    border-radius: var(--border-radius-main);
    box-shadow: var(--shadow-card);
    padding: 30px;
    margin-bottom: 25px;
    transition: transform var(--transition-speed);
}

.card:hover {
    transform: translateY(-5px);
}

.icon {
    color: var(--color-icon);
    font-size: 1.5em;
    margin-right: 10px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--color-button);
    color: var(--color-text-white);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    transition: background-color var(--transition-speed), transform var(--transition-speed), box-shadow var(--transition-speed);
}

.btn:hover {
    background-color: #2da4e3;    
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(61, 169, 252, 0.4);
}

/* ==================================== */
/* -------------------------------------------------------------------------- */
/* 1. Base et Réinitialisation Globale */
/* -------------------------------------------------------------------------- */

:root {
    --color-primary: #0047AB; /* Bleu Institutionnel (FSJES) */
    --color-secondary: #FFC300; /* Jaune/Or (Accent) */
    --color-bg-light: #F4F7FA; /* Arrière-plan général */
    --color-text: #333333;
    --color-text-light: #666;
    --color-white: #ffffff;
    --sidebar-width: 250px;
    --header-height: 70px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--color-text);
    background-color: var(--color-bg-light);
    line-height: 1.6;
    transition: margin-left 0.3s ease;
}

a {
    text-decoration: none;
    color: var(--color-primary);
}

a:hover {
    color: var(--color-secondary);
}
/* 💻 Layout: Sidebar & Main Content (Pages Intérieures) */

/* ==================================== */

.portal-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transform: translateX(0);
    transition: transform var(--transition-speed) ease-in-out;
}

.sidebar-header {
    text-align: center;
    padding: 0 20px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header img {
    max-width: 150px;
    height: auto;
    margin-bottom: 10px;
    background: var(--color-card-bg);
    padding: 5px;
    border-radius: 10px;
}

.sidebar-header h2 {
    font-family: var(--font-secondary);
    font-weight: 900;
    color: var(--color-icon);
    letter-spacing: 1px;
}

.sidebar-nav {
    flex-grow: 1;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 15px 30px;
    color: var(--color-text-white);
    font-size: 1.1em;
    font-weight: 600;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    position: relative;
    overflow: hidden;
    margin: 5px 0;
}

/* Style spécifique pour le lien actif dans la sidebar */
.sidebar-nav a[style] {
    color: var(--color-icon) !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.sidebar-nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: left var(--transition-speed);
    border-radius: 5px;
}

.sidebar-nav a:hover {
    color: var(--color-icon);
}

.sidebar-nav a:hover::before {
    left: 0;
}

.sidebar-nav a i, .sidebar-nav a span {
    z-index: 1;
}

.logout-btn {
    margin-top: auto;    
    padding: 15px 30px;
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--color-logout);
    transition: color var(--transition-speed);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-btn:hover {
    color: #ff8c8c;
}

.main-content {
    flex-grow: 1;
    padding: 30px;
    position: relative;
    z-index: 1;
}

.page-content {
    position: relative;
    z-index: 5;
}

/* ==================================== */
/* 🚀 Éléments d'arrière-plan animés (Pages Intérieures) */
/* ==================================== */
@keyframes float {
    0% { transform: translate(0, 0); }
    50% { transform: translate(10px, -10px); }
    100% { transform: translate(0, 0); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.bg-element {
    position: absolute;
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
}

.bg-rocket {
    top: 5%;
    right: 5%;
    font-size: 4em;
    color: var(--color-icon);
    animation: float 8s ease-in-out infinite;
    opacity: 0.2;
}

.bg-student {
    bottom: 10%;
    left: 20%;
    font-size: 3em;
    color: var(--color-text-white);
    animation: float 10s ease-in-out infinite reverse;
    opacity: 0.1;
}

.bg-star {
    top: 30%;
    left: 5%;
    font-size: 1.5em;
    color: var(--color-button);
    animation: spin 20s linear infinite;
    opacity: 0.3;
}

.bg-star-2 {
    bottom: 5%;
    right: 5%;
    font-size: 2em;
    color: var(--color-icon);
    animation: float 7s ease-in-out infinite;
    opacity: 0.2;
}


/* ==================================== */
/* 📱 Responsivité (Mobile) */
/* ==================================== */
.menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    background: var(--color-button);
    color: var(--color-text-white);
    padding: 10px 15px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5em;
    z-index: 101;
    box-shadow: var(--shadow-card);
}

@media (max-width: 900px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100%;
        transform: translateX(-100%);
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.3);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .menu-toggle {
        display: block;
    }

    .main-content {
        padding-top: 80px;
        margin-left: 0;
    }
}
/* -------------------------------------------------------------------------- */
/* 2. Page de Connexion (index.html) - GLASSMORPHISM */
/* -------------------------------------------------------------------------- */

.login-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Gestion du fond d'écran pour le flou et l'obscurité */
.login-page-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(0.7) blur(3px); /* Flou et obscurcissement pour le contraste */
    z-index: 0;
}

/* Cercles décoratifs (Glassmorphism Light) */
.login-decoration-circle-1,
.login-decoration-circle-2 {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15); /* Légèrement transparent */
    backdrop-filter: blur(5px);
    z-index: 1;
}

.login-decoration-circle-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 15%;
}

.login-decoration-circle-2 {
    width: 300px;
    height: 300px;
    bottom: 5%;
    right: 10%;
    background: rgba(255, 195, 0, 0.15); /* Utilise la couleur secondaire */
}

/* La carte de connexion Glassmorphism */
.login-card {
    background: rgba(255, 255, 255, 0.15); /* Semi-transparent */
    backdrop-filter: blur(20px); /* L'effet Glassmorphism principal */
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3); /* Bordure fine pour l'effet de verre */
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    padding: 35px;
    width: 90%;
    max-width: 450px;
    text-align: center;
    position: relative;
    z-index: 2;
    color: var(--color-white); /* Texte blanc pour contraster avec le fond sombre */
}

.login-header {
    margin-bottom: 25px;
}

.login-card img {
    width: 90px;
    height: auto;
    margin-bottom: 15px;
}

.login-card h2 {
    color: var(--color-white);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    font-size: 2rem;
    margin-bottom: 5px;
}

.login-card p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

/* Groupe d'entrée (Input Group) */
.input-group {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.85); /* Fond opaque pour les champs */
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border 0.3s;
}

.input-group:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(0, 71, 171, 0.3);
}

.input-group .icon {
    padding: 12px 10px 12px 15px;
    color: var(--color-primary);
    font-size: 1.1rem;
}

.input-group input {
    flex-grow: 1;
    padding: 12px 15px 12px 5px;
    border: none;
    background: transparent;
    color: var(--color-text);
    font-size: 1rem;
}

.input-group input:focus {
    outline: none;
}

/* Bouton de Connexion */
.login-button {
    width: 100%;
    padding: 14px;
    background-color: var(--color-secondary);
    color: var(--color-primary);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    transition: background-color 0.3s, transform 0.1s, color 0.3s;
    margin-top: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.login-button:hover {
    background-color: #ffda6a;
    color: #002861;
    transform: translateY(-1px);
}

.login-button i {
    margin-right: 8px;
}

.forgot-password {
    display: block;
    margin-top: 20px;
    color: var(--color-white);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
    font-size: 0.9rem;
}

.forgot-password:hover {
    color: var(--color-secondary);
}


/* ==================================== */
/* 🏠 Styles de la Page d'Accueil Intérieure (home.html) */
/* ==================================== */

.welcome-card {
    background: var(--color-card-bg);    
    border-left: 5px solid var(--color-icon);
    padding: 40px;
}

.welcome-card h2 {
    color: var(--color-text-title);
    margin-bottom: 10px;
    font-size: 2em;
}

.welcome-card p {
    color: var(--color-text-paragraph);
    font-size: 1.1em;
    margin-bottom: 20px;
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.quick-link-card {
    text-align: center;
    padding: 20px;
    animation: fadeIn 0.5s ease-out;
    background-color: var(--color-card-bg);
}

.quick-link-card i {
    font-size: 2.5em;
    margin-bottom: 10px;
    transition: transform 0.3s;
    color: var(--color-button);
}

.quick-link-card:hover i {
    transform: scale(1.1) rotate(5deg);
    color: var(--color-icon);    
}
.quick-link-card p {
    color: var(--color-text-title);
    font-weight: 600;
}

/* ==================================== */
/* 📅 Styles pour l'Emploi du Temps (emploi.html) */
/* ==================================== */
.timetable-header {
    margin-bottom: 30px;
    color: var(--color-text-title);
    text-align: center;
}

.timetable-header h2 {
    color: var(--color-button);
}

.timetable-container {
    overflow-x: auto;
}

.timetable {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
    table-layout: fixed;
}

.timetable th, .timetable td {
    border: 1px solid #eee;
    padding: 10px;
    text-align: center;
    font-size: 0.9em;
    height: 80px;
    transition: background-color 0.2s;
    color: var(--color-text-title);    
}

.timetable th {
    background-color: #f5f5f5;
    color: var(--color-background);
    font-weight: 700;
}

.timetable tr:nth-child(even) {
    background-color: #f9f9f9;
}

.timetable td {
    background-color: var(--color-card-bg);
}

.timetable td:hover {
    background-color: #e6f7ff;
}

.module-info {
    font-weight: 700;    
    color: var(--color-background);    
    font-size: 1em;
}

.prof-info {
    font-size: 0.85em;
    color: #1abc9c;    
    font-weight: 600;
}

/* ==================================== */
/* 📊 Styles pour Mes Résultats (mes-resultats.html) */
/* ==================================== */
.note-pass {
    font-weight: 700;
    color: #1abc9c;    
}
.note-fail {
    font-weight: 700;
    color: var(--color-logout);
}


/* ==================================== */
/* 📋 Styles pour le Suivi des Réclamations (suivi-reclamations.html) */
/* ==================================== */

.status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
    color: white;
}

.status-new {
    background-color: var(--color-logout); /* Rouge/Urgence */
}

.status-open {
    background-color: #f39c12; /* Jaune/Orange */
}

.status-in-progress {
    background-color: var(--color-button); /* Bleu vif */
}

.status-closed {
    background-color: #1abc9c; /* Vert Succès */
}

.reclamation-table {
    margin-top: 20px;
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.reclamation-table th, .reclamation-table td {
    border: 1px solid #eee;
    padding: 12px 15px;
    text-align: left;
    color: var(--color-text-title);
}

.reclamation-table th {
    background-color: #f5f5f5;
    color: var(--color-background);
    font-weight: 700;
}


/* ==================================== */
/* 💫 Animations générales pour l'entrée de page */
/* ==================================== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.page-content > * {
    animation: slideIn 0.5s ease-out both;
}
.quick-link-card:nth-child(1) { animation-delay: 0.1s; }
.quick-link-card:nth-child(2) { animation-delay: 0.2s; }
.quick-link-card:nth-child(3) { animation-delay: 0.3s; }

/* ==================================== */
/* 🛑 MODIFICATION POUR LA RÉCLAMATION (SUPPRESSION CADRE FOCUS) */
/* ==================================== */
/* Cible le champ de sélection (select) de la page de réclamation */
#type-reclamation:focus {
    outline: none; /* Supprime la bordure de focus par défaut du navigateur */
    box-shadow: none; /* Supprime l'ombre de focus si elle existe */
}

/* Cible également le champ de texte et la zone de texte pour la cohérence */
#module-concerne:focus, 
#details:focus {
    /* Si vous voulez enlever le focus par défaut sur les inputs et textareas aussi */
    outline: none; 
    /* Remarque : Si vous utilisez :focus-within sur .input-group, 
       ceci peut être redondant ou nécessiter de revoir le style 
       du focus de l'input-group. */
    border-color: #ccc !important; /* Pour conserver la bordure grise d'origine */
    box-shadow: none !important;
}