/* 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 p {
    color: #4b5563;
    margin-bottom: 2rem;
}

.tool-card .btn {
    margin-top: auto;
}

/* --- HERO & HEADER --- */
.tool-header {
    padding: 56px 0;
    background: linear-gradient(135deg, #0F2F41 0%, #12354A 100%);
    color: #fff;
    text-align: center;
    position: relative;                       /* ancre le back-link absolu */
}
.tool-header h1 { color: #fff; margin-bottom: 0.5rem; }
.tool-header p { color: #fff; margin: 0 auto; max-width: 760px; }
/* Lien "Retour aux outils" – coin supérieur gauche du hero */
.back-link {
    position: absolute;
    top: 22px;
    left: var(--pad-x);                       /* aligne avec le container (24px) */
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.88rem;
    font-weight: 600;
    font-family: var(--ff-ui);
    text-decoration: none;
    transition: color 0.22s ease;
}
.back-link i {
    font-size: 0.82rem;
    transition: transform 0.22s ease;
}
.back-link:hover,
.back-link:focus-visible {
    color: #D4A64E;                           /* gold au hover */
}
.back-link:hover i {
    transform: translateX(-3px);              /* flèche glisse vers la gauche */
}

.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;
}

/* --- GAUCHE : INPUTS --- */
.card-inputs {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    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-with-icon {
    position: relative; margin-bottom: 1.5rem;
}
.input-with-icon span {
    position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
    color: #4b5563; 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: var(--bg-input); color: var(--text-body); transition: 0.3s;
}
.input-with-icon input:focus {
    background: var(--bg-input); 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: #4b5563; 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; }

/* --- 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;
}
/* 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; }

/* Print */
@media print {
    header, .back-link, .actions-row, footer, .cta-section-beige { display: none !important; }
    .card-inputs, .card-results { border: 1px solid #000; box-shadow: none; margin-bottom: 2rem; background: #fff !important; }
}

/* 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; }

/* --- Super Carte : Assistant IA (pleine largeur) --- */
.tool-card-featured {
    grid-column: 1 / -1;
}
.tool-card-featured-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}
.tool-card-featured-left {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    flex: 1;
    min-width: 0;                             /* évite débordement flex */
}
.tool-card-icon-featured {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}
.tool-card-featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #D4A64E;
    background: rgba(212, 166, 78, 0.12);
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 6px;
}
.tool-card-featured-badge i {
    font-size: 0.7rem;
}
.tool-card-beta {
    display: inline-flex;
    font-size: 0.7rem;
    font-weight: 700;
    background: #12354A;
    color: #fff;
    padding: 2px 8px;
    border-radius: 999px;
    margin-left: 6px;
    vertical-align: middle;
}
.tool-card h2 {
    font-size: 1.2rem;
    font-weight: 650;
}
.tool-card-featured-text h2 {
    margin: 0 0 6px;
}
.tool-card-featured-text p {
    margin: 0 0 12px;
}
.tool-card-featured-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

/* Accordéon natif <details>/<summary> */
.tool-card-accordion {
    margin-top: 4px;
}
.tool-card-accordion summary {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 650;
    color: #12354A;
    list-style: none;                         /* Firefox */
    -webkit-list-style-type: none;            /* WebKit fallback */
    user-select: none;
}
.tool-card-accordion summary::-webkit-details-marker {
    display: none;                            /* Chrome/Safari */
}
.tool-card-accordion summary i {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}
.tool-card-accordion[open] summary i {
    transform: rotate(180deg);
}
.tool-card-accordion ul {
    margin: 10px 0 0;
    padding: 0 0 0 18px;
    list-style: disc;
}
.tool-card-accordion ul li {
    font-size: 0.88rem;
    color: #4b5563;
    margin-bottom: 5px;
    line-height: 1.4;
}

/* Mobile : la super carte redevient taille normale */
@media (max-width: 780px) {
    .tool-card-featured {
        grid-column: auto;
    }
    .tool-card-featured-content {
        flex-direction: column;
        align-items: stretch;
    }
    .tool-card-featured-left {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .tool-card-featured-text {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .tool-card-featured-btn {
        width: 100%;
        justify-content: center;
    }
}

