:root {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #172033;
    background: #f5f7fb;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #f5f7fb;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    -webkit-appearance: none;
    appearance: none;
}

.app-shell {
    min-height: 100vh;
}


/* =========================================================
   NAVIGATION
   ========================================================= */

.topbar {
    min-height: 72px;
    padding: 0 5vw;
    display: flex;
    align-items: center;
    gap: 32px;
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid #e6eaf0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}


/* -------------------------
   Brand
   ------------------------- */

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 190px;
    color: #172033;
    font-weight: 900;
    letter-spacing: .02em;
}

    .brand:hover {
        color: #172033;
    }

.brand-mark {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    border-radius: 11px;
    background: #172033;
    color: white;
    font-size: 20px;
    line-height: 1;
    box-shadow: 0 5px 15px rgba(23, 32, 51, .15);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

    .brand-text strong {
        font-size: 14px;
        font-weight: 850;
        letter-spacing: -.01em;
    }

    .brand-text small {
        margin-top: 4px;
        font-size: 11px;
        font-weight: 650;
        color: #64748b;
    }


/* -------------------------
   Main navigation
   ------------------------- */

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.nav-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    border-radius: 9px;
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
    transition: background .15s ease, color .15s ease, transform .15s ease;
}

    .nav-item:hover {
        background: #f1f5f9;
        color: #172033;
    }

.nav-icon {
    font-size: 17px;
    line-height: 1;
}


/* -------------------------
   User navigation
   ------------------------- */

.user-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}


/* -------------------------
   User pill
   ------------------------- */

.user-pill {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px 11px 5px 5px;
    background: #f8fafc;
    border: 1px solid #e6eaf0;
    border-radius: 999px;
}

.user-avatar {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #2563eb;
    color: white;
    font-size: 11px;
    font-weight: 850;
}

.user-name {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}


/* -------------------------
   Logout
   ------------------------- */

.logout-form {
    margin: 0;
    padding: 0;
}

.logout-button {
    border: 0;
    background: transparent;
    padding: 8px 10px;
    color: #64748b;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 8px;
    transition: background .15s ease, color .15s ease;
}

    .logout-button:hover {
        background: #fef2f2;
        color: #dc2626;
    }


/* -------------------------
   Login / Register
   ------------------------- */

.login-link {
    padding: 8px 10px;
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
    border-radius: 8px;
    transition: background .15s ease, color .15s ease;
}

    .login-link:hover {
        background: #f1f5f9;
        color: #172033;
    }

.register-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    background: #172033;
    color: white;
    border: 1px solid #172033;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 750;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

    .register-button:hover {
        background: #0f172a;
        color: white;
        transform: translateY(-1px);
        box-shadow: 0 6px 18px rgba(23, 32, 51, .18);
    }


/* =========================================================
   CONTENU PRINCIPAL
   ========================================================= */

.main-content {
    max-width: 1180px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}


/* =========================================================
   HERO / HOME
   ========================================================= */

.hero {
    padding: 80px 0;
    max-width: 760px;
}

.eyebrow {
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .16em;
    color: #2563eb;
    margin-bottom: 12px;
}

.hero h1,
.page-header h1 {
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1;
    margin: 0 0 18px;
    letter-spacing: -.04em;
}

.hero p,
.page-header p {
    font-size: 18px;
    line-height: 1.6;
    color: #64748b;
}


/* =========================================================
   HOME - ÉTAPES
   ========================================================= */

.steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 32px 0;
    max-width: 760px;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

.step-number {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #172033;
    color: white;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(23, 32, 51, .12);
}

.step-content {
    padding-top: 3px;
}

    .step-content strong {
        display: block;
        margin-bottom: 6px;
        font-size: 16px;
        font-weight: 750;
    }

    .step-content p {
        margin: 0;
        color: #64748b;
        line-height: 1.6;
        max-width: 680px;
    }


/* =========================================================
   BOUTONS GÉNÉRAUX
   ========================================================= */

.hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}

.primary-button {
    background: #172033;
    color: white;
    border: 1px solid #172033;
}

    .primary-button:hover {
        background: #0f172a;
        color: white;
        transform: translateY(-1px);
        box-shadow: 0 8px 22px rgba(23, 32, 51, .18);
    }

.secondary-button {
    background: white;
    color: #172033;
    border: 1px solid #dbe2ea;
}

    .secondary-button:hover {
        background: #f8fafc;
        color: #172033;
        border-color: #94a3b8;
        transform: translateY(-1px);
    }


/* =========================================================
   PAGE HEADER
   ========================================================= */

.page-header {
    margin-bottom: 34px;
}

    .page-header h1 {
        font-size: clamp(36px, 5vw, 56px);
    }


/* =========================================================
   CALENDAR
   ========================================================= */

.calendar-grid {
    display: grid;
    gap: 14px;
}

.appointment-card {
    display: grid;
    grid-template-columns: 74px 1fr auto;
    gap: 20px;
    align-items: center;
    background: white;
    border: 1px solid #e6eaf0;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 8px 28px rgba(20, 30, 50, .05);
    transition: .2s ease;
}

    .appointment-card:hover {
        box-shadow: 0 10px 32px rgba(20, 30, 50, .08);
        transform: translateY(-1px);
    }

    .appointment-card.present {
        border-color: #b7e4c7;
        box-shadow: 0 8px 28px rgba(22, 163, 74, .08);
    }

.date-block {
    text-align: center;
    border-radius: 14px;
    background: #f1f5f9;
    padding: 10px 6px;
}

    .date-block span,
    .date-block small {
        display: block;
        font-size: 11px;
        text-transform: uppercase;
        font-weight: 750;
        color: #64748b;
    }

    .date-block strong {
        display: block;
        font-size: 30px;
        line-height: 1.05;
        margin: 2px 0;
    }

.appointment-info h2 {
    font-size: 17px;
    margin: 0 0 8px;
}

.meta {
    display: flex;
    gap: 16px;
    color: #64748b;
    font-size: 14px;
}

.attendance {
    display: flex;
    gap: 8px;
}

.attendance-btn {
    min-width: 112px;
    border: 1px solid #dbe2ea;
    background: white;
    color: #334155;
    border-radius: 11px;
    padding: 10px 13px;
    font-weight: 750;
    cursor: pointer;
    transition: .15s ease;
}

    .attendance-btn:hover:not(:disabled) {
        transform: translateY(-1px);
        border-color: #94a3b8;
    }

    .attendance-btn.active {
        background: #16a34a;
        color: white;
        border-color: #16a34a;
    }

    .attendance-btn.absent.active {
        background: #dc2626;
        border-color: #dc2626;
    }

    .attendance-btn:disabled {
        opacity: .6;
        cursor: wait;
    }

.locked {
    color: #94a3b8;
    font-weight: 700;
}


/* =========================================================
   LOADING / EMPTY
   ========================================================= */

.loading-card,
.empty-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 28px;
    background: white;
    border: 1px solid #e6eaf0;
    border-radius: 18px;
}

.empty-card {
    flex-direction: column;
    align-items: flex-start;
}

    .empty-card span {
        color: #64748b;
    }


/* =========================================================
   SPINNERS
   ========================================================= */

