/* ============================================================
   SIM IA — Modern CSS  (inspiré de remotepass.com)
   ============================================================ */

/* ================================================================
   1. WRAPPER
   ================================================================ */

.sim-ia-wrapper {
    position: relative;
    background: #ffffff;
    background-image: linear-gradient(#fff, #fafbff 12%, #e4ebfe 70.53%);
    border: 1.5px solid #c7d3fd;
    border-radius: 20px;
    padding: 64px 32px 88px;
    color: var(--sim-text);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(17, 78, 247, 0.06);
}

/* ================================================================
   2. HEADER
   ================================================================ */

.sim-ia-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 52px;
}

.sim-ia-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #114ef7;
    background: #eef2ff;
    border: 1.5px solid #c7d3fd;
    padding: 5px 14px;
    border-radius: 100px;
    margin-bottom: 22px;
}

.sim-ia-eyebrow-dot {
    position: relative;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #16a34a;
    flex-shrink: 0;
}

.sim-ia-eyebrow-dot::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: rgba(22, 163, 74, 0.3);
    animation: sim-dot-pulse 2s ease-out infinite;
}

@keyframes sim-dot-pulse {
    0%   { transform: scale(0.8); opacity: 1; }
    70%  { transform: scale(1.8); opacity: 0; }
    100% { transform: scale(0.8); opacity: 0; }
}

.sim-ia-header h2 {
    font-size: clamp(1.75rem, 4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 14px;
    color: #0d1117;
}

.sim-ia-header p {
    font-size: 1rem;
    color: #6b7280;
    line-height: 1.65;
    margin: 0;
}

/* ================================================================
   3. STATS
   ================================================================ */

.sim-ia-stats {
    display: flex;
    gap: 14px;
    margin-top: 36px;
    flex-wrap: wrap;
}

.sim-ia-stat {
    flex: 1;
    min-width: 100px;
    text-align: center;
    padding: 18px 12px;
    background: #ffffff;
    border-radius: 12px;
    border: 1.5px solid #c7d3fd;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.sim-ia-stat:hover {
    border-color: #114ef7;
    box-shadow: 0 2px 8px rgba(17, 78, 247, 0.1);
}

.sim-ia-stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #114ef7 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

.sim-ia-stat-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: #9ca3af;
    margin-top: 4px;
    display: block;
    letter-spacing: 0.03em;
}

/* ================================================================
   4. SEPARATEUR
   ================================================================ */

.sim-ia-separator {
    height: 1px;
    background-color: #c7d3fd;
    width: 60%;
    margin: 30px auto 0;
}

/* ================================================================
   5. RECHERCHE
   ================================================================ */

.sim-ia-search {
    max-width: 400px;
    margin: 0 auto 20px;
    padding-top: 28px;
}

.sim-ia-search .sim-search {
    width: 100%;
    padding: 11px 16px;
    border-radius: 10px;
    border: 1.5px solid #c7d3fd;
    background: #ffffff;
    color: #0d1117;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s;
    box-sizing: border-box;
}

.sim-search::placeholder {
    color: #9ca3af;
}

.sim-search:focus {
    border-color: #114ef7;
    box-shadow: 0 0 0 3px rgba(17, 78, 247, 0.1);
}

/* ================================================================
   6. FILTRES
   ================================================================ */

.sim-filters {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.sim-filter {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 100px;
    border: 1.5px solid #c7d3fd;
    background: #ffffff;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.18s;
}

.sim-filter:hover {
    border-color: #114ef7;
    color: #114ef7;
    background: #eef2ff;
}

.sim-filter.active {
    background: white !important;
    border-color: #114ef7 !important;
    color: #114ef7 !important;
    box-shadow: 0 2px 8px rgba(17, 78, 247, 0.25) !important;
}

/* ================================================================
   7. LAYOUT
   ================================================================ */

.sim-ia-layout {
    display: grid;
    grid-template-columns: 1fr 440px;
    gap: 24px;
}

@media (max-width: 900px) {
    .sim-ia-layout {
        grid-template-columns: 1fr;
    }
}

/* ================================================================
   8. GRILLE METIERS
   ================================================================ */

.sim-ia-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    place-content: start;
}

