:root{--header-height: 80px;--bg:#111315;--panel:#1c1f23;--panel2:#24282d;--line:#30353b;--red:#e82127;--muted:#92979d;--green:#42c98a;--orange:#f0a34a}

html, body { font-family: 'Inter', sans-serif; font-size: 16px; }
body { background-color: #eee; }

/* Pour les ancres */
:target { scroll-margin-top: var(--header-height); }

main { padding-top: var(--header-height); }

.text-justify { text-align: justify;}

/*#calendrier {*/
    .calendar { border: 1px solid #dee2e6; border-radius: 8px; overflow: hidden; background: #fff; }
    .calendar-header { background: #f8f9fa; border-bottom: 1px solid #dee2e6; }
    .calendar-weekdays, .calendar-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
    .calendar-weekdays > div { padding: 12px 4px; text-align: center; font-weight: 600; font-size: 0.85rem; background-color: #198754; color: white; border-right: 1px solid #dee2e6; }
    .calendar-weekdays > div:last-child { border-right: 0; }
    .calendar-week { border-top: 1px solid #dee2e6; }
    .calendar-day { min-height: 125px; padding: 8px; border-right: 1px solid #dee2e6; position: relative; background: #fff; transition: background-color 0.2s; }
    .calendar-day:last-child { border-right: 0; }
    .calendar-day:hover { background: #f8f9fa; }
/*}*/

/*#statistiques {*/
    .stats-dashboard {
        background: #f5f7fa;
    }
    .stats-card {
        background: #fff;
        border: 1px solid #e9edf2;
        border-radius: 1rem;
        padding: 1.25rem;
        height: 100%;
        box-shadow: 0 3px 12px rgba(0,0,0,.035);
    }

    .stats-card h2 {
        font-size: 1.15rem;
        font-weight: 700;
        margin-bottom: 1.25rem;
        color: #263445;
    }

    .stats-card h3 {
        font-size: .9rem;
        font-weight: 700;
        color: #687789;
        margin-top: 1rem;
        margin-bottom: .5rem;
    }

    .stats-weather {
        display: flex;
        align-items: center;
        gap: 1rem;
        margin-bottom: .75rem;
    }

    .stats-weather img {
        width: 65px;
        height: 65px;
        object-fit: contain;
    }

    .stats-weather-content {
        flex: 1;
        min-width: 0;
    }

    .stats-weather-label {
        font-size: .85rem;
        font-weight: 600;
        margin-bottom: .4rem;
    }

    .stats-weather .progress {
        height: 9px;
        border-radius: 10px;
        background: #edf0f4;
    }

    .stats-weather .progress-bar {
        border-radius: 10px;
    }

    .stats-percentage {
        font-size: .8rem;
        font-weight: 700;
        color: #198754;
        min-width: 40px;
        text-align: end;
    }

    .stats-temperature {
        display: flex;
        gap: .5rem;
    }

    .stats-temperature > div {
        flex: 1;
        background: #f5f7fa;
        border-radius: .75rem;
        padding: .75rem;
        text-align: center;
    }

    .stats-temperature small {
        display: block;
        color: #758295;
        font-size: .75rem;
    }

    .stats-temperature strong {
        display: block;
        font-size: 1.25rem;
        color: #263445;
    }

    .stats-info {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: .7rem 0;
        border-bottom: 1px solid #edf0f4;
        font-size: .9rem;
    }

    .stats-info:last-child {
        border-bottom: 0;
    }

    .stats-info strong {
        color: #263445;
    }

    .stats-chart {
        position: relative;
        height: 320px;
    }

    .stats-chart-pie {
        position: relative;
        height: 300px;
    }

    .stats-tabs {
        border-bottom: 1px solid #e5e9ef;
        margin-bottom: 1.5rem;
    }

    .stats-tabs .nav-link {
        border: 0;
        color: #687789;
        font-weight: 600;
        padding: .85rem 1.2rem;
    }

    .stats-tabs .nav-link.active {
        color: #198754;
        background: transparent;
        border-bottom: 3px solid #198754;
    }
/*}*/

/*#nouveau {*/
    .weather-form {
        background: #f5f7fa;
        padding: 1.5rem;
        border-radius: 1rem;
    }

    .form-card {
        background: #fff;
        border: 1px solid #e9edf2;
        border-radius: 1rem;
        padding: 1.5rem;
        margin-bottom: 1rem;
        box-shadow: 0 3px 12px rgba(0,0,0,.035);
    }

    .form-card legend {
        float: none;
        width: auto;
        font-size: 1.1rem;
        font-weight: 700;
        color: #263445;
        padding: 0;
        margin-bottom: .5rem;
    }

    .form-card .form-description {
        color: #8793a3;
        font-size: .85rem;
        margin-bottom: 1.25rem;
    }

    /* Sélection des pictogrammes */
    .weather-options {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
        gap: .75rem;
    }

    .weather-option {
        position: relative;
        cursor: pointer;
        margin: 0;
    }

    .weather-option input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .weather-option span {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: .5rem;
        border: 2px solid transparent;
        border-radius: .85rem;
        background: #f7f9fb;
        transition: all .2s ease;
        min-height: 100px;
    }

    .weather-option img {
        width: 70px;
        height: 70px;
        object-fit: contain;
    }

    .weather-option:hover span {
        background: #edf5ff;
        border-color: #c9ddf5;
        transform: translateY(-2px);
    }

    .weather-option input:checked + span {
        background: #e8f3ff;
        border-color: #0d6efd;
        box-shadow: 0 0 0 2px rgba(13,110,253,.08);
    }

    .weather-option input:checked + span::after {
        content: "✓";
        position: absolute;
        top: 5px;
        right: 7px;
        width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #0d6efd;
        color: white;
        font-size: 12px;
        font-weight: bold;
        border-radius: 50%;
    }

    .weather-option input:focus-visible + span {
        outline: 3px solid rgba(13,110,253,.4);
        outline-offset: 2px;
    }

    /* Températures */
    .temperature-input {
        background: #f7f9fb;
        border: 1px solid #e9edf2;
        border-radius: .85rem;
        padding: 1rem;
        height: 100%;
    }

    .temperature-input label {
        font-weight: 600;
        font-size: .9rem;
        margin-bottom: .6rem;
    }

    .temperature-input .input-group-text {
        background: #fff;
        font-weight: 600;
    }

    /* Remarques */
    .form-check-card {
        background: #f7f9fb;
        border: 1px solid #e9edf2;
        border-radius: .75rem;
        padding: .85rem 1rem;
    }

    .form-check-card .form-check {
        margin: 0;
    }

    .form-check-card .form-check-label {
        font-weight: 500;
    }

    /* Bouton de validation */
    .btn-submit {
        padding: .9rem 2rem;
        font-weight: 700;
        border-radius: .75rem;
    }
/*}*/

#charge {
    background:var(--bg);color:#f5f5f5;font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif;text-align:left;
}
    #charge *{box-sizing:border-box}
    #charge .sidebar{width:250px;position:fixed;inset:0 auto 0 0;background:#17191c;border-right:1px solid var(--line);padding:26px 18px;z-index:10}
    #charge .sidebarpadding{padding-top:var(--header-height);}
    #charge .brand{font-weight:800;letter-spacing:.08em}.brand span{color:var(--red)} .car-tag{color:var(--muted);font-size:.82rem}
    #charge .nav-link{color:#aeb3b9;border-radius:10px;padding:11px 13px;margin:3px 0}.nav-link:hover,.nav-link.active{background:#302124;color:white}.nav-link.active i{color:var(--red)}
    #charge main{margin-left:250px;padding: calc(var(--header-height) + 30px) 30px 30px 30px;max-width:1800px}.topline{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:26px}
    #charge .eyebrow{color:var(--red);font-size:.72rem;font-weight:800;letter-spacing:.16em;text-transform:uppercase}
    #charge h1{font-size:clamp(1.7rem,3vw,2.4rem);font-weight:750;margin:4px 0}.muted{color:var(--muted)}
    #charge .panel,.stat-card{background:var(--panel);border:1px solid var(--line);border-radius:16px}
    #charge .stat-card{padding:18px;height:100%;position:relative;overflow:hidden}.stat-card:after{content:"";position:absolute;width:4px;inset:0 auto 0 0;background:var(--red)}
    #charge .stat-label{color:var(--muted);font-size:.83rem}.stat-value{font-size:1.75rem;font-weight:750;line-height:1.2;margin:8px 0 4px}.stat-icon{position:absolute;right:17px;top:17px;color:#555d65;font-size:1.35rem}
    #charge .section-title{font-size:1.15rem;font-weight:700;margin:34px 0 15px;display:flex;align-items:center;gap:10px}.section-title i{color:var(--red)}
    #charge .panel{padding:20px;height:100%}.panel h3{font-size:1rem;font-weight:700;margin-bottom:4px}.panel-sub{font-size:.8rem;color:var(--muted);margin-bottom:18px}
    #charge .chart-wrap{height:270px;position:relative}.table{--bs-table-bg:transparent;--bs-table-color:#e9ecef;--bs-table-border-color:var(--line);font-size:.88rem}
    #charge .table thead th{color:var(--muted);font-weight:600;white-space:nowrap}.table td{vertical-align:middle}.badge-soft{background:#302124;color:#ff8589;border:1px solid #633034}
    #charge .metric-line{display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px solid var(--line)}.metric-line:last-child{border:0}
    #charge .record{background:var(--panel2);border-radius:12px;padding:16px;height:100%}.record i{color:var(--red);font-size:1.25rem}.record small{display:block;color:var(--muted);margin:7px 0 3px}.record strong{font-size:1.2rem}
    #charge .filter-input{background:var(--panel2);border:1px solid var(--line);color:white}.filter-input:focus{background:var(--panel2);color:white;border-color:var(--red);box-shadow:none}
    #charge footer{border-top:1px solid var(--line);margin-top:42px;padding:20px 0;color:var(--muted);font-size:.8rem}

@media all and (max-width: 992px) { /* version mobile */

    html, body { font-size: 14px; }

    #calendrier {
        font-size: 8px !important;

        .fs-1 { font-size: 1.3rem !important; }
        .fs-2 { font-size: 1.2rem !important; }
        .fs-3 { font-size: 1.1rem !important; }
        .fs-4 { font-size: 0.9rem !important; }
        .fs-5 { font-size: 0.8rem !important; }
        .fs-6 { font-size: 0.7rem !important; }
    }

    /*#statistiques {*/
        .stats-dashboard {
            padding: .75rem;
        }

        .stats-card {
            padding: 1rem;
        }

        .stats-weather img {
            width: 50px;
            height: 50px;
        }

        .stats-chart {
            height: 260px;
        }
    /*}*/

    /*#nouveau {*/
        .weather-form {
            padding: .75rem;
        }

        .form-card {
            padding: 1rem;
        }

        .weather-options {
            grid-template-columns: repeat(3, 1fr);
            gap: .5rem;
        }

        .weather-option img {
            width: 60px;
            height: 60px;
        }

        .weather-option span {
            min-height: 85px;
        }
    /*}*/

    /*#charge {*/
        #charge .sidebar{display:none}
		#charge main{margin:0;padding:var(--header-height) 16px 16px 16px}
		#charge .topline{align-items:flex-start;flex-direction:column}
		#charge .stat-value{font-size:1.45rem}
		#charge .panel{padding:15px}
    /*}*/

}
