/* ==================== RESET ==================== */

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
}

body {
    background: #0b0b0f;
    color: #fbf8f8;
    font-family: Arial, sans-serif;
    overflow-x: hidden;
}


/* ==================== ELEMENTS ==================== */

button,
input {
    font-family: inherit;
}

button {
    cursor: pointer;
}


/* ==================== APPLICATION ==================== */

.app {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 18px 14px 35px;
}


/* ==================== HEADER ==================== */

.header h1 {
    margin: 5px 0 18px;
    text-align: center;
    font-size: 22px;
    letter-spacing: 3px;
    color: #d8b45a;
}


/* ==================== OBJECTIF ==================== */

.goal-card {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;

    background: #151519;

    border: 1px solid #cf971c;
    border-radius: 16px;

    padding: 15px 8px;
}

.goal-card div {
    text-align: center;
}

.goal-card span {
    display: block;

    font-size: 9px;

    color: #85858c;

    margin-bottom: 7px;

    letter-spacing: 0.5px;
}

.goal-card strong {
    display: block;

    color: #d8b45a;

    font-size: 15px;
}


/* ==================== BOUTON OPTIONS ==================== */

.options-button {
    display: block;

    margin: 12px auto 0;

    padding: 10px 18px;

    border: 1px solid #ddb216;

    border-radius: 10px;

    background: #151519;

    color: #d8b45a;

    font-size: 11px;

    font-weight: bold;

    letter-spacing: 1px;
}


/* ==================== CALENDRIER ==================== */

.calendar-section {
    margin-top: 22px;
}


.month-navigation {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 14px;
}


.month-navigation h2 {
    margin: 0;

    font-size: 18px;

    text-transform: capitalize;
}


.month-navigation button {
    width: 42px;
    height: 42px;

    border: none;

    border-radius: 12px;

    background: #19191e;

    color: #d8b45a;

    font-size: 28px;
}


/* ==================== JOURS SEMAINE ==================== */

.weekdays {
    display: grid;

    grid-template-columns: repeat(7, 1fr);

    text-align: center;

    margin-bottom: 7px;
}


.weekdays span {
    color: #77777e;

    font-size: 11px;

    font-weight: bold;
}


/* ==================== CASES ==================== */

.calendar {
    display: grid;

    grid-template-columns: repeat(7, 1fr);

    gap: 5px;
}


.day {
    min-height: 72px;

    background: #151519;

    border: 1px solid #232329;

    border-radius: 10px;

    padding: 7px 4px;

    position: relative;

    overflow: hidden;
}


.day.empty {
    background: transparent;

    border: none;
}


.day-number {
    font-size: 12px;

    color: #a4a4aa;

    margin-bottom: 5px;
}


.day.today {
    border-color: #d8b45a;
}


.day.today .day-number {
    color: #d8b45a;

    font-weight: bold;
}


.day.has-data {
    background: #18181d;
}


.day-weight {
    font-size: 11px;

    font-weight: bold;

    color: #f2f2f2;
}


.day-steps {
    font-size: 8px;

    color: #85858c;

    margin-top: 3px;
}


.day-muscu {
    font-size: 8px;

    color: #d8b45a;

    margin-top: 3px;
}


.day-change {
    font-size: 8px;

    margin-top: 3px;
}


.change-down {
    color: #71c78a;
}


.change-up {
    color: #d56d6d;
}


/* ==================== PANNEAU JOUR ==================== */

.day-panel {
    position: fixed;

    left: 50%;
    bottom: 0;

    transform: translateX(-50%);

    width: 100%;

    max-width: 480px;

    max-height: 92vh;

    overflow-y: auto;

    background: #111115;

    border-top: 1px solid #303036;

    border-radius: 22px 22px 0 0;

    padding: 20px 18px 30px;

    z-index: 10;

    box-shadow:
        0 -10px 40px rgba(0, 0, 0, 0.5);
}


.hidden {
    display: none !important;
}


/* ==================== TITRE JOUR ==================== */

.day-title {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 20px;
}


.day-title h2 {
    margin: 0;

    font-size: 20px;

    text-transform: capitalize;
}


#closePanel {
    width: 38px;
    height: 38px;

    border: none;

    border-radius: 10px;

    background: #202025;

    color: #aaa;

    font-size: 24px;
}


/* ==================== FORMULAIRE ==================== */

.form label {
    display: block;

    color: #aaa;

    font-size: 12px;

    margin-bottom: 15px;
}


