/* NSIA ASSURANCES - FEUILLE DE STYLE AUTONOME PLATEFORME PARTENAIRES (INDIVIDUELLE ACCIDENT) */

:root {
    /* Couleurs Principales */
    --primary-color: #001A60;
    --nsia-blue: #001A60;
    --nsia-blue-light: #0d2c80;
    
    /* Couleurs d'Accentuation Or */
    --accent-color: #CF9E06;
    --accent-hover: #A67E05;
    --nsia-gold: #CF9E06;
    --nsia-gold-hover: #A67E05;
    --nsia-gold-soft: rgba(207, 158, 6, 0.12);

    /* Arrière-plans & Cartes */
    --bg-body: transparent;
    --bg-card: #ffffff;
    --nsia-gray-bg: transparent;

    /* Typographie & Bordures */
    --text-main: #1e293b;
    --text-muted: #64748b;
    --nsia-text: #1e293b;
    --nsia-text-muted: #64748b;
    --border-color: #cbd5e1;
    --nsia-border: #cbd5e1;

    /* Badges & Alertes */
    --nsia-red-stamp: #dc2626;
    --nsia-green: #16a34a;

    /* Rayons & Ombres */
    --radius-lg: 14px;
    --radius-md: 8px;
    --shadow-md: 0 10px 30px rgba(0, 26, 96, 0.06);
    --shadow-card: 0 10px 25px -5px rgba(0, 26, 96, 0.08), 0 8px 10px -6px rgba(0, 26, 96, 0.04);
    --transition: all 0.25s ease-in-out;
}

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

html {
    background: transparent !important;
    background-color: transparent !important;
    height: auto !important;
    min-height: 0 !important;
}

body {
    background: transparent !important;
    background-color: transparent !important;
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
    color: var(--text-main);
    min-height: auto !important;
    height: auto !important;
    line-height: 1.5;
    padding: 15px;
    margin: 0;
    display: flow-root;
}

/* --- STRUCTURE ET ALIGNEMENT DE L'AUTHENTIFICATION --- */
.auth-wrapper {
    display: flex;
    max-width: 900px;
    width: 100%;
    gap: 25px;
    margin: 30px auto;
    align-items: stretch;
}

.auth-box {
    flex: 1;
    margin: 0 auto !important;
    padding: 35px 30px !important;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border-top: 5px solid var(--primary-color);
}

.auth-header-clean {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 15px;
    width: 100%;
}

.auth-header-clean img {
    width: 50px !important;
    height: 50px !important;
    object-fit: contain;
}

.auth-header-clean .form-title {
    font-size: 22px !important;
    color: var(--primary-color);
    font-weight: 700;
}

/* Affichage / Masquage du mot de passe */
.password-container {
    position: relative;
    width: 100%;
}

.password-container input[type="password"],
.password-container input[type="text"] {
    width: 100%;
    padding-right: 45px;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--primary-color);
}

.password-toggle.visible svg {
    stroke: var(--accent-color);
}

/* --- STYLE STRUCTURÉ DU FORMULAIRE --- */
.form-container,
form.form-standalone {
    background: var(--bg-card);
    max-width: 850px;
    width: 100%;
    margin: 0 auto 30px auto;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border-top: 5px solid var(--primary-color);
}

.form-container form {
    background: transparent;
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    border-top: none;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.form-header,
.form-group.form-full:first-child {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    margin-bottom: 15px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 15px;
}

.form-header .logo,
.form-header img,
.form-group.form-full:first-child img {
    width: 55px;
    height: 55px;
    object-fit: contain;
    margin-bottom: 0;
}

.form-title {
    color: var(--primary-color);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 0;
}

/* Configuration 2 Colonnes */
.form-row {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    gap: 20px;
}

.form-row .col-2 {
    flex: 1;
    min-width: calc(50% - 10px) !important;
    width: calc(50% - 10px) !important;
}

.form-row .input-block {
    width: 100% !important;
}

.form-group {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.form-full { width: 100%; }
.col-2 { width: calc(50% - 10px); }
.col-3 { width: calc(33.333% - 13.4px); }

/* Blocs d'entrée avec badges */
.input-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 0;
    width: 100%;
}

.input-block label {
    display: inline-block;
    background-color: var(--primary-color);
    color: #ffffff !important;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 12px;
    border-radius: 6px;
    margin-bottom: 6px;
    margin-top: 0 !important;
}

/* Titres de sections */
h3, .section-title {
    color: var(--primary-color);
    font-size: 18px;
    font-weight: 600;
    margin: 20px 0 5px 0;
    width: 100%;
    border-left: 4px solid var(--accent-color);
    padding-left: 10px;
}

/* Champs de formulaire */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="date"],
select {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    color: var(--text-main);
    transition: var(--transition);
    outline: none;
    margin-bottom: 0;
    box-shadow: none;
}