.spinner,
.mini-spinner {
    border: 3px solid #dbe2ea;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

.spinner {
    width: 26px;
    height: 26px;
}

.mini-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-width: 2px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
   TOAST
   ========================================================= */

.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    padding: 14px 18px;
    border-radius: 12px;
    background: #fee2e2;
    color: #991b1b;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .12);
    z-index: 200;
}


/* =========================================================
   FOCUS ACCESSIBILITY
   ========================================================= */

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 3px;
}


/* =========================================================
   AUTHENTIFICATION
   ========================================================= */

.auth-page {
    min-height: calc(100vh - 72px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 70px 20px 100px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: white;
    border: 1px solid #e6eaf0;
    border-radius: 22px;
    padding: 38px 40px;
    box-shadow: 0 20px 60px rgba(20, 30, 50, .08);
}


/* -------------------------
   Logo
   ------------------------- */

.auth-logo {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    border-radius: 16px;
    background: #172033;
    color: white;
    font-size: 30px;
    line-height: 1;
    box-shadow: 0 8px 22px rgba(23, 32, 51, .16);
}


/* -------------------------
   Header
   ------------------------- */

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

    .auth-header .eyebrow {
        margin-bottom: 10px;
    }

    .auth-header h1 {
        margin: 0 0 10px;
        font-size: 36px;
        line-height: 1.1;
        letter-spacing: -.035em;
    }

    .auth-header p {
        margin: 0;
        color: #64748b;
        font-size: 15px;
        line-height: 1.6;
    }


/* -------------------------
   Formulaire
   ------------------------- */

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

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

    .form-group label,
    .password-label label {
        color: #334155;
        font-size: 13px;
        font-weight: 750;
    }


    /* -------------------------
   Inputs
   ------------------------- */

    .form-group input[type="email"],
    .form-group input[type="password"],
    .form-group input.form-control {
        width: 100%;
        height: 46px;
        padding: 0 14px;
        border: 1px solid #dbe2ea;
        border-radius: 10px;
        background: white;
        color: #172033;
        font-size: 14px;
        outline: none;
        transition: border-color .15s ease, box-shadow .15s ease;
    }

    .form-group input::placeholder {
        color: #94a3b8;
    }

    .form-group input[type="email"]:focus,
    .form-group input[type="password"]:focus,
    .form-group input.form-control:focus {
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
    }


/* -------------------------
   Validation
   ------------------------- */

.validation-message {
    color: #dc2626;
    font-size: 12px;
    font-weight: 600;
}

.form-group input.invalid {
    border-color: #f87171;
}

    .form-group input.invalid:focus {
        border-color: #dc2626;
        box-shadow: 0 0 0 3px rgba(220, 38, 38, .10);
    }


/* -------------------------
   Password
   ------------------------- */

.password-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .password-label a {
        color: #2563eb;
        font-size: 12px;
        font-weight: 700;
    }

        .password-label a:hover {
            text-decoration: underline;
        }


/* -------------------------
   Remember me
   ------------------------- */

.remember-me {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

    .remember-me input {
        width: 16px;
        height: 16px;
        margin: 0;
        accent-color: #2563eb;
        cursor: pointer;
    }


/* -------------------------
   Submit
   ------------------------- */

.auth-submit {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 2px;
    padding: 0 18px;
    border: 1px solid #172033;
    border-radius: 11px;
    background: #172033;
    color: white;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, opacity .15s ease;
}

    .auth-submit:hover:not(:disabled) {
        background: #0f172a;
        transform: translateY(-1px);
        box-shadow: 0 8px 22px rgba(23, 32, 51, .18);
    }

    .auth-submit:active:not(:disabled) {
        transform: translateY(0);
    }

    .auth-submit:disabled {
        opacity: .65;
        cursor: wait;
    }

    .auth-submit > span:last-child {
        font-size: 17px;
    }


/* -------------------------
   Error
   ------------------------- */

.auth-error {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    padding: 12px 14px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fef2f2;
    color: #991b1b;
    font-size: 13px;
    font-weight: 650;
}

    .auth-error > span:first-child {
        flex: 0 0 auto;
    }


/* -------------------------
   Success
   ------------------------- */

.auth-success {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 22px;
    padding: 13px 14px;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    background: #f0fdf4;
    color: #166534;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 650;
}

    .auth-success > span:first-child {
        width: 22px;
        height: 22px;
        flex: 0 0 22px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: -1px;
        border-radius: 50%;
        background: #16a34a;
        color: white;
        font-size: 12px;
        font-weight: 800;
    }


/* -------------------------
   Footer
   ------------------------- */

.auth-footer {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #eef1f5;
    color: #64748b;
    font-size: 13px;
}

    .auth-footer a {
        color: #2563eb;
        font-weight: 750;
    }

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


/* =========================================================
   PROFILE
   ========================================================= */

.profile-page-header {
    margin-bottom: 28px;
}

.profile-card {
    background: white;
    border: 1px solid #e6eaf0;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(20, 30, 50, .06);
}


/* -------------------------
   Identity
   ------------------------- */

.profile-identity {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 28px 30px;
    background: linear-gradient( 135deg, #f8fafc 0%, #ffffff 100% );
    border-bottom: 1px solid #eef1f5;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: #172033;
    color: white;
    font-size: 20px;
    font-weight: 850;
    letter-spacing: .02em;
    box-shadow: 0 8px 20px rgba(23, 32, 51, .16);
}

.profile-identity-info h2 {
    margin: 0 0 5px;
    color: #172033;
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: -.025em;
}

.profile-identity-info span {
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
}


/* -------------------------
   Section
   ------------------------- */

.profile-section {
    padding: 30px;
}

.profile-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.profile-section-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #eff6ff;
    font-size: 17px;
}

.profile-section-title strong {
    display: block;
    margin-bottom: 3px;
    color: #172033;
    font-size: 15px;
    font-weight: 800;
}

.profile-section-title small {
    display: block;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
}


/* -------------------------
   Display fields
   ------------------------- */

.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.profile-field {
    min-width: 0;
}

.profile-field-full {
    grid-column: 1 / -1;
}

.profile-field label {
    display: block;
    margin-bottom: 7px;
    color: #64748b;
    font-size: 12px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.profile-value {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 14px;
    border: 1px solid #e6eaf0;
    border-radius: 10px;
    background: #f8fafc;
    color: #172033;
    font-size: 14px;
    font-weight: 650;
}

.profile-value-icon {
    color: #64748b;
    font-size: 15px;
}

.profile-empty {
    color: #94a3b8;
    font-weight: 550;
    font-style: italic;
}


/* =========================================================
   PROFILE - EDITION
   ========================================================= */

.edit-profile-card {
    overflow: hidden;
}


/* -------------------------
   Edit fields
   ------------------------- */

.profile-edit-field {
    min-width: 0;
}

    .profile-edit-field label {
        display: block;
        margin-bottom: 7px;
        color: #64748b;
        font-size: 12px;
        font-weight: 750;
        text-transform: uppercase;
        letter-spacing: .04em;
    }

.profile-input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid #dbe2ea;
    border-radius: 10px;
    background: white;
    color: #172033;
    font-size: 14px;
    font-weight: 600;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

    .profile-input:hover {
        border-color: #cbd5e1;
    }

    .profile-input:focus {
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
    }


/* -------------------------
   Edit validation
   ------------------------- */

.profile-edit-field .validation-message {
    display: block;
    margin-top: 6px;
    color: #dc2626;
    font-size: 12px;
    font-weight: 600;
}

.profile-edit-field .profile-input.invalid {
    border-color: #f87171;
}

    .profile-edit-field .profile-input.invalid:focus {
        border-color: #dc2626;
        box-shadow: 0 0 0 3px rgba(220, 38, 38, .10);
    }


/* -------------------------
   Edit error
   ------------------------- */

.profile-edit-error {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 30px 22px;
    padding: 12px 14px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fef2f2;
    color: #991b1b;
    font-size: 13px;
    font-weight: 650;
}


/* -------------------------
   Profile actions
   ------------------------- */

.profile-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 22px 30px;
    background: #fafbfc;
    border-top: 1px solid #eef1f5;
}


/* -------------------------
   Edit / save button
   ------------------------- */

.profile-edit-button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 18px;
    border: 1px solid #172033;
    border-radius: 11px;
    background: #172033;
    color: white;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, opacity .15s ease;
}

    .profile-edit-button:hover:not(:disabled) {
        background: #0f172a;
        transform: translateY(-1px);
        box-shadow: 0 8px 22px rgba(23, 32, 51, .18);
    }

    .profile-edit-button:active:not(:disabled) {
        transform: translateY(0);
    }

    .profile-edit-button:disabled {
        opacity: .65;
        cursor: wait;
    }

.profile-edit-arrow {
    font-size: 17px;
}


/* -------------------------
   Cancel button
   ------------------------- */

.profile-cancel-button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid #dbe2ea;
    border-radius: 11px;
    background: white;
    color: #475569;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

    .profile-cancel-button:hover:not(:disabled) {
        background: #f8fafc;
        border-color: #94a3b8;
        color: #172033;
        transform: translateY(-1px);
    }

    .profile-cancel-button:active:not(:disabled) {
        transform: translateY(0);
    }

    .profile-cancel-button:disabled {
        opacity: .6;
        cursor: wait;
    }

.edit-profile-card .profile-edit-button {
    min-width: 210px;
}


/* -------------------------
   Profile loading
   ------------------------- */

.profile-loading {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: white;
    border: 1px solid #e6eaf0;
    border-radius: 18px;
    color: #64748b;
    font-size: 14px;
    font-weight: 650;
}


/* -------------------------
   Profile error
   ------------------------- */

.profile-error {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    border: 1px solid #fecaca;
    border-radius: 14px;
    background: #fef2f2;
    color: #991b1b;
    box-shadow: 0 8px 24px rgba(220, 38, 38, .05);
}

.profile-error-icon {
    font-size: 18px;
}

.profile-error strong {
    display: block;
    margin-bottom: 3px;
    font-size: 14px;
}

.profile-error div span {
    display: block;
    font-size: 13px;
    line-height: 1.5;
}


/* =========================================================
   RESPONSIVE - TABLETTE
   ========================================================= */

@media (max-width: 850px) {

    .topbar {
        padding: 12px 20px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .brand {
        min-width: auto;
    }

    .main-nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .user-nav {
        margin-left: auto;
    }

    .user-name {
        display: none;
    }
}


/* =========================================================
   RESPONSIVE - CALENDRIER / HOME
   ========================================================= */

@media (max-width: 760px) {

    .appointment-card {
        grid-template-columns: 60px 1fr;
    }

    .attendance {
        grid-column: 1 / -1;
    }

    .attendance-btn {
        flex: 1;
    }

    .meta {
        flex-direction: column;
        gap: 4px;
    }

    .steps {
        gap: 20px;
    }

    .step {
        gap: 14px;
    }

    .step-number {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
        font-size: 14px;
    }

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

    .primary-button,
    .secondary-button {
        width: 100%;
    }
}


/* =========================================================
   RESPONSIVE - PROFILE
   ========================================================= */

@media (max-width: 650px) {

    .profile-identity {
        padding: 24px 20px;
    }

    .profile-section {
        padding: 24px 20px;
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }

    .profile-field-full {
        grid-column: auto;
    }

    .profile-actions {
        padding: 18px 20px;
    }

    .profile-edit-button {
        width: 100%;
    }

    .edit-profile-card .profile-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .profile-cancel-button,
    .edit-profile-card .profile-edit-button {
        width: 100%;
    }

    .profile-edit-error {
        margin-left: 20px;
        margin-right: 20px;
    }
}


/* =========================================================
   RESPONSIVE - AUTH
   ========================================================= */

@media (max-width: 550px) {

    .auth-page {
        min-height: calc(100vh - 60px);
        padding: 35px 16px 70px;
    }

    .auth-card {
        padding: 30px 22px;
        border-radius: 18px;
    }

    .auth-logo {
        width: 54px;
        height: 54px;
        font-size: 27px;
    }

    .auth-header h1 {
        font-size: 32px;
    }

    .auth-header p {
        font-size: 14px;
    }
}


/* =========================================================
   RESPONSIVE - PETIT MOBILE
   ========================================================= */

@media (max-width: 550px) {

    .topbar {
        min-height: auto;
    }

    .brand-text {
        display: none;
    }

    .main-nav {
        gap: 2px;
    }

    .nav-item {
        font-size: 13px;
        padding: 8px 9px;
        white-space: nowrap;
    }

    .logout-button {
        width: 36px;
        height: 36px;
        padding: 0;
        font-size: 0;
    }

        .logout-button span {
            font-size: 18px;
        }

    .login-link {
        font-size: 13px;
    }

    .register-button {
        padding: 0 12px;
    }

    .main-content {
        padding: 32px 18px 60px;
    }

    .hero {
        padding: 50px 0;
    }

        .hero h1 {
            font-size: clamp(36px, 12vw, 52px);
        }
}


/* =========================================================
   PROFILE - PETIT MOBILE
   ========================================================= */

@media (max-width: 450px) {

    .profile-avatar {
        width: 54px;
        height: 54px;
        flex-basis: 54px;
        border-radius: 15px;
        font-size: 17px;
    }

    .profile-identity-info h2 {
        font-size: 19px;
    }

    .profile-section-title {
        align-items: flex-start;
    }
}

/* =========================
   Sessions - Administration
   ========================= */

.session-grid {
    display: grid;
    gap: 16px;
}

.session-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 22px;
    background: white;
    border: 1px solid #e6eaf0;
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(20, 30, 50, .05);
    transition: .2s ease;
}

    .session-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 34px rgba(20, 30, 50, .09);
    }

    .session-card.current {
        border-color: #93c5fd;
        box-shadow: 0 10px 32px rgba(37, 99, 235, .10);
    }

