/* assets/css/pages/outils.css */

:root {
    --bg-beige-tool: #EBE9E1; /* Le beige exact des captures */
    --color-green-success: #15803d; /* Vert des montants */
    --color-gold-btn: #C8A951; /* Le moutarde/doré des boutons */
    --color-border: #e5e7eb;
}

.hero-compact {
    background: linear-gradient(135deg, #0F2F41 0%, #12354A 100%);
    color: #fff;
    text-align: center;
    padding: 56px 0;
}

.hero-compact h1 {
    color: #fff;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    color: #E8E4DB;
    margin: 0 auto;
    max-width: 760px;
    font-size: 1.05rem;
}

.section-padding {
    padding: 64px 0;
}

.tool-card-grid .card {
    border-top: 5px solid transparent;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
    box-shadow: 0 8px 22px rgba(18,53,74,.12);
    min-height: 100%;
}

.tool-card-grid .card:hover {
    border-top-color: var(--color-gold-btn);
    box-shadow: 0 8px 22px rgba(18,53,74,.12);
}

.tool-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tool-card-icon {
    font-size: 2.2rem;
    color: var(--color-gold-btn);
}

.tool-card .btn-gold-cta {
    margin-top: auto;
}

/* --- HERO & HEADER --- */
.tool-header {
    padding: 56px 0;
    background: linear-gradient(135deg, #0F2F41 0%, #12354A 100%);
    color: #fff;
    text-align: center;
}
.tool-header h1 { color: #fff; margin-bottom: 0.5rem; }
.tool-header p { color: #fff; margin: 0 auto; max-width: 760px; }
.back-link { display: none; }

.tool-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: left;
}
.tool-icon {
    width: 64px; height: 64px;
    background: #F4F2ED;
    color: #C8A951; /* Icône dorée */
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}
.tool-title-row h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem; margin-bottom: 5px; color: #fff;
}

.tool-header .tool-subtitle {
    color: #E8E4DB;
    font-size: 1.05rem;
    margin: 0.3rem auto 0;
}

/* --- LAYOUT GRILLE --- */
.tool-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr; /* Colonne résultat un peu plus large */
    gap: 3rem;
    align-items: start;
    margin-bottom: 5rem;
}

/* --- GAUCHE : INPUTS --- */
.card-inputs {
    background: #fff;
    border: 1px solid #eef3f6;
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 12px 24px rgba(18,53,74,.06);
    border-top: 3px solid transparent;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card-inputs:hover {
    border-top-color: #dcb463;
    box-shadow: 0 12px 24px rgba(18,53,74,.06);
}

.input-label {
    display: block; font-weight: 600; margin-bottom: 0.5rem;
    color: #0f172a; font-size: 0.95rem;
}

.input-with-icon {
    position: relative; margin-bottom: 1.5rem;
}
.input-with-icon span {
    position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
    color: #64748b; font-weight: 500; font-size: 1rem;
}
.input-with-icon input {
    width: 100%; padding: 14px 14px 14px 35px; /* Espace pour le $ */
    border: 1px solid var(--color-border); border-radius: 6px;
    font-size: 1rem; background: #f9fafb; color: #1f2937; transition: 0.3s;
}
.input-with-icon input:focus {
    background: #fff; border-color: var(--color-gold-btn);
    outline: none; box-shadow: 0 0 0 3px rgba(200, 169, 81, 0.15);
}

/* Checkboxes (Outil Employé) */
.checkbox-group {
    display: flex; flex-direction: column; gap: 12px; margin-bottom: 2rem;
}
.checkbox-item { display: flex; align-items: flex-start; gap: 12px; }
.checkbox-item input[type="checkbox"] {
    width: 20px; height: 20px; margin-top: 3px;
    accent-color: #0f172a; cursor: pointer;
}
.checkbox-label strong { display: block; color: #0f172a; font-size: 0.95rem; }
.checkbox-label span { display: block; color: #64748b; font-size: 0.85rem; }

/* Slider (Outil Impôts) */
.slider-container { margin: 2rem 0 1rem 0; }
input[type=range] {
    width: 100%; -webkit-appearance: none; appearance: none; height: 8px;
    background: #e5e7eb; border-radius: 5px; outline: none;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 24px; height: 24px; border-radius: 50%;
    background: #0f172a; border: 3px solid #fff;
    cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Boutons Actions */
.actions-row { display: flex; gap: 1rem; margin-top: 2rem; }
.btn-tool {
    flex: 1; padding: 12px;
    border: 1px solid var(--color-border); background: #fff;
    border-radius: 6px; cursor: pointer; font-weight: 600; color: #4b5563;
    display: flex; align-items: center; justify-content: center; gap: 8px; transition: 0.2s;
}
.btn-tool:hover { background: #f3f4f6; color: #0f172a; border-color: #9ca3af; }

/* --- DROITE : RÉSULTATS --- */
.card-results {
    background: var(--bg-beige-tool);
    border-radius: 12px;
    padding: 2.5rem;
    min-height: 550px;
    display: flex; flex-direction: column;
}
.card-results h3 {
    margin-bottom: 2rem; color: #0f172a;
    display: flex; align-items: center; gap: 10px;
    font-family: 'Playfair Display', serif; font-size: 1.5rem;
}

/* État Vide */
.empty-state {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center; color: #5a6b7c; opacity: 0.7;
}
.empty-icon {
    font-size: 2.5rem; margin-bottom: 1.5rem;
    background: rgba(255,255,255,0.5);
    width: 80px; height: 80px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
}

/* État Rempli */
.results-content { display: none; }

/* Cartes blanches dans résultats */
.result-card-white {
    background: #fff; padding: 1.5rem;
    border-radius: 8px; margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}
.res-label { font-size: 0.9rem; color: #64748b; margin-bottom: 5px; }
.res-val-big { font-size: 2rem; font-weight: 700; color: var(--color-green-success); font-family: 'Playfair Display', serif; }
.res-val-big span { font-size: 1.2rem; } /* Le signe $ */

/* Grilles internes */
.grid-2-res { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* Liste détails (Outil Employé) */
.detail-list { margin-top: 1rem; font-size: 0.95rem; }
.detail-row {
    display: flex; justify-content: space-between;
    padding: 8px 0; border-bottom: 1px dashed #d1d5db;
}
.detail-row:last-child { border-bottom: none; font-weight: 700; font-size: 1.1rem; margin-top: 10px; border-top: 1px solid #000; padding-top: 15px; }

/* Badge "Meilleur" (Outil Impôt) */
.badge-best {
    background: #dcfce7; color: #166534;
    font-size: 0.75rem; font-weight: 700;
    padding: 2px 8px; border-radius: 4px;
    text-transform: uppercase; float: right;
}

/* Note bas de page */
.tool-note {
    margin-top: auto; padding-top: 2rem;
    font-size: 0.8rem; font-style: italic; color: #6b7280;
}

/* --- SECTION CTA INDEX --- */
.cta-section-beige {
    background: var(--bg-beige-tool);
    padding: 5rem 0;
    text-align: center;
    margin-top: 0;
}
.cta-section-beige h2 { font-family: 'Playfair Display', serif; font-size: 2.5rem; margin-bottom: 1rem; color: #0f172a; }
.cta-section-beige p { color: #4b5563; max-width: 600px; margin: 0 auto 2rem; font-size: 1.1rem; }
.btn-gold-cta {
    background: #12354A;
    color: #fff;
    padding: 14px 32px;
    border-radius: 999px;
    font-weight: 650;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    border: 1px solid #12354A;
    box-shadow: 0 12px 30px rgba(18,53,74,.14);
}
.btn-gold-cta.full-width {
    width: 100%;
    justify-content: center;
    text-align: center;
}
.btn-gold-cta i {
    font-size: 1.1em;
    font-weight: 700;
}
.btn-gold-cta:visited {
    color: #fff;
}
.btn-gold-cta:hover {
    background: #dcb463;
    color: #0f172a;
    border-color: #dcb463;
    
}

/* Print & Mobile */
@media print {
    header, .back-link, .actions-row, footer, .cta-section-beige { display: none !important; }
    .tool-grid { display: block; }
    .card-inputs, .card-results { border: 1px solid #000; box-shadow: none; margin-bottom: 2rem; background: #fff !important; }
}
@media (max-width: 968px) { .tool-grid { grid-template-columns: 1fr; } }

/* AJOUTS SPÉCIFIQUES IMPÔTS */

/* Tableau de détails avec lignes pointillées */
.detail-table {
    width: 100%;
    margin-top: 1rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 0.9rem;
    color: #334155;
    /* La ligne pointillée */
    border-bottom: 1px dotted #cbd5e1;
}

.detail-row:last-child {
    border-bottom: none;
    border-top: 2px solid #0f172a; /* Trait plein noir pour le total */
    padding-top: 15px;
    margin-top: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

/* Boîte d'avertissement (Pédagogie) */
.scenario-note {
    background-color: #eff6ff; /* Bleu très pâle */
    border-left: 4px solid #3b82f6; /* Bleu info */
    padding: 1rem;
    margin-top: 1.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #1e3a8a;
    line-height: 1.5;
}
.scenario-note strong { color: #172554; }

/* --- Mode sombre : surfaces lisibles --- */
body[data-theme="dark"] .card-results,
body[data-theme="dark"] .cta-section-beige {
    background: #0f1f2f;
    color: #e6eef5;
}
body[data-theme="dark"] .card-results h3,
body[data-theme="dark"] .cta-section-beige h2 {
    color: #e6eef5;
}
body[data-theme="dark"] .cta-section-beige p,
body[data-theme="dark"] .tool-note,
body[data-theme="dark"] .detail-row,
body[data-theme="dark"] .res-label {
    color: #c7d5e4;
}
body[data-theme="dark"] .tool-icon {
    background: #142a3c;
    color: #f3d48a;
}
body[data-theme="dark"] .result-card-white {
    background: #13283b;
    border: 1px solid rgba(255,255,255,0.06);
    color: #e6eef5;
}
body[data-theme="dark"] .empty-state {
    color: #9fb6cc;
}