input:focus, select:focus {
    background-color: #ffffff;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(207, 158, 6, 0.15);
}

label {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

input::placeholder {
    color: var(--text-muted);
}

optgroup {
    font-weight: 700;
    color: var(--primary-color);
}

/* Boutons */
.submit-btn {
    width: 100%;
    max-width: 240px;
    height: 48px;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0, 26, 96, 0.15);
    margin-top: 10px;
}

.submit-btn:hover {
    background-color: var(--accent-color);
    color: #001A60;
    box-shadow: 0 6px 15px rgba(207, 158, 6, 0.25);
    transform: translateY(-2px);
}

/* --- TABLEAU RÉCAPITULATIF PROPOSITION --- */
.result-table {
    width: 100%;
    max-width: 800px;
    margin: 30px auto 10px auto;
    border-collapse: collapse;
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    color: var(--text-main);
}

.result-table tr:first-child th {
    background-color: var(--primary-color);
    padding: 20px 22px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: none;
    width: 100%;
}

.result-table tr:first-child th img {
    width: 35px;
    height: 35px;
    margin-bottom: 0;
    margin-right: 0;
    object-fit: contain;
}

.result-table .recap-title {
    color: #ffffff;
    font-size: 19px;
    font-weight: 600;
    margin-bottom: 0;
}

.result-table tr {
    border-bottom: 1px solid #e2e8f0;
    transition: var(--transition);
}

.result-table th {
    font-weight: 600;
    color: var(--primary-color);
    background-color: #fafbfc;
    text-align: left;
    width: 38%;
    font-size: 14px;
    padding: 14px 22px;
}

.result-table td {
    padding: 14px 22px;
    text-align: left;
    border-bottom: none;
    font-size: 14px;
}

.result-table tr:nth-child(even) {
    background-color: #f8fafc;
}

.result-table tr:not(:first-child):hover {
    background-color: rgba(207, 158, 6, 0.08);
}

.result-table tr:last-child {
    background-color: rgba(0, 26, 96, 0.03);
}

.result-table tr:last-child th {
    background-color: transparent;
    color: var(--primary-color);
}

.result-table tr:last-child td,
.result-table strong {
    font-size: 17px;
    color: var(--primary-color);
    font-weight: 700;
}

.btn-payer {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--primary-color) !important;
    padding: 14px 35px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    border-radius: var(--radius-md);
    box-shadow: 0 5px 15px rgba(207, 158, 6, 0.35);
    transition: var(--transition);
    margin: 20px auto;
}

.btn-payer:hover {
    background-color: var(--primary-color);
    color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(0, 26, 96, 0.25);
    transform: translateY(-2px);
}

/* Dropdown checkboxes */
.dropdown-checkbox {
    position: relative;
    width: 250px;
    font-family: inherit;
}

.select-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    cursor: pointer;
    background-color: #fff;
}

.options-container {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid #cbd5e1;
    border-top: none;
    background-color: #fff;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    border-radius: 0 0 4px 4px;
}

.options-container label {
    display: block;
    padding: 8px 10px;
    cursor: pointer;
    transition: background 0.2s;
    background-color: transparent !important;
    color: var(--text-main) !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    border-radius: 0 !important;
    margin-bottom: 0 !important;
    margin-top: 0 !important;
}

.options-container label:hover {
    background-color: #cbd5e1 !important;
}

.options-container.show {
    display: block;
}

/* --- BARRE DE NAVIGATION PARTENAIRE (HEADER) --- */
.partner-nav {
    width: 100%;
    max-width: 950px;
    margin: 0 auto 20px auto;
    background: #ffffff;
    border-radius: 12px;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 15px rgba(0, 26, 96, 0.05);
    border-left: 5px solid var(--nsia-gold);
}

.partner-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.partner-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--nsia-blue);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    border: 2px solid var(--nsia-gold);
}

.partner-details h4 {
    margin: 0;
    font-size: 15px;
    color: var(--nsia-blue);
    font-weight: 700;
}

.partner-details p {
    margin: 2px 0 0 0;
    font-size: 13px;
    color: var(--nsia-text-muted);
}

.partner-badge-type {
    display: inline-block;
    padding: 2px 8px;
    background: var(--nsia-gold-soft);
    color: #855b00;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    margin-left: 6px;
}

.partner-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--nsia-blue);
    text-decoration: none;
    background: #f1f5f9;
    border-radius: 6px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-nav-link:hover {
    background: var(--nsia-blue);
    color: #ffffff;
}

.btn-nav-logout {
    color: #dc2626;
    background: #fee2e2;
}

.btn-nav-logout:hover {
    background: #dc2626;
    color: #ffffff;
}