.session-icon {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: #eff6ff;
    font-size: 27px;
}

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

.session-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

    .session-title-row h2 {
        margin: 0;
        font-size: 19px;
        font-weight: 800;
        letter-spacing: -.02em;
    }

.session-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: #dcfce7;
    color: #15803d;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.session-dates {
    display: flex;
    align-items: center;
    gap: 18px;
}

    .session-dates > div:not(.session-arrow) {
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

    .session-dates span {
        color: #94a3b8;
        font-size: 11px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .08em;
    }

    .session-dates strong {
        font-size: 14px;
        font-weight: 700;
        color: #334155;
    }

.session-arrow {
    color: #94a3b8;
    font-size: 20px;
}

.session-actions {
    flex: 0 0 auto;
}


/* =========================
   Responsive Sessions
   ========================= */

@media (max-width: 760px) {

    .page-header {
        display: flex;
        flex-direction: column;
        gap: 18px;
    }

        .page-header > .primary-button {
            width: 100%;
            margin-top: 0;
        }

    .session-card {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .session-content {
        width: calc(100% - 76px);
    }

    .session-title-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .session-dates {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .session-arrow {
        display: none;
    }

    .session-actions {
        width: 100%;
        margin-left: 76px;
    }

        .session-actions .secondary-button {
            width: 100%;
        }
}

/* =========================================================
   SESSION FORM
   ========================================================= */

.session-form-card {
    overflow: hidden;
}

.session-form-avatar {
    background: #eff6ff;
    color: #172033;
    font-size: 25px;
    box-shadow: none;
}

.session-form-card .profile-actions {
    justify-content: flex-end;
}

.session-form-card .profile-edit-button {
    min-width: 190px;
}

.session-form-card .profile-input[type="date"] {
    cursor: pointer;
}

@media (max-width: 650px) {

    .session-form-card .profile-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .session-form-card .profile-edit-button,
    .session-form-card .profile-cancel-button {
        width: 100%;
    }
}

/* =========================================================
   SESSION USERS
   ========================================================= */

.session-users-card {
    background: white;
    border: 1px solid #e6eaf0;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 18px;
    box-shadow: 0 10px 32px rgba(20, 30, 50, .05);
}

.session-users-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 26px;
    border-bottom: 1px solid #eef1f5;
    background: #fafbfc;
}

.session-users-title {
    color: #172033;
    font-size: 16px;
    font-weight: 800;
}

.session-users-subtitle {
    margin-top: 4px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
}


/* -------------------------
   Liste
   ------------------------- */

.session-users-list {
    display: flex;
    flex-direction: column;
}

.session-user-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 26px;
    border-bottom: 1px solid #f0f2f5;
}

    .session-user-row:last-child {
        border-bottom: 0;
    }


/* -------------------------
   Avatar
   ------------------------- */

.session-user-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #172033;
    color: white;
    font-size: 13px;
    font-weight: 850;
}


