/* calculateur/calc.css -- habillage commun des pages du calculateur.
   Chargé APRÈS les <style> inline : tout est préfixé body.calc-modern pour
   gagner en spécificité. Aucune logique/ID touchés, uniquement le visuel. */
body.calc-modern {
    --c-blue: #1c9bc7;
    --c-blue-dark: #168bb5;
    --c-blue-deep: #0d5f82;
    --c-ink: #14313f;
    --c-muted: #5f7885;
    --c-line: #d3e4ec;
    --c-soft: #eef6fa;
    --c-radius: 16px;
    --c-radius-sm: 10px;
}
body.calc-modern .calc-page,
body.calc-modern .calc-index-page { max-width: 1120px; }

/* ---- fil d'Ariane en pastille ---- */
body.calc-modern .calc-breadcrumb {
    display: inline-flex; align-items: center; gap: 6px;
    background: #fff; border: 1px solid var(--c-line);
    border-radius: 999px; padding: 6px 14px; color: var(--c-muted);
}
body.calc-modern .calc-breadcrumb a { color: var(--c-blue-dark); font-weight: 700; }

/* ---- titre : aligné à gauche, gros ---- */
body.calc-modern .calc-hero,
body.calc-modern .calc-index-hero { text-align: left; margin-bottom: 26px; }
body.calc-modern .calc-hero h1,
body.calc-modern .calc-index-hero h1 {
    font-size: 2.6em; line-height: 1.05; color: var(--c-ink); letter-spacing: 2px;
}
body.calc-modern .calc-hero p,
body.calc-modern .calc-index-hero p {
    margin: 0; max-width: 680px; color: var(--c-muted); font-size: 15px; line-height: 1.55;
}

body.calc-modern .calc-login-notice {
    border-radius: var(--c-radius-sm); text-align: left; padding: 12px 18px;
}

/* ---- cartes de saisie ---- */
body.calc-modern .calc-card {
    background: #fff; border: 1px solid var(--c-line);
    border-top: 5px solid var(--c-blue);
    border-radius: var(--c-radius); padding: 24px 26px;
    box-shadow: 0 10px 28px -14px rgba(13, 95, 130, .35);
}
body.calc-modern .calc-columns .calc-card:nth-child(2) { border-top-color: var(--c-blue-deep); }
body.calc-modern .calc-card-title { font-size: 1.5em; color: var(--c-ink); letter-spacing: 1.5px; }
body.calc-modern .calc-card-subtitle { color: var(--c-muted); font-size: 13px; margin-bottom: 20px; }

