/*
 * RepairTech RDV — tracking.css
 * Styles du shortcode [repairtech_suivi]
 * Design : or/anthracite, glassmorphism léger, mobile-first
 */

/* ── Reset local ── */
.rtrdv-tracking *,
.rtrdv-tracking *::before,
.rtrdv-tracking *::after { box-sizing: border-box; }

.rtrdv-tracking {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    max-width: 720px;
    margin: 0 auto;
    padding: 8px 0 40px;
    color: #1a1a1a;
    line-height: 1.55;
}

/* ══ Carte générique ══ */
.rtrdv-tr-card {
    background: #fff;
    border: 1px solid #e8e1d5;
    border-radius: 18px;
    padding: 28px 30px;
    margin-bottom: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,.07);
}

/* ══ En-tête formulaire ══ */
.rtrdv-tr-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 26px;
}
.rtrdv-tr-header-icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}
.rtrdv-tr-header h2 {
    margin: 0 0 4px;
    font-size: 1.25rem;
    font-weight: 800;
    color: #1a1a1a;
}
.rtrdv-tr-header p {
    margin: 0;
    font-size: .88rem;
    color: #777;
}

/* ══ Formulaire ══ */
.rtrdv-tr-form { display: flex; flex-direction: column; gap: 18px; }

.rtrdv-tr-field { display: flex; flex-direction: column; gap: 5px; }
.rtrdv-tr-field label {
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #555;
}
.rtrdv-tr-hint {
    font-size: .72rem;
    color: #aaa;
    margin-top: 2px;
}

/* Input wrapper avec préfixe # */
.rtrdv-tr-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.rtrdv-tr-input-prefix {
    position: absolute;
    left: 13px;
    font-size: 1rem;
    font-weight: 700;
    color: #c9960c;
    pointer-events: none;
    z-index: 1;
}
.rtrdv-tr-input-wrap input {
    padding-left: 28px !important;
}

/* Champs de saisie */
.rtrdv-tr-form input[type="number"],
.rtrdv-tr-form input[type="email"] {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #ddd6c8;
    border-radius: 10px;
    font-size: .95rem;
    color: #1a1a1a;
    background: #faf8f4;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
    font-family: inherit;
    -moz-appearance: textfield;
}
.rtrdv-tr-form input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }
.rtrdv-tr-form input:focus {
    border-color: #c9960c;
    box-shadow: 0 0 0 3px rgba(201,150,12,.12);
    background: #fff;
}

/* ══ Bouton principal ══ */
.rtrdv-tr-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #c9960c, #f0b930);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s, opacity .15s;
    box-shadow: 0 6px 20px rgba(201,150,12,.30);
    margin-top: 4px;
    font-family: inherit;
}
.rtrdv-tr-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(201,150,12,.38);
}
.rtrdv-tr-btn:active:not(:disabled) { transform: translateY(0); }
.rtrdv-tr-btn:disabled { opacity: .65; cursor: not-allowed; }

/* ══ Message d'erreur ══ */
.rtrdv-tr-error {
    background: #fdeaea;
    border: 1px solid #f0bcbc;
    color: #b23434;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: .87rem;
    font-weight: 600;
}

