/* ============================================================
   Simulateur Remorquage Pro — Frontend CSS
   Tous les styles sont encapsulés sous .rs-sim-wrapper
   ============================================================ */

.rs-sim-wrapper {
    --rs-primary:        #e63946;
    --rs-secondary:      #1d3557;
    --rs-bg:             #f8f9fa;
    --rs-card-bg:        #ffffff;
    --rs-border:         #dee2e6;
    --rs-text:           #212529;
    --rs-text-muted:     #6c757d;
    --rs-success:        #198754;
    --rs-danger:         #dc3545;
    --rs-info:           #0d6efd;
    --rs-radius:         8px;
    --rs-shadow:         0 2px 12px rgba(0,0,0,.10);
    --rs-transition:     0.2s ease;

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--rs-text);
    max-width: 860px;
    margin: 0 auto;
    padding: 0 12px;
    box-sizing: border-box;
}

.rs-sim-wrapper *,
.rs-sim-wrapper *::before,
.rs-sim-wrapper *::after {
    box-sizing: border-box;
}

/* ── Marque ─────────────────────────────────────────────────── */
.rs-sim-brand-logo {
    text-align: center;
    margin-bottom: 16px;
}
.rs-sim-brand-logo img {
    max-height: 60px;
    width: auto;
}

.rs-sim-intro {
    text-align: center;
    margin-bottom: 20px;
    color: var(--rs-text-muted);
}

/* ── Card ───────────────────────────────────────────────────── */
.rs-sim-wrapper .rs-sim-card {
    background: var(--rs-card-bg);
    border: 1px solid var(--rs-border);
    border-radius: var(--rs-radius);
    box-shadow: var(--rs-shadow);
    margin-bottom: 24px;
    /* overflow: visible — requis pour afficher le dropdown d'autocomplétion */
    overflow: visible;
}

/* Les coins arrondis de l'en-tête sont gérés sans overflow:hidden */
.rs-sim-card > .rs-sim-card-header:first-child {
    border-radius: var(--rs-radius) var(--rs-radius) 0 0;
}

.rs-sim-card > *:last-child {
    border-radius: 0 0 var(--rs-radius) var(--rs-radius);
}

.rs-sim-card-header {
    background: var(--rs-secondary);
    color: #fff;
    padding: 20px 24px;
}

.rs-sim-title {
    margin: 0 0 4px;
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
}

.rs-sim-subtitle {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.85;
    color: #fff;
}

/* ── Formulaire ─────────────────────────────────────────────── */
.rs-sim-form {
    padding: 24px;
}

.rs-sim-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

@media (max-width: 580px) {
    .rs-sim-form-grid {
        grid-template-columns: 1fr;
    }
}

.rs-sim-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rs-sim-field-full {
    grid-column: 1 / -1;
}

.rs-sim-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--rs-text);
}

.rs-sim-required {
    color: var(--rs-danger);
    margin-left: 2px;
}

.rs-sim-hint {
    font-size: 0.78rem;
    color: var(--rs-text-muted);
}

.rs-sim-wrapper .rs-sim-input,
.rs-sim-wrapper .rs-sim-select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--rs-border);
    border-radius: 6px;
    font-size: 0.95rem;
    color: var(--rs-text);
    background: #fff;
    transition: border-color var(--rs-transition), box-shadow var(--rs-transition);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.rs-sim-wrapper .rs-sim-input:focus,
.rs-sim-wrapper .rs-sim-select:focus {
    border-color: var(--rs-primary);
    box-shadow: 0 0 0 3px rgba(230,57,70,.15);
}

.rs-sim-wrapper .rs-sim-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236c757d' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

.rs-sim-textarea {
    resize: vertical;
    min-height: 80px;
}

.rs-sim-field-error {
    font-size: 0.8rem;
    color: var(--rs-danger);
    min-height: 1em;
}

/* ── Conditions ─────────────────────────────────────────────── */
.rs-sim-conditions fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.rs-sim-conditions legend {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.rs-sim-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

.rs-sim-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
}

.rs-sim-wrapper .rs-sim-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--rs-primary);
    cursor: pointer;
    flex-shrink: 0;
}

