/* ===============================
    VARIABLES & UTILITAIRES
================================== */
:root {
    --primary: #0d6efd;
    --primary-dark: #0b5ed7;
    --danger: #dc3545;
    --white: #ffffff;
    --light: #f8f9fa;
    --gray: #666;
    --dark-gray: #333;
    --radius: 12px;
    --transition: all 0.3s ease-in-out;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* ===============================
    NAVIGATION HORIZONTALE (Django)
================================== */
.top-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', sans-serif;
}

.top-nav a {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 700;
    padding: 8px 10px;
    border-radius: 10px;
    transition: var(--transition);
}

.top-nav a:hover {
    background: #f1f9ff;
    box-shadow: 0 3px 10px rgba(0, 123, 255, 0.08);
}

.top-nav-logout {
    margin: 0;
}

.top-nav-logout button {
    border: 0;
    background: var(--primary);
    color: white;
    font-weight: 800;
    padding: 8px 12px;
    border-radius: 10px;
    transition: var(--transition);
}

.top-nav-logout button:hover {
    background: var(--primary-dark);
}

.page-content {
    padding: 10px 16px;
}

.jsl-login-form {
    margin-top: 18px;
}

.jsl-login-form .form-row {
    margin-bottom: 12px;
}

.jsl-login-form input {
    width: min(520px, 100%);
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: #ffffff;
    font-size: 15px;
}

.jsl-login-form button {
    border: 0;
    background: var(--primary);
    color: white;
    font-weight: 800;
    padding: 12px 16px;
    border-radius: 10px;
    transition: var(--transition);
}

.jsl-login-form button:hover {
    background: var(--primary-dark);
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.radius { border-radius: var(--radius); }
.shadow { box-shadow: var(--shadow); }
.shadow-hover:hover { box-shadow: var(--shadow-hover); }
.text-center { text-align: center; }
.text-bold { font-weight: bold; }
.transition { transition: var(--transition); }
.hover-scale:hover { transform: scale(1.01); transition: var(--transition); }
.fadeIn { animation: fadeIn 0.6s ease-in-out; }

.scrollbar {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) #f1f1f1;
}
.scrollbar::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.scrollbar::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}
.scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

/* ===============================
    LOGIN CARD — ANIMÉE & RESPONSIVE
================================== */

.login-card {
    background-color: #ffffff;
    padding: 30px 40px;
    width: clamp(320px, 80%, 1000px);
    margin: 40px auto;
    border-radius: 15px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
    font-family: 'Segoe UI', sans-serif;
    animation: fadeIn 0.6s ease-in-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform: translateY(0);
}

.login-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px) scale(1.01);
    cursor: default;
}

.login-card h1::before { content: ""; }


.login-card h1:hover {
    color: #0056b3;
}

.login-card h2 {
    font-size: clamp(16px, 2.5vw, 22px);
    color: #444;
    font-weight: normal;
    margin-bottom: 25px;
    opacity: 0.95;
}

.login-card p {
    font-size: clamp(13px, 2vw, 16px);
    color: #666;
    line-height: 1.6;
    opacity: 0.9;
}

/*  Animation */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ===============================
    OPTIMISÉ POUR TÉLÉPHONES
================================== */
@media (max-width: 480px) {
    .login-card {
        width: 95%;
        padding: 20px;
        margin: 20px auto;
        border-radius: 12px;
    }

    .login-card h1 {
        font-size: 22px;
    }

    .login-card h2 {
        font-size: 15px;
    }

    .login-card p {
        font-size: 13px;
    }
}


.login-footer {
    text-align: center;
    font-size: 14px;
    margin-top: 50px;
    color: #666;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.05);
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: bold;
}

.login-footer a:hover {
    text-decoration: underline;
}


/* ===============================
 TITRES DE SECTION MODERNES
.section-title, .depot-title, .employe-title
================================== */
.section-title,
.depot-title,
.employe-title {
    background: linear-gradient(135deg, #f0faff, #d0e7ff); /* gradient plus lumineux */
    padding: 20px 30px;
    border-radius: var(--radius);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.08);
    text-align: center;
    color: var(--primary);
    font-size: 28px;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    animation: fadeInTitle 0.7s ease-in-out;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.3s ease-in-out;
}

.section-title:hover,
.depot-title:hover,
.employe-title:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 123, 255, 0.15);
    cursor: default;
}

/*  Brillance douce au survol */
.section-title::before,
.depot-title::before,
.employe-title::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05), transparent 60%);
    animation: shine 8s linear infinite;
    z-index: 0;
}

