* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #f5f5f7;
    color: #1d1d1f;
    font-family: Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.home {
    width: min(760px, calc(100% - 32px));
    margin: 0 auto;
    padding: 80px 0 100px;
}

.home-header {
    text-align: center;
    margin-bottom: 56px;
}

.eyebrow {
    margin: 0 0 14px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #86868b;
}

.home-header h1 {
    margin: 0;
    font-size: clamp(32px, 6vw, 48px);
    line-height: 1.08;
    font-weight: 600;
    letter-spacing: -0.035em;
}

.intro {
    margin: 18px 0 0;
    font-size: 18px;
    color: #86868b;
}

.vocals {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.vocal-card {
    padding: 28px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 24px;
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.vocal-card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 12px 36px rgba(0, 0, 0, 0.07);
}

.vocal-card.latest {
    border-color: rgba(0, 0, 0, 0.09);
}

.vocal-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.vocal-top time {
    font-size: 13px;
    color: #86868b;
}

.latest-label {
    padding: 6px 10px;
    border-radius: 999px;
    background: #f5f5f7;
    color: #6e6e73;
    font-size: 12px;
    font-weight: 600;
}

.vocal-card h2 {
    margin: 0 0 22px;
    font-size: 23px;
    line-height: 1.25;
    font-weight: 600;
    letter-spacing: -0.02em;
}

audio {
    width: 100%;
}

.empty-state {
    padding: 70px 24px;
    text-align: center;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 24px;
}

.empty-icon {
    margin-bottom: 20px;
    font-size: 36px;
}

.empty-state h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.empty-state p {
    margin: 10px 0 0;
    color: #86868b;
}

@media (max-width: 600px) {

    .home {
        width: min(100% - 20px, 760px);
        padding: 48px 0 70px;
    }

    .home-header {
        margin-bottom: 36px;
    }

    .vocal-card {
        padding: 22px;
        border-radius: 20px;
    }

    .vocal-card h2 {
        font-size: 20px;
    }

}

/* =========================================================
   LECTEUR AUDIO PERSONNALISÉ
   ========================================================= */

.audio-player {
    width: 100%;
    margin-top: 24px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 18px;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.audio-element {
    display: none;
}

.player-main {
    display: flex;
    align-items: center;
    gap: 14px;
}

.play-button {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #1d1d1f;
    color: #ffffff;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        transform 0.15s ease,
        opacity 0.15s ease;
}

.play-button:hover {
    transform: scale(1.05);
}

.play-button:active {
    transform: scale(0.96);
}

.player-content {
    min-width: 0;
    flex: 1;
}

.player-times {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 12px;
    color: #86868b;
    font-variant-numeric: tabular-nums;
}

.progress,
.volume {
    appearance: none;
    -webkit-appearance: none;
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    outline: none;
    cursor: pointer;
}

.progress {
    width: 100%;
    height: 5px;
    border-radius: 999px;
    background: #d2d2d7;
}

.progress::-webkit-slider-runnable-track {
    height: 5px;
    border-radius: 999px;
    background: #d2d2d7;
}

.progress::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    margin-top: -4.5px;
    border: 0;
    border-radius: 50%;
    background: #1d1d1f;
}

.progress::-moz-range-track {
    height: 5px;
    border-radius: 999px;
    background: #d2d2d7;
}

.progress::-moz-range-progress {
    height: 5px;
    border-radius: 999px;
    background: #1d1d1f;
}

.progress::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border: 0;
    border-radius: 50%;
    background: #1d1d1f;
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
}

.volume-icon {
    font-size: 14px;
    line-height: 1;
}

.volume {
    width: 70px;
    height: 4px;
    border-radius: 999px;
    background: #d2d2d7;
}

.volume::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 999px;
    background: #d2d2d7;
}

.volume::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    margin-top: -4px;
    border: 0;
    border-radius: 50%;
    background: #1d1d1f;
}

.volume::-moz-range-track {
    height: 4px;
    border-radius: 999px;
    background: #d2d2d7;
}

.volume::-moz-range-progress {
    height: 4px;
    border-radius: 999px;
    background: #1d1d1f;
}

.volume::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 50%;
    background: #1d1d1f;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .audio-player {
        padding: 14px;
    }

    .player-main {
        gap: 11px;
    }

    .play-button {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
    }

    .volume-container {
        display: none;
    }

}

/* =========================================================
   ADMINISTRATION
   ========================================================= */

.admin-page {
    width: min(900px, calc(100% - 32px));
    margin: 0 auto;
    padding: 60px 0 100px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 40px;
}

.admin-header h1 {
    margin: 4px 0 8px;
    font-size: clamp(30px, 5vw, 44px);
    letter-spacing: -0.04em;
}

.admin-intro {
    margin: 0;
    color: #86868b;
    font-size: 15px;
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.back-link,
.logout-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 14px;
    transition:
        transform 0.15s ease,
        background 0.15s ease;
}

.back-link {
    background: #1d1d1f;
    color: #ffffff;
}

.logout-link {
    background: #e8e8ed;
    color: #1d1d1f;
}

.back-link:hover,
.logout-link:hover {
    transform: translateY(-1px);
}


/* =========================================================
   CARTES ADMIN
   ========================================================= */

.admin-card {
    margin-bottom: 24px;
    padding: 28px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 24px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
}

