/* ═══════════════════════════════════════════════════════════════════════════
   ASSUGERIS — Outils interactifs (calculateurs SEO)
   Composants autonomes montés par /assets/tools.js sur les éléments [data-tool].
   Style aligné sur la charte (bordeaux, Playfair/Outfit). Zéro dépendance.
   Réutilise les variables --burgundy, --charcoal… déclarées par landing.css/site.css
   (fallbacks fournis au cas où l'outil est utilisé hors de ces contextes).
   ═══════════════════════════════════════════════════════════════════════════ */
.tool {
    --tl-burgundy: var(--burgundy, #7B2D3B);
    --tl-burgundy-dark: var(--burgundy-dark, #5E1F2C);
    --tl-charcoal: var(--charcoal, #2D3436);
    --tl-green: var(--green-dark, #1F6B45);
    --tl-gray50: var(--gray-50, #F5F2ED);
    --tl-gray200: var(--gray-200, #E5E7EB);
    --tl-gray500: var(--gray-500, #6B7280);
    font-family: 'Outfit', 'Outfit Fallback', system-ui, sans-serif;
    background: #fff;
    border: 1px solid var(--tl-gray200);
    border-radius: 18px;
    padding: clamp(20px, 4vw, 30px);
    margin: 28px 0;
    box-shadow: 0 10px 34px rgba(45,52,54,0.07);
    max-width: 720px;
    contain: content;
}
.tool * { box-sizing: border-box; }
.tool-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.tool-badge {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--tl-burgundy); background: var(--burgundy-pale, #F5EAEC);
    padding: 6px 12px; border-radius: 999px;
}
.tool-title {
    font-family: 'Playfair Display', 'Playfair Fallback', serif;
    font-size: clamp(1.25rem, 3vw, 1.6rem); font-weight: 700; color: var(--tl-charcoal);
    margin: 10px 0 6px; line-height: 1.2;
}
.tool-intro { color: var(--tl-gray500); font-size: 0.96rem; line-height: 1.5; margin: 0 0 20px; }

.tool-field { margin-bottom: 20px; }
.tool-label { display: block; font-weight: 600; color: var(--tl-charcoal); margin-bottom: 10px; font-size: 0.98rem; }
.tool-label .hint { font-weight: 400; color: var(--tl-gray500); font-size: 0.85rem; }

/* Segmented control (choix multiples) */
.tool-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-seg button {
    flex: 1 1 auto; min-width: 60px;
    font: inherit; font-weight: 600; font-size: 0.95rem;
    padding: 11px 14px; border-radius: 11px; cursor: pointer;
    background: var(--tl-gray50); color: var(--tl-charcoal);
    border: 1.5px solid transparent; transition: background .15s, border-color .15s, color .15s;
}
.tool-seg button:hover { border-color: rgba(123,45,59,0.3); }
.tool-seg button[aria-pressed="true"] {
    background: var(--tl-burgundy); color: #fff; border-color: var(--tl-burgundy);
    box-shadow: 0 4px 14px rgba(123,45,59,0.28);
}

/* Range + number combo */
.tool-range-row { display: flex; align-items: center; gap: 16px; }
.tool-range-row input[type="range"] { flex: 1; accent-color: var(--tl-burgundy); height: 6px; }
.tool-num {
    width: 96px; text-align: center; font: inherit; font-weight: 700; font-size: 1.05rem;
    color: var(--tl-burgundy); padding: 9px 8px; border: 1.5px solid var(--tl-gray200);
    border-radius: 10px; background: #fff;
}
.tool-num:focus, .tool-seg button:focus-visible, .tool select:focus { outline: 2px solid var(--tl-burgundy); outline-offset: 2px; }
.tool select {
    width: 100%; font: inherit; font-size: 0.98rem; padding: 11px 12px;
    border: 1.5px solid var(--tl-gray200); border-radius: 11px; background: #fff; color: var(--tl-charcoal);
}

/* Result panel */
.tool-out {
    background: linear-gradient(135deg, #fff 0%, var(--tl-gray50) 100%);
    border: 1px solid var(--tl-gray200); border-radius: 14px; padding: 20px; margin-top: 6px;
}
.tool-out-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; }
.tool-stat { text-align: center; padding: 6px 4px; }
.tool-stat .v {
    font-family: 'Playfair Display', 'Playfair Fallback', serif; font-weight: 700;
    font-size: clamp(1.6rem, 5vw, 2.1rem); color: var(--tl-burgundy); line-height: 1;
}
.tool-stat .v.up { color: #B4232F; }
.tool-stat .v.down, .tool-stat .v.ok { color: var(--tl-green); }
.tool-stat .k { font-size: 0.78rem; color: var(--tl-gray500); margin-top: 8px; font-weight: 500; line-height: 1.3; }
.tool-verdict {
    font-size: 1.02rem; font-weight: 600; color: var(--tl-charcoal);
    padding: 4px 2px 14px; line-height: 1.45;
}
.tool-verdict.ok { color: var(--tl-green); }
.tool-verdict.warn { color: #B4232F; }
.tool-note { font-size: 0.82rem; color: var(--tl-gray500); line-height: 1.5; margin: 14px 0 0; }
.tool-cta {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 18px;
    background: var(--tl-burgundy); color: #fff; text-decoration: none; font-weight: 700;
    padding: 13px 26px; border-radius: 11px; transition: background .15s, transform .15s;
}
.tool-cta:hover { background: var(--tl-burgundy-dark); transform: translateY(-1px); }
.tool-disclaimer {
    display: flex; gap: 8px; font-size: 0.8rem; color: var(--tl-gray500);
    margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--tl-gray200); line-height: 1.5;
}
@media (prefers-reduced-motion: reduce) { .tool-cta, .tool-seg button { transition: none; } }


/* ═══════════ Blog interactif — questions distribuées + capture ═══════════ */
.engage-card, .engage-cap {
    --e-burgundy: var(--burgundy, #7B2D3B);
    --e-burgundy-dark: var(--burgundy-dark, #5E1F2C);
    --e-charcoal: var(--charcoal, #2D3436);
    --e-gray200: var(--gray-200, #E5E7EB);
    --e-gray500: var(--gray-500, #6B7280);
    font-family: 'Outfit', 'Outfit Fallback', system-ui, sans-serif;
    box-sizing: border-box;
}
.engage-card * , .engage-cap * { box-sizing: border-box; }

/* Carte question — format proche du formulaire */
.engage-card {
    background: #fff; border: 1px solid var(--e-gray200); border-left: 4px solid var(--e-burgundy);
    border-radius: 16px; padding: clamp(20px, 4vw, 28px); margin: 30px 0;
    box-shadow: 0 10px 30px rgba(45,52,54,0.06); max-width: 760px;
}
.engage-q-tag { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--e-burgundy); margin-bottom: 10px; }
.engage-q { font-family: 'Playfair Display', 'Playfair Fallback', serif; font-size: clamp(1.25rem, 3vw, 1.6rem); font-weight: 700; color: var(--e-charcoal); line-height: 1.3; margin-bottom: 18px; }
.engage-opts { display: flex; flex-wrap: wrap; gap: 10px; }
.engage-opt {
    flex: 1 1 auto; min-width: 46%; text-align: left; font: inherit; font-size: 1rem; font-weight: 600;
    color: var(--e-charcoal); background: var(--gray-50, #F5F2ED); border: 1.5px solid transparent;
    border-radius: 12px; padding: 15px 18px; cursor: pointer; transition: border-color .15s, background .15s, transform .1s;
}
.engage-opt:hover { border-color: var(--e-burgundy); background: #fff; }
.engage-opt:active { transform: scale(0.99); }
.engage-opt:focus-visible { outline: 2px solid var(--e-burgundy); outline-offset: 2px; }
.engage-card.answered { border-left-color: var(--green-dark, #1F6B45); }
.engage-picked {
    display: inline-block; font-weight: 700; color: var(--green-dark, #1F6B45);
    background: var(--green-pale, #E8F5EE); border-radius: 999px; padding: 6px 14px; font-size: 0.9rem; margin-bottom: 10px;
}
.engage-picked::before { content: '✓ '; }
.engage-insight { color: #374151; font-size: 1.02rem; line-height: 1.6; }

/* Carte capture — apparaît quand le lecteur est engagé */
.engage-cap {
    max-width: 760px; margin: 34px 0; border-radius: 18px; overflow: hidden;
    background: linear-gradient(135deg, #7B2D3B 0%, #5E1F2C 100%); color: #FBF6F0;
    box-shadow: 0 18px 44px rgba(94,31,44,0.28);
}
.engage-cap.is-in { animation: engage-pop .45s ease; }
@keyframes engage-pop { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.engage-cap-in { padding: clamp(22px, 4vw, 32px); }
.engage-badge { display: inline-block; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; background: rgba(251,246,240,0.15); padding: 6px 13px; border-radius: 999px; margin-bottom: 12px; }
.engage-cap-title { font-family: 'Playfair Display', 'Playfair Fallback', serif; font-size: clamp(1.35rem, 3.2vw, 1.8rem); font-weight: 700; line-height: 1.2; margin: 0 0 8px; color: #fff; }
.engage-cap-sub { color: rgba(251,246,240,0.9); font-size: 1rem; line-height: 1.55; margin: 0 0 18px; }
.engage-cap-sub a { color: #F4C9B8; font-weight: 700; }
.engage-form { display: flex; flex-direction: column; gap: 10px; }
.engage-row { display: flex; gap: 10px; }
.engage-row .engage-inp { flex: 1; }
.engage-inp {
    width: 100%; font: inherit; font-size: 1rem; padding: 14px 16px; border-radius: 12px;
    border: 1.5px solid rgba(251,246,240,0.25); background: rgba(255,255,255,0.96); color: #2D3436;
}
.engage-inp::placeholder { color: #9CA3AF; }
.engage-inp:focus { outline: 2px solid #F4C9B8; outline-offset: 1px; }
.engage-submit {
    display: inline-block; text-align: center; text-decoration: none; font: inherit; font-weight: 800; font-size: 1.02rem;
    background: #FBF6F0; color: #7B2D3B; border: none; border-radius: 12px; padding: 15px 22px; cursor: pointer;
    transition: transform .12s, background .15s; margin-top: 2px;
}
.engage-submit:hover { transform: translateY(-1px); background: #fff; }
.engage-submit.as-link { display: inline-block; }
.engage-err { color: #FFD9D0; font-size: 0.88rem; font-weight: 600; }
.engage-full { display: inline-block; margin-top: 14px; color: rgba(251,246,240,0.92); font-weight: 600; font-size: 0.92rem; text-decoration: underline; }
.engage-full:hover { color: #fff; }
@media (max-width: 560px) { .engage-row { flex-direction: column; } .engage-opt { min-width: 100%; } }
@media (prefers-reduced-motion: reduce) { .engage-cap.is-in { animation: none; } .engage-opt, .engage-submit { transition: none; } }
