/* style.css - Design "Glassmorphism" (Clear & Glass) */

:root {
    --glass-bg: rgba(255, 255, 255, 0.1); /* Transparence des cartes */
    --glass-border: 1px solid rgba(255, 255, 255, 0.2); /* Bordure fine blanche */
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37); /* Ombre portée */
    --sidebar-width: 250px;
    --text-color: #ffffff; /* Texte en blanc pour le contraste */
    --text-muted: #e0e0e0;
    --accent-color: #00d2ff; /* Bleu cyan néon pour les actions */
}

@font-face {
	font-family: 'Quicksand-VariableFont_wght';
	src: url('../polices/Quicksand-VariableFont_wght.ttf') format('truetype');
	font-weight: normal;
	font-style: normal;
}

/* RESET & FOND ANIMÉ */
* { box-sizing: border-box; }

body {
    font-family: 'Quicksand-VariableFont_wght';
    margin: 0;
    padding: 0;
    /* Un beau dégradé profond (Style Event/Tech) */
    background: linear-gradient(45deg, #1a1a2e, #16213e, #0f3460, #533483);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite; /* Animation lente du fond */
    color: var(--text-color);
    display: flex;
    min-height: 100vh;
}

button, input {
    font-family: 'Quicksand-VariableFont_wght';
	display: inline-block;
    padding: 10px 20px;
    border-radius: 30px; /* Boutons pillule */
    text-decoration: none;
    color: white;
    font-size: 0.9rem;
    border: 1px solid rgba(255,255,255,0.2);
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(4px);
    margin-right: 5px;
}
button:hover {
    background: white;
    color: #333;
    box-shadow: 0 0 15px rgba(255,255,255,0.5);
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* BARRE LATÉRALE (SIDEBAR) EN VERRE */
nav.sidebar {
    width: var(--sidebar-width);
    /* L'effet Verre */
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px); /* Pour Safari */
    border-right: var(--glass-border);
    
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding-top: 30px;
    z-index: 1000;
}

nav.sidebar h2 {
    text-align: center;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 40px;
    text-transform: uppercase;
    font-size: 1.1rem;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

nav.sidebar a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    padding: 15px 30px;
    display: block;
    transition: 0.3s;
    border-left: 3px solid transparent;
    font-size: 0.95rem;
}

nav.sidebar a:hover, nav.sidebar a.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: var(--accent-color);
    text-shadow: 0 0 8px var(--accent-color);
}

nav.sidebar .user-info {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9em;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    width: 80%;
    margin-left: auto;
    margin-right: auto;
}

/* CONTENU PRINCIPAL */
main.content {
    margin-left: var(--sidebar-width);
    padding: 40px;
    width: calc(100% - var(--sidebar-width));
}

h1 {
    font-weight: 300;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 15px;
    font-size: 2rem;
}

h3 { font-weight: 400; color: var(--text-muted); }

/* CARTES (CARDS) EN VERRE */
.card, .box {
    background: var(--glass-bg);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: 16px; /* Coins très arrondis */
    padding: 25px;
    margin-bottom: 25px;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px); /* Petit effet de levitation */
    background: rgba(255, 255, 255, 0.15);
}

/* TABLEAUX MODERNES */
table {
    width: 100%;
    border-collapse: separate; 
    border-spacing: 0; 
    margin-top: 10px;
}

th {
    text-align: left;
    padding: 15px;
    color: var(--accent-color);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

td {
    padding: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.95rem;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.05); }

/* BOUTONS "NEON" & GLASS */
.btn {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 30px; /* Boutons pillule */
    text-decoration: none;
    color: white;
    font-size: 0.9rem;
    border: 1px solid rgba(255,255,255,0.2);
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(4px);
    margin-right: 5px;
}

.btn:hover {
    background: white;
    color: #333;
    box-shadow: 0 0 15px rgba(255,255,255,0.5);
}

/* Couleurs spécifiques boutons (bords colorés) */
.btn-add { border-color: #2ecc71; color: #2ecc71; }
.btn-add:hover { background: #2ecc71; color: white; box-shadow: 0 0 15px #2ecc71; }

.btn-edit { border-color: #3498db; color: #3498db; }
.btn-edit:hover { background: #3498db; color: white; box-shadow: 0 0 15px #3498db; }

.btn-del { border-color: #e74c3c; color: #e74c3c; }
.btn-del:hover { background: #e74c3c; color: white; box-shadow: 0 0 15px #e74c3c; }

.btn-detail { border-color: #00d2ff; color: #00d2ff; }
.btn-detail:hover { background: #00d2ff; color: white; box-shadow: 0 0 15px #00d2ff; }

/* FORMULAIRES TRANSPARENTS */
input, select, textarea {
    width: 100%;
    padding: 12px;
    margin: 8px 0 20px 0;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: rgba(0,0,0,0.2); /* Fond sombre transparent */
    color: white;
    font-size: 1rem;
	font-family: 'Quicksand-VariableFont_wght'
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(0,0,0,0.4);
}
input::placeholder { color: rgba(255,255,255,0.4); }
option { background: #333; color: white; } /* Pour que le menu déroulant soit lisible */

/* BADGES */
.badge { padding: 5px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: bold; border: 1px solid transparent; }
.bg-Payé, .bg-Accepté { background: rgba(46, 204, 113, 0.2); color: #2ecc71; border-color: #2ecc71; }
.bg-EnRetard { background: rgba(231, 76, 60, 0.2); color: #e74c3c; border-color: #e74c3c; }
.bg-Brouillon { background: rgba(149, 165, 166, 0.2); color: #bdc3c7; border-color: #95a5a6; }
.bg-Envoyé { background: rgba(241, 196, 15, 0.2); color: #f1c40f; border-color: #f1c40f; }
.bg-Arrhesréglés { background: rgba(163, 255, 250, 0.2); color: #1abc9c; border-color: #1abc9c; }

/* --- MODAL (FENÊTRE POP-UP) --- */
.modal {
    display: none; /* Caché par défaut */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Scroll si l'écran est petit */
    background-color: rgba(0,0,0,0.6); /* Fond noir semi-transparent */
    backdrop-filter: blur(5px); /* Flou sur l'arrière plan */
}

.modal-content {
    background: var(--glass-bg); /* Notre fond vitré */
    border: var(--glass-border);
    backdrop-filter: blur(20px);
    margin: 5% auto; /* 5% du haut, centré horizontalement */
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 800px; /* Largeur max */
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    position: relative;
    animation: modalFadeIn 0.3s;
}

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

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.close-btn:hover { color: white; }

/* RESPONSIVE */
@media (max-width: 900px) {
    body { flex-direction: column; }
    nav.sidebar { width: 100%; height: auto; position: relative; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.2); }
    main.content { margin-left: 0; width: 100%; }
    .card { margin-bottom: 15px; }
}