.admin-card h2 {
    margin: 0;
    font-size: 21px;
    letter-spacing: -0.02em;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
}

.section-description {
    margin: 6px 0 0;
    color: #86868b;
    font-size: 14px;
}

.count-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    background: #f0f0f2;
    color: #1d1d1f;
    font-size: 13px;
    font-weight: 600;
}


/* =========================================================
   FORMULAIRE
   ========================================================= */

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
}

.form-group input[type="text"],
.form-group input[type="file"] {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    background: #ffffff;
    color: #1d1d1f;
    font: inherit;
    outline: none;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.form-group input[type="text"]:focus {
    border-color: #1d1d1f;
    box-shadow: 0 0 0 3px rgba(29, 29, 31, 0.08);
}

.admin-form > button {
    align-self: flex-start;
    min-height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    background: #1d1d1f;
    color: #ffffff;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    transition:
        transform 0.15s ease,
        opacity 0.15s ease;
}

.admin-form > button:hover {
    transform: translateY(-1px);
}

.admin-form > button:active {
    transform: scale(0.98);
}


/* =========================================================
   LISTE DES VOCAUX
   ========================================================= */

.vocal-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.admin-vocal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px;
    border: 1px solid #e5e5e7;
    border-radius: 18px;
    background: #ffffff;
}

.vocal-info {
    min-width: 0;
    flex: 1;
}

.vocal-info h3 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.vocal-info p {
    margin: 0;
    color: #86868b;
    font-size: 13px;
}

.admin-vocal-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.admin-player {
    width: 390px;
    max-width: 40vw;
    margin-top: 0;
}

.admin-vocal-actions form {
    margin: 0;
}

.delete-button {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid #d2d2d7;
    border-radius: 999px;
    background: #ffffff;
    color: #1d1d1f;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    transition:
        background 0.15s ease,
        transform 0.15s ease;
}

.delete-button:hover {
    background: #f5f5f7;
    transform: translateY(-1px);
}

.delete-button:active {
    transform: scale(0.98);
}

.empty {
    padding: 30px 0 10px;
    text-align: center;
    color: #86868b;
}

.empty p {
    margin: 0;
}


/* =========================================================
   RESPONSIVE ADMIN
   ========================================================= */

@media (max-width: 800px) {

    .admin-header {
        flex-direction: column;
    }

    .admin-actions {
        width: 100%;
    }

    .back-link,
    .logout-link {
        flex: 1;
    }

    .admin-vocal {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-vocal-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-player {
        width: 100%;
        max-width: none;
    }

    .delete-button {
        width: 100%;
    }

}


@media (max-width: 600px) {

    .admin-page {
        width: min(100% - 24px, 900px);
        padding-top: 36px;
    }

    .admin-card {
        padding: 20px;
        border-radius: 20px;
    }

    .section-header {
        margin-bottom: 20px;
    }

}

/* =====================================================
   PAGE DE CONNEXION
   ===================================================== */

.page {
    min-height: 100vh;
    min-height: 100dvh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;

    background: #f5f5f7;
}


/* Carte */

.page .card {
    width: min(100%, 420px);

    padding: 42px 38px;

    background: rgba(255, 255, 255, 0.88);

    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 24px;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04);

    text-align: center;

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}


/* Icône cadenas */

.page .lock {
    width: 54px;
    height: 54px;

    margin: 0 auto 22px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f0f0f2;

    border-radius: 16px;

    font-size: 24px;
}


/* Titre */

.page .card h1 {
    margin: 0;

    font-size: 32px;
    line-height: 1.15;
    font-weight: 650;

    letter-spacing: -0.8px;

    color: #1d1d1f;
}


/* Sous-titre */

.page .subtitle {
    margin: 12px 0 28px;

    color: #6e6e73;

    font-size: 15px;
    line-height: 1.5;
}


/* Formulaire */

.page .card form {
    display: flex;
    flex-direction: column;

    gap: 12px;
}


/* Champ code */

.page .card input[type="password"] {
    width: 100%;
    height: 50px;

    padding: 0 16px;

    border: 1px solid #d2d2d7;
    border-radius: 12px;

    background: #fff;

    color: #1d1d1f;

    font-family: inherit;
    font-size: 16px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;

    -webkit-appearance: none;
    appearance: none;
}


.page .card input[type="password"]::placeholder {
    color: #8e8e93;
}


.page .card input[type="password"]:focus {
    border-color: #8e8e93;

    box-shadow:
        0 0 0 3px rgba(0, 0, 0, 0.07);
}


/* Bouton */

.page .card button {
    width: 100%;
    height: 50px;

    margin-top: 2px;

    border: 0;
    border-radius: 12px;

    background: #1d1d1f;
    color: #fff;

    font-family: inherit;
    font-size: 15px;
    font-weight: 600;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;

    -webkit-appearance: none;
    appearance: none;
}


.page .card button:hover {
    background: #000;

    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.14);
}


.page .card button:active {
    transform: scale(0.98);
}


/* =====================================================
   MOBILE
   ===================================================== */

@media (max-width: 520px) {

    .page {
        padding: 16px;
    }

    .page .card {
        padding: 34px 24px;

        border-radius: 20px;
    }

    .page .card h1 {
        font-size: 28px;
    }

    .page .subtitle {
        font-size: 14px;
        margin-bottom: 24px;
    }

}
