@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;800;900&family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --navy:       #0B1E3D;
    --navy-mid:   #15294f;
    --navy-light: #1c3766;
    --gold:       #C9A961;
    --gold-soft:  rgba(201, 169, 97, 0.14);
    --gold-deep:  #b3924f;
    --off-white:  #F2F4F8;
    --ink:        #0B1E3D;
    --muted:      #6b7280;
    --border:     #E7EAF1;
    --success:    #0f8a5f;
    --success-bg: #e6f8f1;
    --danger:     #C8102E;
    --danger-bg:  #fdeaec;
    --warning:    #b7791f;
    --warning-bg: #FBF3E7;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--off-white);
    color: var(--ink);
    line-height: 1.6;
    min-height: 100vh;
}

h1, h2, h3 { font-family: 'Playfair Display', serif; }

/* Navigation */
.navbar {
    background: var(--navy);
    color: #fff;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(11, 30, 61, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand a {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 0.2px;
}

.nav-menu {
    display: flex;
    gap: 0.5rem;
}

.nav-menu a {
    color: #b9c3d9;
    text-decoration: none;
    padding: 0.7rem 1.4rem;
    border-radius: 10px;
    transition: all 0.25s;
    font-weight: 600;
    font-size: 0.92rem;
}

.nav-menu a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.nav-menu a.active {
    background: var(--gold-soft);
    border: 1px solid rgba(201, 169, 97, 0.4);
    color: #fff;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-user span {
    color: #b9c3d9;
    font-weight: 500;
    font-size: 0.92rem;
}

/* Container */
.container {
    max-width: 2000px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: #fff;
    padding: 1.8rem 2rem;
    border-radius: 18px;
    box-shadow: 0 4px 20px rgba(11, 30, 61, 0.06);
    border-top: 3px solid var(--gold);
}

.page-header h1 {
    color: var(--navy);
    font-size: 2rem;
    font-weight: 800;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #fff;
    padding: 1.8rem;
    border-radius: 18px;
    box-shadow: 0 4px 20px rgba(11, 30, 61, 0.06);
    text-align: center;
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gold);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 32px rgba(11, 30, 61, 0.12);
}

