/* ====================================================
   BILAN SANGUIN - STYLES MODERNES
   ==================================================== */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 15px;
    color: #2c3e50;
    background: linear-gradient(135deg, #e8f0fe 0%, #f0e6f6 100%);
    min-height: 100vh;
    line-height: 1.5;
}

/* ====================================================
   CONTENEUR PRINCIPAL
   ==================================================== */
.bs-container {
    max-width: 820px;
    margin: 20px auto 40px;
    padding: 0 15px;
}

/* ====================================================
   EN-TÊTE
   ==================================================== */
.bs-header {
    text-align: center;
    padding: 25px 20px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 14px 14px 0 0;
    color: white;
}

.bs-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.bs-subtitle {
    font-size: 13px;
    opacity: 0.85;
    font-weight: 400;
}

/* ====================================================
   SECTIONS
   ==================================================== */
.bs-section {
    background: #fff;
    padding: 18px 22px;
    border-left: 1px solid #e0e6ed;
    border-right: 1px solid #e0e6ed;
    border-bottom: 1px solid #eef1f5;
}

.bs-section:last-of-type {
    border-bottom: 1px solid #e0e6ed;
}

.bs-section-highlight {
    background: linear-gradient(135deg, #f8f4ff, #f0eaff);
    border-left-color: #d4c8f0;
    border-right-color: #d4c8f0;
}

.bs-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #667eea;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #eef1f5;
}

.bs-section-highlight .bs-section-title {
    color: #764ba2;
    border-bottom-color: #e0d4f5;
}

/* ====================================================
   CHAMPS DE SAISIE
   ==================================================== */
.bs-field-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.bs-field-row label {
    font-weight: 600;
    font-size: 13.5px;
    color: #34495e;
    white-space: nowrap;
}

input[type="text"],
input[type="date"] {
    padding: 8px 12px;
    border: 1.5px solid #d0d7de;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #2c3e50;
    background: #fafbfc;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="date"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.bs-input-wide {
    flex: 1;
    min-width: 0;
}

.bs-input-mini {
    width: 60px;
    padding: 5px 8px;
    border: 1.5px solid #d0d7de;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
    font-family: inherit;
    color: #2c3e50;
    background: #fafbfc;
}

.bs-input-mini:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

/* ====================================================
   CHIPS (ALD, Domicile)
   ==================================================== */
.bs-options-row {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.bs-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #f0f4f8;
    border: 1.5px solid #d0d7de;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #4a5568;
    transition: all 0.2s;
}

.bs-chip:hover {
    background: #e8eef5;
    border-color: #667eea;
}

.bs-chip:has(input:checked) {
    background: #eef0ff;
    border-color: #667eea;
    color: #4338ca;
}

.bs-chip input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #667eea;
    cursor: pointer;
}

/* ====================================================
   BOUTONS PRÉ-THÉRAPEUTIQUES
   ==================================================== */
.bs-presets {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.bs-preset-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #fff;
    border: 2px solid #d4c8f0;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #5b21b6;
    transition: all 0.2s;
    flex: 1;
    min-width: 200px;
}

.bs-preset-btn:hover {
    background: #f5f0ff;
    border-color: #a78bfa;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(118, 75, 162, 0.15);
}

.bs-preset-btn:has(input:checked) {
    background: #ede9fe;
    border-color: #8b5cf6;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
}

.bs-preset-btn input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #7c3aed;
    cursor: pointer;
}

/* ====================================================
   GRILLE DE CHECKBOXES
   ==================================================== */
.bs-checks-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.bs-check-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #fafbfc;
    border: 1px solid #e8ecf0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 13.5px;
    color: #2c3e50;
}

.bs-check-item:hover {
    background: #f0f4ff;
    border-color: #c5cee8;
}

.bs-check-item:has(input:checked) {
    background: #eef2ff;
    border-color: #667eea;
    color: #3730a3;
    font-weight: 600;
}

.bs-check-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #667eea;
    cursor: pointer;
    flex-shrink: 0;
}

/* ====================================================
   SOUS-OPTIONS (Fréquence NFS)
   ==================================================== */
.bs-sub-options {
    display: none;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding: 12px 14px;
    background: #f8f9fb;
    border: 1px dashed #c5cee8;
    border-radius: 8px;
}

.bs-sub-label {
    font-weight: 600;
    font-size: 12.5px;
    color: #4a5568;
    margin-right: 4px;
}

.bs-radio-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    background: #fff;
    border: 1.5px solid #d0d7de;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 500;
    color: #4a5568;
    transition: all 0.2s;
}

.bs-radio-pill:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.bs-radio-pill:has(input:checked) {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.bs-radio-pill input[type="radio"] {
    display: none;
}

.bs-unit {
    font-size: 12.5px;
    color: #667;
    font-weight: 500;
}

/* ====================================================
   BOUTONS D'ACTION
   ==================================================== */
.bs-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding: 20px 22px 25px;
    background: #fff;
    border: 1px solid #e0e6ed;
    border-top: none;
    border-radius: 0 0 14px 14px;
}

.bs-btn {
    padding: 11px 28px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.bs-btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.bs-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.bs-btn-secondary {
    background: #f0f4f8;
    color: #4a5568;
    border: 1.5px solid #d0d7de;
}

.bs-btn-secondary:hover {
    background: #e8ecf0;
    border-color: #b0b8c4;
}

/* ====================================================
   IMPRESSION
   ==================================================== */
@media print {
    body {
        background: white;
        font-size: 12px;
    }

    .menu,
    .bs-actions {
        display: none !important;
    }

    .bs-container {
        margin: 0;
        max-width: 100%;
    }

    .bs-header {
        background: #555 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        border-radius: 0;
        padding: 12px;
    }

    .bs-section {
        padding: 10px 15px;
        border-left: none;
        border-right: none;
    }

    .bs-check-item,
    .bs-preset-btn,
    .bs-chip {
        border-color: #ccc;
        background: none;
        padding: 4px 8px;
    }

    .bs-checks-grid {
        gap: 3px;
    }
}

/* ====================================================
   RESPONSIVE
   ==================================================== */
@media screen and (max-width: 600px) {
    .bs-checks-grid {
        grid-template-columns: 1fr;
    }

    .bs-presets {
        flex-direction: column;
    }

    .bs-preset-btn {
        min-width: auto;
    }

    .bs-sub-options {
        flex-direction: column;
        align-items: flex-start;
    }

    .bs-field-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .bs-input-wide {
        width: 100%;
    }

    .bs-actions {
        flex-direction: column;
    }

    .bs-btn {
        width: 100%;
    }
}