/* -------------------------
   Substitute number
   ------------------------- */

.substitute-number {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    font-size: 12px;
    font-weight: 850;
}


/* -------------------------
   Information
   ------------------------- */

.session-user-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

    .session-user-info strong {
        color: #172033;
        font-size: 14px;
        font-weight: 750;
    }

    .session-user-info span {
        color: #94a3b8;
        font-size: 12px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }


/* -------------------------
   Type badge
   ------------------------- */

.session-user-type {
    display: inline-flex;
    align-items: center;
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

    .session-user-type.permanent {
        background: #dcfce7;
        color: #15803d;
    }

    .session-user-type.substitute {
        background: #fff7ed;
        color: #c2410c;
    }


/* -------------------------
   Change type
   ------------------------- */

.session-user-change {
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    background: white;
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

    .session-user-change:hover:not(:disabled) {
        background: #f8fafc;
        border-color: #94a3b8;
        color: #172033;
    }


/* -------------------------
   Remove
   ------------------------- */

.session-user-remove {
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: white;
    color: #dc2626;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}

    .session-user-remove:hover:not(:disabled) {
        background: #fef2f2;
        border-color: #f87171;
    }

    .session-user-change:disabled,
    .session-user-remove:disabled {
        opacity: .6;
        cursor: wait;
    }


/* -------------------------
   Empty
   ------------------------- */

.session-users-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 48px 20px;
    text-align: center;
}

.session-users-empty-icon {
    margin-bottom: 5px;
    font-size: 30px;
}

.session-users-empty strong {
    color: #334155;
    font-size: 14px;
}

.session-users-empty span {
    color: #94a3b8;
    font-size: 12px;
}


/* -------------------------
   Add user
   ------------------------- */

.add-user-card {
    margin-top: 18px;
}

.add-user-form {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 26px;
}

    .add-user-form .profile-input {
        flex: 1;
        min-width: 0;
    }

    .add-user-form .add-user-type {
        flex: 0 0 170px;
    }

    .add-user-form .profile-edit-button {
        flex: 0 0 auto;
        min-width: 140px;
    }


/* =========================================================
   SESSION USERS RESPONSIVE
   ========================================================= */

@media (max-width: 850px) {

    .session-user-row {
        flex-wrap: wrap;
        padding: 15px 20px;
    }

    .session-user-info {
        min-width: calc(100% - 120px);
    }

    .session-user-type {
        margin-left: 56px;
    }

    .session-user-change,
    .session-user-remove {
        flex: 1;
    }

    .add-user-form {
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
    }

        .add-user-form .profile-input,
        .add-user-form .add-user-type,
        .add-user-form .profile-edit-button {
            width: 100%;
            flex: none;
        }
}

/* =========================================================
   APPOINTMENTS - ADMIN
   ========================================================= */

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.appointment-admin-grid {
    display: grid;
    gap: 14px;
}

.appointment-admin-card {
    display: grid;
    grid-template-columns: 74px 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 18px;
    background: white;
    border: 1px solid #e6eaf0;
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(20, 30, 50, .05);
    transition: .2s ease;
}

    .appointment-admin-card:hover {
        transform: translateY(-1px);
        box-shadow: 0 12px 32px rgba(20, 30, 50, .08);
    }

    .appointment-admin-card.canceled {
        opacity: .65;
        background: #fafafa;
    }

    .appointment-admin-card.past {
        background: #fafbfc;
    }

.appointment-admin-date {
    text-align: center;
    border-radius: 14px;
    background: #f1f5f9;
    padding: 10px 6px;
}

    .appointment-admin-date span,
    .appointment-admin-date small {
        display: block;
        font-size: 11px;
        text-transform: uppercase;
        font-weight: 750;
        color: #64748b;
    }

    .appointment-admin-date strong {
        display: block;
        font-size: 30px;
        line-height: 1.05;
        margin: 2px 0;
        color: #172033;
    }

.appointment-admin-info {
    min-width: 0;
}

.appointment-admin-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

    .appointment-admin-title h2 {
        margin: 0;
        font-size: 17px;
        font-weight: 800;
    }

.appointment-status {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .05em;
}

    .appointment-status.active {
        background: #dcfce7;
        color: #15803d;
    }

    .appointment-status.past {
        background: #f1f5f9;
        color: #64748b;
    }

    .appointment-status.canceled {
        background: #fee2e2;
        color: #b91c1c;
    }

.appointment-admin-meta {
    display: flex;
    gap: 18px;
    color: #64748b;
    font-size: 14px;
}

.appointment-admin-actions {
    display: flex;
    gap: 8px;
}

@media (max-width: 760px) {
    .page-header-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

        .page-header-actions .primary-button,
        .page-header-actions .secondary-button {
            width: 100%;
        }

    .appointment-admin-card {
        grid-template-columns: 60px 1fr;
    }

    .appointment-admin-actions {
        grid-column: 1 / -1;
    }

        .appointment-admin-actions .secondary-button {
            width: 100%;
        }

    .appointment-admin-meta {
        flex-direction: column;
        gap: 4px;
    }

    .appointment-admin-title {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* =========================================================
   APPOINTMENT EDIT STATUS
   ========================================================= */

.appointment-edit-status {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    margin-bottom: 28px;
    border-radius: 14px;
    border: 1px solid;
}

    .appointment-edit-status.active {
        background: #f0fdf4;
        border-color: #bbf7d0;
        color: #166534;
    }

    .appointment-edit-status.canceled {
        background: #fef2f2;
        border-color: #fecaca;
        color: #991b1b;
    }

.appointment-edit-status-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: white;
    font-weight: 900;
}

.appointment-edit-status div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.appointment-edit-status strong {
    font-size: 13px;
}

.appointment-edit-status span {
    font-size: 12px;
    opacity: .8;
}


/* =========================================================
   APPOINTMENT TOGGLE
   ========================================================= */

.appointment-toggle {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid #e6eaf0;
    border-radius: 14px;
    cursor: pointer;
    transition: .15s ease;
}

    .appointment-toggle:hover {
        background: #f8fafc;
        border-color: #cbd5e1;
    }

    .appointment-toggle input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

.appointment-toggle-slider {
    position: relative;
    width: 46px;
    height: 26px;
    flex: 0 0 46px;
    border-radius: 999px;
    background: #cbd5e1;
    transition: .2s ease;
}

    .appointment-toggle-slider::after {
        content: "";
        position: absolute;
        width: 20px;
        height: 20px;
        top: 3px;
        left: 3px;
        border-radius: 50%;
        background: white;
        box-shadow: 0 2px 5px rgba(0,0,0,.15);
        transition: .2s ease;
    }

.appointment-toggle input:checked + .appointment-toggle-slider {
    background: #dc2626;
}

    .appointment-toggle input:checked + .appointment-toggle-slider::after {
        transform: translateX(20px);
    }

.appointment-toggle-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

    .appointment-toggle-content strong {
        color: #172033;
        font-size: 13px;
    }

    .appointment-toggle-content small {
        color: #94a3b8;
        font-size: 12px;
    }

.appointment-card.canceled {
    background: #fafafa;
    border-color: #fecaca;
    opacity: .75;
}

    .appointment-card.canceled .date-block {
        background: #fef2f2;
    }

        .appointment-card.canceled .date-block strong {
            color: #991b1b;
        }

.appointment-canceled {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 13px;
    border-radius: 11px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-weight: 800;
    font-size: 13px;
}

/* =========================================================
   ATTENDANCE SUMMARY
   ========================================================= */

.attendance-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

    .attendance-summary span {
        display: inline-flex;
        align-items: center;
        padding: 5px 9px;
        border-radius: 999px;
        font-size: 11px;
        font-weight: 800;
    }

.attendance-summary-present {
    background: #dcfce7;
    color: #15803d;
}

.attendance-summary-absent {
    background: #fee2e2;
    color: #b91c1c;
}

.attendance-summary-no-response {
    background: #f1f5f9;
    color: #64748b;
}

@media (max-width: 900px) {
    .appointment-admin-actions {
        grid-column: 1 / -1;
        display: flex;
    }

        .appointment-admin-actions .secondary-button {
            flex: 1;
        }
}

/* =========================================================
   APPOINTMENT ATTENDANCE
   ========================================================= */

.attendance-appointment-header {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px;
    margin-bottom: 18px;
    background: white;
    border: 1px solid #e6eaf0;
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(20, 30, 50, .05);
}

.attendance-appointment-date {
    width: 74px;
    flex: 0 0 74px;
    text-align: center;
    padding: 10px 6px;
    border-radius: 14px;
    background: #f1f5f9;
}

    .attendance-appointment-date span,
    .attendance-appointment-date small {
        display: block;
        color: #64748b;
        font-size: 11px;
        font-weight: 750;
        text-transform: uppercase;
    }

    .attendance-appointment-date strong {
        display: block;
        margin: 2px 0;
        color: #172033;
        font-size: 30px;
        line-height: 1.05;
    }

.attendance-appointment-info {
    flex: 1;
}

    .attendance-appointment-info h2 {
        margin: 0 0 8px;
        color: #172033;
        font-size: 18px;
        font-weight: 800;
    }

    .attendance-appointment-info > div {
        display: flex;
        gap: 18px;
        color: #64748b;
        font-size: 14px;
    }


/* =========================================================
   ATTENDANCE OVERVIEW
   ========================================================= */

.attendance-overview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.attendance-overview-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 18px;
    background: white;
    border: 1px solid #e6eaf0;
    border-radius: 16px;
}

    .attendance-overview-item strong {
        font-size: 25px;
        line-height: 1;
    }

    .attendance-overview-item span {
        color: #64748b;
        font-size: 12px;
        font-weight: 700;
    }

    .attendance-overview-item.present strong {
        color: #16a34a;
    }

    .attendance-overview-item.absent strong {
        color: #dc2626;
    }

    .attendance-overview-item.no-response strong {
        color: #64748b;
    }

    .attendance-overview-item.total strong {
        color: #172033;
    }


/* =========================================================
   ATTENDANCE SECTIONS
   ========================================================= */

.attendance-section {
    margin-bottom: 18px;
    overflow: hidden;
    background: white;
    border: 1px solid #e6eaf0;
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(20, 30, 50, .04);
}

.attendance-section-header {
    padding: 20px 24px;
    border-bottom: 1px solid #eef1f5;
    background: #fafbfc;
}

    .attendance-section-header > div {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .attendance-section-header small {
        display: block;
        margin-top: 5px;
        margin-left: 40px;
        color: #94a3b8;
        font-size: 12px;
    }

.attendance-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #172033;
    font-size: 15px;
    font-weight: 850;
}

.attendance-section-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 900;
}

    .attendance-section-icon.present {
        background: #dcfce7;
        color: #15803d;
    }

    .attendance-section-icon.absent {
        background: #fee2e2;
        color: #b91c1c;
    }

    .attendance-section-icon.no-response {
        background: #f1f5f9;
        color: #64748b;
    }


/* =========================================================
   PLAYER LIST
   ========================================================= */

.attendance-player-list {
    display: flex;
    flex-direction: column;
}

.attendance-player-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    border-bottom: 1px solid #f0f2f5;
}

    .attendance-player-row:last-child {
        border-bottom: 0;
    }