/* ---- champs ---- */
body.calc-modern .calc-field label,
body.calc-modern .calc-barge-field label { color: var(--c-ink); }
body.calc-modern .calc-field select,
body.calc-modern .calc-field input[type="number"],
body.calc-modern .calc-barge-field select {
    border: 1.5px solid var(--c-line); border-radius: var(--c-radius-sm);
    background-color: var(--c-soft); color: var(--c-ink);
    padding: 10px 12px; transition: border-color .15s, box-shadow .15s, background-color .15s;
}
body.calc-modern .calc-field select:hover,
body.calc-modern .calc-field input[type="number"]:hover { border-color: #9fcfe2; }
body.calc-modern .calc-field select:focus,
body.calc-modern .calc-field input[type="number"]:focus,
body.calc-modern .calc-barge-field select:focus {
    outline: none; background-color: #fff; border-color: var(--c-blue);
    box-shadow: 0 0 0 4px rgba(28, 155, 199, .2);
}
body.calc-modern .calc-field select:disabled { background-color: #f1f4f6; color: #9aa7ae; }
body.calc-modern .calc-field-hint { color: #7d93a0; }
body.calc-modern .calc-toggle-row input[type="checkbox"] { accent-color: var(--c-blue); }

body.calc-modern .calc-engrave-slot {
    background: var(--c-soft); border: 1px solid var(--c-line);
    border-left: 4px solid var(--c-blue); border-radius: var(--c-radius-sm);
}
body.calc-modern .calc-engrave-slot select { background-color: #fff; }
body.calc-modern .calc-engrave-slot-label { color: var(--c-blue-dark); }
body.calc-modern .calc-barges-total {
    background: var(--c-soft); border: 1px solid var(--c-line); border-radius: var(--c-radius-sm);
}
body.calc-modern .calc-barges-total strong { color: var(--c-blue-deep); }

/* ---- résultat : panneau bleu, le chiffre clé domine ---- */
body.calc-modern .calc-result-card {
    background: var(--c-blue-dark); border: 0; color: #fff;
    border-radius: var(--c-radius); padding: 28px 30px;
    box-shadow: 0 18px 40px -18px rgba(13, 95, 130, .7);
}
body.calc-modern .calc-result-title { text-align: left; font-size: 1.6em; letter-spacing: 1.5px; }
body.calc-modern .calc-result-subtitle { text-align: left; color: #d4eef8; }
body.calc-modern .calc-result-headline {
    background: #fff; border: 0; border-radius: var(--c-radius); padding: 22px 16px;
}
body.calc-modern .calc-result-headline.calc-result-headline-time,
body.calc-modern .calc-result-headline.calc-result-headline-secondary {
    background: var(--c-blue-deep); border: 0;
}
body.calc-modern .calc-result-headline .calc-result-headline-value {
    font-family: 'Bangers', cursive; font-weight: 400; letter-spacing: 1.5px;
    font-size: 3.4em; color: var(--c-blue-deep);
}
body.calc-modern .calc-result-headline-time .calc-result-headline-value,
body.calc-modern .calc-result-headline-secondary .calc-result-headline-value { color: #fff; }
body.calc-modern .calc-result-headline .calc-result-headline-label { color: var(--c-muted); font-size: 13px; }
body.calc-modern .calc-result-headline-time .calc-result-headline-label,
body.calc-modern .calc-result-headline-secondary .calc-result-headline-label { color: #cfeaf6; }

body.calc-modern .calc-result-stat {
    background: rgba(255,255,255,.12); border: 0; border-radius: var(--c-radius-sm); padding: 14px 10px;
}
body.calc-modern .calc-result-stat-label { color: #d4eef8; text-transform: none; letter-spacing: 0; font-size: 12px; }
body.calc-modern .calc-result-stat-value { color: #fff; }
body.calc-modern .calc-result-warning { border-radius: var(--c-radius-sm); }
body.calc-modern .calc-result-disclaimer { color: #d4eef8; text-align: left; }

/* ---- tableau de résultats (canonnière) ---- */
body.calc-modern .calc-result-table { border-spacing: 0 5px; }
body.calc-modern .calc-result-table thead th {
    background: rgba(0,0,0,.18); text-transform: none; letter-spacing: 0; font-size: 12.5px;
}
body.calc-modern .calc-result-table thead th:first-child { border-radius: var(--c-radius-sm) 0 0 var(--c-radius-sm); }
body.calc-modern .calc-result-table thead th:last-child { border-radius: 0 var(--c-radius-sm) var(--c-radius-sm) 0; }
body.calc-modern .calc-result-table tbody td { background: rgba(255,255,255,.1); color: #fff; }
body.calc-modern .calc-result-table tbody td:first-child { border-radius: var(--c-radius-sm) 0 0 var(--c-radius-sm); }
body.calc-modern .calc-result-table tbody td:last-child {
    background: rgba(255,255,255,.2); color: #fff; border-radius: 0 var(--c-radius-sm) var(--c-radius-sm) 0;
}
body.calc-modern .calc-result-table tbody tr.calc-result-row-highlight td { background: #fff; color: var(--c-ink); }
body.calc-modern .calc-result-table tbody tr.calc-result-row-highlight td:last-child {
    background: #fff; color: var(--c-blue-deep); font-family: 'Bangers', cursive; font-weight: 400; letter-spacing: 1px; font-size: 1.6em;
}

/* ---- stats cuirassé ---- */
body.calc-modern .calc-item-tag {
    background: var(--c-soft); border: 1px solid var(--c-line); color: var(--c-blue-dark);
    border-radius: 999px; padding: 4px 12px; text-transform: none; letter-spacing: 0;
}
body.calc-modern .calc-table-wrap { border: 1px solid var(--c-line); border-radius: var(--c-radius-sm); }
body.calc-modern table.calc-stats-table { border-collapse: separate; border-spacing: 0; }
body.calc-modern table.calc-stats-table th,
body.calc-modern table.calc-stats-table td { border: 0; border-bottom: 1px solid #e3eef3; }
body.calc-modern table.calc-stats-table thead th { background: var(--c-blue-deep); color: #fff; text-transform: none; letter-spacing: 0; font-size: 12.5px; }
body.calc-modern table.calc-stats-table tbody tr:nth-child(even) { background: var(--c-soft); }
body.calc-modern table.calc-stats-table td.calc-stats-level { background: #dff0f7; color: var(--c-blue-deep); }
body.calc-modern table.calc-stats-table tbody tr:last-child td { border-bottom: 0; }

/* ---- page d'accueil du calculateur ---- */
body.calc-modern .calc-index-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
body.calc-modern .calc-index-card {
    position: relative; background: #fff; border: 1px solid var(--c-line); border-radius: var(--c-radius);
    padding: 24px; gap: 12px; box-shadow: 0 10px 28px -16px rgba(13, 95, 130, .4);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
body.calc-modern .calc-index-card:hover {
    transform: translateY(-3px); border-color: var(--c-blue);
    box-shadow: 0 16px 34px -14px rgba(13, 95, 130, .55);
}
body.calc-modern .calc-index-card-icon {
    display: grid; place-items: center; width: 58px; height: 58px; font-size: 30px;
    background: var(--c-blue); border-radius: 16px; box-shadow: inset 0 -4px 0 rgba(0,0,0,.15);
}
body.calc-modern .calc-index-card h2 { font-family: 'Bangers', cursive; font-weight: 400; letter-spacing: 1.2px; font-size: 1.5em; color: var(--c-ink); }
body.calc-modern .calc-index-card p { color: var(--c-muted); font-size: 13.5px; line-height: 1.5; }
body.calc-modern .calc-index-card-tag {
    position: absolute; top: 20px; right: 20px; align-self: auto;
    background: var(--c-soft); color: var(--c-blue-dark); border-radius: 999px;
    padding: 3px 11px; text-transform: none; letter-spacing: 0; font-size: 12px;
}
body.calc-modern .calc-index-empty-card { border: 2px dashed #9fcfe2; border-radius: var(--c-radius); background: transparent; color: var(--c-muted); }

@media (max-width: 560px) {
    body.calc-modern .calc-hero h1,
    body.calc-modern .calc-index-hero h1 { font-size: 2em; }
    body.calc-modern .calc-card { padding: 20px 18px; }
    body.calc-modern .calc-result-card { padding: 22px 18px; }
}
@media (prefers-reduced-motion: reduce) {
    body.calc-modern * { transition: none !important; }
}

/* ---- icônes (gravures, sprites de bâtiments, bonus de secteur) ---- */
body.calc-modern .calc-label-icon {
    width: 22px; height: 22px; object-fit: contain; vertical-align: -5px; margin-right: 6px;
}
body.calc-modern .calc-label-sprite {
    width: 34px; height: 34px; object-fit: contain; vertical-align: -10px; margin-right: 6px;
}
body.calc-modern .calc-has-sel-icon { display: flex; align-items: center; gap: 10px; }
body.calc-modern .calc-has-sel-icon > select { flex: 1; min-width: 0; }
body.calc-modern .calc-field.calc-has-sel-icon { display: flex; flex-wrap: wrap; }
body.calc-modern .calc-sel-icon { flex: none; object-fit: contain; }
body.calc-modern .calc-sel-icon[hidden] { display: none; }
body.calc-modern .calc-sel-icon-engraving { width: 44px; height: 44px; }
body.calc-modern .calc-sel-icon-sprite { width: 64px; height: 64px; }
body.calc-modern .calc-field.calc-has-sel-icon > label { flex-basis: 100%; }
body.calc-modern .calc-field.calc-has-sel-icon > .calc-field-hint { flex-basis: 100%; }
body.calc-modern .calc-result-sprite {
    width: 72px; height: 72px; object-fit: contain; vertical-align: middle; margin-right: 10px;
}

