/* ==========================================================================
   Page Calculateur CLB / NCLC
   Aligné sur la charte DKOM (--primary #223A76, --accent #F39200)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero (utilise <x-page-hero>)
   -------------------------------------------------------------------------- */
.page-hero {
    position: relative;
    padding: 6rem 0 4rem;
    background-color: var(--primary);
    background-size: cover;
    background-position: center 30%;
    background-repeat: no-repeat;
    overflow: hidden;
    text-align: center;
}
.page-hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(13, 20, 36, 0.7);
    z-index: 1;
}
.page-hero__content {
    position: relative;
    z-index: 2;
}
.page-hero__title {
    font-size: clamp(2.5rem, 1.6rem + 3vw, 4rem);
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: -1px;
    margin: 0;
    line-height: 1.1;
}
@media (min-width: 768px) {
    .page-hero {
        padding: 7rem 0 6rem;
    }
}

/* --------------------------------------------------------------------------
   Section principale
   -------------------------------------------------------------------------- */
.clb-page {
    padding: clamp(28px, 3.5vw, 50px) 0;
    background: #f7f8fc;
}

.clb-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto clamp(28px, 3.5vw, 44px);
    padding: 0 var(--page-gutter, 16px);
}

.clb-header__eyebrow {
    display: inline-block;
    padding: 8px 18px;
    background: rgba(243, 146, 0, 0.10);
    color: var(--accent);
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.clb-header__title {
    font-size: clamp(2.25rem, 1.5rem + 2.5vw, 3.4rem);
    font-weight: 800;
    color: #0d1424;
    line-height: 1.1;
    letter-spacing: -1px;
    margin: 0 0 14px;
}
.clb-header__title span { color: var(--accent); }

.clb-header__subtitle {
    font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.2rem);
    color: #5a6478;
    line-height: 1.6;
    margin: 0;
}
.clb-header__subtitle strong {
    color: var(--primary);
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   Carte principale
   -------------------------------------------------------------------------- */
.clb-card {
    max-width: 1080px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e6eaf2;
    border-radius: 20px;
    padding: 26px 22px;
}
@media (min-width: 768px) {
    .clb-card { padding: 36px; }
}

/* --------------------------------------------------------------------------
   Onglets de langue (pill segmenté)
   -------------------------------------------------------------------------- */
.clb-langs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    background: #f7f8fc;
    border: 1px solid #e6eaf2;
    border-radius: 999px;
    margin-bottom: 22px;
}

.clb-lang {
    padding: 12px 18px;
    background: transparent;
    border: none;
    border-radius: 999px;
    color: #5a6478;
    font-weight: 600;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.clb-lang:hover:not(.is-active) { color: var(--primary); }
.clb-lang.is-active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 6px 16px -8px rgba(34, 58, 118, 0.4);
}

/* --------------------------------------------------------------------------
   Onglets de test (sous-onglets, style underline)
   -------------------------------------------------------------------------- */
.clb-tests {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 1px solid #e6eaf2;
    margin-bottom: 22px;
}
.clb-tests[hidden] { display: none; }

.clb-test {
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #5a6478;
    font-weight: 600;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    margin-bottom: -1px;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.clb-test:hover:not(.is-active) { color: var(--primary); }
.clb-test.is-active {
    color: var(--primary);
    border-bottom-color: var(--accent);
}

/* --------------------------------------------------------------------------
   Formulaire
   -------------------------------------------------------------------------- */
.clb-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}
@media (min-width: 640px) {
    .clb-grid { grid-template-columns: 1fr 1fr; }
}

.clb-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.clb-field__label {
    font-weight: 600;
    color: #2a3245;
    font-size: 0.95rem;
}