/* --- SECTION DE SÉLECTION DES PROPOSITIONS NSIACARE --- */
.propositions-wrapper {
    width: 100%;
    max-width: 950px;
    margin: 10px auto 30px auto;
}

.propositions-header {
    text-align: center;
    margin-bottom: 25px;
}

.propositions-header h2 {
    color: var(--nsia-blue);
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 8px;
}

.propositions-header p {
    color: var(--nsia-text-muted);
    font-size: 15px;
}

.propositions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

@media (max-width: 768px) {
    .propositions-grid {
        grid-template-columns: 1fr;
    }
}

.proposition-card {
    background: #ffffff;
    border-radius: 14px;
    border: 2px solid #e2e8f0;
    padding: 30px 25px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.proposition-card:hover {
    border-color: var(--nsia-gold);
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(207, 158, 6, 0.15);
}

.proposition-card.active {
    border-color: var(--nsia-blue);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 26, 96, 0.15), var(--shadow-card);
}

.proposition-badge-rec {
    position: absolute;
    top: -12px;
    right: 20px;
    background: linear-gradient(135deg, #CF9E06, #E0B429);
    color: #001A60;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(207, 158, 6, 0.3);
}

.prop-title-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.prop-title {
    color: var(--nsia-blue);
    font-size: 22px;
    font-weight: 800;
    margin: 0;
}

.prop-formula-tag {
    font-size: 12px;
    font-weight: 700;
    background: #f1f5f9;
    color: var(--nsia-blue);
    padding: 3px 8px;
    border-radius: 4px;
}

.prop-price-box {
    margin: 15px 0 20px 0;
    padding: 15px;
    background: #fafbfc;
    border-radius: 8px;
    border-left: 4px solid var(--nsia-gold);
}

.prop-price {
    font-size: 28px;
    font-weight: 800;
    color: var(--nsia-blue);
    line-height: 1;
}

.prop-period {
    font-size: 13px;
    color: var(--nsia-text-muted);
    font-weight: 500;
}

.prop-details-breakdown {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: var(--nsia-text-muted);
    border-top: 1px dashed #e2e8f0;
    padding-top: 6px;
}

.prop-features-list {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
}

.prop-features-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--nsia-text);
}

.prop-features-list li .icon-check {
    color: var(--nsia-green);
    font-weight: bold;
    font-size: 16px;
    line-height: 1.2;
}

.prop-features-list li strong {
    color: var(--nsia-blue);
}

.btn-select-prop {
    width: 100%;
    padding: 13px;
    background: #f1f5f9;
    color: var(--nsia-blue);
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
}

.proposition-card.active .btn-select-prop,
.proposition-card:hover .btn-select-prop {
    background: var(--nsia-blue);
    color: #ffffff;
}

/* --- BANNER DE SÉLECTION RAPIDE DANS LE FORMULAIRE --- */
.formula-switch-bar {
    width: 100%;
    background: #f8fafc;
    border: 1px solid var(--nsia-border);
    border-radius: 10px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
}

.formula-switch-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.formula-switch-badge {
    background: var(--nsia-blue);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
}

.formula-switch-pills {
    display: flex;
    background: #e2e8f0;
    padding: 4px;
    border-radius: 8px;
    gap: 4px;
}

.pill-option {
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    background: transparent;
    color: var(--nsia-text-muted);
    transition: all 0.2s ease;
}

.pill-option.active {
    background: #ffffff;
    color: var(--nsia-blue);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* --- POLICE / PROPOSITION NUMBER STAMP --- */
.stamp-police-num {
    font-family: 'Courier New', Courier, monospace;
    color: var(--nsia-red-stamp);
    font-weight: 800;
    font-size: 22px;
    letter-spacing: 2px;
}

/* --- BOX RÉCAPITULATIF PRIME AU COMPTANT --- */
.prime-calc-box {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 20px;
    width: 100%;
}

.prime-calc-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--nsia-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    border-bottom: 2px solid var(--nsia-gold);
    padding-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.prime-calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    text-align: center;
}