/* ── Boutons ─────────────────────────────────────────────────── */
.rs-sim-submit-row {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.rs-sim-wrapper .rs-sim-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--rs-transition), color var(--rs-transition), transform var(--rs-transition);
    white-space: nowrap;
    line-height: 1.2;
}

.rs-sim-btn-primary {
    background: var(--rs-primary);
    color: #fff;
    border-color: var(--rs-primary);
}
.rs-sim-btn-primary:hover {
    background: #c1121f;
    border-color: #c1121f;
    color: #fff;
    text-decoration: none;
}

.rs-sim-btn-secondary {
    background: var(--rs-secondary);
    color: #fff;
    border-color: var(--rs-secondary);
}
.rs-sim-btn-secondary:hover {
    background: #14253d;
    color: #fff;
    text-decoration: none;
}

.rs-sim-btn-outline {
    background: transparent;
    color: var(--rs-secondary);
    border-color: var(--rs-secondary);
}
.rs-sim-btn-outline:hover {
    background: var(--rs-secondary);
    color: #fff;
    text-decoration: none;
}

.rs-sim-btn:active {
    transform: scale(.98);
}

.rs-sim-btn[disabled],
.rs-sim-btn.rs-loading {
    opacity: .6;
    pointer-events: none;
}

/* ── Notices ─────────────────────────────────────────────────── */
.rs-sim-notice {
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
}
.rs-sim-notice-error {
    background: #fff2f3;
    border: 1px solid #f5c2c7;
    color: #842029;
}
.rs-sim-notice-success {
    background: #d1e7dd;
    border: 1px solid #a3cfbb;
    color: #0a3622;
}
.rs-sim-notice-info {
    background: #e8f4fd;
    border: 1px solid #b6d4fe;
    color: #084298;
}

/* ── Résultat ────────────────────────────────────────────────── */
.rs-sim-result-card .rs-sim-card-header {
    background: linear-gradient(135deg, var(--rs-secondary) 0%, #2c4a7c 100%);
}

.rs-sim-result-title {
    font-size: 1.2rem;
    margin: 0;
    color: #fff;
}

.rs-sim-result-body {
    padding: 24px;
}

.rs-sim-breakdown {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.93rem;
    margin-bottom: 20px;
}

.rs-sim-breakdown td {
    padding: 8px 4px;
    border-bottom: 1px solid var(--rs-border);
}

.rs-sim-breakdown .rs-sim-val {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.rs-sim-breakdown .rs-sim-row-separator td {
    border-top: 2px solid var(--rs-border);
    padding-top: 12px;
}

.rs-sim-breakdown tfoot tr.rs-sim-row-total-ht td {
    border-top: 2px solid var(--rs-border);
    font-weight: 600;
    padding-top: 12px;
}

.rs-sim-breakdown tfoot tr.rs-sim-row-total-ttc td {
    border-top: 2px solid var(--rs-secondary);
    padding-top: 8px;
}

.rs-sim-total-ttc {
    font-size: 1.3rem;
    color: var(--rs-secondary);
}

.rs-sim-row-peage td {
    color: var(--rs-text-muted);
    font-style: italic;
}

.rs-sim-row-minimum td {
    font-size: 0.85rem;
    color: var(--rs-text-muted);
}

.rs-sim-disclaimer {
    background: #fffbf0;
    border: 1px solid #fce08b;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 0.82rem;
    color: #6b5b2e;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* ── CTA ─────────────────────────────────────────────────────── */
.rs-sim-cta-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}

/* ── Contact ─────────────────────────────────────────────────── */
.rs-sim-contact-card .rs-sim-card-header {
    background: var(--rs-bg);
    border-bottom: 1px solid var(--rs-border);
}
.rs-sim-contact-title {
    color: var(--rs-secondary) !important;
}
.rs-sim-contact-body {
    padding: 20px 24px;
}
.rs-sim-rgpd {
    margin-top: 8px;
}

/* ── Quote card ──────────────────────────────────────────────── */
.rs-sim-quote-card .rs-sim-card-header {
    background: #f0a500;
}

/* ════════════════════════════════════════════════════════════
   AUTOCOMPLÉTION ADRESSE (API BAN data.gouv.fr)
   ════════════════════════════════════════════════════════════ */

.rs-sim-autocomplete-wrap {
    position: relative;
}

.rs-sim-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.rs-sim-input-wrap .rs-sim-input {
    padding-right: 42px;
}

.rs-sim-geolocate-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--rs-text-muted);
    line-height: 1;
    border-radius: 4px;
    transition: color var(--rs-transition), background var(--rs-transition);
}

