/* =============================================================
   Comparateur de Banques – Comores
   Palette : #0f172a hero · #1e40af primaire · accents par banque
   ============================================================= */

:root {
    --cb-bg: #f1f5f9;
    --cb-primary: #1e40af;
    --cb-card: #ffffff;
    --cb-radius: 1.1rem;
    --cb-shadow: 0 4px 24px rgba(0,0,0,.08);
}

/* ── Base page ──────────────────────────────────────────────── */
.cb-page {
    background: var(--cb-bg);
    min-height: 100vh;
    padding: 0 0 5rem;
    font-family: 'Inter', system-ui, sans-serif;
    color: #1e293b;
}

/* ── Hero ───────────────────────────────────────────────────── */
.cb-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1d4ed8 100%);
    padding: 3.5rem 2rem 5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cb-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.cb-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 2rem;
    padding: .4rem 1rem;
    font-size: .78rem;
    color: #93c5fd;
    font-weight: 600;
    letter-spacing: .03em;
    margin-bottom: 1.25rem;
    position: relative;
}
.cb-hero h1 {
    color: #fff;
    font-size: clamp(1.7rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: .75rem;
    position: relative;
}
.cb-hero h1 span {
    background: linear-gradient(90deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.cb-hero p {
    color: rgba(255,255,255,.72);
    font-size: 1rem;
    max-width: 560px;
    margin: 0 auto 0;
    position: relative;
}
.cb-hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    position: relative;
}
.cb-hero-stat {
    text-align: center;
}
.cb-hero-stat .val {
    font-size: 1.6rem;
    font-weight: 800;
    color: #60a5fa;
}
.cb-hero-stat .lbl {
    font-size: .75rem;
    color: rgba(255,255,255,.55);
    margin-top: .1rem;
}

/* ── Form card ──────────────────────────────────────────────── */
.cb-form-wrap {
    max-width: 860px;
    margin: -2.5rem auto 0;
    padding: 0 1.25rem;
    position: relative;
    z-index: 10;
}
.cb-form-card {
    background: #fff;
    border-radius: 1.4rem;
    box-shadow: 0 8px 40px rgba(0,0,0,.12);
    padding: 2.25rem 2rem;
}
.cb-form-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: .6rem;
}
.cb-form-title i { color: var(--cb-primary); }

.cb-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.25rem;
}
@media (max-width: 700px) {
    .cb-form-grid { grid-template-columns: 1fr; }
}

.cb-field label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: .45rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.cb-field select,
.cb-field input[type="number"],
.cb-field input[type="text"] {
    width: 100%;
    padding: .65rem .9rem;
    border: 1.5px solid #e2e8f0;
    border-radius: .6rem;
    font-size: .95rem;
    color: #1e293b;
    background: #f8fafc;
    transition: border-color .18s, box-shadow .18s;
    box-sizing: border-box;
}
.cb-field select:focus,
.cb-field input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
    background: #fff;
}

/* Durée range */
.cb-range-wrap {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}
.cb-range-val {
    font-size: 1rem;
    font-weight: 700;
    color: var(--cb-primary);
    text-align: center;
}
.cb-range {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, #1e40af 50%, #e2e8f0 50%);
    outline: none;
    cursor: pointer;
}
.cb-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px; height: 20px;
    background: #1e40af;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(30,64,175,.35);
    cursor: pointer;
}
.cb-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: .72rem;
    color: #94a3b8;
}

.cb-btn-compare {
    width: 100%;
    margin-top: 1.75rem;
    padding: .95rem;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: .75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    transition: opacity .18s, transform .12s;
    box-shadow: 0 4px 16px rgba(30,64,175,.3);
    letter-spacing: .01em;
}
.cb-btn-compare:hover { opacity: .92; transform: translateY(-1px); }
.cb-btn-compare:active { transform: translateY(0); }

/* ── Results container ──────────────────────────────────────── */
.cb-results {
    max-width: 1200px;
    margin: 2.5rem auto 0;
    padding: 0 1.25rem;
    display: none;
}
.cb-results.visible { display: block; }

/* Summary strip */
.cb-summary-strip {
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
    border-radius: 1rem;
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    color: #fff;
}
.cb-summary-strip .s-label {
    font-size: .78rem;
    color: rgba(255,255,255,.55);
    text-transform: uppercase;
    letter-spacing: .06em;
}
.cb-summary-strip .s-val {
    font-size: 1.25rem;
    font-weight: 800;
    color: #60a5fa;
}
.cb-upd {
    font-size: .75rem;
    color: rgba(255,255,255,.45);
    text-align: right;
}
.cb-upd b { color: #fbbf24; }

/* Section title */
.cb-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin: 2rem 0 1.25rem;
    display: flex;
    align-items: center;
    gap: .6rem;
}
.cb-section-title::after {
    content: '';
    flex: 1;
    height: 1.5px;
    background: linear-gradient(90deg, #e2e8f0, transparent);
    margin-left: .75rem;
}

/* ── Bank Cards grid ──────────────────────────────────────── */
.cb-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

.cb-bank-card {
    background: #fff;
    border-radius: var(--cb-radius);
    box-shadow: var(--cb-shadow);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
    position: relative;
    border: 2px solid transparent;
}
.cb-bank-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,.14);
}
.cb-bank-card.best {
    border-color: #16a34a;
    box-shadow: 0 8px 32px rgba(22,163,74,.18);
}

/* Card top accent bar */
.cb-card-top {
    height: 6px;
    width: 100%;
}

/* Best badge */
.cb-best-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    padding: .28rem .7rem;
    border-radius: 2rem;
    letter-spacing: .04em;
    display: flex;
    align-items: center;
    gap: .3rem;
    z-index: 2;
}

