/* ============================================================
   Suivi – Intenzauto | Frontend CSS v5
   Design premium concessionnaire automobile
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

/* ─────────────────────────────────────────
   VARIABLES
   ───────────────────────────────────────── */
.iao-wrap {
    --iao-black:   #111111;
    --iao-red:     #c0392b;
    --iao-red-dk:  #962d22;
    --iao-gray:    #f5f5f5;
    --iao-border:  #e8e8e8;
    --iao-text:    #222222;
    --iao-muted:   #888888;
    font-family: inherit;
    color: var(--iao-text);
    max-width: 680px;
}

/* ─────────────────────────────────────────
   CARTE FORMULAIRE
   ───────────────────────────────────────── */
.iao-card {
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,.12);
}

/* En-tête sombre */
.iao-card-head {
    background: var(--iao-black);
    padding: 36px 40px 32px;
    position: relative;
}

.iao-card-accent {
    position: absolute;
    bottom: 0;
    left: 40px;
    width: 48px;
    height: 3px;
    background: var(--iao-red);
}

.iao-card-title {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
    letter-spacing: -0.2px;
    line-height: 1.2;
}

.iao-card-intro {
    font-size: 14px;
    color: #aaa;
    margin: 0;
    line-height: 1.5;
}

/* Corps blanc */
.iao-card-body {
    background: #fff;
    padding: 32px 40px 36px;
    border: 1px solid var(--iao-border);
    border-top: none;
    border-radius: 0 0 6px 6px;
}

/* ─────────────────────────────────────────
   FORMULAIRE DE RECHERCHE
   ───────────────────────────────────────── */
.iao-search-form { margin: 0; }

.iao-search-row {
    display: flex;
    align-items: stretch;
    gap: 0;
    border: 2px solid var(--iao-black);
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    transition: border-color .2s;
}

.iao-search-row:focus-within {
    border-color: var(--iao-red);
}

.iao-search-field-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 10px 16px;
    min-width: 0;
}

.iao-search-lbl {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--iao-muted);
    margin-bottom: 3px;
    display: block;
}

.iao-search-input {
    border: none !important;
    outline: none !important;
    padding: 0 !important;
    font-size: 15px !important;
    font-family: inherit !important;
    color: var(--iao-text) !important;
    background: transparent !important;
    width: 100% !important;
    font-weight: 500;
    box-shadow: none !important;
}

.iao-search-input::placeholder {
    color: #ccc;
    font-weight: 400;
}

.iao-search-btn {
    background: var(--iao-black);
    color: #fff;
    border: none;
    padding: 0 28px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s;
    font-family: inherit;
}

.iao-search-btn:hover  { background: var(--iao-red); }
.iao-search-btn:active { background: var(--iao-red-dk); }

/* Alerte erreur */
.iao-alert {
    background: #fff5f4;
    border-left: 3px solid var(--iao-red);
    color: var(--iao-red);
    padding: 10px 14px;
    margin-bottom: 20px;
    font-size: 13px;
    border-radius: 0 3px 3px 0;
}

/* ─────────────────────────────────────────
   RÉSULTAT DE SUIVI
   ───────────────────────────────────────── */
.iao-result {
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,.12);
    border: none !important;
}

/* En-tête véhicule */
.iao-result-head {
    background: var(--iao-black) !important;
    padding: 24px 32px !important;
    border-bottom: 3px solid var(--iao-red) !important;
}

.iao-result-vehicle {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #fff !important;
    margin: 0 0 4px !important;
}

.iao-result-ordernum {
    font-family: 'Courier New', monospace !important;
    color: #888 !important;
    font-size: 12px !important;
    letter-spacing: 1.5px !important;
    margin: 0 !important;
}

.iao-result-head-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Badge statut */
.iao-status-badge {
    font-size: 10px !important;
    font-weight: 700 !important;
    padding: 5px 12px !important;
    border-radius: 2px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    color: #fff !important;
}

/* Bouton imprimer */
.iao-print-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,.2);
    color: #888;
    padding: 5px 12px;
    border-radius: 3px;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
    transition: all .15s;
}
.iao-print-btn:hover { border-color: #fff; color: #fff; }

/* Annulé */
.iao-cancelled-notice {
    background: #fff5f4;
    border-bottom: 1px solid #fca5a5;
    padding: 14px 32px;
    color: #c0392b;
    font-size: 14px;
    font-weight: 500;
}

/* ─────────────────────────────────────────
   BARRE DE PROGRESSION
   ───────────────────────────────────────── */
.iao-progress {
    background: #fafafa;
    padding: 20px 32px 18px;
    border-bottom: 1px solid var(--iao-border);
}

.iao-bar {
    width: 100%;
    height: 5px;
    background: #e8e8e8;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 14px;
}

.iao-bar-fill {
    height: 100%;
    background: var(--iao-red);
    border-radius: 3px;
    transition: width .5s ease;
    min-width: 5px;
}

.iao-steps {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 4px;
}

.iao-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.iao-step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    border: 2px solid #ddd;
    margin-bottom: 7px;
    flex-shrink: 0;
    transition: background .3s, border-color .3s;
}