.rs-sim-geolocate-btn:hover {
    color: var(--rs-primary);
    background: rgba(230,57,70,.08);
}

.rs-sim-geolocate-btn.rs-sim-loading-geo {
    animation: rs-spin 1s linear infinite;
    color: var(--rs-primary);
}

@keyframes rs-spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* Liste déroulante */
.rs-sim-autocomplete-list {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid var(--rs-primary);
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0,0,0,.15);
    list-style: none;
    margin: 0;
    padding: 4px 0;
    z-index: 9999;
    max-height: 240px;
    overflow-y: auto;
    display: none;
}

.rs-sim-autocomplete-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    padding: 9px 14px;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.3;
    transition: background var(--rs-transition);
    border-bottom: 1px solid #f0f0f0;
}

.rs-sim-autocomplete-list li:last-child {
    border-bottom: none;
}

.rs-sim-autocomplete-list li:hover,
.rs-sim-autocomplete-list li.rs-sim-ac-active {
    background: rgba(230,57,70,.06);
}

.rs-sim-ac-label {
    color: var(--rs-text);
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Indicateur de chargement sur le champ pendant la recherche BAN */
.rs-sim-wrapper .rs-sim-input.rs-sim-ac-loading {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 38 38' stroke='%23e63946'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg transform='translate(1 1)' stroke-width='2'%3E%3Ccircle stroke-opacity='.3' cx='18' cy='18' r='18'/%3E%3Cpath d='M36 18c0-9.94-8.06-18-18-18'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 18 18' to='360 18 18' dur='.8s' repeatCount='indefinite'/%3E%3C/path%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 16px;
}

.rs-sim-ac-type {
    font-size: 0.72rem;
    color: var(--rs-text-muted);
    background: #f0f0f0;
    border-radius: 10px;
    padding: 1px 7px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Badge géolocalisation ✓ */
.rs-sim-geo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: var(--rs-success);
    color: #fff;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    margin-left: 6px;
    vertical-align: middle;
}

/* Distance auto-calculée */
.rs-sim-distance-wrap {
    display: flex;
    gap: 8px;
    align-items: center;
}

.rs-sim-distance-wrap .rs-sim-input {
    flex: 1;
}

.rs-sim-distance-wrap .rs-sim-input.rs-sim-loading-input {
    background: #f8f9fa;
    color: var(--rs-text-muted);
    animation: rs-pulse 1.2s ease-in-out infinite;
}

@keyframes rs-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: .5; }
}

.rs-sim-recalc-btn {
    flex-shrink: 0;
    background: none;
    border: 1.5px solid var(--rs-border);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 1rem;
    cursor: pointer;
    color: var(--rs-text-muted);
    transition: border-color var(--rs-transition), color var(--rs-transition);
}

.rs-sim-recalc-btn:hover {
    border-color: var(--rs-primary);
    color: var(--rs-primary);
}

.rs-sim-distance-source {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--rs-success);
    margin-left: 8px;
    font-style: italic;
}

/* ── Fuel price editable row ─────────────────────────────────── */
.rs-sim-fuel-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
    padding: 8px 10px;
    background: #f0faf3;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    font-size: 0.85rem;
}

.rs-sim-fuel-icon {
    font-size: 1rem;
}

.rs-sim-fuel-type {
    font-weight: 600;
    color: var(--rs-success);
}

.rs-sim-fuel-price-label {
    color: var(--rs-text-muted);
    margin-left: 4px;
}

.rs-sim-fuel-price-input {
    width: 72px;
    padding: 3px 6px;
    border: 1px solid #aad5b5;
    border-radius: 4px;
    font-size: 0.88rem;
    text-align: right;
    color: var(--rs-text);
    background: #fff;
    -moz-appearance: textfield;
    font-variant-numeric: tabular-nums;
}