.attendance-player-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #172033;
    color: white;
    font-size: 12px;
    font-weight: 850;
}

.attendance-player-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

    .attendance-player-info strong {
        color: #172033;
        font-size: 14px;
        font-weight: 750;
    }

    .attendance-player-info span {
        overflow: hidden;
        color: #94a3b8;
        font-size: 12px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.attendance-player-type {
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

    .attendance-player-type.permanent {
        background: #dcfce7;
        color: #15803d;
    }

    .attendance-player-type.substitute {
        background: #fff7ed;
        color: #c2410c;
    }

.attendance-response {
    min-width: 120px;
    text-align: right;
    font-size: 12px;
    font-weight: 800;
}

    .attendance-response.present {
        color: #16a34a;
    }

    .attendance-response.absent {
        color: #dc2626;
    }

    .attendance-response.no-response {
        color: #94a3b8;
    }

.attendance-empty {
    padding: 28px 24px;
    color: #94a3b8;
    font-size: 13px;
}


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

@media (max-width: 760px) {
    .attendance-appointment-header {
        align-items: flex-start;
    }

    .attendance-appointment-info > div {
        flex-direction: column;
        gap: 4px;
    }

    .attendance-overview {
        grid-template-columns: repeat(2, 1fr);
    }

    .attendance-player-row {
        flex-wrap: wrap;
        padding: 14px 18px;
    }

    .attendance-player-info {
        min-width: calc(100% - 70px);
    }

    .attendance-player-type {
        margin-left: 54px;
    }

    .attendance-response {
        min-width: 0;
        margin-left: auto;
    }
}

/* =========================================================
   CALENDAR - BULK ATTENDANCE
   ========================================================= */

.calendar-bulk-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.bulk-attendance-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 11px;
    background: white;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

    .bulk-attendance-button span {
        font-size: 16px;
        font-weight: 900;
    }

    .bulk-attendance-button.present {
        color: #15803d;
        border: 1px solid #bbf7d0;
    }

        .bulk-attendance-button.present:hover:not(:disabled) {
            background: #f0fdf4;
            border-color: #86efac;
            transform: translateY(-1px);
            box-shadow: 0 5px 16px rgba(22, 163, 74, .10);
        }

    .bulk-attendance-button.absent {
        color: #b91c1c;
        border: 1px solid #fecaca;
    }

        .bulk-attendance-button.absent:hover:not(:disabled) {
            background: #fef2f2;
            border-color: #fca5a5;
            transform: translateY(-1px);
            box-shadow: 0 5px 16px rgba(220, 38, 38, .10);
        }

    .bulk-attendance-button:disabled {
        opacity: .55;
        cursor: wait;
        transform: none;
        box-shadow: none;
    }

    .bulk-attendance-button .mini-spinner {
        border-top-color: currentColor;
    }


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

@media (max-width: 760px) {
    .calendar-bulk-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .bulk-attendance-button {
        width: 100%;
    }
}

/* =========================================================
   ADMIN USERS
   ========================================================= */

.users-admin-card {
    overflow: hidden;
    background: white;
    border: 1px solid #e6eaf0;
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(20, 30, 50, .05);
}

.users-admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: #fafbfc;
    border-bottom: 1px solid #eef1f5;
}

    .users-admin-header div {
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

    .users-admin-header strong {
        color: #172033;
        font-size: 15px;
        font-weight: 850;
    }

    .users-admin-header span {
        color: #94a3b8;
        font-size: 12px;
    }

.users-admin-list {
    display: flex;
    flex-direction: column;
}

.user-admin-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 24px;
    border-bottom: 1px solid #f0f2f5;
    transition: background .15s ease;
}

    .user-admin-row:last-child {
        border-bottom: 0;
    }

    .user-admin-row:hover {
        background: #fafbfc;
    }

.user-admin-avatar {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: #172033;
    color: white;
    font-size: 13px;
    font-weight: 850;
}

.user-admin-info {
    flex: 1;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

    .user-admin-info strong {
        color: #172033;
        font-size: 14px;
        font-weight: 800;
    }

    .user-admin-info span {
        overflow: hidden;
        color: #94a3b8;
        font-size: 12px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.user-admin-phone {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 150px;
    color: #64748b;
    font-size: 12px;
}

.user-admin-actions {
    display: flex;
    justify-content: flex-end;
}

    .user-admin-actions .secondary-button {
        margin-top: 0;
        min-height: 38px;
        padding: 0 13px;
        font-size: 12px;
    }

@media (max-width: 760px) {
    .user-admin-row {
        flex-wrap: wrap;
        padding: 16px 18px;
    }

    .user-admin-info {
        min-width: calc(100% - 60px);
    }

    .user-admin-phone {
        width: 100%;
        min-width: 0;
        margin-left: 58px;
    }

    .user-admin-actions {
        width: 100%;
        margin-left: 58px;
    }

        .user-admin-actions .secondary-button {
            width: 100%;
        }
}

/* =========================================================
   USER MENU
   ========================================================= */

.user-menu {
    position: relative;
}

.user-profile-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 0;
    background: transparent;
    padding: 4px 6px;
    border-radius: 12px;
    color: #172033;
    cursor: pointer;
    font: inherit;
    transition: background .18s ease;
}

    .user-profile-button:hover {
        background: #f1f5f9;
    }

.user-avatar-button {
    flex: 0 0 auto;
}

.user-profile-name {
    font-size: 14px;
    font-weight: 750;
    white-space: nowrap;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 260px;
    padding: 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .14);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
    z-index: 1000;
}

.user-menu:hover .user-dropdown,
.user-menu:focus-within .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-header {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 11px;
}

    .user-dropdown-header strong {
        color: #172033;
        font-size: 14px;
        font-weight: 800;
    }

    .user-dropdown-header span {
        color: #64748b;
        font-size: 12px;
        word-break: break-word;
    }

.user-dropdown-divider {
    height: 1px;
    margin: 4px 7px;
    background: #e2e8f0;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 42px;
    padding: 0 11px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
}

    .user-dropdown-item:hover {
        background: #f8fafc;
        color: #2563eb;
    }

    .user-dropdown-item span {
        width: 20px;
        text-align: center;
        font-size: 17px;
    }

    .user-dropdown-item.logout {
        color: #b91c1c;
    }

        .user-dropdown-item.logout:hover {
            background: #fef2f2;
            color: #dc2626;
        }

.user-dropdown-logout {
    margin: 0;
}

@media (max-width: 760px) {
    .user-profile-name {
        display: none;
    }

    .user-profile-button {
        gap: 0;
    }
}

.register-confirmation-card {
    text-align: center;
}

.confirmation-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
    font-size: 30px;
    font-weight: 800;
}