.clb-field__input-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.clb-field input {
    flex: 1;
    min-width: 0;
    padding: 13px 16px;
    background: #f7f8fc;
    border: 1px solid #e6eaf2;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    color: #0d1424;
    line-height: 1.3;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.clb-field input:hover { border-color: #c8cfde; }
.clb-field input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(34, 58, 118, 0.10);
}
.clb-field input::-webkit-outer-spin-button,
.clb-field input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.clb-field input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.clb-field__badge {
    flex: none;
    min-width: 88px;
    text-align: center;
    padding: 0 14px;
    border-radius: 12px;
    background: #f7f8fc;
    color: #98a1b3;
    border: 1px solid #e6eaf2;
    font-weight: 700;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.clb-field__badge.has-value {
    background: rgba(34, 58, 118, 0.06);
    color: var(--primary);
    border-color: var(--primary);
}

.clb-field__hint {
    font-size: 0.82rem;
    color: #98a1b3;
    line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Actions
   -------------------------------------------------------------------------- */
.clb-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}

.clb-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.92rem;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.clb-btn svg { width: 14px; height: 14px; }
.clb-btn--ghost {
    background: transparent;
    color: #5a6478;
    border-color: #e6eaf2;
}
.clb-btn--ghost:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* --------------------------------------------------------------------------
   Résultat
   -------------------------------------------------------------------------- */
.clb-result {
    margin-top: 26px;
    padding: 24px 22px;
    background:
        radial-gradient(circle at 0% 0%, rgba(34, 58, 118, 0.06) 0%, transparent 60%),
        radial-gradient(circle at 100% 100%, rgba(243, 146, 0, 0.06) 0%, transparent 60%),
        #fbfcff;
    border: 1px solid #e6eaf2;
    border-radius: 16px;
}

.clb-result__skills {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 22px;
}
@media (min-width: 768px) {
    .clb-result__skills { grid-template-columns: repeat(4, 1fr); }
}

.clb-result__skill {
    background: #fff;
    border: 1px solid #e6eaf2;
    border-radius: 12px;
    padding: 14px 14px 16px;
    text-align: center;
}

.clb-result__skill-label {
    display: block;
    font-size: 0.74rem;
    color: #98a1b3;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
}

.clb-result__skill-level {
    display: block;
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    letter-spacing: -0.5px;
}
.clb-result__skill-level.is-empty { color: #c8cfde; }

.clb-result__overall {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e6eaf2;
}

.clb-result__overall-label {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: #98a1b3;
    font-weight: 700;
    margin-bottom: 10px;
}

.clb-result__overall-level {
    display: inline-block;
    padding: 10px 32px;
    background: var(--accent);
    color: #fff;
    border-radius: 999px;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    box-shadow: 0 10px 24px -10px rgba(243, 146, 0, 0.55);
}
.clb-result__overall-level.is-empty {
    background: #e6eaf2;
    color: #98a1b3;
    box-shadow: none;
}

.clb-result__overall-hint {
    display: block;
    margin-top: 10px;
    font-size: 0.84rem;
    color: #98a1b3;
}

/* --------------------------------------------------------------------------
   Disclaimer
   -------------------------------------------------------------------------- */
.clb-disclaimer {
    max-width: 1080px;
    margin: 22px auto 0;
    padding: 14px 18px;
    background: rgba(243, 146, 0, 0.05);
    border: 1px dashed rgba(243, 146, 0, 0.4);
    border-radius: 12px;
    color: #5a6478;
    font-size: 0.9rem;
    line-height: 1.55;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.clb-disclaimer svg {
    flex: none;
    width: 18px;
    height: 18px;
    color: var(--accent);
    margin-top: 2px;
}
.clb-disclaimer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 575.98px) {
    .clb-card { border-radius: 16px; padding: 22px 18px; }
    .clb-langs { font-size: 0.88rem; }
    .clb-lang { padding: 10px 12px; font-size: 0.88rem; }
    .clb-test { padding: 9px 12px; font-size: 0.9rem; }
    .clb-tests { gap: 4px; }
    .clb-result { padding: 20px 16px; }
    .clb-result__skill-level { font-size: 1.4rem; }
    .clb-result__overall-level { font-size: 1.25rem; padding: 9px 24px; }
    .clb-field__badge { min-width: 76px; font-size: 0.82rem; padding: 0 10px; }
    .clb-header__title { font-size: 1.85rem; letter-spacing: -0.4px; }
    .clb-header__subtitle { font-size: 1rem; }
}

/* ==========================================================================
   CTA "Outil complémentaire" sur la page Admissibilité
   ========================================================================== */
.admis-tool {
    max-width: 1080px;
    margin: 1.75rem auto 0;
    padding: 22px 24px;
    background: #fff;
    border: 1px solid #e6eaf2;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    transition: border-color 0.15s ease;
}
.admis-tool:hover { border-color: var(--primary); }

.admis-tool__icon {
    flex: none;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(243, 146, 0, 0.10);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.admis-tool__icon svg {
    width: 28px;
    height: 28px;
}

.admis-tool__body {
    flex: 1;
    min-width: 220px;
}
.admis-tool__title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0d1424;
    margin: 0 0 4px;
    letter-spacing: -0.2px;
}
.admis-tool__text {
    font-size: 0.95rem;
    color: #5a6478;
    line-height: 1.5;
    margin: 0;
}

.admis-tool__cta {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    background: var(--primary);
    color: #fff;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    transition: background 0.2s ease;
}
.admis-tool__cta:hover {
    background: #1a2e5c;
    color: #fff;
}
.admis-tool__cta svg { width: 14px; height: 14px; }

@media (max-width: 575.98px) {
    .admis-tool {
        padding: 18px;
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .admis-tool__icon { margin: 0 auto; }
    .admis-tool__cta { justify-content: center; }
}
