/* ============================================================
   CALCULATEURS SECONDAIRES — CSS plugin
   Couleur principale : linear-gradient(135deg, #003D99 0%, #0052CC 60%, #0065E0 100%)
   ============================================================ */

:root {
    --sc2-grad: linear-gradient(135deg, #003D99 0%, #0052CC 60%, #0065E0 100%);
    --sc2-color: #0052CC;
    --sc2-color-light: #e8f0fe;
    --sc2-color-border: #c7d9f8;
}

/* ── Conteneur principal ───────────────────────────────────── */
.sc-secondary-calc {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    max-width: 640px;          /* ↓ réduit de 760px */
    margin: 0 auto 32px;
    background: #fff;
    border: 1.5px solid #dde6f5;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,52,153,.08);
}

/* ── Header avec gradient ──────────────────────────────────── */
.sc-calc-header {
    background: var(--sc2-grad);
    padding: 16px 22px 14px;   /* ↓ réduit */
}
.sc-calc-title {
    font-size: 17px !important;   /* ↓ réduit */
    font-weight: 700 !important;
    color: #fff !important;
    margin: 0 0 3px !important;
    padding: 0 !important;
    border: none !important;
}
.sc-calc-subtitle {
    font-size: 12px !important;
    color: rgba(255,255,255,.78) !important;
    margin: 0 !important;
}

/* ── Body ──────────────────────────────────────────────────── */
.sc-calc-body {
    padding: 18px 22px 22px;   /* ↓ réduit */
}

/* ── Grid 2 colonnes ───────────────────────────────────────── */
.sc-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}
@media (max-width: 520px) {
    .sc-grid-2 { grid-template-columns: 1fr; }
}

/* ── Champs ────────────────────────────────────────────────── */
.sc-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.sc-field label {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    margin: 0 !important;
}
.sc-field label em {
    font-weight: 400;
    color: #9ca3af;
    font-style: normal;
}
.sc-field input[type="number"] {
    padding: 8px 12px;         /* ↓ réduit */
    border: 1.5px solid #d1d5db;
    border-radius: 7px;
    font-size: 14px;
    color: #111827;
    width: 100%;
    box-sizing: border-box;
    transition: border-color .15s;
    -moz-appearance: textfield;
}
.sc-field input[type="number"]:focus {
    outline: none;
    border-color: var(--sc2-color);
}
.sc-field input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ── Select ────────────────────────────────────────────────── */
.sc-select {
    padding: 8px 12px;
    border: 1.5px solid #d1d5db;
    border-radius: 7px;
    font-size: 14px;
    color: #111827;
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%230052CC' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}
.sc-select:focus {
    outline: none;
    border-color: var(--sc2-color);
}

/* ── Sliders ───────────────────────────────────────────────── */
.sc-slider-wrap {
    margin-bottom: 14px;       /* ↓ réduit */
}
.sc-slider-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 12px;
}
.sc-slider-label span  { color: #374151; font-weight: 500; }
.sc-slider-label strong {
    color: var(--sc2-color);
    font-weight: 700;
    min-width: 56px;
    text-align: right;
}

.sc-range {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;               /* ↓ réduit */
    border-radius: 3px;
    background: #dde6f5;
    outline: none;
    cursor: pointer;
}
.sc-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;               /* ↓ réduit */
    height: 16px;
    border-radius: 50%;
    background: var(--sc2-grad);
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,52,153,.25);
}
.sc-range::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--sc2-color);
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,52,153,.25);
}

/* ── Résultats ─────────────────────────────────────────────── */
.sc-result-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin: 18px 0 0;
}
.sc-result-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sc-result-box label {
    font-size: 10px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #6b7280 !important;
    margin: 0 !important;
}
.sc-result-box input[readonly] {
    background: #f5f7fa;
    border: 1.5px solid #e5e7eb;
    border-radius: 7px;
    padding: 8px 12px;         /* ↓ réduit */
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}
/* Résultat principal — fond gradient bleu */
.sc-result-primary input[readonly] {
    background: var(--sc2-grad);
    border-color: #0052CC;
    color: #fff;
    font-size: 20px;           /* ↓ réduit */
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,.15);
}

/* ── Bloc détail ───────────────────────────────────────────── */
.sc-detail { margin-top: 14px; }
.sc-detail-inner {
    padding: 12px 16px;
    background: var(--sc2-color-light);
    border-left: 3px solid var(--sc2-color);
    border-radius: 0 7px 7px 0;
    font-size: 12.5px;
    line-height: 1.65;
    color: #1e3a6e;
}
.sc-detail-inner p  { margin: 3px 0; }
.sc-detail-inner hr { border: none; border-top: 1px solid #c7d9f8; margin: 7px 0; }
.sc-notice {
    display: inline-block;
    margin-top: 5px;
    font-size: 11px;
    color: #6b7280;
    font-style: italic;
}

/* ── Bouton reset ──────────────────────────────────────────── */
.sc-actions { margin-top: 14px; }
.sc-btn-reset {
    background: none;
    border: 1.5px solid #c7d9f8;
    color: #6b7280;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: border-color .15s, color .15s;
}
.sc-btn-reset:hover {
    border-color: var(--sc2-color);
    color: var(--sc2-color);
}