.confirmation-message {
    margin: 24px 0;
    padding: 18px 20px;
    border-radius: 13px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 14px;
    line-height: 1.65;
}

    .confirmation-message p {
        margin: 0;
    }

        .confirmation-message p + p {
            margin-top: 12px;
        }

.confirmation-button {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-sizing: border-box;
}

/* =========================================================
   REGISTER
   ========================================================= */

.register-card {
    width: min(100%, 620px);
}

.register-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.register-card .form-group {
    margin-bottom: 17px;
}

.register-card label {
    display: flex;
    align-items: baseline;
    gap: 7px;
    margin-bottom: 7px;
    color: #172033;
    font-size: 12px;
    font-weight: 800;
}

.register-card .form-input {
    width: 100%;
    height: 43px;
    padding: 0 13px;
    box-sizing: border-box;
    border: 1px solid #dbe3ee;
    border-radius: 11px;
    outline: none;
    background: #ffffff;
    color: #172033;
    font-family: inherit;
    font-size: 14px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

    .register-card .form-input::placeholder {
        color: #94a3b8;
    }

    .register-card .form-input:hover {
        border-color: #cbd5e1;
    }

    .register-card .form-input:focus {
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
        background: #fff;
    }

.register-card .validation-message {
    display: block;
    margin-top: 5px;
    color: #dc2626;
    font-size: 11px;
    font-weight: 600;
}

.optional-label {
    color: #94a3b8;
    font-size: 10px;
    font-weight: 600;
}

.password-input-wrapper {
    position: relative;
    width: 100%;
}

    .password-input-wrapper .form-input {
        padding-right: 48px;
    }

.password-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background .15s ease, color .15s ease;
}

    .password-toggle:hover {
        background: #f1f5f9;
        color: #2563eb;
    }