.rs-sim-fuel-price-input:focus {
    outline: none;
    border-color: var(--rs-success);
    box-shadow: 0 0 0 2px rgba(25,135,84,.15);
}

.rs-sim-fuel-price-input::-webkit-outer-spin-button,
.rs-sim-fuel-price-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.rs-sim-fuel-unit {
    color: var(--rs-text-muted);
    font-weight: 500;
}

.rs-sim-fuel-source-tag {
    font-size: 0.75rem;
    font-style: italic;
    margin-left: auto;
}

.rs-sim-fuel-source-tag.rs-fuel-api    { color: var(--rs-success); }
.rs-sim-fuel-source-tag.rs-fuel-fallback { color: var(--rs-text-muted); }

/* ── Ligne "inclus dans le prix/km" ──────────────────────────── */
.rs-sim-breakdown .rs-sim-row-inclus td {
    color: var(--rs-text-muted);
    font-style: italic;
    font-size: 0.88rem;
}
.rs-sim-breakdown .rs-sim-row-inclus .rs-sim-val {
    color: var(--rs-text-muted);
}
.rs-sim-inclus-icon {
    margin-right: 4px;
    font-style: normal;
}

/* ── Fuel result row ─────────────────────────────────────────── */
.rs-sim-breakdown .rs-sim-row-carburant:not(.rs-sim-row-inclus) td {
    color: var(--rs-success);
}

.rs-sim-breakdown .rs-sim-fuel-source {
    display: block;
    font-size: 0.76rem;
    color: var(--rs-text-muted);
    font-style: italic;
}

/* ── Sélecteur de classe de péage ────────────────────────────── */
.rs-sim-toll-class-wrap {
    margin-bottom: 10px;
}
.rs-sim-toll-class-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--rs-text-muted);
    margin-bottom: 6px;
}
.rs-sim-toll-class-selector {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.rs-sim-toll-class-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 14px;
    border: 2px solid var(--rs-border);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
    min-width: 60px;
}
.rs-sim-toll-class-btn:hover {
    border-color: var(--rs-primary);
    background: #fef2f2;
}
.rs-sim-toll-class-btn.rs-sim-tc-active {
    border-color: var(--rs-primary);
    background: var(--rs-primary);
    color: #fff;
}
.rs-sim-tc-num {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
}
.rs-sim-tc-label {
    font-size: 0.70rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* ── Fiche rappel classe ──────────────────────────────────────── */
.rs-sim-toll-class-card {
    margin-bottom: 8px;
}
.rs-sim-tc-card-inner {
    border-left: 4px solid #2563eb;
    background: #f8faff;
    border-radius: 0 8px 8px 0;
    padding: 10px 14px;
    font-size: 0.82rem;
}
.rs-sim-tc-card-title {
    font-weight: 700;
    font-size: 0.88rem;
    margin-bottom: 6px;
}
.rs-sim-tc-card-row {
    margin-bottom: 2px;
    color: var(--rs-text);
}
.rs-sim-tc-card-key {
    font-weight: 600;
    color: var(--rs-text-muted);
}

/* ── Toll detail — form (inline below péage input) ───────────── */
.rs-sim-toll-detail {
    margin-top: 6px;
    font-size: 0.82rem;
    color: var(--rs-text-muted);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}
.rs-sim-toll-label {
    font-weight: 600;
    color: var(--rs-text);
    margin-right: 2px;
}
.rs-sim-toll-item {
    background: #f0f4ff;
    border: 1px solid #c7d4f5;
    border-radius: 4px;
    padding: 2px 8px;
    white-space: nowrap;
}
.rs-sim-toll-item strong {
    color: #1d4ed8;
    margin-right: 4px;
}
.rs-sim-toll-sep {
    color: var(--rs-border);
    font-size: 0.9em;
}

/* ── Toll detail — result breakdown row ──────────────────────── */
.rs-sim-breakdown .rs-sim-row-toll-detail td {
    padding-top: 2px;
    padding-bottom: 8px;
}
.rs-sim-toll-breakdown {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    padding: 6px 8px;
    background: #f0f4ff;
    border-radius: 6px;
    border: 1px solid #c7d4f5;
}
.rs-sim-toll-breakdown-label {
    font-weight: 600;
    color: #1d4ed8;
    margin-right: 4px;
    white-space: nowrap;
}
.rs-sim-toll-breakdown-item {
    background: #fff;
    border: 1px solid #c7d4f5;
    border-radius: 4px;
    padding: 2px 8px;
    white-space: nowrap;
}
.rs-sim-toll-breakdown-item strong {
    color: #1d4ed8;
    margin-right: 4px;
}

/* ── Formulaire par étapes ───────────────────────────────────── */
.rs-sim-step {
    position: relative;
    padding-left: 52px;
}

.rs-sim-step + .rs-sim-step {
    margin-top: 16px;
}

/* Connecteur vertical entre étapes */
.rs-sim-step + .rs-sim-step::before {
    content: '';
    position: absolute;
    left: 17px;
    top: -14px;
    width: 2px;
    height: 18px;
    background: var(--rs-border);
}

.rs-sim-step-done + .rs-sim-step::before {
    background: var(--rs-success);
}

.rs-sim-step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    margin-left: -52px;
}

