/* ═══════════════════════════════════════════════
   RAT DEVIS WIZARD — CSS
   ═══════════════════════════════════════════════ */
.rat-dw {
    --rat-accent: #CE1327;
    --rat-accent-light: #fff8f8;
    max-width: 860px;
    margin: 0 auto;
    padding: 40px 32px;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0,0,0,.08);
    position: relative;
    overflow: hidden;
    font-family: inherit;
    background: #fff;
}

/* ── Progress ── */
.rat-dw__progress { margin-bottom: 36px; }
.rat-dw__progress-track { height: 4px; background: #e9ecef; border-radius: 4px; overflow: hidden; margin-bottom: 16px; }
.rat-dw__progress-fill { height: 100%; background: var(--rat-accent); border-radius: 4px; width: 33.33%; transition: width .5s cubic-bezier(.4,0,.2,1); }
.rat-dw__steps-indicator { display: flex; justify-content: space-between; }
.rat-dw__step-ind { display: flex; flex-direction: column; align-items: center; gap: 4px; opacity: .4; transition: opacity .3s; }
.rat-dw__step-ind.is-active, .rat-dw__step-ind.is-done { opacity: 1; }
.rat-dw__step-num { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #ccc; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; transition: all .3s; }
.rat-dw__step-ind.is-active .rat-dw__step-num,
.rat-dw__step-ind.is-done .rat-dw__step-num { background: var(--rat-accent); border-color: var(--rat-accent); color: #fff; }
.rat-dw__step-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: #666; }

/* ── Steps ── */
.rat-dw__step { display: none; animation: ratDwFadeIn .5s cubic-bezier(.4,0,.2,1); }
.rat-dw__step.is-active { display: block; }
@keyframes ratDwFadeIn { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
.rat-dw__step-title { font-size: 22px; font-weight: 700; color: #222; margin-bottom: 24px; text-align: center; }

/* ── Services grid ── */
.rat-dw__services {
    display: grid;
    grid-template-columns: repeat(var(--rat-dw-cols, 3), 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

/* ── Carte service ── */
.rat-dw__svc { cursor: pointer; position: relative; }
.rat-dw__svc-input { position: absolute; opacity: 0; pointer-events: none; }
.rat-dw__svc-inner {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    padding: 18px 10px; border-radius: 12px; border: 2px solid #e9ecef;
    background: #f8f8f8; transition: all .25s; position: relative; gap: 6px;
    height: 100%; box-sizing: border-box;
}
.rat-dw__svc-inner:hover { border-color: var(--rat-accent); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(206,19,39,.08); }
.rat-dw__svc-input:checked + .rat-dw__svc-inner { border-color: var(--rat-accent); border-width: 2px; background: #fff8f8; box-shadow: 0 4px 14px rgba(206,19,39,.08); }

/* Icône — taille fixe pour FA et SVG */
.rat-dw__svc-inner i,
.rat-dw__svc-inner i::before { font-size: 28px !important; color: var(--rat-accent); line-height: 1; }
.rat-dw__svc-inner svg { width: 28px !important; height: 28px !important; fill: var(--rat-accent); }
.rat-dw__svc-input:checked + .rat-dw__svc-inner i,
.rat-dw__svc-input:checked + .rat-dw__svc-inner i::before { transform: scale(1.1); }

.rat-dw__svc-label { font-size: 13px; font-weight: 700; color: #222; line-height: 1.2; }
.rat-dw__svc-desc  { font-size: 11px; color: #888; line-height: 1.3; }

/* Check badge */
.rat-dw__svc-check { position: absolute; top: 6px; right: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--rat-accent); color: #fff; display: flex; align-items: center; justify-content: center; opacity: 0; transform: scale(0); transition: all .25s cubic-bezier(.4,0,.2,1); }
.rat-dw__svc-check svg { width: 10px; height: 10px; }
.rat-dw__svc-input:checked + .rat-dw__svc-inner .rat-dw__svc-check { opacity: 1; transform: scale(1); }

/* ── Fields ── */
.rat-dw__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 28px; }
.rat-dw__field--full { grid-column: 1 / -1; }
.rat-dw__field label { display: block; font-size: 13px; font-weight: 600; color: #555; margin-bottom: 6px; }
.rat-dw__field input,
.rat-dw__field textarea { width: 100%; padding: 12px 16px; border: 2px solid #e9ecef; border-radius: 12px; font-size: 15px; transition: border-color .3s; background: #fafafa; font-family: inherit; resize: vertical; box-sizing: border-box; }
.rat-dw__field input:focus,
.rat-dw__field textarea:focus { outline: none; border-color: var(--rat-accent); background: #fff; box-shadow: 0 0 0 3px rgba(206,19,39,.06); }

/* Urgency */
.rat-dw__urgency { display: flex; gap: 8px; flex-wrap: wrap; }
.rat-dw__urg-opt { cursor: pointer; flex: 1; min-width: 70px; }
.rat-dw__urg-opt input { position: absolute; opacity: 0; }
.rat-dw__urg-opt span { display: block; padding: 8px 6px; border: 2px solid #e9ecef; border-radius: 50px; font-size: 12px; font-weight: 600; transition: all .3s; text-align: center; }
.rat-dw__urg-opt input:checked + span { border-color: var(--rat-accent); background: var(--rat-accent); color: #fff; }

/* ── Nav ── */
.rat-dw__nav { display: flex; justify-content: space-between; gap: 12px; }
.rat-dw__btn { padding: 14px 28px; border: none; border-radius: 50px; font-size: 15px; font-weight: 700; cursor: pointer; transition: all .35s; font-family: inherit; }
.rat-dw__btn--next, .rat-dw__btn--submit { background: var(--rat-accent); color: #fff; margin-left: auto; box-shadow: 0 4px 16px rgba(206,19,39,.3); }
.rat-dw__btn--next:hover, .rat-dw__btn--submit:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(206,19,39,.4); }
.rat-dw__btn--next:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
.rat-dw__btn--back { background: #f0f0f0; color: #555; }
.rat-dw__btn--back:hover { background: #e0e0e0; }

/* ── Success ── */
.rat-dw__success-inner { text-align: center; padding: 40px 20px; animation: ratDwFadeIn .6s cubic-bezier(.4,0,.2,1); }
.rat-dw__success-icon svg { width: 80px; height: 80px; margin-bottom: 20px; }
.rat-dw__success-icon circle { stroke-dasharray: 226; stroke-dashoffset: 226; animation: ratDwCircle .6s .2s forwards; }
.rat-dw__success-icon polyline { stroke-dasharray: 60; stroke-dashoffset: 60; animation: ratDwCheck .4s .7s forwards; }
@keyframes ratDwCircle { to { stroke-dashoffset: 0; } }
@keyframes ratDwCheck  { to { stroke-dashoffset: 0; } }
.rat-dw__success-msg { font-size: 17px; color: #333; line-height: 1.6; }

/* ── Loading ── */
.rat-dw__loading { position: absolute; inset: 0; background: rgba(255,255,255,.9); display: flex; align-items: center; justify-content: center; z-index: 10; }
.rat-dw__spinner { width: 40px; height: 40px; border: 3px solid #e9ecef; border-top-color: var(--rat-accent); border-radius: 50%; animation: ratSpin .7s linear infinite; }
@keyframes ratSpin { to { transform: rotate(360deg); } }

/* ── RGPD ── */
.rat-dw__rgpd { font-size: 12px; color: #777; line-height: 1.5; margin-bottom: 20px; }
.rat-dw__rgpd label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.rat-dw__rgpd-check { margin-top: 3px; flex-shrink: 0; width: 18px; height: 18px; accent-color: var(--rat-accent); }
.rat-dw__rgpd a { color: red !important; text-decoration: underline; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
    .rat-dw { padding: 24px 14px; }
    .rat-dw__fields { grid-template-columns: 1fr; }
    .rat-dw__step-title { font-size: 18px; }
}
@media (max-width: 480px) {
    .rat-dw { padding: 20px 10px; border-radius: 14px; }
    .rat-dw__step-title { font-size: 16px; margin-bottom: 14px; }
    .rat-dw__svc-label { font-size: 12px; }
    .rat-dw__svc-desc  { display: none; }
    .rat-dw__svc-inner { padding: 14px 6px; }
    .rat-dw__btn { padding: 12px 16px; font-size: 14px; }
    .rat-dw__step-label { font-size: 10px; }
    .rat-dw__step-num { width: 28px; height: 28px; font-size: 12px; }
    .rat-dw__nav { gap: 8px; }
}
