/* cpf-tjm-calculator.css */

:root {
    --cpf-blue: #010C4E;
    --cpf-gold: #FBAE17;
    --cpf-light: #F0F5FA;
    --cpf-text: #334155;
    --cpf-danger: #ef4444;
}

#cpf-tjm-container {
    max-width: 800px;
    margin: 0 auto;
    font-family: 'Work Sans', sans-serif;
}

/* La carte du calculateur */
.cpf-tjm-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(1, 12, 78, 0.08);
    padding: 30px;
    margin-bottom: 40px;
    border-top: 4px solid var(--cpf-gold); /* Bordure jaune cette fois */
}

/* Les Inputs */
.cpf-tjm-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

/* Le dernier input prend toute la largeur s'il est impair */
.cpf-tjm-inputs .cpf-input-group:last-child {
    grid-column: 1 / -1;
}

.cpf-input-group {
    display: flex;
    flex-direction: column;
}

.cpf-input-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--cpf-blue);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.cpf-tooltip {
    background: var(--cpf-light);
    color: var(--cpf-text);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    cursor: help;
    margin-left: 5px;
}

.cpf-input-group input,
.cpf-input-group select {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    color: var(--cpf-text);
    transition: border-color 0.3s;
    background: #fff;
}

.cpf-input-group input:focus,
.cpf-input-group select:focus {
    border-color: var(--cpf-blue);
    outline: none;
}

/* Les Résultats */
.cpf-tjm-results {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
    background: var(--cpf-light);
    padding: 20px;
    border-radius: 8px;
}

.cpf-result-box, .cpf-result-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
}

.cpf-result-box span:first-child,
.cpf-result-main span:first-child {
    font-size: 12px;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 5px;
}

.cpf-number, .cpf-money {
    font-weight: 700;
    font-size: 20px;
    color: var(--cpf-blue);
}

.cpf-result-main span:nth-child(2) {
    font-weight: 800;
    font-size: 28px;
    color: var(--cpf-blue);
    background: #fff;
    padding: 5px 15px;
    border-radius: 6px;
    border: 2px solid var(--cpf-gold);
}

.cpf-warning {
    font-size: 11px;
    color: var(--cpf-danger);
    margin-top: 8px;
    font-weight: 600;
}

/* Chart Canvas */
.cpf-chart-wrapper {
    position: relative;
    height: 250px; /* Plus petit pour un graphique camembert */
    width: 100%;
}

/* SEO Content Styling */
.cpf-tjm-content h2 {
    color: var(--cpf-blue);
    font-size: 24px;
    margin-top: 0;
}

.cpf-tjm-content h3 {
    color: var(--cpf-gold);
    font-size: 20px;
    margin-top: 25px;
}

.cpf-tjm-content ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

.cpf-tjm-content li {
    margin-bottom: 10px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cpf-tjm-inputs, .cpf-tjm-results {
        grid-template-columns: 1fr;
    }
    .cpf-tjm-inputs .cpf-input-group:last-child {
        grid-column: auto;
    }
}

/* Fix pour le menu déroulant coupé (Override du thème Astra) */
.cpf-input-group select {
    height: auto !important;
    min-height: 48px;
    padding: 12px;
    line-height: normal;
    box-sizing: border-box;
    /* Optionnel : redonne un style par défaut au menu selon le navigateur */
    -webkit-appearance: listbox;
    -moz-appearance: listbox;
    appearance: listbox;
}