/*  Animation d’entrée */
@keyframes fadeInTitle {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/*  Brillance subtile */
@keyframes shine {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Container */
.container-box {
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

/* Table container */
.table-container {
    width: 100%;
    max-width: 100%;
    overflow: auto;
    max-height: 600px;
    padding: 15px;
    display: block;
    border-radius: 10px;
    box-shadow: inset 0 0 0 5px #ddd;
}
.table-container:hover {
    overflow: auto !important;
}

/* Table */
.styled-table {
    width: 100%;
    table-layout: auto;
    border-collapse: collapse;
    font-size: 14px;
    text-align: center;
    border-radius: 10px;
    background: var(--white);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}
.styled-table thead {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, var(--primary), #d9d9d9);
    color: white;
    text-transform: uppercase;
    font-weight: bold;
}
.styled-table th, .styled-table td {
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
    white-space: nowrap;
    text-align: center;
}
.styled-table tbody tr:hover {
    background-color: #f1f1f1;
    transition: var(--transition);
    cursor: pointer;
}
.styled-table td:nth-child(7),
.styled-table td:nth-child(10),
.styled-table td:nth-child(11) {
    text-align: right !important;
    font-weight: bold;
}

/* ===============================
 SUMMARY BOX + CARDS (avec border-radius)
================================== */

.summary-box {
    display: flex;
    flex-wrap: wrap;                 /*  Cartes wrap automatiquement */
    justify-content: center;
    gap: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 12px;             /*  Bord arrondi global */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.3s ease;
}

.summary-card {
    flex: 1 1 250px;
    max-width: 100%;
    background: white;
    padding: 20px;
    border-radius: 12px;             /*  Arrondi des cartes */
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    word-break: break-word;
}

.summary-card:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 123, 255, 0.15);
}

.summary-card h2 {
    font-size: 16px;
    color: var(--primary);
    margin-bottom: 8px;
}

.summary-card p {
    font-size: 15px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

/* ===============================
 CALENDRIER PRÉSENCES
================================== */
.calendar { display:grid; grid-template-columns: repeat(7, 1fr); gap: 10px; margin-top: 10px; }
.cal-header { text-align:center; font-weight:700; color: #6b7280; padding:.4rem 0; }
.cal-day { background: #ffffff; border:1px solid #e5e7eb; border-radius:12px; padding:.5rem; min-height:110px; position:relative; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.cal-day--sunday { background: #f8fafc; border:1px dashed #e2e8f0; }
.cal-day--empty { background: transparent; border:none; min-height:110px; }
.cal-day-number { position:absolute; top:.35rem; right:.5rem; font-size:.85rem; color: #94a3b8; font-weight:700; }
.cal-entry { margin-top:1.2rem; font-size:.78rem; padding:.25rem .35rem; border-radius:8px; display:flex; align-items:center; gap:.35rem; border:1px solid #e5e7eb; }
.cal-code { font-size:.72rem; color:#64748b; background:#f1f5f9; padding:.05rem .35rem; border-radius:999px; }
.cal-status.present { font-size:.72rem; color:#1d4ed8; font-weight:700; margin-left:auto; }
.cal-status.retard { font-size:.72rem; color:#be123c; font-weight:700; margin-left:auto; }
.cal-entry.present { background: linear-gradient(135deg, #ffffff 70%, #eaf4ff); border-color: #bfdbfe; color: #1d4ed8; }
.cal-entry.retard { background: linear-gradient(135deg, #ffffff 70%, #ffe4e6); border-color:#fecaca; color:#be123c; }
.cal-time { font-variant-numeric: tabular-nums; font-weight:700; }
.cal-emp { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cal-more { margin-top:.25rem; font-size:.75rem; color: #6b7280; }
.cal-dots { display:flex; flex-wrap:wrap; gap:6px; margin-top:1.4rem; }
.cal-dot { width:14px; height:14px; border-radius:50%; display:inline-block; border:2px solid #ffffff; box-shadow: 0 0 0 1px rgba(0,0,0,.10); }
.cal-dot--ring { box-shadow: 0 0 0 2px #94a3b8 inset; }
.cal-dot--late { box-shadow: 0 0 0 2px #ef4444 inset; }
.cal-dot--absent { box-shadow: 0 0 0 2px #111827 inset; }
.cal-dot-link { display:inline-flex; }
.cal-modal-backdrop { position:fixed; inset:0; background:rgba(0,0,0,.35); z-index:9997; }
.cal-modal { position:fixed; inset:0; display:flex; align-items:center; justify-content:center; z-index:9998; }
.cal-modal-card { background:#ffffff; border:1px solid #e5e7eb; border-radius:12px; width:min(420px, 92vw); box-shadow:0 10px 24px rgba(0,0,0,.18); position:relative; padding:16px 18px; }
.cal-modal-close { position:absolute; right:8px; top:6px; border:none; background:transparent; font-size:22px; color:#334155; cursor:pointer; }
.cal-modal-close:hover { color:#0d6efd; }
.cal-legend { display:flex; flex-wrap:wrap; gap:10px 12px; align-items:center; margin:8px 0 4px 0; }
.cal-legend--grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap:10px 12px; }
.cal-legend-chip { display:inline-flex; align-items:center; gap:8px; font-size:.82rem; color:#334155; background:#f8fafc; border:1px solid #e2e8f0; border-radius:999px; padding:.35rem .7rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cal-legend-chip .name { overflow:hidden; text-overflow:ellipsis; }

/* Palette 16 couleurs — harmonisée bleu/gris/blanc */
.emp-color-0  { background:#0d6efd; }
.emp-color-1  { background:#1d4ed8; }
.emp-color-2  { background:#2563eb; }
.emp-color-3  { background:#3b82f6; }
.emp-color-4  { background:#60a5fa; }
.emp-color-5  { background:#93c5fd; }
.emp-color-6  { background:#0ea5e9; }
.emp-color-7  { background:#06b6d4; }
.emp-color-8  { background:#0891b2; }
.emp-color-9  { background:#0dcaf0; }
.emp-color-10 { background:#475569; }
.emp-color-11 { background:#64748b; }
.emp-color-12 { background:#94a3b8; }
.emp-color-13 { background:#1e293b; }
.emp-color-14 { background:#0b5ed7; }
.emp-color-15 { background:#0056b3; }

@media (max-width: 900px) {
  .calendar { grid-template-columns: repeat(7, minmax(90px, 1fr)); overflow-x:auto; padding-bottom:.25rem; }
}
@media (max-width: 640px) {
  .calendar { grid-template-columns: repeat(7, minmax(72px, 1fr)); }
  .cal-day { min-height:96px; }
}

/* ===============================
 DARK MODE — MANUEL (.dark-mode)
================================== */
.dark-mode body {
    background-color: #1e1e1e;
    color: #e0e0e0;
}

.dark-mode .login-card,
.dark-mode .container-box,
.dark-mode .table-container,
.dark-mode .summary-card,
.dark-mode .employe-container,
.dark-mode .depot-box,
.dark-mode .section-box,
.dark-mode .retrait-history-container {
    background-color: #2a2a2a;
    color: #eaeaea;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.05);
}

.dark-mode .section-title,
.dark-mode .depot-title,
.dark-mode .employe-title {
    background: linear-gradient(135deg, #2f3a4f, #1e2a3a); /*  fond texturé sombre */
    color: #00bfff;                                        /*  bleu clair lisible */
    border: 1px solid #444;
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.15);         /*  plus de profondeur */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);              /*  contraste renforcé */
    font-weight: 800;
    letter-spacing: 0.5px;
    font-size: 26px;
    transition: all 0.3s ease-in-out;
}
.dark-mode .section-title:hover,
.dark-mode .depot-title:hover,
.dark-mode .employe-title:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 24px rgba(0, 191, 255, 0.2);
    cursor: default;
}


.dark-mode .styled-table {
    background-color: #2c2c2c;
    color: #eaeaea;
}
.dark-mode .styled-table thead {
    background: linear-gradient(135deg, #444, #777);
    color: white;
}
.dark-mode .styled-table tbody tr:hover {
    background-color: #3b3b3b;
}
.dark-mode .styled-table th,
.dark-mode .styled-table td {
    border-color: #555;
}

.dark-mode .summary-card {
    border-left: 5px solid #00bfff;
}
.dark-mode .summary-card:hover {
    background: #333;
    box-shadow: 0 6px 18px rgba(0, 191, 255, 0.2);
}

.dark-mode .table-container {
    scrollbar-color: #00bfff #2c2c2c;
}
.dark-mode .table-container::-webkit-scrollbar-thumb {
    background: #00bfff;
}
.dark-mode .table-container::-webkit-scrollbar-track {
    background: #333;
}

.dark-mode .login-footer {
    background-color: #252525;
    color: #b0b0b0;
    box-shadow: 0px 4px 12px rgba(255, 255, 255, 0.05);
}
.dark-mode .login-footer a {
    color: #00bfff;
}

.dark-mode .homepage-title,
.dark-mode .homepage-subtitle,
.dark-mode .homepage-section-title {
    color: #00bfff;
    text-shadow: none;
}

.dark-mode .resume-box {
    background-color: #2c2c2c;
    color: #f0f0f0;
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(13, 110, 253, 0.1);
}

.dark-mode .sidebar-box {
    background-color: #2a2a2a;
    color: #ccc;
    box-shadow: 0 6px 12px rgba(0, 123, 255, 0.05);
}

.dark-mode .sidebar-slogan {
    background-color: #1a1a1a;
    color: #00bfff;
    border-left: 4px solid #00bfff;
}

.dark-mode .depot-summary,
.dark-mode .depot-description,
.dark-mode .total-employe {
    background-color: #1a1a1a;
    color: #00bfff;
    border-left: 5px solid #00bfff;
}

.dark-mode .balance-box,
.dark-mode .retrait-box,
.dark-mode .resume-global,
.dark-mode .total-retrait {
    background: linear-gradient(135deg, #0072ff, #00c6ff);
    color: white;
    box-shadow: 0 4px 16px rgba(0, 191, 255, 0.2);
}

.dark-mode .alert-success {
    background-color: #1d3b2a;
    color: #90ee90;
    border-left-color: #28a745;
}
.dark-mode .alert-warning {
    background-color: #4a3f1a;
    color: #f0e68c;
    border-left-color: #ffc107;
}
.dark-mode .alert-error {
    background-color: #3a1e1e;
    color: #f08080;
    border-left-color: #dc3545;
}

.dark-mode .user-box {
    background-color: #1f2b33;
    color: #e0e0e0;
    border-left-color: #00bfff;
}
.dark-mode .user-box h3 {
    color: #00bfff;
}
.dark-mode .user-box .role {
    color: #aaa;
}

.dark-mode .advantages-list,
.dark-mode .advantages-footer {
    color: #ccc;
}

.dark-mode .daily-message {
    background-color: #2a2a2a;
    color: #e0e0e0;
    border-left: 5px solid #00bfff;
}
.dark-mode .daily-message h3 {
    color: #00bfff;
}
.dark-mode .daily-content {
    color: #ccc;
}

.dark-mode .app-banner {
    background: linear-gradient(135deg, #002244, #005577);
}

/* ===============================
 RESPONSIVE DESIGN GLOBAL + BORDER RADIUS
================================== */

/*  Smartphones Portrait (0 - 480px) */
@media (max-width: 480px) {
    .login-card,
    .container-box,
    .table-container,
    .summary-card,
    .employe-container,
    .depot-box {
        padding: 15px !important;
        margin: 15px !important;
        border-radius: 8px;
    }

    .login-card h1 {
        font-size: 26px;
    }

    .login-card h2 {
        font-size: 16px;
    }

    .login-card p,
    .summary-card p {
        font-size: 14px;
    }

    .section-title,
    .depot-title,
    .employe-title {
        font-size: 22px !important;
    }

    .styled-table {
        font-size: 12px;
        border-radius: 6px;
    }

    .login-footer {
        font-size: 12px;
        padding: 12px;
        border-radius: 6px;
    }
}

/*  Mobiles paysage & petits téléphones (481px – 767px) */
@media (min-width: 481px) and (max-width: 767px) {
    .styled-table {
        font-size: 13px;
        border-radius: 8px;
    }

    .summary-card,
    .retrait-box,
    .balance-box {
        font-size: 16px;
        border-radius: 10px;
    }

    .summary-card p {
        font-size: 15px;
    }

    .section-title,
    .depot-title {
        font-size: 24px;
    }

    .login-footer {
        font-size: 13px;
        padding: 14px;
        border-radius: 8px;
    }
}

/*  Tablettes (768px – 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .styled-table {
        font-size: 13.5px;
        border-radius: 10px;
    }

    .summary-box {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .summary-card {
        margin: 8px;
        flex: 1 1 45%;
        border-radius: 12px;
    }

    .balance-box,
    .retrait-box {
        font-size: 18px;
        border-radius: 12px;
    }

    .login-card {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 30px;
        border-radius: 12px;
    }

    .login-footer {
        font-size: 14px;
        padding: 16px;
        border-radius: 10px;
    }
}

/*  Laptops standards (1025px – 1366px) */
@media (min-width: 1025px) and (max-width: 1366px) {
    .summary-card {
        flex: 1 1 30%;
        border-radius: 12px;
    }

    .styled-table {
        font-size: 14px;
        border-radius: 10px;
    }

    .login-footer {
        font-size: 14px;
        padding: 18px;
        border-radius: 10px;
    }
}

/*  Grands écrans (1367px et +) */
@media (min-width: 1367px) {
    .summary-card {
        flex: 1 1 220px;
        border-radius: 14px;
    }

    .styled-table {
        font-size: 15px;
        border-radius: 12px;
    }

    .resume-box {
        font-size: 15px;
        border-radius: 10px;
    }

    .login-footer {
        font-size: 15px;
        padding: 20px;
        border-radius: 10px;
    }
}

/* ===============================
 TITRES DE LA PAGE D'ACCUEIL - BASE
================================== */

.homepage-title {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: clamp(28px, 4vw, 48px);
    font-weight: bold;
    color: var(--primary);
    text-align: center;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2);
    margin-bottom: 10px;
    animation: fadeIn 0.5s ease-in-out;
    transition: all 0.3s ease-in-out;
}

.homepage-subtitle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #333;
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 500;
    text-align: center;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    animation: fadeIn 0.6s ease-in-out;
}

.homepage-section-title {
    color: #2563eb;
    font-size: clamp(20px, 2.2vw, 26px);
    font-weight: bold;
    text-align: center;
    margin-top: 30px;
    text-shadow: 0px 1px 3px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease-in-out;
    animation: fadeIn 0.7s ease-in-out;
}

/* ===============================
 CONTENEUR DE FONCTIONNALITÉS
.section-box
================================== */
.section-box {
    display: block;
    height: auto;
    min-height: 0;

    text-align: left;
    font-family: Arial, sans-serif;
    padding: 16px;
    margin-bottom: 16px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease-in-out;
}

.section-box h4 {
    font-size: 20px;
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 10px;
}

.section-box p {
    font-size: 14px;
    color: #555;
    margin: 8px 0 0 0;
}

/* Survol pour plus d'interaction */
.section-box:hover {
    transform: scale(1.02);
    animation: floatBox 1s ease-in-out infinite alternate;
}

@keyframes floatBox {
    from { transform: translateY(0); }
    to { transform: translateY(-4px); }
}

/* ===============================
 RESPONSIVE HOMEPAGE
================================== */

/* Smartphones Portrait (jusqu’à 480px) */
@media (max-width: 480px) {
    .homepage-title { font-size: 26px; flex-direction: column; gap: 6px; }
    .homepage-subtitle { font-size: 16px; flex-direction: column; gap: 6px; }
    .homepage-section-title { font-size: 18px; }
    .section-box h4 { font-size: 15px; }
    .section-box p { font-size: 13px; }
}

/* Mobiles paysage & petits smartphones (481px – 767px) */
@media (min-width: 481px) and (max-width: 767px) {
    .homepage-title { font-size: 30px; }
    .homepage-subtitle { font-size: 18px; }
    .homepage-section-title { font-size: 20px; }
    .section-box h4 { font-size: 16px; }
    .section-box p { font-size: 13.5px; }
}

/* Tablettes Portrait & iPad (768px – 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .homepage-title { font-size: 36px; }
    .homepage-subtitle { font-size: 20px; }
    .homepage-section-title { font-size: 22px; }
    .section-box h4 { font-size: 18px; }
    .section-box p { font-size: 14px; }
}

/* Laptops standards (1025px – 1366px) */
@media (min-width: 1025px) and (max-width: 1366px) {
    .homepage-title { font-size: 42px; }
    .homepage-subtitle { font-size: 22px; }
    .homepage-section-title { font-size: 22px; }
    .section-box h4 { font-size: 20px; }
    .section-box p { font-size: 14px; }
}

/* Écrans larges / 4K / 40 pouces & doubles écrans (1367px et +) */
@media (min-width: 1367px) {
    .homepage-title { font-size: 48px; }
    .homepage-subtitle { font-size: 24px; }
    .homepage-section-title { font-size: 24px; }
    .section-box h4 { font-size: 22px; }
    .section-box p { font-size: 15px; }
}

/*  Apparition douce */
@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ===============================
    STYLES CSS COMPLÉMENTAIRES
   Pour les composants manquants dans styles.css
================================== */

/*  .sidebar-box — Boîte de menu latéral */
.sidebar-box {
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.08);
    transition: all 0.3s ease-in-out;
    margin-bottom: 15px;
}
.sidebar-box:hover {
    transform: scale(1.01);
    box-shadow: 0 8px 24px rgba(0, 123, 255, 0.15);
}

/*  .sidebar-slogan — Texte dynamique dans le menu */
.sidebar-slogan {
    background-color: #f1f9ff;
    color: #00507a;
    font-size: 14px;
    font-style: italic;
    padding: 12px 18px;
    border-left: 4px solid var(--primary);
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 123, 255, 0.05);
    animation: fadeIn 1s ease-in-out;
    margin-bottom: 20px;
    line-height: 1.5;
}

/*  .depot-summary — encadré message slogan page */
.depot-summary {
    background-color: #e8f4ff;
    color: #004080;
    padding: 16px 24px;
    margin-top: 1rem;
    border-radius: 10px;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    font-family: Arial, sans-serif;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.07);
    animation: fadeIn 1s ease-in-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/*  .resume-box — boîte de résumé en bas d'écran */
.resume-box {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: white;
    padding: 20px;
    border: 1px solid var(--primary);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.1);
    z-index: 9999;
    max-width: 320px;
    animation: fadeIn 0.4s ease-in-out;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    transition: all 0.3s ease-in-out;
}
.resume-box:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 36px rgba(0, 123, 255, 0.15);
    cursor: default;
}

/* ===============================
 RESPONSIVE - MOBILE À 4K
================================== */

/*  Smartphones Portrait (jusqu'à 480px) */
@media (max-width: 480px) {
    .sidebar-box {
        padding: 15px;
    }

    .sidebar-slogan {
        font-size: 13px;
        padding: 10px 14px;
    }

    .depot-summary {
        font-size: 13.5px;
        padding: 14px;
    }

    .resume-box {
        padding: 15px;
        font-size: 13px;
        left: 20px;
        right: 20px;
        bottom: 20px;
        max-width: none;
    }
}

/*  Mobiles paysage & petits téléphones (481px – 767px) */
@media (min-width: 481px) and (max-width: 767px) {
    .sidebar-slogan {
        font-size: 14px;
    }

    .depot-summary {
        font-size: 14px;
    }

    .resume-box {
        font-size: 14px;
    }
}

/*  Tablettes Portrait (768px – 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .sidebar-box {
        padding: 18px;
    }

    .sidebar-slogan {
        font-size: 14px;
        padding: 14px 16px;
    }

    .depot-summary {
        font-size: 15px;
    }

    .resume-box {
        font-size: 14px;
        max-width: 280px;
    }
}

/*  Laptops (1025px – 1366px) */
@media (min-width: 1025px) and (max-width: 1366px) {
    .resume-box {
        font-size: 14px;
    }

    .depot-summary {
        font-size: 15px;
    }

    .sidebar-slogan {
        font-size: 15px;
    }
}

/*  Écrans larges (1367px et +) */
@media (min-width: 1367px) {
    .resume-box {
        font-size: 15px;
    }

    .depot-summary {
        font-size: 16px;
    }

    .sidebar-slogan {
        font-size: 16px;
    }
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 5px solid #28a745;
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 6px;
}
.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 5px solid #ffc107;
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 6px;
}
.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 5px solid #dc3545;
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 6px;
}

/* ===============================
 BLOC AVANTAGES - STYLES DE BASE
================================== */

.section-advantages {
    text-align: center;
    padding: 30px 20px;
    font-family: Arial, sans-serif;
    margin-bottom: 40px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease-in-out;
}

.advantages-list {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    font-size: 16px;
    color: #555;
    line-height: 1.8;
    max-width: 800px;
}

.advantages-list li {
    margin-bottom: 10px;
    text-align: center;
}

.advantages-footer {
    font-size: 16px;
    color: #666;
    margin-top: 20px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
/* Smartphones Portrait */
@media (max-width: 480px) {
    .advantages-list {
        font-size: 14px;
        line-height: 1.7;
    }

    .advantages-footer {
        font-size: 14px;
        padding: 0 10px;
    }
}

/* Mobiles paysage et petits smartphones */
@media (min-width: 481px) and (max-width: 767px) {
    .advantages-list {
        font-size: 15px;
    }

    .advantages-footer {
        font-size: 15px;
    }
}

/* Tablettes */
@media (min-width: 768px) and (max-width: 1024px) {
    .advantages-list {
        font-size: 16px;
    }

    .advantages-footer {
        font-size: 15.5px;
    }
}

/* Laptops standards */
@media (min-width: 1025px) and (max-width: 1366px) {
    .advantages-list {
        font-size: 16px;
    }

    .advantages-footer {
        font-size: 16px;
    }
}

/* Grands écrans */
@media (min-width: 1367px) {
    .advantages-list {
        font-size: 17px;
    }

    .advantages-footer {
        font-size: 17px;
    }
}

/* ===============================
 MESSAGE QUOTIDIEN - STYLES GÉNÉRAUX
================================== */

.daily-message {
    background-color: #f1f9ff;
    border-left: 5px solid var(--primary);
    padding: 20px;
    margin: 20px auto;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    max-width: 800px;
    font-family: Arial, sans-serif;
    animation: fadeIn 0.6s ease-in-out;
}

.daily-message h3 {
    font-size: 22px;
    color: var(--primary);
    margin-bottom: 15px;
    text-align: center;
}

.daily-content {
    font-size: 15px;
    color: #333;
    line-height: 1.6;
    white-space: pre-line;
    text-align: left;
}

/* ===============================
 RESPONSIVE .daily-message
================================== */

/* Smartphones Portrait */
@media (max-width: 480px) {
    .daily-message {
        padding: 15px;
        margin: 15px 10px;
    }

    .daily-message h3 {
        font-size: 18px;
    }

    .daily-content {
        font-size: 14px;
        line-height: 1.5;
    }
}

/* Mobiles paysage et petits téléphones */
@media (min-width: 481px) and (max-width: 767px) {
    .daily-message h3 {
        font-size: 19px;
    }

    .daily-content {
        font-size: 14.5px;
    }
}

/* Tablettes (768px – 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .daily-message h3 {
        font-size: 21px;
    }

    .daily-content {
        font-size: 15px;
    }
}

/* Laptops standards (1025px – 1366px) */
@media (min-width: 1025px) and (max-width: 1366px) {
    .daily-message h3 {
        font-size: 22px;
    }

    .daily-content {
        font-size: 15px;
    }
}

/* Très grands écrans (4K et +) */
@media (min-width: 1367px) {
    .daily-message {
        max-width: 1000px;
    }

    .daily-message h3 {
        font-size: 24px;
    }

    .daily-content {
        font-size: 16px;
    }
}

/* Animation fadeIn */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===============================
 APP BANNER - MODERNE & DYNAMIQUE
================================== */
.app-banner {
    position: relative;
    background: linear-gradient(135deg, #1e3a8a, #2563eb 60%, #93c5fd);
    padding: 28px 18px;
    text-align: center;
    color: white;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
    margin-bottom: 24px;
    animation: fadeInScale 0.8s ease-out;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.app-banner:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 12px 30px rgba(0, 123, 255, 0.3);
}

.app-banner::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.06), transparent 70%);
    animation: shine 6s linear infinite;
    z-index: 0;
}

.app-banner h1,
.app-banner p {
    position: relative;
    z-index: 1;
}

.app-banner h1 {
    margin: 0;
    font-size: 36px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 800;
    transition: color 0.3s ease;
}

.app-banner p {
    margin: 10px 0 0;
    font-size: 16px;
    opacity: 0.95;
}

/* ===============================
 RESPONSIVE BANNER
================================== */
@media (max-width: 480px) {
    .app-banner {
        padding: 20px 15px;
    }

    .app-banner h1 {
        font-size: 24px;
        letter-spacing: 1px;
    }

    .app-banner p {
        font-size: 14px;
    }
}

@media (min-width: 481px) and (max-width: 767px) {
    .app-banner h1 {
        font-size: 28px;
    }

    .app-banner p {
        font-size: 15px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .app-banner h1 {
        font-size: 32px;
    }

    .app-banner p {
        font-size: 15.5px;
    }
}

@media (min-width: 1025px) and (max-width: 1366px) {
    .app-banner h1 {
        font-size: 36px;
    }

    .app-banner p {
        font-size: 16px;
    }
}

@media (min-width: 1367px) {
    .app-banner h1 {
        font-size: 42px;
    }

    .app-banner p {
        font-size: 18px;
    }
}

/* ===============================
 ANIMATIONS
================================== */
@keyframes fadeInScale {
    0% { opacity: 0; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes shine {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===============================
 UTILISATEUR CONNECTÉ - MODERNE
================================== */
.user-box {
    background: #f8fbff;
    border-left: 5px solid var(--primary);
    padding: 15px 25px;
    margin-top: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.08);
    animation: fadeInSlide 0.6s ease-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 100%;
}

.user-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 123, 255, 0.15);
}

.user-box h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #004080;
    text-align: center;         /*  Centrage horizontal */
    word-break: break-word;     /*  Coupe propre des longs mots */
    white-space: normal;        /*  Autorise les retours à la ligne */
    line-height: 1.6;           /*  Espacement agréable */
}

.user-box .username {
    color: #007acc;
    font-weight: bold;
}

.user-box .role {
    color: #555;
    font-style: italic;
}

/*  Animation */
@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===============================
 RESPONSIVE .user-box
================================== */
@media (max-width: 480px) {
    .user-box {
        padding: 12px 16px;
    }

    .user-box h3 {
        font-size: 16px;
        line-height: 1.4;
    }
}

@media (min-width: 481px) and (max-width: 767px) {
    .user-box h3 {
        font-size: 17px;
    }
}

@media (min-width: 1367px) {
    .user-box h3 {
        font-size: 20px;
    }
}
/* ===============================
 EXPANDER HEADER ICON
================================== */
.streamlit-expanderHeader::before { content: ""; }

/* ===============================
 FOOTER HEADING STYLÉ
================================== */
.footer-heading {
    text-align: center;
    color: var(--primary-dark); /* Fallback */
    font-size: 20px;
    font-weight: bold;
    margin-top: 40px;
    animation: fadeIn 0.5s ease-in-out;
}

@supports ((-webkit-background-clip:text) or (background-clip: text)) {
  .footer-heading {
    background-image: linear-gradient(90deg, #0b5ed7 0%, #64748b 55%, #ffffff 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
  }
}

/* ===============================
 RESPONSIVE - FOOTER HEADING
================================== */
/* Smartphones Portrait (jusqu'à 480px) */
@media (max-width: 480px) {
    .footer-heading {
        font-size: 16px;
        padding: 0 10px;
    }
}

/* Mobiles paysage (481px – 767px) */
@media (min-width: 481px) and (max-width: 767px) {
    .footer-heading {
        font-size: 17px;
    }
}

/* Tablettes (768px – 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .footer-heading {
        font-size: 18px;
    }
}

/* Grands écrans (1367px et plus) */
@media (min-width: 1367px) {
    .footer-heading {
        font-size: 22px;
    }
}

/*  Animation fade-in */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

html {
    scroll-behavior: smooth;
  }
  
  body {
    max-width: 100vw;
    overflow-x: auto;
  }

  .depot-box {
    background: #ffffff;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.depot-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
    text-align: center;
    margin-bottom: 20px;
}
.balance-box {
    background: linear-gradient(135deg, #00c6ff, #0072ff);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease-in-out;
}

.retrait-box {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    color: white;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
    box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.2);
}

.retrait-description {
    font-size: 16px;
    margin-top: 10px;
}

.resume-global {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    padding: 15px;
    border-radius: 10px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    margin-top: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.retrait-history-container {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}
.employe-container {
    background: #ffffff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.05);
}

.total-employe {
    background: #e9f5ff;
    padding: 15px;
    border-left: 5px solid var(--primary);
    font-size: 16px;
    font-weight: bold;
    color: #004080;
    text-align: center;
    border-radius: 10px;
}
/* ===============================
 TOTAL RETRAIT - RÉSUMÉ FINAL
================================== */

.total-retrait {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    padding: 16px 24px;
    border-radius: 10px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    animation: fadeIn 0.6s ease-in-out;
    transition: all 0.3s ease-in-out;
}

/* ===============================
 RESPONSIVE .total-retrait
================================== */

/* Smartphones Portrait */
@media (max-width: 480px) {
    .total-retrait {
        font-size: 14px;
        padding: 12px 16px;
    }
}

/* Mobiles paysage et petits smartphones */
@media (min-width: 481px) and (max-width: 767px) {
    .total-retrait {
        font-size: 15px;
    }
}

/* Tablettes */
@media (min-width: 768px) and (max-width: 1024px) {
    .total-retrait {
        font-size: 16px;
    }
}

/* Grands écrans (1025px et +) */
@media (min-width: 1025px) {
    .total-retrait {
        font-size: 18px;
    }
}

/* ===============================
 DÉPÔT - PARAGRAPHE DESCRIPTIF
================================== */
.depot-description {
    font-size: 16px;
    color: #555;
    background-color: #f9f9f9;
    padding: 15px 20px;
    text-align: center;
    border-left: 5px solid var(--primary);
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.05);
    margin: 20px 0;
    line-height: 1.7;
    animation: fadeIn 0.6s ease-in-out;
    transition: all 0.3s ease-in-out;
}

/* ===============================
 RESPONSIVE - depot-description
================================== */
@media (max-width: 480px) {
    .depot-description {
        font-size: 14px;
        padding: 12px 14px;
    }
}

@media (min-width: 481px) and (max-width: 767px) {
    .depot-description {
        font-size: 15px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .depot-description {
        font-size: 15.5px;
    }
}

@media (min-width: 1367px) {
    .depot-description {
        font-size: 17px;
    }
}
/* ===============================
 CHAMPS DE CONNEXION - SIDEBAR
================================== */
section[data-testid="stSidebar"] input {
    border: 1px solid #ccc !important;
    border-radius: 8px !important;
    padding: 10px !important;
    font-size: 14px !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

section[data-testid="stSidebar"] input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2) !important;
    outline: none !important;
}

/* ===============================
 RESPONSIVE - SIDEBAR INPUTS
================================== */

/* Smartphones portrait */
@media (max-width: 480px) {
    section[data-testid="stSidebar"] input {
        font-size: 13px !important;
        padding: 8px !important;
    }
}

/* Petits appareils / paysage */
@media (min-width: 481px) and (max-width: 767px) {
    section[data-testid="stSidebar"] input {
        font-size: 13.5px !important;
    }
}

/* Tablettes */
@media (min-width: 768px) and (max-width: 1024px) {
    section[data-testid="stSidebar"] input {
        font-size: 14px !important;
    }
}

/* Écrans larges */
@media (min-width: 1367px) {
    section[data-testid="stSidebar"] input {
        font-size: 15px !important;
    }
}

/* ===============================
 RESPONSIVE .page-about
================================== */

/* Smartphones portrait (jusqu’à 480px) */
@media (max-width: 480px) {
    .page-about {
        padding: 0 10px;
        font-size: 15px;
    }

    .page-about h4 {
        font-size: 18px;
    }

    .page-about ul li {
        font-size: 14px;
    }

    .page-about .quote,
    .page-about .signature {
        font-size: 15px;
    }
}

/* Mobiles paysage & petits smartphones (481px – 767px) */
@media (min-width: 481px) and (max-width: 767px) {
    .page-about {
        padding: 0 15px;
    }

    .page-about h4 {
        font-size: 19px;
    }

    .page-about ul li {
        font-size: 15px;
    }

    .page-about .quote,
    .page-about .signature {
        font-size: 16px;
    }
}

/* Tablettes (768px – 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .page-about {
        padding: 0 30px;
    }

    .page-about h4 {
        font-size: 20px;
    }

    .page-about ul li {
        font-size: 16px;
    }

    .page-about .quote,
    .page-about .signature {
        font-size: 17px;
    }
}

/* Laptops et écrans moyens (1025px – 1366px) */
@media (min-width: 1025px) and (max-width: 1366px) {
    .page-about {
        padding: 0 50px;
    }

    .page-about h4 {
        font-size: 21px;
    }

    .page-about ul li {
        font-size: 16.5px;
    }

    .page-about .quote,
    .page-about .signature {
        font-size: 17.5px;
    }
}

/* Grands écrans (1367px et +) */
@media (min-width: 1367px) {
    .page-about {
        max-width: 1000px;
        font-size: 17px;
        padding: 0 60px;
    }

    .page-about h4 {
        font-size: 22px;
    }

    .page-about ul li {
        font-size: 17px;
    }

    .page-about .quote,
    .page-about .signature {
        font-size: 18px;
    }
}

.page-about {
    line-height: 1.8;
    text-align: justify;
    font-size: clamp(15px, 1.2vw, 17px);
    color: #333;
    padding: 0 10px;
    margin-top: 20px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.page-about h4 {
    color: var(--primary);
    font-size: clamp(18px, 2vw, 22px);
    margin-top: 25px;
    margin-bottom: 10px;
    font-weight: bold;
}

.page-about ul {
    padding-left: 1.5rem;
    margin-bottom: 20px;
}

.page-about ul li {
    margin-bottom: 8px;
    font-size: clamp(15px, 1.1vw, 17px);
}

.page-about .quote {
    text-align: center;
    font-style: italic;
    margin-top: 30px;
    color: #444;
    font-size: clamp(16px, 2vw, 18px);
}

.page-about .signature {
    text-align: center;
    font-weight: bold;
    font-size: clamp(16px, 2vw, 18px);
    margin-bottom: 40px;
    color: #000;
}

/* ===============================
SERVICES GRID
================================== */
/* ==== GLOBAL STYLES ==== */
body {
    font-family: 'Segoe UI', sans-serif;
    color: #333;
    margin: 0;
    padding: 0;
}

/* ==== HEADER / BANNER ==== */
.app-banner {
    text-align: center;
    padding: 50px 20px;
    background: linear-gradient(90deg, #007BFF, #00BFFF);
    color: white;
    border-radius: 12px;
    margin-bottom: 40px;
}

.app-banner h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.app-banner p {
    font-size: 16px;
    margin: 5px 0;
}

/* ==== GRID SERVICES ==== */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 0 20px;
    margin-top: 30px;
    margin-bottom: 40px;
}

/* ==== SERVICE CARD ==== */
.service-box {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 180px;
}

.service-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,123,255,0.2);
}

.service-box h4 {
    font-size: 20px;
    font-weight: 600;
    color: #007BFF;
    margin-bottom: 10px;
}

.service-box p {
    font-size: 14px;
    color: #444;
    margin: 0;
    line-height: 1.5;
}

/* ==== FORMULAIRE ==== */
.section-title {
    font-size: 22px;
    font-weight: bold;
    color: #007BFF;
    text-align: center;
    margin-top: 40px;
    margin-bottom: 20px;
}

/* ==== FOOTER ==== */
.login-footer {
    text-align: center;
    font-size: 13px;
    color: #888;
    margin-top: 60px;
}

.login-footer a {
    color: #007BFF;
    text-decoration: none;
}

.login-footer hr {
    margin-bottom: 20px;
}

/* ==== RESPONSIVE ==== */
@media screen and (max-width: 768px) {
    .app-banner h1 {
        font-size: 28px;
    }

    .service-box {
        padding: 20px;
    }
}

@media screen and (max-width: 480px) {
    .service-box h4 {
        font-size: 18px;
    }

    .service-box p {
        font-size: 13px;
    }
}

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@600&display=swap');

.splash-container {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    background: linear-gradient(135deg, #ffffff, #e6f0ff);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeOutSplash 1s ease-out 2.5s forwards;
}

@keyframes fadeOutSplash {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

.jsl-text {
    font-size: 6vw;
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    color: #007bff;
    letter-spacing: 0.4vw;
    text-align: center;
    text-shadow: 0 0 10px rgba(0,123,255,0.8);
    animation: glowZoom 2s ease-in-out forwards;
    opacity: 0;
}

@keyframes glowZoom {
    0% {
        transform: scale(0.7);
        opacity: 0;
        text-shadow: none;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
        text-shadow: 0 0 25px rgba(0,123,255,0.9);
    }
    100% {
        transform: scale(1);
        text-shadow: 0 0 15px rgba(0,123,255,0.7);
    }
}

.splash-subtext {
    margin-top: 1rem;
    font-size: 1.2rem;
    font-weight: 400;
    color: #333;
    font-family: 'Segoe UI', sans-serif;
    text-align: center;
    animation: fadeIn 1.2s ease-in 1s forwards;
    opacity: 0;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/*  Zone de bannière animée responsive */
.footer-animated-banner {
    position: relative;
    text-align: center;
    font-weight: bold;
    color: #007bff;
    font-size: clamp(16px, 2vw, 22px);
    padding: 30px 20px 60px; /* espace bas pour laisser passer le camion */
    line-height: 1.5;
    overflow: hidden;
    max-width: 100%;
    width: 100%;
}

/*  Piste d’animation du camion */
.footer-animated-truck-line {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    height: 30px;
    pointer-events: none;
    display: flex;
    justify-content: center;
}

/*  Camion animé */
.footer-animated-truck-line .animated-truck {
    display: inline-block;
    font-size: clamp(24px, 3vw, 36px);
    animation: driveBelow 6s linear infinite;
    white-space: nowrap;
}

/*  Mouvement du camion */
@keyframes driveBelow {
    0%   { transform: translateX(-120%); }
    100% { transform: translateX(120%); }
}

/*  Mobile */
@media (max-width: 480px) {
    .footer-animated-banner {
        font-size: 15px;
        padding: 20px 12px 50px;
    }
    .footer-animated-truck-line .animated-truck {
        font-size: 22px;
    }
}

/*  Grands écrans */
@media (min-width: 1920px) {
    .footer-animated-banner {
        font-size: 22px;
    }
    .footer-animated-truck-line .animated-truck {
        font-size: 36px;
    }
}
/*  Animation combinée : flottement + rotation */
.emoji {
    display: inline-block;
    animation: floatEmoji 2s ease-in-out infinite, rotateEmoji 6s linear infinite;
    transform-origin: center;
}

/*  Flottement vertical */
@keyframes floatEmoji {
    0%   { transform: translateY(0); }
    50%  { transform: translateY(-5px); }
    100% { transform: translateY(0); }
}

/*  Rotation à 360° */
@keyframes rotateEmoji {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/*  Politique de confidentialité — Responsive & Centrée */
.privacy-box {
    background-color: #ffffff;
    border-radius: 12px;
    padding: clamp(20px, 4vw, 40px);
    margin: 40px auto;
    max-width: 900px;
    width: 95%;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    font-family: 'Segoe UI', sans-serif;
    animation: fadeIn 0.6s ease-in-out;
    line-height: 1.7;
    color: #333;
    box-sizing: border-box;
    display: block;
    text-align: left;
}

/*  Titre centré, responsive */
.privacy-title {
    font-size: clamp(22px, 4vw, 32px);
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.4;
}

/*  Liste stylée responsive */
.privacy-list {
    padding-left: 1.5rem;
    margin: 20px 0;
    font-size: clamp(15px, 2.5vw, 17px);
}

.privacy-list li {
    margin-bottom: 10px;
    line-height: 1.6;
    text-align: left;
}

/*  Mobile */
@media (max-width: 480px) {
    .privacy-box {
        padding: 20px 15px;
        margin: 20px 10px;
        width: 100%;
    }

    .privacy-title {
        font-size: 20px;
    }

    .privacy-list {
        font-size: 15px;
    }
}

/*  Tablettes / Moyens écrans */
@media (min-width: 768px) and (max-width: 1024px) {
    .privacy-box {
        padding: 30px 25px;
    }

    .privacy-title {
        font-size: 26px;
    }
}

/*  Très grands écrans (ex. 4K / 40 pouces) */
@media (min-width: 1600px) {
    .privacy-box {
        max-width: 1000px;
    }

    .privacy-title {
        font-size: 32px;
    }

    .privacy-list {
        font-size: 18px;
    }
}

/*  Barre de navigation personnalisée */
.custom-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    padding: 20px;
    background-color: #f8f9fa;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-bottom: 1px solid #ddd;
    flex-wrap: wrap;
}

/*  Liens du menu */
.custom-nav-item {
    font-size: 16px;
    font-weight: 600;
    color: #007bff;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

/*  Hover effect */
.custom-nav-item:hover {
    background-color: #e6f0ff;
    color: #004080;
    transform: scale(1.05);
}

/*  Onglet actif */
.custom-nav-item.active {
    background-color: #007bff;
    color: white;
}

/* ===============================
   Modern UI Tokens & Components
   (appliqués en fin de fichier pour surcharger sans casser l’existant)
================================== */

/* Design tokens supplémentaires (mode clair/sombre auto) */
:root {
    --bg: #ffffff;               /* Blanc */
    --fg: #0f172a;               /* Gris très foncé */
    --muted: #64748b;            /* Gris ardoise */
    --card: #ffffff;             /* Blanc */
    --border-strong: #e5e7eb;    /* Gris clair */
    --primary-500: #2563eb;      /* Bleu principal */
    --primary-600: #1d4ed8;      /* Bleu plus foncé */
    --accent-500: #64748b;       /* Gris (remplace le violet) */

    --space-1: .375rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem; --space-6: 1.5rem;
    --radius-8: 8px; --radius-12: 12px; --radius-16: 16px;
    --shadow-1: 0 2px 8px rgba(15, 23, 42, .06);
    --shadow-2: 0 10px 25px rgba(15, 23, 42, .10);

    --fs-sm: clamp(12px, .8vw, 14px);
    --fs-md: clamp(14px, 1vw, 16px);
    --fs-lg: clamp(16px, 1.2vw, 18px);
    --fs-xl: clamp(20px, 2vw, 28px);
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0b1220;           /* Fond sombre */
        --fg: #e5e7eb;           /* Texte clair */
        --muted: #9aa4b2;        /* Gris moyen */
        --card: #0f1623;         /* Carte sombre */
        --border-strong: #30363d;/* Bord sombre */
        --primary-500: #60a5fa;  /* Bleu clair (sombre) */
        --primary-600: #93c5fd;  /* Bleu très clair (sombre) */
        --accent-500: #94a3b8;   /* Gris (remplace le violet) */
        --shadow-1: 0 2px 8px rgba(0,0,0,.35);
        --shadow-2: 0 18px 36px rgba(0,0,0,.45);
    }
}
html, body { color: var(--fg); background: var(--bg); }

/* ===============================
   KPI STRIP — 1 ligne, sans emojis
================================== */
.kpi-strip {
    display: flex;
    gap: var(--space-4);
    flex-wrap: nowrap;            /*  une seule ligne */
    overflow-x: auto;             /*  scroll horizontal sur mobile */
    padding-bottom: var(--space-2);
}
.kpi-card {
    flex: 0 0 260px;              /* largeur minimale par carte */
    background: var(--card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-12);
    box-shadow: var(--shadow-1);
    padding: var(--space-6);
    text-align: center;
    transition: transform 200ms ease, box-shadow 200ms ease;
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.kpi-value { font-size: clamp(28px, 3vw, 36px); font-weight: 800; letter-spacing: .3px; }
.kpi-value .kpi-amount { font-variant-numeric: tabular-nums; }
.kpi-value .kpi-currency { font-size: clamp(14px, 1.2vw, 18px); font-weight: 700; color: var(--muted); vertical-align: baseline; }
.kpi-label { color: var(--muted); font-weight: 700; font-size: var(--fs-sm); margin-top: var(--space-2); text-transform: uppercase; }

/* Accents par type */
.kpi-card.kpi-pending { 
  border-left: 6px solid #64748b; /* gris ardoise */
  background-image: linear-gradient(135deg, #ffffff 60%, #e2e8f0 100%); /* blanc → gris */
}
.kpi-card.kpi-done    { 
  border-left: 6px solid #2563eb; /* bleu */
  background-image: linear-gradient(135deg, #ffffff 60%, #dbeafe 100%); /* blanc → bleu clair */
}
.kpi-card.kpi-total   { 
  border-left: 6px solid #1d4ed8; /* bleu foncé */
  background-image: linear-gradient(135deg, #ffffff 60%, #eff6ff 100%); /* blanc → très bleu clair */
}
.kpi-card.kpi-rate    { 
  border-left: 6px solid #475569; /* gris bleuté */
  background-image: linear-gradient(135deg, #ffffff 60%, #e2e8f0 85%, #dbeafe 100%); /* blanc → gris → bleu clair */
}

/* Variante responsive sans scroll (grille auto-fit) */
.kpi-strip.kpi-responsive {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-4);
  overflow: visible;
}
.kpi-strip.kpi-responsive .kpi-card { flex: initial; width: 100%; }

/* Grille 2 colonnes pleine largeur (deux cartes) */
.kpi-strip.kpi-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  overflow: visible;
}
.kpi-strip.kpi-two .kpi-card { flex: initial; width: 100%; }
@media (max-width: 768px) {
  .kpi-strip.kpi-two { grid-template-columns: 1fr; }
}

/* Variantes applicables à toutes les boîtes (.summary-card, .section-box, .depot-box, .card) */
.summary-card.box--pending, .section-box.box--pending, .depot-box.box--pending, .card.box--pending {
  border-left: 6px solid #64748b;
  background-image: linear-gradient(135deg, #ffffff 60%, #e2e8f0 100%);
}
.summary-card.box--done, .section-box.box--done, .depot-box.box--done, .card.box--done {
  border-left: 6px solid #2563eb;
  background-image: linear-gradient(135deg, #ffffff 60%, #dbeafe 100%);
}
.summary-card.box--total, .section-box.box--total, .depot-box.box--total, .card.box--total {
  border-left: 6px solid #1d4ed8;
  background-image: linear-gradient(135deg, #ffffff 60%, #eff6ff 100%);
}
.summary-card.box--rate, .section-box.box--rate, .depot-box.box--rate, .card.box--rate {
  border-left: 6px solid #475569;
  background-image: linear-gradient(135deg, #ffffff 60%, #e2e8f0 85%, #dbeafe 100%);
}

/* Variantes pour kpi-card avec la même charte bleu/blanc/gris */
.kpi-card.box--pending {
  border-left: 6px solid #64748b;
  background-image: linear-gradient(135deg, #ffffff 60%, #e2e8f0 100%);
}
.kpi-card.box--done {
  border-left: 6px solid #2563eb;
  background-image: linear-gradient(135deg, #ffffff 60%, #dbeafe 100%);
}
.kpi-card.box--total {
  border-left: 6px solid #1d4ed8;
  background-image: linear-gradient(135deg, #ffffff 60%, #eff6ff 100%);
}
.kpi-card.box--rate {
  border-left: 6px solid #475569;
  background-image: linear-gradient(135deg, #ffffff 60%, #e2e8f0 85%, #dbeafe 100%);
}

/* ===== KPI & Cards — Responsive smartphone → 4K ===== */
@media (max-width: 480px) {
  .kpi-card { flex: 0 0 180px; padding: var(--space-4); }
  .kpi-value { font-size: clamp(22px, 7vw, 28px); }
  .summary-card { flex: 1 1 160px; padding: 16px; }
  .depot-box { padding: 16px; }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .kpi-card { flex: 0 0 220px; }
  .summary-card { flex: 1 1 200px; }
}

@media (min-width: 1367px) {
  .container { max-width: 1400px; }
  .kpi-card { flex: 0 0 280px; }
  .kpi-value { font-size: clamp(32px, 2vw, 48px); }
  .summary-card { flex: 1 1 240px; }
}

@media (min-width: 1920px) {
  .container { max-width: 1600px; }
  .kpi-card { flex: 0 0 320px; }
  .kpi-value { font-size: clamp(36px, 2vw, 56px); }
  .summary-card { flex: 1 1 280px; }
}

/* Conteneur et cartes */
.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--space-4); }
.card {
    background: var(--card); border: 1px solid var(--border-strong); border-radius: var(--radius-12);
    box-shadow: var(--shadow-1); padding: var(--space-6); transition: transform 200ms ease, box-shadow 200ms ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }

/* Titres modernes (option) */
.section-title.modern,
.depot-title.modern {
    font-size: var(--fs-xl); font-weight: 800; letter-spacing: .2px; margin-bottom: .5rem;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Boutons modernes */
.btn { display:inline-flex; align-items:center; gap:.5rem; font-weight:600; padding:.6rem 1rem; border-radius:var(--radius-8); border:1px solid transparent; transition: background 200ms ease, transform 200ms ease, box-shadow 200ms ease; }
.btn-primary { color:#fff; background: var(--primary-500); box-shadow: 0 6px 14px rgba(37,99,235,.25); }
.btn-primary:hover { background: var(--primary-600); transform: translateY(-1px); }
.btn-outline { color: var(--fg); background: transparent; border-color: var(--border-strong); }
.btn:focus-visible { outline: 3px solid rgba(37,99,235,.35); outline-offset: 2px; }

/* Tables — style admin moderne */
.table-container {
    background: var(--card); border: 1px solid var(--border-strong); border-radius: var(--radius-12);
    padding: var(--space-4); overflow:auto; box-shadow: inset 0 0 0 1px var(--border-strong);
}
.styled-table, table.dataframe { width:100%; border-collapse: collapse; font-size: var(--fs-sm); background: var(--card); }
.styled-table thead, table.dataframe thead { position: sticky; top: 0; z-index: 1; background:#f8fafc; box-shadow: inset 0 -1px 0 var(--border-strong); }
.styled-table thead th, table.dataframe thead th { color:#1f2937; letter-spacing:.2px; }
@supports ((-webkit-background-clip:text) or (background-clip: text)) {
  .styled-table thead th, table.dataframe thead th {
    background-image: linear-gradient(90deg, #475569, #2563eb 55%, #93c5fd);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
  }
}
.styled-table th, .styled-table td, table.dataframe th, table.dataframe td { padding:.65rem .8rem; border-bottom:1px solid var(--border-strong); color: var(--fg); }
.styled-table th.col-status, .styled-table td.col-status { width: 110px; white-space: nowrap; text-align:center; }
/* Fallbacks lisibles en mode clair (sans color-mix) */
.styled-table tbody tr:nth-child(even) { background:#f9fafb; }
.styled-table tbody tr:hover { background:#f3f4f6; }

/* Formulaires Streamlit — inputs */
.stTextInput input,
.stNumberInput input,
.stSelectbox div[data-baseweb="select"],
.stDateInput input {
    background: var(--card)!important; color: var(--fg)!important; border:1px solid var(--border-strong)!important;
    border-radius: var(--radius-8)!important; transition: border-color 200ms ease, box-shadow 200ms ease;
}
.stTextInput input:focus,
.stNumberInput input:focus,
.stDateInput input:focus { border-color: var(--primary-500)!important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-500) 30%, transparent)!important; }
.label { font-size: var(--fs-sm); color: var(--muted); font-weight:600; }

/* Badges / Tags */
.badge.modern { display:inline-block; padding:.25rem .5rem; border-radius:999px; font-size:.75rem; font-weight:700; letter-spacing:.2px; background: color-mix(in srgb, var(--primary-500) 15%, var(--card)); color: color-mix(in srgb, var(--primary-500) 85%, white); border:1px solid color-mix(in srgb, var(--primary-500) 35%, var(--border-strong)); }
.badge.warn { background:#fef3c7; color:#92400e; border:1px solid #f59e0b; }
.badge.danger { background:#fee2e2; color:#991b1b; border:1px solid #ef4444; }

/* Skeletons pour chargements */
.skeleton { position:relative; overflow:hidden; background: color-mix(in srgb, var(--card) 88%, var(--fg)); border-radius: var(--radius-8); }
.skeleton::after { content:''; position:absolute; inset:0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent); animation: shimmer 1.6s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }

/* Micro-interactions */
@media (prefers-reduced-motion: no-preference) {
  .hover-float { transition: transform 200ms ease; }
  .hover-float:hover { transform: translateY(-2px) scale(1.01); }
  .pulse { animation: pulse 1.8s ease-in-out infinite; }
  @keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.02)} }
}

/* Scrollbar harmonisée */
* { scrollbar-width: thin; scrollbar-color: var(--primary-500) var(--card); }
::-webkit-scrollbar { height: 8px; width: 8px; }
::-webkit-scrollbar-thumb { background: var(--primary-500); border-radius: 10px; }
::-webkit-scrollbar-track { background: var(--card); }

/* ===============================
   Sidebar — couleurs gris/bleu/blanc
================================== */
section[data-testid="stSidebar"] .sidebar-title {
    font-weight: 800; letter-spacing: .2px; margin-bottom: .25rem;
    color:#1f2937;
}
@supports ((-webkit-background-clip:text) or (background-clip: text)) {
  section[data-testid="stSidebar"] .sidebar-title {
    background-image: linear-gradient(90deg, #475569, #2563eb 55%, #93c5fd);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
  }
}

/* Accent visuel de la box du menu */
section[data-testid="stSidebar"] .sidebar-box {
    position: relative; border: 1px solid var(--border-strong);
}
section[data-testid="stSidebar"] .sidebar-box::before {
    content:""; position:absolute; left:-1px; top:0; bottom:0; width:4px; border-radius: 4px 0 0 4px;
    background: linear-gradient(180deg, #475569, #2563eb 60%, #93c5fd);
}

/* Label du select en dégradé */
section[data-testid="stSidebar"] .stSelectbox label { color:#1f2937; font-weight:700; letter-spacing:.2px; }
@supports ((-webkit-background-clip:text) or (background-clip: text)) {
  section[data-testid="stSidebar"] .stSelectbox label {
    background-image: linear-gradient(90deg, #475569, #2563eb 55%, #93c5fd) !important;
    -webkit-background-clip: text !important; background-clip: text !important;
    -webkit-text-fill-color: transparent !important; color: transparent !important;
  }
}

/* Contrôle select — fond/bordure harmonisés */
section[data-testid="stSidebar"] .stSelectbox [data-baseweb="select"] {
    background: var(--card)!important; border:1px solid var(--border-strong)!important;
    border-radius: var(--radius-8)!important;
}
section[data-testid="stSidebar"] .stSelectbox [data-baseweb="select"]:focus-within {
    outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-500) 28%, transparent);
    border-color: var(--primary-500)!important;
}

/* Valeur visible — teinte bleutée lisible */
section[data-testid="stSidebar"] .stSelectbox [data-baseweb="select"] div[role="combobox"] {
    color: var(--primary-500); font-weight:700;
}

/* Liste déroulante */
section[data-testid="stSidebar"] .stSelectbox [role="listbox"] {
    background: var(--card); border:1px solid var(--border-strong);
    box-shadow: var(--shadow-2);
}
section[data-testid="stSidebar"] .stSelectbox [role="option"] { color: var(--fg); }
/* Dégradé sur les options et la valeur sélectionnée (fallback = couleur lisible) */
@supports ((-webkit-background-clip:text) or (background-clip: text)) {
  /* Valeur affichée dans le select */
  section[data-testid="stSidebar"] .stSelectbox [data-baseweb="select"] div[role="combobox"] {
    background-image: linear-gradient(90deg, #475569, #2563eb 55%, #93c5fd) !important;
    -webkit-background-clip: text !important; background-clip: text !important;
    -webkit-text-fill-color: transparent !important; color: transparent !important;
  }
  /* Chaque option de la liste */
  section[data-testid="stSidebar"] .stSelectbox [role="option"] {
    background-image: linear-gradient(90deg, #475569, #2563eb 55%, #93c5fd) !important;
    -webkit-background-clip: text !important; background-clip: text !important;
    -webkit-text-fill-color: transparent !important; color: transparent !important;
  }
}
/* Conserver une couleur solide lisible pour l'option active */
section[data-testid="stSidebar"] .stSelectbox [role="option"][aria-selected="true"] {
    background: rgba(37,99,235,.08); color: var(--primary-600); font-weight:700;
    -webkit-text-fill-color: initial; background-clip: initial;
}
section[data-testid="stSidebar"] .stSelectbox [role="option"]:hover {
    background:#f3f4f6;
}
@media (prefers-color-scheme: dark) {
  section[data-testid="stSidebar"] .stSelectbox [role="option"]:hover { background:#111827; }
}

/* Slogan en gradient également (fallback inclus) */
section[data-testid="stSidebar"] .sidebar-slogan { color:#1f2937; }
@supports ((-webkit-background-clip:text) or (background-clip: text)) {
  section[data-testid="stSidebar"] .sidebar-slogan {
    background-image: linear-gradient(90deg, #475569, #2563eb 55%, #93c5fd) !important;
    -webkit-background-clip: text !important; background-clip: text !important;
    -webkit-text-fill-color: transparent !important; color: transparent !important;
  }
}

/* ===============================
   Titres des modules — gris/bleu/blanc
================================== */
.section-title, .depot-title, .employe-title { color:#1f2937; }
@supports ((-webkit-background-clip:text) or (background-clip: text)) {
  .section-title, .depot-title, .employe-title {
    background-image: linear-gradient(90deg, #475569, #2563eb 55%, #93c5fd) !important;
    -webkit-background-clip: text !important; background-clip: text !important;
    -webkit-text-fill-color: transparent !important; color: transparent !important;
  }
}

/* ===============================
   Sidebar radio (si utilisé)
================================== */
section[data-testid="stSidebar"] .stRadio > label { font-weight:700; color:#1f2937; }
@supports ((-webkit-background-clip:text) or (background-clip: text)) {
  section[data-testid="stSidebar"] .stRadio > label {
    background-image: linear-gradient(90deg, #475569, #2563eb 55%, #93c5fd) !important;
    -webkit-background-clip: text !important; background-clip: text !important;
    -webkit-text-fill-color: transparent !important; color: transparent !important;
  }
}
section[data-testid="stSidebar"] .stRadio div[role="radiogroup"] label {
    display:block; padding:.5rem .6rem; border-radius: var(--radius-8);
    color: var(--fg); border:1px solid transparent; transition: background .15s ease, border-color .15s ease;
}
section[data-testid="stSidebar"] .stRadio div[role="radiogroup"] label:hover { background:#f3f4f6; }
section[data-testid="stSidebar"] .stRadio div[role="radiogroup"] input[aria-checked="true"] + div + label,
section[data-testid="stSidebar"] .stRadio div[role="radiogroup"] input[checked] + div + label {
    background: rgba(37,99,235,.08); border-color: var(--primary-500); color: var(--primary-600);
}
@media (prefers-color-scheme: dark) {
  section[data-testid="stSidebar"] .stRadio div[role="radiogroup"] label:hover { background:#111827; }
}

/* ===============================
   Radios principaux (Statut) — style pills responsive
================================== */
.stRadio > label { font-weight:700; color: var(--muted); letter-spacing:.2px; }
.stRadio div[role="radiogroup"] { display:flex; gap:.5rem; flex-wrap: wrap; align-items:center; }
.stRadio div[role="radiogroup"] label {
  display:block; padding:.45rem .8rem; border-radius:999px; cursor:pointer;
  border:1px solid var(--border-strong); color: var(--fg);
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
.stRadio div[role="radiogroup"] label:hover { background:#f3f4f6; }
.stRadio div[role="radiogroup"] input[aria-checked="true"] + div + label {
  background: color-mix(in srgb, var(--primary-500) 10%, #fff);
  border-color: var(--primary-500);
  color: var(--primary-600);
}
@media (prefers-color-scheme: dark) {
  .stRadio div[role="radiogroup"] label:hover { background:#111827; }
}

/* ===================== DARK MODE TABLES (SYSTEM) ===================== */
@media (prefers-color-scheme: dark) {
    /* Conteneur */
    .table-container {
        background:#0f1623 !important;
        border:1px solid #30363d !important;
        box-shadow: inset 0 0 0 1px #30363d !important;
    }

    /* Tables Pandas et custom */
    .styled-table,
    table.dataframe {
        background:#0e141b !important;
        color:#e5e7eb !important;
    }
    .styled-table thead,
    table.dataframe thead {
        background:#1f2937 !important;
        color:#e5e7eb !important;
    }
    .styled-table th,
    .styled-table td,
    table.dataframe th,
    table.dataframe td {
        border-color:#30363d !important;
        color:#e5e7eb !important;
    }
    .styled-table tbody tr:nth-child(even),
    table.dataframe tbody tr:nth-child(even) {
        background:#0b1017 !important;
    }
    .styled-table tbody tr:hover,
    table.dataframe tbody tr:hover {
        background:#122033 !important;
    }

    /* Liens en sombre */
    .table-container a { color:#93c5fd !important; }
    .table-container a:hover { color:#bfdbfe !important; }

    /* Forcer la lisibilité si des styles inline clairs existent */
    .table-container [style*="color:#000"],
    .table-container [style*="color:#111"],
    .table-container [style*="color:#222"],
    .table-container [style*="color:#333"],
    .table-container [style*="color:#444"],
    .table-container [style*="color:#555"],
    .table-container [style*="color:#666"],
    .table-container [style*="color:#777"],
    .table-container [style*="color: #000"],
    .table-container [style*="color: #111"],
    .table-container [style*="color: #222"],
    .table-container [style*="color: #333"],
    .table-container [style*="color: #444"],
    .table-container [style*="color: #555"],
    .table-container [style*="color: #666"],
    .table-container [style*="color: #777"] {
        color:#e5e7eb !important;
    }

    .table-container [style*="background:#fff"],
    .table-container [style*="background:#ffffff"],
    .table-container [style*="background:#f9f9f9"],
    .table-container [style*="background:#f8f9fa"],
    .table-container [style*="background: #fff"],
    .table-container [style*="background: #ffffff"],
    .table-container [style*="background: #f9f9f9"],
    .table-container [style*="background: #f8f9fa"],
    .table-container [style*="background-color:#fff"],
    .table-container [style*="background-color:#ffffff"],
    .table-container [style*="background-color:#f9f9f9"],
    .table-container [style*="background-color:#f8f9fa"],
    .table-container [style*="background-color: #fff"],
    .table-container [style*="background-color: #ffffff"],
    .table-container [style*="background-color: #f9f9f9"],
    .table-container [style*="background-color: #f8f9fa"] {
        background-color:#0e141b !important;
    }
}


/* TITRES BLEU/BLANC/GRIS — FORCER LE STYLE MODERNE */
.section-title.modern,
.depot-title.modern,
.employe-title.modern {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: .5px;
    margin-bottom: 1rem;

    background-image: linear-gradient(90deg, #475569, #2563eb 55%, #93c5fd) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;

    text-shadow: none !important; /* désactive le shadow gris */
}

/* Forcer wrap uniquement sur la colonne Commentaire */
.styled-table td:nth-child(7) {
    white-space: normal !important;
    word-break: break-word;
    max-width: 400px;
    text-align: center !important;
    vertical-align: middle;
}
.user-subtitle {
    text-align: center;
    font-size: clamp(14px, 2vw, 18px);
    color: #555;
    font-weight: 500;
    margin-top: 8px;
    margin-bottom: 15px;
}

.sidebar-subtitle {
    margin-top: 10px;
    color: #2563eb;
}

/* ===============================
   ABOUT (Page "À propos") — premium DB-driven
================================== */
.about-page {
  width: clamp(320px, 92%, 1100px);
  margin: 20px auto 40px auto;
  font-family: "Segoe UI", sans-serif;
}

.about-section {
  margin-top: 26px;
  background: #ffffff;
  border-radius: 15px;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
  padding: 22px 22px;
}

.about-section__title {
  margin: 0 0 14px 0;
  font-size: clamp(18px, 2.6vw, 26px);
  color: var(--primary-dark);
  font-weight: 900;
  letter-spacing: 0.2px;
}

.about-empty {
  padding: 14px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  color: #334155;
}

.about-hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
  align-items: stretch;
  background: #ffffff;
  border-radius: 15px;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.about-hero--empty {
  grid-template-columns: 1fr;
  padding: 26px;
}

.about-hero__media {
  position: relative;
  min-height: 260px;
}

.about-hero__img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.about-hero__overlay {
  position: absolute;
  inset: auto 14px 14px 14px;
  background: rgba(17, 24, 39, 0.58);
  color: #ffffff;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
  backdrop-filter: blur(6px);
}

.about-hero__content {
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-hero__title {
  margin: 0;
  font-size: clamp(22px, 3.4vw, 34px);
  font-weight: 950;
  color: #0f172a;
  letter-spacing: 0.2px;
}

.about-hero__subtitle {
  margin: 10px 0 0 0;
  font-size: clamp(14px, 2.1vw, 18px);
  color: #475569;
  line-height: 1.55;
}

.about-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.about-card {
  border: 1px solid rgba(2, 6, 23, 0.08);
  border-radius: 14px;
  padding: 16px 16px;
  background: linear-gradient(135deg, #ffffff 65%, #f1f9ff);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.06);
}

.about-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.about-card__icon svg {
  width: 26px;
  height: 26px;
  display: block;
  fill: var(--primary-dark);
}

.about-card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  color: #0f172a;
}

.about-card__desc {
  margin: 0;
  color: #334155;
  line-height: 1.55;
}

.about-card__img {
  width: 100%;
  height: 160px;
  margin-top: 12px;
  border-radius: 12px;
  object-fit: cover;
  display: block;
}

.about-team {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.team-card {
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(2, 6, 23, 0.08);
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.team-card__photo {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.team-card__body {
  padding: 14px 14px;
}

.team-card__name {
  margin: 0;
  font-size: 16px;
  font-weight: 950;
  color: #0f172a;
}

.team-card__role {
  margin-top: 6px;
  color: #2563eb;
  font-weight: 800;
}

.team-card__desc {
  margin: 10px 0 0 0;
  color: #475569;
  line-height: 1.55;
}

.about-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.gallery-card {
  margin: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(2, 6, 23, 0.08);
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.gallery-card__img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.gallery-card__cap {
  padding: 10px 12px;
  color: #334155;
  font-size: 13px;
  display: flex;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
}

.gallery-card__cat {
  color: #2563eb;
  font-weight: 800;
  white-space: nowrap;
}

@media (max-width: 1000px) {
  .about-hero {
    grid-template-columns: 1fr;
  }
  .about-hero__media {
    min-height: 220px;
  }
  .about-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .about-team {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .about-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .about-page {
    width: 95%;
  }
  .about-section {
    padding: 16px 14px;
  }
  .about-cards {
    grid-template-columns: 1fr;
  }
  .about-team {
    grid-template-columns: 1fr;
  }
  .about-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .team-card__photo {
    height: 200px;
  }
  .gallery-card__img {
    height: 160px;
  }
}

/* ===============================
   SERVICES — premium institutionnel
================================== */
.services-page {
  width: clamp(320px, 92%, 1100px);
  margin: 20px auto 40px auto;
  font-family: "Segoe UI", sans-serif;
}

.services-hero {
  background: #ffffff;
  border-radius: 15px;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 0;
  border: 1px solid rgba(2, 6, 23, 0.06);
}

.services-hero--empty {
  grid-template-columns: 1fr;
}

.services-hero__media {
  min-height: 320px;
}

.services-hero__img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.services-hero__content {
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #ffffff 60%, #f1f9ff);
}

.services-hero__title {
  margin: 0;
  font-size: clamp(22px, 3.4vw, 34px);
  font-weight: 950;
  color: #0f172a;
}

.services-hero__subtitle {
  margin: 0;
  font-size: clamp(14px, 2.1vw, 18px);
  color: #475569;
  line-height: 1.55;
}

.services-hero__cta {
  margin-top: 6px;
}

.services-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 950;
  text-decoration: none;
  transition: var(--transition);
}

.services-cta-btn:hover {
  background: var(--primary-dark);
}

.services-section {
  margin-top: 18px;
  background: #ffffff;
  border-radius: 15px;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
  padding: 22px 22px;
  border: 1px solid rgba(2, 6, 23, 0.06);
}

.services-section__title {
  margin: 0 0 14px 0;
  font-size: clamp(18px, 2.6vw, 26px);
  color: var(--primary-dark);
  font-weight: 950;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.service-card {
  border: 1px solid rgba(2, 6, 23, 0.08);
  border-radius: 14px;
  padding: 16px 16px;
  background: linear-gradient(135deg, #ffffff 65%, #f1f9ff);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: fadeInUp 0.5s ease both;
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 123, 255, 0.12);
}

.service-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.service-card__icon svg {
  width: 26px;
  height: 26px;
  display: block;
  fill: var(--primary-dark);
}

.service-card__iconimg {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}

.service-card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 950;
  color: #0f172a;
}

.service-card__desc {
  margin: 0;
  color: #334155;
  line-height: 1.55;
}

.services-contact {
  display: grid;
  gap: 10px;
}

.services-contact__row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid rgba(2, 6, 23, 0.08);
}

.services-contact__label {
  font-weight: 950;
  color: #0f172a;
}

.services-contact__value {
  color: #334155;
  overflow-wrap: anywhere;
}

.services-contact__value a {
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 900;
}

.services-contact__value a:hover {
  text-decoration: underline;
}

.services-contact__sep {
  margin: 0 8px;
  color: #94a3b8;
}

.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  background: #0ea5e9;
  color: #ffffff !important;
  font-weight: 950;
  text-decoration: none;
  transition: var(--transition);
}

.whatsapp-btn:hover {
  background: #0284c7;
  text-decoration: none !important;
}

.services-map {
  margin-top: 12px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(2, 6, 23, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.services-map__frame {
  width: 100%;
  height: 320px;
  border: 0;
  display: block;
}

.hours-grid {
  display: grid;
  gap: 10px;
}

.hours-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid rgba(2, 6, 23, 0.08);
}

.hours-day {
  font-weight: 950;
  color: #0f172a;
}

.hours-hours {
  color: #334155;
  font-variant-numeric: tabular-nums;
}

.services-empty {
  padding: 14px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  color: #334155;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .service-card {
    animation: none;
    transition: none;
  }
}

@media (max-width: 1050px) {
  .services-hero { grid-template-columns: 1fr; }
  .services-hero__media { min-height: 240px; }
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .services-page { width: 95%; }
  .services-section { padding: 16px 14px; }
  .services-grid { grid-template-columns: 1fr; }
  .services-contact__row { grid-template-columns: 1fr; }
  .hours-row { grid-template-columns: 1fr; }
  .services-map__frame { height: 260px; }
}