.stat-card h3 {
    color: var(--navy);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.stat-value {
    font-family: 'Playfair Display', serif;
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 0.4rem;
}

.stat-label {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.stat-details {
    margin-top: 1.4rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    font-size: 0.88rem;
    color: var(--muted);
    font-weight: 600;
}

/* Progress Card (Client Dashboard) */
.progress-card {
    background: #fff;
    padding: 1.8rem;
    border-radius: 18px;
    box-shadow: 0 4px 20px rgba(11, 30, 61, 0.06);
    margin-bottom: 2rem;
}

.progress-card h2 {
    color: var(--navy);
    margin-bottom: 1.8rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.progress-steps {
    display: grid;
    gap: 1.2rem;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    padding: 1.3rem 1.4rem;
    background: var(--off-white);
    border-radius: 14px;
    transition: all 0.25s;
    border: 2px solid transparent;
}

.progress-step.completed {
    background: var(--success-bg);
    border-color: var(--success);
}

.progress-step:hover {
    transform: translateX(4px);
}

.step-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    background: #fff;
    color: var(--navy);
    box-shadow: 0 4px 12px rgba(11, 30, 61, 0.08);
    flex-shrink: 0;
}

.progress-step.completed .step-icon {
    background: var(--success);
    color: #fff;
}

.step-content {
    flex: 1;
}

.step-content h3 {
    color: var(--navy);
    margin-bottom: 0.4rem;
    font-weight: 700;
    font-size: 1.05rem;
}

.step-content p {
    color: var(--muted);
    font-size: 0.9rem;
}

.step-status {
    padding: 0.45rem 0.9rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.step-status.completed {
    background: var(--success-bg);
    color: var(--success);
}

.step-status.pending {
    background: var(--danger-bg);
    color: var(--danger);
}

/* Info Card (Client Dashboard) */
.info-card {
    background: #fff;
    padding: 1.8rem;
    border-radius: 18px;
    box-shadow: 0 4px 20px rgba(11, 30, 61, 0.06);
}

.info-card h2 {
    color: var(--navy);
    margin-bottom: 1.4rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.2rem;
}

.info-item {
    padding: 1.2rem 1.4rem;
    background: var(--off-white);
    border-radius: 12px;
    border-left: 4px solid var(--gold);
}

.info-item label {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}

.info-item .value {
    color: var(--navy);
    font-size: 1.1rem;
    font-weight: 700;
}

/* Table */
.table-container {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 20px rgba(11, 30, 61, 0.06);
    overflow: hidden;
    margin-bottom: 2rem;
}

.gestionnaire-title {
    padding: 1.3rem 1.8rem;
    background: var(--navy);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.15rem;
    font-weight: 700;
}

.gestionnaire-title .badge {
    background: var(--gold-soft);
    border: 1px solid var(--gold);
    color: var(--gold);
}

.table-wrapper {
    overflow-x: auto;
}

.table-wrapper::-webkit-scrollbar {
    height: 10px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: var(--off-white);
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 10px;
}

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

.table thead {
    background: var(--off-white);
}

.table th,
.table td {
    padding: 1.1rem 1.2rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: var(--navy);
}

.table tbody tr {
    transition: all 0.2s;
}

.table tbody tr:hover {
    background: var(--gold-soft);
}

.no-data {
    text-align: center;
    padding: 3rem;
    color: var(--muted);
    font-style: italic;
    font-size: 1.05rem;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-oui {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(15, 138, 95, 0.25);
}

.badge-non {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(200, 16, 46, 0.25);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.25s;
    text-decoration: none;
    display: inline-block;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--gold);
}

.btn-primary:hover {
    background: var(--navy-mid);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(11, 30, 61, 0.3);
}

.btn-secondary {
    background: #fff;
    border-color: var(--border);
    color: var(--navy);
}

.btn-secondary:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
}

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

.btn-danger:hover {
    background: #a80d24;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(200, 16, 46, 0.3);
}

.btn-warning {
    background: var(--gold);
    color: var(--navy);
}

.btn-warning:hover {
    background: var(--gold-deep);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(201, 169, 97, 0.4);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn-block {
    width: 100%;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(11, 30, 61, 0.55);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.25s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: #fff;
    margin: 2% auto;
    padding: 2.4rem;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 24px 60px rgba(11, 30, 61, 0.35);
    animation: slideDown 0.25s;
    border-top: 4px solid var(--gold);
}

@keyframes slideDown {
    from { transform: translateY(-40px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.close {
    color: #a8b2c7;
    float: right;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.25s;
    line-height: 1;
}

.close:hover {
    color: var(--danger);
    transform: rotate(90deg);
}

.modal h2 {
    color: var(--navy);
    margin-bottom: 1.8rem;
    font-size: 1.6rem;
    font-weight: 700;
}

/* Forms */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.4rem;
    margin-bottom: 1.4rem;
}

.form-group {
    margin-bottom: 1.4rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--navy);
    font-weight: 600;
    font-size: 0.88rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.85rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 0.92rem;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    color: var(--ink);
    background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 4px var(--gold-soft);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.8rem;
    padding-top: 1.8rem;
    border-top: 1px solid var(--border);
}

/* Alerts */
.alert {
    padding: 1.1rem 1.3rem;
    border-radius: 12px;
    margin-bottom: 1.4rem;
    animation: slideIn 0.25s;
    font-weight: 500;
}

@keyframes slideIn {
    from { transform: translateX(-16px); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

.alert-success {
    background: var(--success-bg);
    color: #1a4a35;
    border-left: 4px solid var(--success);
}

.alert-error {
    background: var(--danger-bg);
    color: #7a1626;
    border-left: 4px solid var(--danger);
}

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(150deg, var(--navy) 0%, var(--navy-mid) 55%, var(--navy-light) 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    right: -80px;
    top: -80px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(201, 169, 97, 0.18), transparent 70%);
}

.login-container {
    width: 100%;
    max-width: 460px;
    padding: 2rem;
    position: relative;
}

.login-box {
    background: #fff;
    padding: 2.8rem;
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    border-top: 4px solid var(--gold);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 0.4rem;
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--navy);
}

.subtitle {
    text-align: center;
    color: var(--muted);
    margin-bottom: 2.2rem;
    font-size: 0.92rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
    }

    .nav-menu a {
        text-align: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

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

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