/*
 * OUTILS RH — CSS commun partagé
 * Charte NEURO SOFT : navy #0d2d4a / teal #1a9c8c
 * Inclure dans @section css de chaque vue outil
 */

/* ── Page layout ─────────────────────────────────── */
.outil-page { background: #f4f9f8; min-height: 100vh; }

/* ── Hero ─────────────────────────────────────────── */
.outil-hero {
    padding-top: 110px;
    padding-bottom: 3rem;
    background: linear-gradient(135deg, #0d2d4a 0%, #154570 55%, #1a9c8c 100%);
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.outil-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 40%, rgba(34,197,177,.13) 0%, transparent 60%);
    pointer-events: none;
}
.outil-hero .container { position: relative; z-index: 1; }

.outil-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(26,156,140,.2);
    border: 1px solid rgba(34,197,177,.4);
    color: #22c5b1;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 5px 16px;
    border-radius: 50px;
    margin-bottom: 1rem;
}
.outil-hero h1 {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    color: #fff;
    margin-bottom: .5rem;
}
.outil-hero p {
    color: rgba(255,255,255,.68);
    font-size: .95rem;
    margin: 0;
}

/* ── Breadcrumb ───────────────────────────────────── */
.outil-breadcrumb {
    font-size: .82rem;
    margin-bottom: 1rem;
}
.outil-breadcrumb a { color: #22c5b1; text-decoration: none; }
.outil-breadcrumb .sep { color: rgba(255,255,255,.35); margin: 0 7px; }
.outil-breadcrumb .cur { color: rgba(255,255,255,.65); }

/* ── Body ─────────────────────────────────────────── */
.outil-body { padding: 3rem 0 4rem; background: #f4f9f8; }

/* ── Cards ────────────────────────────────────────── */
.calc-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 24px rgba(13,45,74,.08);
    border: 1px solid rgba(26,156,140,.08);
    margin-bottom: 1.5rem;
}
.calc-card-title {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: #0d2d4a;
    margin-bottom: .4rem;
    display: flex;
    align-items: center;
    gap: 9px;
}
.calc-card-title i { color: #1a9c8c; font-size: 1.1rem; }
.calc-card-bar {
    width: 32px; height: 3px;
    background: linear-gradient(90deg, #1a9c8c, #22c5b1);
    border-radius: 2px;
    margin-bottom: 1.4rem;
}

/* ── Formulaire ───────────────────────────────────── */
.form-group-ns { margin-bottom: 1.2rem; }

.form-label-ns {
    display: block;
    font-size: .82rem;
    font-weight: 700;
    color: #0d2d4a;
    letter-spacing: .02em;
    margin-bottom: .4rem;
}

.input-wrap-ns { position: relative; }

.form-control-ns {
    width: 100%;
    height: 46px;
    padding: 0 44px 0 14px;
    border: 1.5px solid #cce4e0;
    border-radius: 10px;
    font-size: .9rem;
    color: #1c2e2c;
    background: #f9fdfc;
    font-family: 'Nunito', sans-serif;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.form-control-ns:focus {
    border-color: #1a9c8c;
    box-shadow: 0 0 0 3px rgba(26,156,140,.11);
    background: #fff;
}
.form-control-ns.no-addon { padding-right: 14px; }

.input-addon-ns {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b8f8a;
    font-size: .82rem;
    font-weight: 700;
    pointer-events: none;
}

.form-select-ns {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1.5px solid #cce4e0;
    border-radius: 10px;
    font-size: .9rem;
    color: #1c2e2c;
    background: #f9fdfc;
    font-family: 'Nunito', sans-serif;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b8f8a' stroke-width='2'%3E%3Cpolyline points='6,9 12,15 18,9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}
.form-select-ns:focus {
    border-color: #1a9c8c;
    box-shadow: 0 0 0 3px rgba(26,156,140,.11);
    background-color: #fff;
}

.help-text-ns {
    font-size: .78rem;
    color: #6b8f8a;
    margin-top: .3rem;
    font-style: italic;
}

/* Checkbox style */
.check-ns {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 1rem;
    background: #f4f9f8;
    border: 1.5px solid #cce4e0;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.check-ns:hover { border-color: #1a9c8c; background: #edf7f5; }
.check-ns input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: #1a9c8c;
    margin-top: 1px;
    cursor: pointer;
    flex-shrink: 0;
}
.check-ns-label { font-size: .88rem; font-weight: 600; color: #0d2d4a; }
.check-ns-sub   { font-size: .78rem; color: #6b8f8a; margin-top: 1px; }

/* Radio cards */
.radio-card-ns {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 1rem;
    background: #f9fdfc;
    border: 1.5px solid #cce4e0;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: .6rem;
    transition: border-color .2s, background .2s;
}
.radio-card-ns:hover { border-color: #1a9c8c; background: #edf7f5; }
.radio-card-ns.selected { border-color: #1a9c8c; background: #edf7f5; box-shadow: 0 0 0 3px rgba(26,156,140,.1); }
.radio-card-ns input[type="radio"] {
    width: 18px; height: 18px;
    accent-color: #1a9c8c;
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
}
.radio-label { font-size: .88rem; font-weight: 700; color: #0d2d4a; }
.radio-sub   { font-size: .78rem; color: #6b8f8a; margin-top: 2px; }

/* Alert info */
.alert-ns-info {
    display: flex;
    gap: 10px;
    background: rgba(26,156,140,.08);
    border: 1px solid rgba(26,156,140,.25);
    border-radius: 10px;
    padding: .9rem 1rem;
    margin-bottom: 1.4rem;
    font-size: .84rem;
    color: #0d2d4a;
}
.alert-ns-info i { color: #1a9c8c; font-size: .95rem; margin-top: 1px; flex-shrink: 0; }

.alert-ns-warning {
    display: flex;
    gap: 10px;
    background: rgba(245,158,11,.07);
    border: 1px solid rgba(245,158,11,.3);
    border-radius: 10px;
    padding: .9rem 1rem;
    margin-bottom: 1.4rem;
    font-size: .84rem;
    color: #92400e;
}
.alert-ns-warning i { color: #d97706; margin-top: 1px; flex-shrink: 0; }

/* ── Bouton Calculer ──────────────────────────────── */
.btn-calc-ns {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, #1a9c8c, #22c5b1);
    border: none;
    border-radius: 50px;
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: .07em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    box-shadow: 0 6px 20px rgba(26,156,140,.36);
    transition: transform .25s, box-shadow .25s;
    margin-top: .5rem;
}
.btn-calc-ns:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(26,156,140,.46);
}
.btn-calc-ns:disabled { opacity: .7; cursor: not-allowed; }

.btn-reset-ns {
    width: 100%;
    height: 46px;
    background: transparent;
    border: 1.5px solid rgba(26,156,140,.4);
    border-radius: 50px;
    color: #1a9c8c;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: .06em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    transition: background .2s, border-color .2s;
    margin-top: .8rem;
}
.btn-reset-ns:hover { background: rgba(26,156,140,.08); border-color: #1a9c8c; }

/* ── Résultats ────────────────────────────────────── */
.result-main-card {
    background: linear-gradient(135deg, #0d2d4a, #154570);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 1.2rem;
    position: relative;
    overflow: hidden;
}
.result-main-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(34,197,177,.15) 0%, transparent 55%);
    pointer-events: none;
}
.result-main-label {
    font-size: .8rem;
    font-weight: 700;
    color: rgba(255,255,255,.6);
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: .5rem;
    position: relative;
}
.result-main-value {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: #22c5b1;
    line-height: 1;
    position: relative;
}
.result-main-sub {
    font-size: .8rem;
    color: rgba(255,255,255,.55);
    margin-top: .4rem;
    position: relative;
}

/* Lignes de détail */
.detail-section-header {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: .78rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #1a9c8c;
    padding: .6rem 0 .4rem;
    border-bottom: 1px solid #e8f4f2;
    margin: 1rem 0 .5rem;
}
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .6rem 0;
    border-bottom: 1px solid #f0f7f5;
    font-size: .88rem;
}
.detail-row:last-child { border-bottom: none; }
.detail-label { color: #4a6360; font-weight: 500; }
.detail-value { font-weight: 700; color: #0d2d4a; }
.detail-value.neg { color: #dc2626; }
.detail-value.pos { color: #1a9c8c; }
.detail-row.total {
    background: #f0faf8;
    margin: .5rem -2rem;
    padding: .8rem 2rem;
    border-radius: 0;
    border-bottom: none;
}
.detail-row.total .detail-label { font-weight: 700; color: #0d2d4a; font-size: .95rem; }
.detail-row.total .detail-value { font-size: 1.1rem; }

/* Info légale */
.legal-info-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 24px rgba(13,45,74,.07);
    border: 1px solid rgba(26,156,140,.08);
    margin-top: 2rem;
}
.legal-info-card h4 {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #0d2d4a;
    margin-bottom: .3rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.legal-info-card h4 i { color: #1a9c8c; }
.legal-info-card p, .legal-info-card li { font-size: .85rem; color: #4a6360; line-height: 1.7; }
.legal-info-card ul { padding-left: 1.2rem; margin: .5rem 0; }

/* Ancienneté badge */
.anciennete-badge {
    background: rgba(26,156,140,.1);
    border: 1px solid rgba(26,156,140,.3);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 12px;
}
.anciennete-badge i { color: #1a9c8c; font-size: 1.4rem; }
.anciennete-val {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    color: #0d2d4a;
    line-height: 1;
}
.anciennete-lbl { font-size: .78rem; color: #6b8f8a; }

/* Spinner */
.ns-spinner {
    width: 20px; height: 20px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    display: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* CTA bas de page */
.outil-cta {
    background: linear-gradient(135deg, #0d2d4a, #154570);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    color: #fff;
    margin-top: 2rem;
}
.outil-cta h4 {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: .5rem;
}
.outil-cta p { color: rgba(255,255,255,.65); font-size: .88rem; margin-bottom: 1.2rem; }
.btn-cta-ns {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #1a9c8c, #22c5b1);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    padding: .65rem 1.6rem;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: .92rem;
    letter-spacing: .06em;
    box-shadow: 0 4px 16px rgba(26,156,140,.35);
    transition: transform .25s, box-shadow .25s;
}
.btn-cta-ns:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(26,156,140,.45); color: #fff; }

/* Responsive */
@media (max-width: 991px) {
    .outil-hero { padding-top: 100px; padding-bottom: 2.5rem; }
    .outil-body { padding: 2rem 0 3rem; }
}