/* Card header */
.cb-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem .75rem;
}
.cb-card-icon {
    width: 52px; height: 52px;
    border-radius: .75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    flex-shrink: 0;
}
.cb-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}
.cb-card-type {
    font-size: .75rem;
    color: #94a3b8;
    margin-top: .1rem;
}

/* Rate display */
.cb-rate-box {
    margin: .5rem 1.5rem;
    background: #f8fafc;
    border-radius: .75rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cb-rate-main {
    font-size: 2.4rem;
    font-weight: 900;
    line-height: 1;
}
.cb-rate-pct {
    font-size: 1.1rem;
    font-weight: 700;
    opacity: .7;
    margin-left: .1rem;
}
.cb-rate-label {
    font-size: .72rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.cb-mensualite {
    text-align: right;
}
.cb-mensualite .val {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
}
.cb-mensualite .lbl {
    font-size: .72rem;
    color: #94a3b8;
}

/* Costs breakdown */
.cb-costs {
    padding: .75rem 1.5rem;
    border-top: 1px solid #f1f5f9;
}
.cb-cost-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .4rem 0;
    font-size: .85rem;
    border-bottom: 1px dashed #f1f5f9;
}
.cb-cost-row:last-child { border-bottom: none; }
.cb-cost-label { color: #64748b; }
.cb-cost-val { font-weight: 600; color: #1e293b; }
.cb-cost-total {
    background: #f0fdf4;
    border-radius: .5rem;
    padding: .6rem .9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: .5rem;
    border: 1.5px solid #bbf7d0;
}
.cb-cost-total .label { font-weight: 700; color: #15803d; font-size: .88rem; }
.cb-cost-total .val { font-weight: 800; color: #16a34a; font-size: 1rem; }

/* Guarantees */
.cb-guarantees {
    padding: .75rem 1.5rem;
    border-top: 1px solid #f1f5f9;
}
.cb-guarantees-title {
    font-size: .75rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: .6rem;
}
.cb-guarantee-tag {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .75rem;
    padding: .25rem .65rem;
    border-radius: 2rem;
    margin: .2rem .2rem 0 0;
    font-weight: 500;
}

/* Avantages / Inconvénients */
.cb-pros-cons {
    padding: .75rem 1.5rem 1.5rem;
    border-top: 1px solid #f1f5f9;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
}
.cb-pros-title, .cb-cons-title {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .45rem;
}
.cb-pros-title { color: #16a34a; }
.cb-cons-title { color: #dc2626; }
.cb-pros li, .cb-cons li {
    font-size: .78rem;
    color: #475569;
    padding: .2rem 0;
    list-style: none;
    display: flex;
    gap: .35rem;
    align-items: flex-start;
    line-height: 1.4;
}
.cb-pros li::before {
    content: '✓';
    color: #16a34a;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: .05rem;
}
.cb-cons li::before {
    content: '✗';
    color: #ef4444;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: .05rem;
}

/* ── Comparison table ────────────────────────────────────── */
.cb-table-wrap {
    background: #fff;
    border-radius: var(--cb-radius);
    box-shadow: var(--cb-shadow);
    overflow-x: auto;
    margin-top: 1.5rem;
}
.cb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
}
.cb-table thead th {
    background: #0f172a;
    color: rgba(255,255,255,.85);
    padding: .85rem 1rem;
    text-align: left;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    white-space: nowrap;
}
.cb-table thead th:first-child { border-radius: .5rem 0 0 0; }
.cb-table thead th:last-child { border-radius: 0 .5rem 0 0; }
.cb-table tbody tr { border-bottom: 1px solid #f1f5f9; }
.cb-table tbody tr:last-child { border-bottom: none; }
.cb-table tbody tr:hover { background: #f8fafc; }
.cb-table tbody td { padding: .75rem 1rem; color: #334155; vertical-align: middle; }
.cb-table .best-row { background: #f0fdf4; }
.cb-table .best-row td { color: #166534; }

.cb-tbl-bank {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-weight: 600;
}
.cb-tbl-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.tbl-best-badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    background: #dcfce7;
    color: #16a34a;
    font-size: .68rem;
    font-weight: 700;
    padding: .15rem .5rem;
    border-radius: 2rem;
    margin-left: .5rem;
}

.cb-rank-1 { color: #f59e0b; font-weight: 800; }
.cb-rank-2 { color: #94a3b8; font-weight: 700; }
.cb-rank-3 { color: #b45309; font-weight: 700; }

/* ── Update note ─────────────────────────────────────────── */
.cb-update-note {
    background: #fefce8;
    border: 1.5px solid #fde68a;
    border-radius: .75rem;
    padding: 1rem 1.5rem;
    margin-top: 2rem;
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    font-size: .84rem;
    color: #92400e;
}
.cb-update-note i { font-size: 1.1rem; margin-top: .1rem; flex-shrink: 0; }

/* ── Animations ──────────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.cb-anim { animation: fadeUp .4s ease both; }
.cb-anim-1 { animation-delay: .05s; }
.cb-anim-2 { animation-delay: .10s; }
.cb-anim-3 { animation-delay: .15s; }
.cb-anim-4 { animation-delay: .20s; }
.cb-anim-5 { animation-delay: .25s; }
.cb-anim-6 { animation-delay: .30s; }

/* Mobile tweaks */
@media (max-width: 600px) {
    .cb-hero { padding: 2.5rem 1.25rem 4rem; }
    .cb-form-card { padding: 1.5rem 1.25rem; }
    .cb-cards-grid { grid-template-columns: 1fr; }
    .cb-pros-cons { grid-template-columns: 1fr; }
    .cb-summary-strip { flex-direction: column; text-align: center; }
}