/* ══ Bouton retour ══ */
.rtrdv-tr-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #c9960c;
    font-size: .85rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    margin-bottom: 14px;
    font-family: inherit;
    transition: color .15s;
}
.rtrdv-tr-back:hover { color: #9a7209; text-decoration: underline; }

/* ══ Résultat : en-tête ══ */
.rtrdv-tr-result-header {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    color: #fff;
    border: none;
}
.rtrdv-tr-ref-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.rtrdv-tr-ref-label {
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #888;
}
.rtrdv-tr-ref-val {
    font-size: 1.4rem;
    font-weight: 900;
    color: #f6c94b;
    letter-spacing: .5px;
}
.rtrdv-tr-status-badge {
    font-size: .78rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1.5px solid transparent;
}
.rtrdv-tr-client-row {
    font-size: .88rem;
    color: rgba(255,255,255,.65);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.rtrdv-tr-sep { color: #666; }

/* ══ Timeline ══ */
.rtrdv-tr-timeline-card h3,
.rtrdv-tr-card h3 {
    margin: 0 0 20px;
    font-size: .88rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #888;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0ebe0;
}

.rtrdv-tr-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-left: 4px;
}

.rtrdv-tr-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 0 0 24px;
    position: relative;
}
/* Ligne verticale entre les étapes */
.rtrdv-tr-step:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 32px;
    bottom: 0;
    width: 2px;
    background: #e8e1d5;
}
.rtrdv-tr-step--done:not(:last-child)::before  { background: #2d7a4f; }
.rtrdv-tr-step--active:not(:last-child)::before { background: linear-gradient(#c9960c, #e8e1d5); }

/* Cercle indicateur */
.rtrdv-tr-step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    font-weight: 900;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: transform .2s;
}
.rtrdv-tr-step--pending .rtrdv-tr-step-dot {
    background: #f5f0e8;
    border: 2px solid #ddd6c8;
    color: #bbb;
}
.rtrdv-tr-step--done .rtrdv-tr-step-dot {
    background: #2d7a4f;
    border: 2px solid #2d7a4f;
    color: #fff;
}
.rtrdv-tr-step--active .rtrdv-tr-step-dot {
    background: linear-gradient(135deg, #c9960c, #f0b930);
    border: 2px solid #c9960c;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(201,150,12,.18);
    animation: rtTrPulse 2s ease infinite;
}
.rtrdv-tr-step--cancel .rtrdv-tr-step-dot {
    background: #c0392b;
    border: 2px solid #c0392b;
    color: #fff;
}

@keyframes rtTrPulse {
    0%,100% { box-shadow: 0 0 0 4px rgba(201,150,12,.18); }
    50%      { box-shadow: 0 0 0 8px rgba(201,150,12,.08); }
}

.rtrdv-tr-step-body { padding-top: 4px; }
.rtrdv-tr-step-label {
    font-size: .95rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 3px;
}
.rtrdv-tr-step--pending .rtrdv-tr-step-label { color: #bbb; }
.rtrdv-tr-step-desc {
    font-size: .82rem;
    color: #888;
    line-height: 1.5;
}
.rtrdv-tr-step--active .rtrdv-tr-step-desc { color: #c9960c; font-weight: 600; }

/* ══ Grille détails appareil ══ */
.rtrdv-tr-details-grid { display: flex; flex-direction: column; gap: 0; }
.rtrdv-tr-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 9px 0;
    border-bottom: 1px solid #f5f0e8;
    font-size: .88rem;
}
.rtrdv-tr-detail-row:last-child { border-bottom: none; }
.rtrdv-tr-detail-row span { color: #888; flex-shrink: 0; }
.rtrdv-tr-detail-row strong { color: #1a1a1a; text-align: right; word-break: break-word; }

/* ══ Logistique ══ */
.rtrdv-tr-logistics { display: flex; flex-direction: column; gap: 0; }
.rtrdv-tr-log-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 9px 0;
    border-bottom: 1px solid #f5f0e8;
    font-size: .88rem;
}
.rtrdv-tr-log-row:last-child { border-bottom: none; }
.rtrdv-tr-log-row span { color: #888; flex-shrink: 0; }
.rtrdv-tr-log-row strong { color: #1a1a1a; text-align: right; }

/* ══ Contact ══ */
.rtrdv-tr-contact-card {
    background: linear-gradient(135deg, #fffdf5, #fdf8eb);
    border-color: #e8d99a;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.rtrdv-tr-contact-icon { font-size: 1.8rem; flex-shrink: 0; }
.rtrdv-tr-contact-card strong { font-size: .95rem; color: #1a1a1a; display: block; margin-bottom: 5px; }
.rtrdv-tr-contact-card p { margin: 0 0 10px; font-size: .85rem; color: #666; }
.rtrdv-tr-phone,
.rtrdv-tr-email {
    display: inline-block;
    font-size: .85rem;
    font-weight: 700;
    color: #c9960c;
    text-decoration: none;
    margin-right: 14px;
}
.rtrdv-tr-phone:hover, .rtrdv-tr-email:hover { text-decoration: underline; }

/* ══ Responsive ══ */
@media (max-width: 540px) {
    .rtrdv-tr-card { padding: 20px 18px; }
    .rtrdv-tr-ref-val { font-size: 1.15rem; }
    .rtrdv-tr-detail-row, .rtrdv-tr-log-row { flex-direction: column; gap: 2px; }
    .rtrdv-tr-detail-row strong, .rtrdv-tr-log-row strong { text-align: left; }
    .rtrdv-tr-contact-card { flex-direction: column; }
}