.password-eye {
    font-size: 17px;
    line-height: 1;
}

.password-hint {
    margin-top: 5px;
    color: #94a3b8;
    font-size: 10px;
}

.register-card .auth-submit {
    margin-top: 8px;
}

.register-card .auth-footer {
    margin-top: 24px;
}

/* Erreur générale */

.register-card .auth-error {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid #fecaca;
    border-radius: 11px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.5;
}

.auth-message-icon {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #dc2626;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
}

/* Spinner */

.register-card .auth-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: register-spin .7s linear infinite;
}

@keyframes register-spin {
    to {
        transform: rotate(360deg);
    }
}

.register-card .auth-submit:disabled {
    opacity: .65;
    cursor: wait;
}

/* Mobile */

@media (max-width: 650px) {

    .register-card {
        width: 100%;
    }

    .register-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .register-card .form-group {
        margin-bottom: 16px;
    }
}
/* =========================================================
   ADMIN USERS - DELETE
   ========================================================= */

.user-admin-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 0 13px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fff;
    color: #b91c1c;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all .18s ease;
}

    .danger-button:hover:not(:disabled) {
        background: #fef2f2;
        border-color: #fca5a5;
        color: #dc2626;
        transform: translateY(-1px);
        box-shadow: 0 5px 14px rgba(220, 38, 38, .10);
    }

    .danger-button:disabled {
        opacity: .55;
        cursor: wait;
        transform: none;
        box-shadow: none;
    }

.danger-button-confirm {
    min-width: 185px;
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

    .danger-button-confirm:hover:not(:disabled) {
        background: #b91c1c;
        border-color: #b91c1c;
        color: #fff;
    }

/* Modal */

.delete-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, .45);
    backdrop-filter: blur(4px);
}

.delete-modal {
    width: min(100%, 470px);
    padding: 28px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 25px 70px rgba(15, 23, 42, .22);
}

.delete-modal-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    font-size: 22px;
    font-weight: 900;
}

.delete-modal-content h2 {
    margin: 0 0 10px;
    color: #172033;
    font-size: 20px;
    font-weight: 850;
}

.delete-modal-content p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
}

    .delete-modal-content p + p {
        margin-top: 10px;
    }

.delete-modal-warning {
    padding: 12px 14px;
    border-radius: 10px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412 !important;
    font-size: 12px !important;
}

.delete-modal-error {
    margin-top: 16px;
    padding: 11px 13px;
    border-radius: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 700;
}

.delete-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 24px;
}

    .delete-modal-actions .secondary-button {
        min-height: 40px;
    }

.mini-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: delete-spinner .7s linear infinite;
}

@keyframes delete-spinner {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 760px) {

    .user-admin-actions {
        width: 100%;
        margin-top: 10px;
    }

        .user-admin-actions .secondary-button,
        .user-admin-actions .danger-button {
            flex: 1;
        }

    .delete-modal {
        padding: 22px;
    }

    .delete-modal-actions {
        flex-direction: column-reverse;
    }

        .delete-modal-actions button {
            width: 100%;
        }
}

.menu-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .menu-icon svg {
        width: 17px;
        height: 17px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.button-spinner {
    width: 16px;
    height: 16px;
    display: inline-block;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: button-spin .7s linear infinite;
}

@keyframes button-spin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================================
   CHANGE PASSWORD
   ========================================================= */

.change-password-card {
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e6eaf0;
    border-radius: 22px;
    box-shadow: 0 16px 48px rgba(20, 30, 50, .07);
}

    /* -------------------------
   En-tête de la carte
   ------------------------- */

    .change-password-card .card-header {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 26px 30px;
        border-bottom: 1px solid #eef1f5;
        background: linear-gradient(135deg, #fafbfc 0%, #ffffff 100%);
    }

    .change-password-card .card-icon {
        width: 42px;
        height: 42px;
        flex: 0 0 42px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        background: #eff6ff;
        font-size: 19px;
    }

    .change-password-card .card-header h2 {
        margin: 0 0 4px;
        color: #172033;
        font-size: 17px;
        line-height: 1.25;
        font-weight: 800;
        letter-spacing: -.015em;
    }

    .change-password-card .card-header p {
        margin: 0;
        color: #64748b;
        font-size: 12px;
        line-height: 1.5;
    }

    /* -------------------------
   Formulaire
   ------------------------- */

    .change-password-card > form {
        padding: 28px 30px 30px;
    }

    .change-password-card .form-group {
        margin-bottom: 20px;
    }

        .change-password-card .form-group:last-of-type {
            margin-bottom: 0;
        }

        .change-password-card .form-group label {
            display: block;
            margin-bottom: 7px;
            color: #172033;
            font-size: 12px;
            font-weight: 800;
        }

    .change-password-card .form-input {
        width: 100%;
        height: 43px;
        padding: 0 13px;
        box-sizing: border-box;
        border: 1px solid #dbe3ee;
        border-radius: 11px;
        outline: none;
        background: #fff;
        color: #172033;
        font-family: inherit;
        font-size: 14px;
        transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
    }

        .change-password-card .form-input::placeholder {
            color: #94a3b8;
        }

        .change-password-card .form-input:hover {
            border-color: #cbd5e1;
        }

        .change-password-card .form-input:focus {
            border-color: #2563eb;
            box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
            background: #fff;
        }

    /* -------------------------
   Champs mot de passe
   ------------------------- */

    .change-password-card .password-input-wrapper {
        position: relative;
        width: 100%;
    }

        .change-password-card .password-input-wrapper .form-input {
            padding-right: 48px;
        }

    .change-password-card .password-toggle {
        position: absolute;
        top: 50%;
        right: 6px;
        width: 34px;
        height: 34px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: 0;
        border-radius: 8px;
        background: transparent;
        color: #64748b;
        cursor: pointer;
        transform: translateY(-50%);
        transition: background .15s ease, color .15s ease;
    }

        .change-password-card .password-toggle:hover {
            background: #f1f5f9;
            color: #2563eb;
        }

    /* -------------------------
   Aide / validation
   ------------------------- */

    .change-password-card .password-help {
        margin-top: 7px;
        color: #94a3b8;
        font-size: 11px;
        line-height: 1.45;
        font-weight: 600;
    }

    .change-password-card .validation-message {
        display: block;
        margin-top: 5px;
        color: #dc2626;
        font-size: 11px;
        line-height: 1.4;
        font-weight: 600;
    }

    /* -------------------------
   Messages
   ------------------------- */

    .change-password-card .form-message {
        margin: 24px 30px 0;
        padding: 12px 14px;
        border-radius: 10px;
        font-size: 13px;
        line-height: 1.5;
        font-weight: 650;
    }

    .change-password-card .form-message-error {
        border: 1px solid #fecaca;
        background: #fef2f2;
        color: #991b1b;
    }

    .change-password-card .form-message-success {
        border: 1px solid #bbf7d0;
        background: #f0fdf4;
        color: #166534;
    }

/* -------------------------
   Actions
   ------------------------- */

.change-password-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin: 28px -30px -30px;
    padding: 18px 30px;
    background: #fafbfc;
    border-top: 1px solid #edf0f4;
}

    .change-password-actions .secondary-button,
    .change-password-actions .primary-button {
        min-height: 42px;
        box-sizing: border-box;
        border-radius: 10px;
        font-family: inherit;
        font-size: 13px;
        font-weight: 750;
        text-decoration: none;
        cursor: pointer;
        transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease, opacity .15s ease;
    }

    .change-password-actions .secondary-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 16px;
    }

    .change-password-actions .primary-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-width: 205px;
        padding: 0 18px;
    }

        .change-password-actions .primary-button:hover:not(:disabled) {
            transform: translateY(-1px);
            box-shadow: 0 7px 18px rgba(23, 32, 51, .16);
        }

        .change-password-actions .primary-button:active:not(:disabled) {
            transform: translateY(0);
        }

        .change-password-actions .primary-button:disabled {
            opacity: .65;
            cursor: wait;
        }

    .change-password-actions .button-spinner {
        width: 15px;
        height: 15px;
        border-width: 2px;
    }

