/* ------------------------------
   GLOBAL
------------------------------ */

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0;
    padding: 0;
    background: #f3f4f6;
    color: #1f2937;
    line-height: 1.6;
}

/* ------------------------------
   HEADER FIXE
------------------------------ */

header {
    position: sticky;
    top: 0;
    background: #1f2937;
    color: #f9fafb;
    padding: 15px 20px;
    font-size: 1.3rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    z-index: 1000;
}

/* ------------------------------
   CONTAINER
------------------------------ */

.container {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
}

/* ------------------------------
   CARDS
------------------------------ */

.card {
    background: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
}

/* ------------------------------
   TITRES
------------------------------ */

.card h2 {
    margin-top: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: #111827;
}

/* ------------------------------
   TABLEAUX
------------------------------ */

table.infoStat {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

table.infoStat td {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.95rem;
}

table.infoStat tr:last-child td {
    border-bottom: none;
}

table.infoStat td:first-child {
    font-weight: 600;
    color: #374151;
}

/* ------------------------------
   SÉPARATEUR
------------------------------ */

.separator {
    height: 1px;
    background: #d1d5db;
    margin: 30px 0;
}

/* ------------------------------
   BOUTON REMONTER
------------------------------ */

#backToTop {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 55px;
    height: 55px;
    background: #2563eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 26px;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    transition: transform 0.2s ease, background 0.2s ease;
    z-index: 9999;
}

#backToTop:hover {
    background: #1e40af;
    transform: scale(1.12);
}

/* ------------------------------
   MODE SOMBRE
------------------------------ */

body.dark {
    background: #111827;
    color: #e5e7eb;
}

body.dark .card {
    background: #1f2937;
    box-shadow: 0 4px 18px rgba(0,0,0,0.6);
}

body.dark table.infoStat {
    background: #1f2937;
}

body.dark table.infoStat td {
    border-bottom: 1px solid #374151;
    color: #e5e7eb;
}

body.dark table.infoStat td:first-child {
    color: #93c5fd;
}

#backToTop {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    cursor: pointer;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #ebad25;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    border: none;
    transition: transform 0.2s ease, background 0.2s ease;
}

#backToTop img {
    width: 60%;
    height: auto;
    pointer-events: none;
}

#backToTop:hover {
    background: #1e40af;
    transform: scale(1.12);
}


.card-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.4rem;
    font-weight: 700;
    color: #111827;
    border-left: 4px solid #2563eb;
    padding-left: 10px;
}

.card-subtitle {
    margin-top: -10px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    font-style: italic;
    color: #6b7280; /* gris élégant */
}

/* Barre de menu */
.menu-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    padding: 15px 10px;
}

/* Boutons */
.menu-btn,
.menu-btn-active {
    padding: 8px 16px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.2s ease;
}

/* Bouton normal */
.menu-btn {
    background: var(--jaune);
    color: var(--blanc);
}

.menu-btn:hover {
    background: #c78902;
    transform: scale(1.05);
}

/* Bouton actif */
.menu-btn-active {
    background: #c76502;
    color: var(--noir);
    transform: scale(1.08);
    box-shadow: 0 0 8px var(--ombre-hover);
}

/* Mode sombre */
body.dark .menu-btn {
    background: #3b82f6;
}

body.dark .menu-btn:hover {
    background: #1d4ed8;
}

body.dark .menu-btn-active {
    background: #fbbf24;
    color: #111;
}

/* Mobile */
@media (max-width: 700px) {
    .menu-btn,
    .menu-btn-active {
        padding: 10px 18px;
        font-size: 1rem;
    }
}
