/* =====================================================================
   Rétractation WooCommerce — Styles publics
   Conforme ordonnance n°2026-2 du 5 janvier 2026
   ===================================================================== */

/* ── Bloc de rétractation global ──────────────────────────────────────── */
.rw-retractation-block {
    border: 2px solid #c0392b;
    border-radius: 6px;
    padding: 20px 24px;
    margin: 24px 0;
    background: #fdf7f7;
    font-family: inherit;
}

.rw-retractation-block__title {
    font-size: 1rem;
    font-weight: 700;
    color: #c0392b;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rw-retractation-block__title::before {
    content: "↩";
    font-size: 1.2rem;
}

.rw-retractation-block__info {
    font-size: 0.875rem;
    color: #555;
    margin: 0 0 16px;
    line-height: 1.5;
}

.rw-retractation-block__timer {
    display: inline-block;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #856404;
    margin-bottom: 16px;
}

/* ── Bouton principal ─────────────────────────────────────────────────── */
.rw-btn-retractation,
a.rw-btn-retractation {
    display: inline-block;
    background-color: #c0392b;
    color: #ffffff !important;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s ease;
    line-height: 1.4;
}

.rw-btn-retractation:hover,
a.rw-btn-retractation:hover {
    background-color: #a93226;
    color: #fff !important;
}

.rw-btn-secondary {
    display: inline-block;
    background: transparent;
    border: 1px solid #aaa;
    color: #555 !important;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none !important;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s;
    margin-left: 12px;
}

.rw-btn-secondary:hover {
    border-color: #555;
    color: #333 !important;
}

/* ── Formulaire de rétractation ───────────────────────────────────────── */
.rw-form-wrap {
    max-width: 680px;
    margin: 0 auto;
}

.rw-form-header {
    border-bottom: 2px solid #c0392b;
    padding-bottom: 16px;
    margin-bottom: 28px;
}

.rw-form-header h2 {
    color: #c0392b;
    font-size: 1.5rem;
    margin: 0 0 6px;
}

.rw-form-header p {
    color: #555;
    font-size: 0.9rem;
    margin: 0;
}

.rw-order-summary {
    background: #f8f8f8;
    border-left: 4px solid #c0392b;
    padding: 14px 18px;
    border-radius: 0 4px 4px 0;
    margin-bottom: 24px;
    font-size: 0.9rem;
    color: #333;
}

.rw-order-summary strong {
    display: block;
    margin-bottom: 4px;
    color: #111;
}

/* Étapes */
.rw-steps {
    display: flex;
    gap: 0;
    margin-bottom: 32px;
    counter-reset: step;
}

.rw-step {
    flex: 1;
    text-align: center;
    font-size: 0.8rem;
    color: #aaa;
    position: relative;
    padding-top: 36px;
}

.rw-step::before {
    content: counter(step);
    counter-increment: step;
    width: 28px;
    height: 28px;
    background: #ddd;
    color: #666;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.rw-step::after {
    content: "";
    position: absolute;
    top: 14px;
    right: 0;
    width: 50%;
    height: 2px;
    background: #ddd;
}

.rw-step:first-child::after { left: 50%; right: auto; }
.rw-step:last-child::after  { display: none; }

.rw-step.active {
    color: #c0392b;
    font-weight: 600;
}

.rw-step.active::before {
    background: #c0392b;
    color: #fff;
}

.rw-step.done::before {
    background: #27ae60;
    color: #fff;
    content: "✓";
}

/* Champs de formulaire */
.rw-field {
    margin-bottom: 20px;
}

.rw-field label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: #333;
}

.rw-field label .required {
    color: #c0392b;
    margin-left: 2px;
}

.rw-field input[type="text"],
.rw-field input[type="email"],
.rw-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.rw-field input:focus,
.rw-field textarea:focus {
    outline: none;
    border-color: #c0392b;
    box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.15);
}

.rw-field textarea {
    min-height: 100px;
    resize: vertical;
}

.rw-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 520px) {
    .rw-field-row { grid-template-columns: 1fr; }
}

/* Confirmation */
.rw-confirm-box {
    background: #fff8f7;
    border: 2px solid #c0392b;
    border-radius: 6px;
    padding: 20px;
    margin: 28px 0;
}

.rw-confirm-box h3 {
    color: #c0392b;
    margin: 0 0 12px;
    font-size: 1rem;
}

.rw-confirm-box table {
    width: 100%;
    font-size: 0.9rem;
    border-collapse: collapse;
}

.rw-confirm-box td {
    padding: 6px 0;
    vertical-align: top;
}

.rw-confirm-box td:first-child {
    font-weight: 600;
    color: #555;
    width: 40%;
}

/* Checkbox légale */
.rw-legal-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #f0f0f0;
    padding: 14px;
    border-radius: 4px;
    margin-bottom: 24px;
    font-size: 0.85rem;
    color: #444;
}

.rw-legal-check input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: #c0392b;
}

/* Messages */
.rw-error {
    background: #fdecea;
    border-left: 4px solid #c0392b;
    color: #7f1d1d;
    padding: 12px 16px;
    border-radius: 0 4px 4px 0;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.rw-success-box {
    text-align: center;
    padding: 40px 20px;
}

.rw-success-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.rw-success-box h2 {
    color: #27ae60;
    margin-bottom: 12px;
}

.rw-success-box p {
    color: #555;
    max-width: 500px;
    margin: 0 auto 8px;
    line-height: 1.6;
}

.rw-reference {
    display: inline-block;
    background: #f0f0f0;
    padding: 6px 14px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    color: #333;
    margin-top: 16px;
}

.rw-legal-notice {
    font-size: 0.78rem;
    color: #888;
    margin-top: 24px;
    line-height: 1.5;
    text-align: center;
}

/* ── Actions formulaire ───────────────────────────────────────────────── */
.rw-form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 8px;
}