@media (max-width: 1200px) {
    .sim-ia-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 800px) {
    .sim-ia-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* ================================================================
   9. CARTE
   ================================================================ */

.sim-ia-card {
    background: #ffffff;
    border: 1.5px solid #d1d8f8;
    border-radius: 12px;
    padding: 16px 14px;
    cursor: pointer;
    position: relative;
    transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}

.sim-ia-card:hover {
    border-color: #114ef7;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(17, 78, 247, 0.12);
}

.sim-ia-card.active {
    border-color: #114ef7;
    background: #f0f4ff;
    box-shadow: 0 4px 16px rgba(17, 78, 247, 0.15);
}

.sim-ia-card-icon {
    font-size: 1.4rem;
    margin-bottom: 8px;
    display: block;
    line-height: 1;
}

.sim-ia-card-title {
    font-size: 0.78rem;
    font-weight: 650;
    color: #0d1117;
    line-height: 1.35;
}

.sim-ia-card-tag {
    display: inline-block;
    margin-top: 7px;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #114ef7;
    background: #eef2ff;
    padding: 2px 8px;
    border-radius: 5px;
}

.sim-ia-card.active .sim-ia-card-tag {
    background: #ffffff;
}

/* ================================================================
   10. PANEL — colonne droite
   ================================================================ */

.sim-ia-panel {
    display: block;
    position: relative;
}

/* Panel par défaut */
.sim-ia-panel-default {
    display: block;
    border: 1.5px dashed #adc2fc;
    border-radius: 16px;
    padding: 40px 32px;
    text-align: center;
    background: #fafbff;
    position: sticky;
    top: 124px;
}

.sim-ia-panel-default.inactive {
    display: none;
}

.sim-ia-panel-default span {
    display: block;
    font-size: 2.4rem;
    margin-bottom: 14px;
    opacity: 0.35;
}

.sim-ia-panel-default p {
    color: #9ca3af;
    font-size: 0.875rem;
    line-height: 1.65;
    margin: 0;
}

/* Panel actif */
.sim-ia-panel-content {
    display: none;
    flex-direction: column;
    background: #ffffff;
    border: 1.5px solid #adc2fc;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(17, 78, 247, 0.08), 0 8px 32px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
}

.sim-ia-panel-content.active {
    display: flex;
}

/* En-tête du panel */
.sim-ia-panel-header {
    background: linear-gradient(135deg, #f0f4ff 0%, #eef9f6 100%);
    padding: 24px 24px 20px;
    border-bottom: 1.5px solid #c7d3fd;
}

#simPIcon {
    font-size: 2rem;
    margin-bottom: 8px;
    display: block;
    line-height: 1;
}

#simPTitle {
    font-size: 1.05rem;
    font-weight: 750;
    margin: 0 0 4px;
    color: #0d1117;
    letter-spacing: -0.01em;
}

.sim-ia-panel-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #059669;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Corps du panel */
.sim-ia-panel-body {
    padding: 22px 24px 16px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: #c7d3fd transparent;
}

/* CTA fixe hors zone scrollable */
.sim-ia-panel-footer {
    padding: 16px 24px 20px;
    border-top: 1.5px solid #c7d3fd;
    background: #ffffff;
    flex-shrink: 0;
}

.sim-ia-panel-body::-webkit-scrollbar {
    width: 4px;
}

.sim-ia-panel-body::-webkit-scrollbar-track {
    background: transparent;
}

.sim-ia-panel-body::-webkit-scrollbar-thumb {
    background: #c7d3fd;
    border-radius: 4px;
}

/* ================================================================
   11. GAINS
   ================================================================ */

.sim-ia-gains-title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #9ca3af;
    margin-bottom: 12px;
}

.sim-ia-gain {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
    padding: 12px 14px;
    background: #f8f9ff;
    border-radius: 10px;
    border: 1.5px solid #e0e7ff;
    transition: border-color 0.18s, background 0.18s;
}

.sim-ia-gain:hover {
    border-color: #adc2fc;
    background: #f0f4ff;
}