@media (max-width: 768px) {
    .prime-calc-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.prime-item {
    background: #ffffff;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.prime-item .label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--nsia-text-muted);
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.prime-item .value {
    font-size: 16px;
    font-weight: 800;
    color: var(--nsia-blue);
}

.prime-item.total {
    background: var(--nsia-blue);
    border-color: var(--nsia-blue);
}

.prime-item.total .label {
    color: var(--nsia-gold);
}

.prime-item.total .value {
    color: #ffffff;
    font-size: 18px;
}

/* --- TABLEAU DES GARANTIES & INDEMNITÉS (DANS FORMULAIRE) --- */
.table-garanties {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0 25px 0;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--nsia-border);
}

.table-garanties th {
    background: var(--nsia-blue);
    color: #ffffff;
    padding: 10px 14px;
    font-size: 13px;
    text-align: left;
    font-weight: 600;
}

.table-garanties td {
    padding: 10px 14px;
    font-size: 14px;
    border-bottom: 1px solid #f1f5f9;
}

.table-garanties tr:last-child td {
    border-bottom: none;
    background: #f8fafc;
    font-weight: 700;
}

.amount-highlight {
    font-weight: 800;
    color: var(--nsia-blue);
    text-align: right;
}

/* --- STYLES DES RADIOS / CASES À COCHER POUR LE RISQUE --- */
.radio-pill-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.radio-pill {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #f1f5f9;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--nsia-text);
    transition: all 0.2s ease;
    user-select: none;
}

.radio-pill input[type="radio"],
.radio-pill input[type="checkbox"] {
    accent-color: var(--nsia-blue);
}

.radio-pill:hover {
    background: #e2e8f0;
}

/* --- CONDITIONS PARTICULIÈRES IMPRIMABLES (PRINT / CONTRAT) --- */
.printable-contract {
    background: #ffffff;
    width: 100%;
    max-width: 850px;
    margin: 20px auto;
    padding: 30px;
    border: 2px solid #001A60;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    font-family: Arial, sans-serif;
    color: #111;
}

.contract-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #001A60;
    padding-bottom: 12px;
    margin-bottom: 15px;
}

.contract-title-center {
    text-align: center;
}

.contract-title-center h1 {
    font-size: 26px;
    color: #001A60;
    margin: 0;
    letter-spacing: 1px;
}

.contract-title-center h2 {
    font-size: 14px;
    color: #333;
    font-weight: 700;
    margin: 4px 0 0 0;
    letter-spacing: 0.5px;
}

.contract-grid-top {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 15px;
    margin-bottom: 15px;
}

.contract-left-info {
    font-size: 13px;
    line-height: 1.6;
}

.contract-left-info .info-row {
    display: flex;
    margin-bottom: 4px;
}

.contract-left-info .info-label {
    font-weight: bold;
    min-width: 140px;
    color: #001A60;
}

.contract-left-info .info-val {
    flex: 1;
    border-bottom: 1px dotted #666;
}

.contract-decompte-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    border: 1px solid #001A60;
}

.contract-decompte-table th,
.contract-decompte-table td {
    border: 1px solid #001A60;
    padding: 5px 8px;
}

.contract-decompte-table th {
    background: #f0f4f8;
    color: #001A60;
    text-align: center;
    font-weight: bold;
}

.contract-signatures {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 10px;
}

.sig-box {
    text-align: center;
    width: 45%;
    font-weight: bold;
    font-size: 13px;
    color: #001A60;
}

.sig-space {
    height: 70px;
}

.contract-footer-legal {
    margin-top: 25px;
    border-top: 1px solid #999;
    padding-top: 8px;
    font-size: 9px;
    color: #555;
    text-align: center;
    line-height: 1.4;
}

@media print {
    body {
        background: #ffffff !important;
        padding: 0 !important;
    }
    .partner-nav,
    .no-print,
    .btn-payer,
    .formula-switch-bar {
        display: none !important;
    }
    .printable-contract {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        max-width: 100% !important;
    }
}

/* --- STYLES BACK-END SUIVI PARTENAIRES --- */
.backend-container {
    max-width: 1100px;
    width: 100%;
    margin: 20px auto;
}

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

@media (max-width: 900px) {
    .kpi-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.kpi-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-card);
    border-top: 4px solid var(--nsia-blue);
}

.kpi-card.gold {
    border-top-color: var(--nsia-gold);
}

.kpi-card .kpi-label {
    font-size: 13px;
    color: var(--nsia-text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.kpi-card .kpi-number {
    font-size: 24px;
    font-weight: 800;
    color: var(--nsia-blue);
    margin: 8px 0 4px 0;
}

.badge-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-en_attente {
    background: #fef3c7;
    color: #92400e;
}

.badge-paye {
    background: #dcfce7;
    color: #15803d;
}

.badge-valide {
    background: #dbeafe;
    color: #1e40af;
}

.badge-annule {
    background: #fee2e2;
    color: #b91c1c;
}

.alert-error {
    background: #fee2e2;
    border-left: 4px solid #dc2626;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
}

.auth-subtitle {
    font-size: 13px;
    color: var(--nsia-text-muted);
    margin: 4px 0 0 0;
}

.auth-login-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    margin-top: 20px;
    gap: 16px;
}

.auth-login-footer .submit-btn {
    width: auto;
    min-width: 180px;
    max-width: 100%;
    margin-top: 0;
    margin-left: auto;
}

.auth-footer-links {
    text-align: left;
}

.back-link {
    color: var(--nsia-text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.back-link:hover {
    color: var(--nsia-blue);
}