/* -------------------------
   Mobile
   ------------------------- */

@media (max-width: 600px) {

    .change-password-card .card-header {
        padding: 22px 20px;
    }

    .change-password-card > form {
        padding: 24px 20px 20px;
    }

    .change-password-card .form-group {
        margin-bottom: 18px;
    }

    .change-password-actions {
        flex-direction: column-reverse;
        align-items: stretch;
        margin: 24px -20px -20px;
        padding: 16px 20px;
    }

        .change-password-actions .secondary-button,
        .change-password-actions .primary-button {
            width: 100%;
        }

        .change-password-actions .primary-button {
            min-width: 0;
        }
}



/* =========================================================
   MOBILE UI FIXES
   Corrections ciblées pour les petits écrans
   ========================================================= */

/* -------------------------
   Session cards
   ------------------------- */

@media (max-width: 760px) {

    .session-card {
        width: 100%;
        box-sizing: border-box;
        gap: 16px;
    }

    .session-content {
        width: calc(100% - 72px);
        min-width: 0;
    }

    .session-actions {
        width: calc(100% - 76px);
        min-width: 0;
        margin-left: 76px;
        box-sizing: border-box;
    }

        .session-actions .secondary-button {
            width: 100%;
            min-width: 0;
            box-sizing: border-box;
        }

    .session-title-row,
    .session-title-row h2 {
        min-width: 0;
        max-width: 100%;
    }

        .session-title-row h2 {
            overflow-wrap: anywhere;
        }

    .session-dates {
        min-width: 0;
        max-width: 100%;
    }
}

/* -------------------------
   User dropdown
   ------------------------- */

@media (max-width: 550px) {

    .user-menu {
        position: static;
    }

    .user-dropdown {
        position: fixed;
        top: 76px;
        right: 12px;
        left: 12px;
        width: auto;
        max-width: none;
        box-sizing: border-box;
        max-height: calc(100vh - 92px);
        overflow-y: auto;
    }

    .user-menu:hover .user-dropdown,
    .user-menu:focus-within .user-dropdown {
        transform: translateY(0);
    }
}

/* -------------------------
   Page headers
   ------------------------- */

@media (max-width: 550px) {

    .page-header {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

        .page-header > div {
            min-width: 0;
            max-width: 100%;
        }

        .page-header h1 {
            max-width: 100%;
            overflow-wrap: anywhere;
            word-break: normal;
        }

        .page-header p {
            max-width: 100%;
            overflow-wrap: anywhere;
        }

        .page-header a {
            max-width: 100%;
            box-sizing: border-box;
        }
}

/* -------------------------
   Navigation mobile
   ------------------------- */

@media (max-width: 550px) {

    .topbar {
        width: 100%;
        box-sizing: border-box;
        overflow: visible;
    }

    .brand {
        flex: 0 0 auto;
    }

    .user-nav {
        flex: 0 0 auto;
        min-width: 0;
    }

    .main-nav {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .nav-item {
        flex: 0 0 auto;
    }
}

/* -------------------------
   Prevent accidental horizontal sizing
   ------------------------- */

@media (max-width: 760px) {

    .main-content {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .session-grid,
    .session-card,
    .session-content,
    .session-actions,
    .appointment-admin-card,
    .appointment-admin-info,
    .appointment-admin-actions {
        min-width: 0;
    }
}


/* =========================================================
   MOBILE - FocusOnNavigate
   Le h1 reçoit le focus automatiquement après navigation.
   On conserve le focus accessible sans afficher le contour
   bleu géant du navigateur autour du titre.
   ========================================================= */

.page-header h1:focus,
.page-header h1:focus-visible {
    outline: none;
}

/* =========================================================
   APPOINTMENT EDIT - iOS / Safari DATE & TIME FIX
   ========================================================= */

.session-form-card .profile-edit-field {
    min-width: 0;
    max-width: 100%;
}

    .session-form-card .profile-edit-field > input.profile-input {
        display: block;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* iOS gives date/time inputs an intrinsic minimum width.
   Force the native control to participate in the grid width. */
    .session-form-card .profile-edit-field > input[type="date"].profile-input,
    .session-form-card .profile-edit-field > input[type="time"].profile-input,
    .session-form-card .profile-edit-field > input[type="datetime-local"].profile-input {
        inline-size: 100%;
        min-inline-size: 0;
        max-inline-size: 100%;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
        -webkit-box-sizing: border-box;
    }

@media (max-width: 650px) {
    .session-form-card .profile-section,
    .session-form-card .profile-grid,
    .session-form-card .profile-edit-field {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .session-form-card .profile-grid {
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
    }

    .session-form-card .profile-edit-field > input[type="date"].profile-input,
    .session-form-card .profile-edit-field > input[type="time"].profile-input,
    .session-form-card .profile-edit-field > input[type="datetime-local"].profile-input {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        inline-size: 100%;
        min-inline-size: 0;
        max-inline-size: 100%;
        box-sizing: border-box;
        -webkit-box-sizing: border-box;
        font-size: 16px;
    }
}

/* =========================================================
   MOBILE - Navigation sans défilement horizontal
   ========================================================= */

@media (max-width: 760px) {

    .topbar {
        flex-wrap: wrap;
        height: auto;
        min-height: 64px;
    }

    .main-nav {
        order: 3;
        width: 100%;
        flex: 0 0 100%;
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 4px;
        padding: 8px 0 10px;
        overflow: visible;
    }

    .nav-item {
        flex: 0 0 auto;
        white-space: nowrap;
    }
}