.iao-step-item.done  .iao-step-dot { background: var(--iao-red); border-color: var(--iao-red); }
.iao-step-item.active .iao-step-dot {
    background: #fff;
    border-color: var(--iao-red);
    box-shadow: 0 0 0 3px rgba(192,57,43,.15);
}

.iao-step-label {
    font-size: 10px;
    color: #bbb;
    text-align: center;
    line-height: 1.3;
    max-width: 72px;
    word-break: break-word;
}

.iao-step-item.done  .iao-step-label { color: #666; }
.iao-step-item.active .iao-step-label { color: var(--iao-text); font-weight: 700; }

/* ─────────────────────────────────────────
   SECTIONS
   ───────────────────────────────────────── */
.iao-section {
    padding: 20px 32px;
    border-bottom: 1px solid var(--iao-border);
}
.iao-section:last-child { border-bottom: none; }

.iao-section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #bbb;
    margin: 0 0 12px;
    display: block;
}

/* Tableau infos */
.iao-info-table { width: 100%; border-collapse: collapse; }
.iao-info-table tr { border-bottom: 1px solid #f5f5f5; }
.iao-info-table tr:last-child { border-bottom: none; }
.iao-info-table th {
    width: 180px;
    padding: 9px 14px 9px 0;
    font-size: 12px;
    font-weight: 700;
    color: #888;
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
}
.iao-info-table td {
    padding: 9px 0;
    font-size: 14px;
    color: #333;
    vertical-align: top;
}

/* Photo */
.iao-photo-container {
    display: inline-block;
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid var(--iao-border);
    line-height: 0;
    max-width: 100%;
}
.iao-photo-img {
    display: block;
    max-width: 460px;
    width: 100%;
    height: auto;
    cursor: zoom-in;
    transition: opacity .15s;
}
.iao-photo-img:hover { opacity: .92; }

/* ─────────────────────────────────────────
   HISTORIQUE
   ───────────────────────────────────────── */
.iao-history-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.iao-history-table thead tr { border-bottom: 2px solid var(--iao-border); }
.iao-history-table th {
    padding: 7px 12px 9px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: #bbb;
    text-align: left;
}
.iao-history-table tbody tr { border-bottom: 1px solid #f8f8f8; transition: background .1s; }
.iao-history-table tbody tr:last-child { border-bottom: none; }
.iao-history-table tbody tr:hover { background: #fafafa; }
.iao-history-table td { padding: 10px 12px; color: #555; vertical-align: middle; }
.iao-history-table td:first-child { font-weight: 600; color: #222; }
.iao-history-note { display: block; margin-top: 3px; font-size: 12px; color: #aaa; font-style: italic; font-weight: 400; }

/* ─────────────────────────────────────────
   NOTES CLIENT
   ───────────────────────────────────────── */
.iao-notes-textarea {
    width: 100%;
    max-width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--iao-border);
    border-radius: 3px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    background: #fafafa;
    transition: border-color .2s;
    display: block;
    margin-bottom: 12px;
    min-height: 90px;
}
.iao-notes-textarea:focus { outline: none; border-color: var(--iao-black); background: #fff; }

/* Bouton générique */
.iao-btn {
    display: inline-block;
    padding: 9px 22px;
    background: var(--iao-black);
    color: #fff;
    border: none;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .5px;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s;
}
.iao-btn:hover  { background: var(--iao-red); }
.iao-btn:active { transform: scale(.98); }

.iao-note-feedback { font-size: 12px; margin-left: 10px; vertical-align: middle; }
.iao-note-feedback.ok    { color: #27ae60; }
.iao-note-feedback.error { color: var(--iao-red); }

/* ─────────────────────────────────────────
   PIED DE PAGE
   ───────────────────────────────────────── */
.iao-result-footer {
    background: #f8f8f8 !important;
    padding: 13px 32px !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 4px 0 !important;
    font-size: 12px !important;
    color: #999 !important;
    border-top: 1px solid var(--iao-border) !important;
}
.iao-result-footer a { color: #666 !important; text-decoration: none !important; border-bottom: 1px solid transparent !important; transition: color .15s, border-color .15s !important; }
.iao-result-footer a:hover { color: var(--iao-red) !important; border-bottom-color: var(--iao-red) !important; }
.iao-footer-sep { margin: 0 10px; color: #ddd; }

/* ─────────────────────────────────────────
   FORMULAIRE CLIENT
   ───────────────────────────────────────── */
.iao-customer-results { margin-top: 24px; }
.iao-customer-results h3 { font-size: 17px; font-weight: 600; margin: 0 0 2px; }
.iao-customer-name-line { font-size: 13px; color: #888; margin: 0 0 16px; }
.iao-customer-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.iao-customer-table th { padding: 9px 12px; background: #f5f5f5; border-bottom: 2px solid var(--iao-border); font-weight: 700; color: #888; text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.iao-customer-table td { padding: 10px 12px; border-bottom: 1px solid #f5f5f5; color: #555; }
.iao-customer-table tr:last-child td { border-bottom: none; }
.iao-customer-table tr:hover td { background: #fafafa; }
.iao-order-num-link { font-weight: 700; color: var(--iao-black); text-decoration: none; font-family: monospace; letter-spacing: .5px; }
.iao-order-num-link:hover { color: var(--iao-red); }
.iao-no-result { color: #aaa; font-style: italic; padding: 12px 0; }

/* Badge */
.iao-badge { display: inline-block; padding: 3px 8px; border-radius: 2px; color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; white-space: nowrap; }

/* ─────────────────────────────────────────
   IMPRESSION
   ───────────────────────────────────────── */
@media print {
    .iao-no-print { display: none !important; }
    .iao-result { box-shadow: none; }
    .iao-result-head, .iao-bar-fill, .iao-status-badge { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ─────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────── */
@media (max-width: 600px) {
    .iao-wrap { max-width: 100%; }
    .iao-card-head, .iao-card-body { padding-left: 20px; padding-right: 20px; }
    .iao-card-title { font-size: 20px; }
    .iao-search-row { flex-direction: column; border-radius: 4px; }
    .iao-search-btn { width: 100%; padding: 14px; text-align: center; }
    .iao-result-head { padding: 18px 20px !important; }
    .iao-result-head { flex-direction: column; align-items: flex-start; gap: 10px; }
    .iao-section { padding: 16px 20px; }
    .iao-info-table th { width: 120px; font-size: 11px; }
    .iao-history-table th:nth-child(2), .iao-history-table td:nth-child(2) { display: none; }
    .iao-result-footer { padding: 12px 20px !important; }
    .iao-steps { gap: 2px; }
    .iao-step-label { font-size: 9px; max-width: 52px; }
}

/* ─────────────────────────────────────────
   HISTORIQUE STYLE DHL
   ───────────────────────────────────────── */
.iao-dhl-timeline { padding: 4px 0 0; }

/* Groupe de date */
.iao-dhl-date-group { margin-bottom: 6px; }
.iao-dhl-date-header {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #aaa;
    padding: 10px 0 8px;
    border-top: 1px solid #f0f0f0;
    margin-bottom: 2px;
}
.iao-dhl-date-group:first-child .iao-dhl-date-header { border-top: none; padding-top: 0; }

/* Ligne d'entrée */
.iao-dhl-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    position: relative;
}
.iao-dhl-row--latest {
    background: #fffaf9;
    margin: 0 -32px;
    padding: 12px 32px;
    border-left: 3px solid var(--iao-red, #c0392b);
}

/* Numéro */
.iao-dhl-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f0f0f0;
    color: #888;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}
.iao-dhl-row--latest .iao-dhl-num {
    background: var(--iao-red, #c0392b);
    color: #fff;
}

/* Ligne verticale + point */
.iao-dhl-dot-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 12px;
    margin-top: 5px;
}
.iao-dhl-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.iao-dhl-line {
    width: 1px;
    flex: 1;
    background: #e8e8e8;
    min-height: 20px;
    margin-top: 4px;
}
.iao-dhl-row:last-child .iao-dhl-line { display: none; }

/* Contenu */
.iao-dhl-content { flex: 1; min-width: 0; }

.iao-dhl-status {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
    line-height: 1.3;
}
.iao-dhl-status--latest {
    font-size: 15px;
    font-weight: 700;
}

.iao-dhl-note {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
    font-style: italic;
}

.iao-dhl-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.iao-dhl-location {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.iao-dhl-location svg { flex-shrink: 0; }

.iao-dhl-time {
    font-size: 12px;
    color: #aaa;
    font-variant-numeric: tabular-nums;
}