.rs-sim-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 0.95rem;
    font-weight: 700;
    flex-shrink: 0;
    border: 2px solid var(--rs-border);
    background: #fff;
    color: var(--rs-text-muted);
    transition: background .2s, color .2s, border-color .2s;
}

.rs-sim-step-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--rs-text-muted);
    transition: color .2s;
}

.rs-sim-step-body {
    margin-bottom: 8px;
}

.rs-sim-step-desc {
    font-size: 0.83rem;
    color: var(--rs-text-muted);
    margin: 0 0 10px;
}

/* Actif */
.rs-sim-step-active .rs-sim-step-num {
    background: var(--rs-primary);
    border-color: var(--rs-primary);
    color: #fff;
}
.rs-sim-step-active .rs-sim-step-title {
    color: var(--rs-text);
}

/* Fait */
.rs-sim-step-done .rs-sim-step-num {
    background: var(--rs-success);
    border-color: var(--rs-success);
    color: #fff;
}
.rs-sim-step-done .rs-sim-step-title {
    color: var(--rs-success);
}

/* Verrouillé */
.rs-sim-step-locked .rs-sim-step-body {
    display: none;
}
.rs-sim-step-locked .rs-sim-step-title {
    color: #bbb;
}
.rs-sim-step-locked .rs-sim-step-num {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #bbb;
}

/* ── Statut de l'itinéraire calculé ──────────────────────────── */
.rs-sim-route-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    margin: 14px 0 6px;
    font-size: 0.83rem;
}

/* ── Notice recalcul ─────────────────────────────────────────── */
.rs-sim-recalc-notice {
    padding: 8px 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 6px;
    font-size: 0.83rem;
    color: #92400e;
    margin: 8px 0;
}

/* ── Guide d'utilisation ─────────────────────────────────────── */
.rs-sim-guide {
    margin-top: 20px;
    border: 1px solid var(--rs-border);
    border-radius: var(--rs-radius);
    overflow: hidden;
    background: #fff;
}

.rs-sim-guide-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 18px;
    background: #f8f9fa;
    border: none;
    border-bottom: 1px solid transparent;
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--rs-secondary);
    text-align: left;
    transition: background var(--rs-transition), border-color var(--rs-transition);
    font-family: inherit;
}

.rs-sim-guide-toggle:hover {
    background: #eef0f2;
}

.rs-sim-guide-toggle[aria-expanded="true"] {
    background: #fff;
    border-bottom-color: var(--rs-border);
}

.rs-sim-guide-toggle-inner {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rs-sim-guide-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(230,57,70,.10);
    color: var(--rs-primary);
    border-radius: 50%;
    flex-shrink: 0;
}

.rs-sim-guide-chevron {
    flex-shrink: 0;
    color: var(--rs-text-muted);
    transition: transform 0.25s ease;
}

.rs-sim-guide-toggle[aria-expanded="true"] .rs-sim-guide-chevron {
    transform: rotate(180deg);
}

.rs-sim-guide-body {
    padding: 20px 18px 24px;
}

.rs-sim-guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.rs-sim-guide-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #eaecef;
    transition: box-shadow var(--rs-transition);
}

.rs-sim-guide-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
}