.input-unit {
    display: flex;

    align-items: center;

    margin-top: 7px;

    background: #1a1a1f;

    border: 1px solid #29292f;

    border-radius: 12px;

    overflow: hidden;
}


.input-unit input {
    width: 100%;

    height: 50px;

    border: none;

    outline: none;

    background: transparent;

    color: white;

    font-size: 17px;

    padding: 0 14px;
}


.input-unit span {
    color: #77777e;

    padding-right: 14px;

    font-size: 12px;
}


.label-title {
    color: #aaa;

    font-size: 12px;

    margin: 20px 0 8px;
}


/* ==================== MUSCU ==================== */

.muscu-buttons {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 10px;
}


.muscu-buttons button {
    height: 48px;

    border: 1px solid #29292f;

    border-radius: 12px;

    background: #1a1a1f;

    color: #999;

    font-weight: bold;
}


.muscu-buttons button.active {
    background: #d8b45a;

    color: #111;

    border-color: #d8b45a;
}


/* ==================== ÉVOLUTION ==================== */

.weight-change {
    margin-top: 18px;

    padding: 14px;

    border-radius: 12px;

    background: #18181d;

    text-align: center;

    font-size: 13px;

    color: #aaa;
}


/* ==================== BOUTONS ==================== */

.save-button {
    width: 100%;

    height: 52px;

    margin-top: 15px;

    border: none;

    border-radius: 13px;

    background: #d8b45a;

    color: #111;

    font-size: 14px;

    font-weight: bold;

    letter-spacing: 1px;
}


.delete-button {
    width: 100%;

    margin-top: 12px;

    padding: 12px;

    border: none;

    background: transparent;

    color: #777;

    font-size: 11px;
}


/* ==================== OPTIONS ==================== */

.options-panel {
    position: fixed;

    left: 50%;
    bottom: 0;

    transform: translateX(-50%);

    width: 100%;

    max-width: 480px;

    max-height: 90vh;

    overflow-y: auto;

    background: #111115;

    border-top: 1px solid #303036;

    border-radius: 22px 22px 0 0;

    padding: 22px 18px 30px;

    z-index: 20;

    box-shadow:
        0 -10px 40px rgba(0, 0, 0, 0.5);
}


.options-title {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 20px;
}


.options-title h2 {
    margin: 0;

    font-size: 20px;
}


.close-options {
    width: 38px;
    height: 38px;

    border: none;

    border-radius: 10px;

    background: #202025;

    color: #aaa;

    font-size: 24px;
}


.options-label {
    display: block;

    color: #aaa;

    font-size: 12px;

    margin-bottom: 7px;
}


.options-input {
    width: 100%;

    height: 52px;

    border: 1px solid #29292f;

    border-radius: 12px;

    outline: none;

    background: #1a1a1f;

    color: white;

    font-size: 18px;

    padding: 0 14px;
}


.options-save {
    width: 100%;

    height: 52px;

    margin-top: 16px;

    border: none;

    border-radius: 13px;

    background: #d8b45a;

    color: #111;

    font-size: 14px;

    font-weight: bold;

    letter-spacing: 1px;
}


.history-button {
    margin-top: 10px;
}


/* ==================== HISTORIQUE ==================== */

.weight-history-list {
    width: 100%;
}


.history-item {
    background: #18181d;

    border: 1px solid #29292f;

    border-radius: 12px;

    padding: 14px;

    margin-bottom: 9px;
}


.history-row {
    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 10px;
}


.history-date {
    color: #aaa;

    font-size: 11px;

    margin-bottom: 5px;

    text-transform: capitalize;
}


.history-weight {
    color: #fff;

    font-size: 19px;

    font-weight: bold;
}


.history-evolution {
    font-size: 13px;

    text-align: right;
}


.history-empty {
    padding: 16px;

    border-radius: 12px;

    background: #18181d;

    text-align: center;

    color: #777;

    font-size: 13px;
}


/* ==================== PETITS ÉCRANS ==================== */

@media (max-width: 360px) {

    .app {
        padding-left: 9px;

        padding-right: 9px;
    }


    .calendar {
        gap: 3px;
    }


    .day {
        min-height: 68px;

        padding: 5px 3px;
    }


    .day-weight {
        font-size: 10px;
    }


    .day-steps,
    .day-muscu,
    .day-change {
        font-size: 7px;
    }

}


/* ==================== ÉCRANS PLUS LARGES ==================== */

@media (min-width: 481px) {

    body {
        background: #050506;
    }


    .app {
        width: 480px;
    }

}