.sim-ia-gain span:first-child {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.sim-ia-gain span:last-child {
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.55;
}

.sim-ia-gain span:last-child strong {
    color: #114ef7;
    font-weight: 600;
}

/* ================================================================
   12. BLOC TEMPS / EUROS
   ================================================================ */

.sim-ia-time-save {
    background: linear-gradient(135deg, #f0f4ff 0%, #eef9f6 100%);
    border: 1.5px solid #adc2fc;
    border-radius: 12px;
    padding: 14px 16px;
    margin: 18px 0;
}

.sim-ia-time-metrics {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.sim-ia-time-metric {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.sim-ia-time-divider {
    width: 1px;
    height: 36px;
    background: #adc2fc;
    flex-shrink: 0;
}

.sim-ia-time-value {
    font-size: 2rem;
    font-weight: 800;
    color: #114ef7;
    letter-spacing: -0.02em;
    line-height: 1;
}

.sim-ia-time-unit {
    font-size: 0.7rem;
    font-weight: 600;
    color: #6b7280;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-top: 3px;
    white-space: nowrap;
}

.sim-ia-time-euro {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 12px 0;
    margin-top: 12px;
    border-top: 1.5px solid #c7d3fd;
}

.sim-ia-time-euro .sim-ia-time-value {
    font-size: 1.6rem;
}

.sim-ia-time-value--green {
    color: #059669;
}

.sim-ia-time-label {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.45;
    padding-top: 10px;
    border-top: 1.5px solid #c7d3fd;
}

/* ================================================================
   13. SLIDER TAUX HORAIRE
   ================================================================ */

.sim-ia-rate-slider {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1.5px solid #c7d3fd;
}

.sim-ia-rate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.sim-ia-rate-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sim-ia-rate-value {
    font-size: 0.82rem;
    font-weight: 700;
    color: #114ef7;
}

.sim-ia-slider {
    width: 100%;
    accent-color: #114ef7;
    cursor: pointer;
}

/* ================================================================
   14. CTA
   ================================================================ */

.sim-ia-cta {
    margin-top: 0;
}

.sim-ia-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 20px;
    background: #114ef7;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
}

.sim-ia-btn-primary:hover {
    background: #0a3fd4;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(17, 78, 247, 0.3);
    color: #ffffff;
}

.sim-ia-btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 20px;
    background: transparent;
    color: #6b7280;
    border: 1.5px solid #c7d3fd;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 8px;
    letter-spacing: 0.01em;
    transition: border-color 0.18s, color 0.18s, background 0.18s;
}

.sim-ia-btn-secondary:hover {
    border-color: #114ef7;
    color: #114ef7;
    background: #f0f4ff;
}

/* ================================================================
   15. MODAL OVERLAY — caché par défaut sur TOUS les écrans
       (doit rester hors du media query)
   ================================================================ */

.sim-ia-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.5);
    z-index: 1000;
    backdrop-filter: blur(4px);
    padding: 20px 16px;
    align-items: stretch;
}

.sim-ia-modal-overlay.active {
    display: flex;
}

/* ================================================================
   16. MODAL — styles et masquage du panel sur mobile
   ================================================================ */

@media (max-width: 900px) {

    .sim-ia-panel {
        display: none;
    }

    .sim-ia-modal {
        background: #ffffff;
        border: 1.5px solid #adc2fc;
        border-radius: 16px;
        width: 100%;
        height: 100%;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        box-shadow: 0 -4px 32px rgba(17, 78, 247, 0.12);
    }

    .sim-ia-modal-header {
        background: linear-gradient(135deg, #f0f4ff 0%, #eef9f6 100%);
        padding: 16px 20px;
        border-bottom: 1.5px solid #c7d3fd;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-shrink: 0;
    }

    .sim-ia-modal-header-left {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .sim-ia-modal-close {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        border: 1.5px solid #c7d3fd;
        background: #ffffff;
        color: #FFFFFF;
        font-size: 1rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        transition: border-color 0.18s, color 0.18s;
    }

    .sim-ia-modal-close:hover {
        border-color: #114ef7;
        color: #114ef7;
    }

    .sim-ia-modal-body {
        padding: 20px;
        overflow-y: auto;
        flex: 1;
        min-height: 0;
        scroll-behavior: smooth;
        scrollbar-width: thin;
        scrollbar-color: #c7d3fd transparent;
    }

    .sim-ia-modal-footer {
        padding: 16px 20px 20px;
        border-top: 1.5px solid #c7d3fd;
        background: #ffffff;
        flex-shrink: 0;
    }
}