.rs-sim-guide-item-full {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #f0f4ff 0%, #f8f9fa 100%);
    border-color: #c9d5f5;
}

.rs-sim-guide-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    flex-shrink: 0;
}

.rs-sim-guide-icon-blue   { background: #dbeafe; color: #1d4ed8; }
.rs-sim-guide-icon-teal   { background: #d1fae5; color: #065f46; }
.rs-sim-guide-icon-orange { background: #ffedd5; color: #c2410c; }
.rs-sim-guide-icon-purple { background: #ede9fe; color: #6d28d9; }
.rs-sim-guide-icon-red    { background: #fee2e2; color: #b91c1c; }
.rs-sim-guide-icon-gray   { background: #f1f5f9; color: #475569; }
.rs-sim-guide-icon-green  { background: #dcfce7; color: #166534; }
.rs-sim-guide-icon-navy   { background: #dbeafe; color: #1e3a8a; }

.rs-sim-guide-item-text strong {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--rs-text);
    margin-bottom: 4px;
}

.rs-sim-guide-item-text p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--rs-text-muted);
    line-height: 1.55;
}

/* ── Bouton téléchargement PDF ───────────────────────────────── */
.rs-sim-btn-pdf {
    background: #0f766e;
    color: #fff;
    border-color: #0f766e;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.rs-sim-btn-pdf:hover {
    background: #0d6460;
    border-color: #0d6460;
    color: #fff;
    text-decoration: none;
}

/* ── Modale email → PDF ──────────────────────────────────────── */
.rs-pdf-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.rs-pdf-modal-box {
    background: #fff;
    border-radius: 12px;
    padding: 36px 32px 32px;
    max-width: 420px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    text-align: center;
}
.rs-pdf-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    font-size: 1.1rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 4px;
}
.rs-pdf-modal-close:hover { color: #333; background: #f0f0f0; }
.rs-pdf-modal-icon { font-size: 2.8rem; margin-bottom: 12px; line-height: 1; }
.rs-pdf-modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1d3557;
    margin: 0 0 10px;
}
.rs-pdf-modal-desc {
    font-size: 0.88rem;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.55;
}
.rs-pdf-modal-desc small { display: block; margin-top: 4px; font-size: 0.78rem; color: #888; }
.rs-pdf-modal-field { margin-bottom: 16px; }
.rs-pdf-email-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #212529;
    background: #fff;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    text-align: center;
    font-family: inherit;
}
.rs-pdf-email-input:focus {
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15,118,110,.15);
}
.rs-pdf-modal-error { font-size: 0.82rem; color: #b91c1c; margin-top: 6px; }
.rs-pdf-submit-btn {
    width: 100%;
    justify-content: center;
    padding: 13px 20px;
    font-size: 1rem;
    background: #0f766e;
    border-color: #0f766e;
}
.rs-pdf-submit-btn:hover { background: #0d6460; border-color: #0d6460; }
.rs-pdf-submit-btn:disabled { opacity: .65; pointer-events: none; }

/* Sélecteur de couleur PDF */
.rs-pdf-color-label {
    font-size: 0.84rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 10px;
    text-align: left;
}
.rs-pdf-color-picker {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
}
.rs-pdf-color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: transform .15s, box-shadow .15s;
    outline: none;
}
.rs-pdf-color-swatch:hover {
    transform: scale(1.12);
    box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.rs-pdf-color-swatch.rs-pdf-color-active {
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(0,0,0,.35);
    transform: scale(1.1);
}

/* Bouton passer */
.rs-pdf-skip-btn {
    display: block;
    width: 100%;
    background: none;
    border: none;
    color: #888;
    font-size: 0.83rem;
    cursor: pointer;
    margin-top: 10px;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-family: inherit;
}
.rs-pdf-skip-btn:hover { color: #555; }

/* ── Powered by ──────────────────────────────────────────────── */
.rs-sim-powered {
    text-align: center;
    font-size: 0.78rem;
    color: var(--rs-text-muted);
    margin-top: 8px;
    padding-bottom: 8px;
}

.rs-sim-powered a {
    color: var(--rs-text-muted);
    text-decoration: none;
}

.rs-sim-powered a:hover {
    color: var(--rs-primary);
    text-decoration: underline;
}
