/* Styles des pages d'authentification - complète styles.css */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 2rem 1rem;
}

.auth-card {
    background: #fff;
    width: 100%;
    max-width: 420px;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    padding: 2.5rem 2rem;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    justify-content: center;
    margin-bottom: 1.8rem;
}

.auth-brand .logo-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
}

.auth-brand .logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.auth-brand h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--primary-dark);
    margin: 0;
}

.auth-brand span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.auth-card h2 {
    text-align: center;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
}

.auth-field {
    margin-bottom: 1.1rem;
}

.auth-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.35rem;
}

.auth-field input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid #dfe3e8;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.auth-field input:focus {
    outline: none;
    border-color: var(--primary);
}

.auth-submit {
    width: 100%;
    padding: 0.85rem;
    border: none;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.auth-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-message {
    margin-top: 1rem;
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
    font-size: 0.9rem;
    display: none;
}

.auth-message.error {
    display: block;
    background: #fdecea;
    color: var(--danger);
    border: 1px solid #f6c6c1;
}

.auth-message.success {
    display: block;
    background: #eaf6ec;
    color: var(--success);
    border: 1px solid #bfe3c4;
}

.auth-switch {
    text-align: center;
    margin-top: 1.4rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-switch a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

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

.privacy-notice {
    margin: 1rem 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--text-secondary);
}

/* ----- Page "en attente" ----- */
.pending-icon {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.pending-text {
    text-align: center;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* ----- Page admin ----- */
.admin-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-header h1 {
    color: var(--primary-dark);
    font-family: 'Playfair Display', serif;
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.admin-home-link {
    padding: 0.55rem 1.1rem;
    border-radius: 8px;
    border: 1.5px solid var(--primary-dark);
    background: #fff;
    color: var(--primary-dark);
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
}

.admin-home-link:hover {
    background: var(--primary-dark);
    color: #fff;
}

.admin-logout {
    padding: 0.55rem 1.1rem;
    border-radius: 8px;
    border: 1.5px solid var(--danger);
    background: #fff;
    color: var(--danger);
    font-weight: 600;
    cursor: pointer;
}

.admin-logout:hover {
    background: var(--danger);
    color: #fff;
}

.admin-table-wrap {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-section {
    margin-top: 2.5rem;
}

.admin-section-title {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.7rem;
}

.admin-section-title h2 {
    margin: 0;
    color: var(--primary-dark);
    font-size: 1.25rem;
}

.admin-section-title span,
.admin-note {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.admin-note {
    margin: 0 0 0.9rem;
    line-height: 1.45;
}

.presence {
    display: inline-block;
    font-weight: 700;
    font-size: 0.8rem;
}

.presence::before {
    content: '';
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    margin-right: 0.35rem;
}

.presence.online { color: var(--success); }
.presence.online::before { background: var(--success); }
.presence.offline { color: var(--text-secondary); }
.presence.offline::before { background: #9aa4af; }

.btn-delete {
    background: #4b5563;
    color: #fff;
}

.admin-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 0.9rem 1rem;
    text-align: left;
    border-bottom: 1px solid #eef1f4;
    font-size: 0.92rem;
}

.admin-table th {
    background: var(--light);
    color: var(--dark);
    font-weight: 700;
}

.status-pill {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.status-pill.pending {
    background: #fff3e0;
    color: var(--warning);
}

.status-pill.approved {
    background: #eaf6ec;
    color: var(--success);
}

.status-pill.rejected {
    background: #fdecea;
    color: var(--danger);
}

.admin-actions button {
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    border: none;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    margin-right: 0.4rem;
}

.btn-approve {
    background: var(--success);
    color: #fff;
}

.btn-reject {
    background: var(--danger);
    color: #fff;
}

.btn-revoke {
    background: var(--light);
    color: var(--dark);
    border: 1px solid #dfe3e8 !important;
}

.admin-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

/* ----- Version mobile : le tableau devient une liste de cartes ----- */
@media (max-width: 640px) {
    .admin-page {
        padding: 1.25rem 1rem 3rem;
    }

    .admin-header h1 {
        font-size: 1.3rem;
    }

    .admin-header-actions {
        width: 100%;
    }

    .admin-home-link,
    .admin-logout {
        width: 100%;
        padding: 0.7rem;
        text-align: center;
    }

    .admin-table-wrap {
        overflow-x: visible;
        background: transparent;
        box-shadow: none;
        border-radius: 0;
    }

    .admin-table {
        min-width: 0;
    }

    .admin-table thead {
        display: none;
    }

    .admin-table tbody {
        display: flex;
        flex-direction: column;
        gap: 0.9rem;
    }

    .admin-table tr {
        display: flex;
        flex-direction: column;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
        padding: 0.9rem 1rem;
    }

    /* Ligne "aucun compte" : pas de mise en forme carte, juste centree */
    .admin-table tr.admin-empty-row {
        background: transparent;
        box-shadow: none;
        padding: 0;
    }

    .admin-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding: 0.55rem 0;
        border-bottom: 1px solid #f0f2f5;
        font-size: 0.95rem;
        text-align: right;
    }

    .admin-table td:last-child {
        border-bottom: none;
    }

    .admin-table td[data-label]::before {
        content: attr(data-label);
        font-weight: 700;
        font-size: 0.78rem;
        color: var(--text-secondary);
        text-transform: uppercase;
        letter-spacing: 0.03em;
        text-align: left;
    }

    .admin-table td.admin-actions {
        flex-direction: column;
        align-items: stretch;
        padding-top: 0.7rem;
    }

    .admin-table td.admin-actions::before {
        margin-bottom: 0.5rem;
    }

    .admin-actions button {
        width: 100%;
        margin-right: 0;
        margin-bottom: 0.5rem;
        padding: 0.65rem;
        font-size: 0.9rem;
    }

    .admin-actions button:last-child {
        margin-bottom: 0;
    }
}
