
/* =====================================
   SUIVI DE FORMATION HTML5
   DESIGN PRINCIPAL
===================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #5b3cc4;
    --primary-light: #eee9ff;
    --accent: #f59e0b;
    --background: #f5f3fa;
    --surface: #ffffff;
    --text: #29243a;
    --muted: #77738a;
    --border: #e8e4f0;
}

body {
    font-family: Arial, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
}

/* EN-TÊTE */

header {
    background: var(--primary);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

header h1 {
    font-size: 27px;
    margin-bottom: 6px;
}

/* CONTENU PRINCIPAL */

main {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
}

section {
    background: var(--surface);
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
}

section h2 {
    color: var(--primary);
    margin-bottom: 20px;
}

/* CARTES STATISTIQUES */

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.stat-card {
    background: var(--primary-light);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.stat-card h3 {
    color: var(--primary);
    font-size: 30px;
    margin-bottom: 5px;
}

.stat-card p {
    color: var(--muted);
    font-size: 13px;
}

/* BARRE DE PROGRESSION */

.progress-section {
    margin-top: 30px;
}

.progress-section h3 {
    margin-bottom: 12px;
}

.progress-bar {
    height: 13px;
    background: #e8e4f0;
    border-radius: 20px;
    overflow: hidden;
}

#progress-fill {
    width: 0%;
    height: 100%;
    background: var(--accent);
    border-radius: 20px;
    transition: width 0.4s ease;
}

#progress-label {
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
}

/* LISTES DES CHAPITRES ET PROJETS */

#chapters-list,
#projects-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.chapter-card,
.project-card {
    border: 1px solid var(--border);
    padding: 18px;
    border-radius: 12px;
    background: white;
}

/* BOUTONS */

button {
    border: none;
    background: var(--primary);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

button:hover {
    opacity: 0.9;
}

/* TÉLÉPHONES ET PETITS ÉCRANS */

@media (max-width: 700px) {

    header h1 {
        font-size: 22px;
    }

    main {
        margin: 18px auto;
        padding: 0 12px;
    }

    section {
        padding: 18px;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    #chapters-list,
    #projects-list {
        grid-template-columns: 1fr;
    }

    .stat-card h3 {
        font-size: 25px;
    }
}
/* MODULE DE SUIVI DU TEMPS */

.time-statistics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.time-statistics > div {
    background: #f3efff;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
}

.time-statistics h3 {
    font-size: 15px;
    margin-bottom: 10px;
}

.time-statistics p {
    font-size: 20px;
    font-weight: bold;
    color: #6b35b5;
}

.study-timer {
    text-align: center;
    padding: 20px;
    background: #faf8ff;
    border-radius: 12px;
}

#timer-display {
    font-size: 36px;
    font-weight: bold;
    margin: 20px 0;
    color: #6b35b5;
}

#timer-status {
    margin-bottom: 15px;
    color: #666;
}

#study-time-section button {
    margin: 5px;
}#study-time-section button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
/* HISTORIQUE DES SÉANCES */

.study-history {
    margin-top: 25px;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
}

.study-history h3 {
    color: #5b3cc4;
    margin-bottom: 15px;
}

#study-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.study-session-item {
    padding: 15px;
    background: #f3efff;
    border-left: 4px solid #ff9800;
    border-radius: 8px;
}

.study-session-item p {
    margin: 5px 0;
}

.study-session-date {
    font-size: 13px;
    color: #666;
}

.study-session-duration {
    font-weight: bold;
    color: #5b3cc4;
}