/*
Theme Name: Liveroom
Theme URI: https://liveroom.re
Author: Liveroom Team
Description: Thème personnalisé Liveroom v4.3 (Mobile Timeline Fix)
Version: 4.3
*/

/* 1. GÉNÉRAL */
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; width: 100%; }
img { height: auto; max-width: 100%; }

/* 2. BOUTONS & DESIGN */
button, .wp-block-button__link, .ast-button, input[type="submit"] {
    background: linear-gradient(135deg, #0073aa 0%, #005177 100%) !important;
    border: none !important; border-radius: 50px !important;
    box-shadow: 0 4px 15px rgba(0, 115, 170, 0.3);
    transition: all 0.3s ease !important;
    text-transform: uppercase; font-weight: bold !important; letter-spacing: 1px; color: white !important;
}
button:hover, .wp-block-button__link:hover, .ast-button:hover, input[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 115, 170, 0.5);
    background: linear-gradient(135deg, #005177 0%, #0073aa 100%) !important;
}

/* Effet de base sur les colonnes */
.wp-block-column { transition: transform 0.3s ease, box-shadow 0.3s ease; }

h2 { position: relative; display: block; margin-bottom: 30px !important; }
h2::after { content: ''; display: block; width: 60px; height: 4px; background-color: #0073aa; margin-top: 10px; border-radius: 2px; margin-left: 0; }
h2.has-text-align-center::after, .wp-block-cover h2::after, .aligncenter h2::after { margin-left: auto; margin-right: auto; }
.wp-block-cover h2::after, .has-background h2::after { background-color: #ffffff !important; }

/* 3. BOUTON FLOTTANT */
.liveroom-float-btn {
    position: fixed; bottom: 20px; right: 20px;
    background-color: #25D366; color: white !important;
    padding: 12px 24px; border-radius: 50px; font-weight: bold; font-size: 16px; text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3); z-index: 9999; transition: transform 0.3s ease;
}
.liveroom-float-btn:hover { transform: scale(1.05); color: white !important; }

/* 4. MOBILE (CORRECTIF MAJEUR ICI) */
@media (max-width: 768px) {
    h1, .entry-title, .ast-title { font-size: 26px !important; }
    h2 { font-size: 22px !important; }
    button, input[type="submit"], .wp-block-button__link { width: 100%; display: block; margin-bottom: 10px; }
    .ast-container, .site-content { padding-left: 15px !important; padding-right: 15px !important; }
    .liveroom-float-btn { bottom: 15px; right: 15px; padding: 10px 20px; font-size: 14px; }
    .wp-block-columns { flex-wrap: wrap !important; }
    .wp-block-column { flex-basis: 100% !important; margin-bottom: 20px; }
    
    /* Correctif Boîte Suivi Mobile */
    .liveroom-tracking-box {
        padding: 20px !important; /* On réduit drastiquement le padding */
        width: 100% !important; /* Prend toute la largeur */
        box-sizing: border-box; /* Empêche le débordement */
    }
    
    /* Correctif Timeline Mobile */
    .tracking-result { width: 100% !important; padding: 0 !important; }
    .liveroom-timeline { padding-left: 30px !important; } /* Réduit l'espace de la ligne */
    
    .timeline-item {
        padding: 15px !important; /* Réduit l'espace interne des cartes */
        width: auto !important; /* Laisse le texte prendre la place */
    }
    
    .timeline-item::before {
        left: -38px !important; /* Recale le point sur la ligne */
    }
}

/* 5. ESPACEMENT */
h2, h3, h4, .ast-cta-title { margin-bottom: 35px !important; line-height: 1.4 !important; }
.wp-block-button, .ast-button { margin-top: 15px !important; }

/* 6. DESIGN SUIVI DE COLIS */
.liveroom-tracking-box {
    background: #ffffff; padding: 50px; border-radius: 20px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.1);
    max-width: 1000px; width: 90%; margin: 40px auto; text-align: center;
    border: 1px solid #f0f0f0;
}
.tracking-header { margin-bottom: 30px; }
.tracking-icon { font-size: 50px; display: block; margin-bottom: 15px; }
.liveroom-tracking-box h2 { font-size: 28px !important; margin-bottom: 10px !important; color: #333; display: inline-block; }
.liveroom-tracking-box h2::after { display: none; }
.liveroom-tracking-box p { font-size: 16px; color: #666; }

.liveroom-tracking-box input[type="text"] {
    width: 100%; max-width: 600px; padding: 18px 25px; border: 2px solid #e6e6e6; border-radius: 50px;
    font-size: 16px; outline: none; transition: all 0.3s ease; background-color: #f9fcfd; color: #333; margin-bottom: 20px !important;
}
.liveroom-tracking-box input[type="text"]:focus { border-color: #0073aa; background-color: #ffffff; }

.liveroom-tracking-box button { width: 100%; max-width: 600px; padding: 18px; font-size: 18px; margin-top: 10px; }
.tracking-footer { margin-top: 20px; font-size: 13px; color: #999; }
.tracking-footer a { color: #0073aa; text-decoration: none; font-weight: bold; }

/* 7. TIMELINE (HISTORIQUE) */
.tracking-result { margin-top: 40px; text-align: left; max-width: 700px; margin-left: auto; margin-right: auto; }
.tracking-result h3 { text-align: center; font-size: 26px; margin-bottom: 40px !important; color: #005177 !important; font-weight: 700; }
.liveroom-timeline { position: relative; padding-left: 40px; }
.liveroom-timeline::before { content: ''; position: absolute; top: 20px; bottom: 30px; left: 10px; width: 4px; background: #e9ecef; z-index: 0; border-radius: 10px; }
.timeline-item { position: relative; margin-bottom: 25px; background: #f8f9fa; padding: 25px 30px; border-radius: 15px; border: 1px solid #e9ecef; z-index: 1; }
.timeline-item::before { content: ''; position: absolute; left: -38px; top: 28px; width: 20px; height: 20px; background: #fff; border: 5px solid #ced4da; border-radius: 50%; z-index: 2; }
.timeline-item:first-child { background: linear-gradient(135deg, #0073aa 0%, #005177 100%); color: white; border: none; box-shadow: 0 15px 30px rgba(0, 115, 170, 0.25); transform: scale(1.02); }
.timeline-item:first-child::before { background: #0073aa; border-color: #cce5ff; }
.timeline-date { font-size: 14px; color: #888; margin-bottom: 8px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.timeline-item:first-child .timeline-date { color: rgba(255,255,255, 0.8) !important; }
.timeline-status { font-size: 17px; line-height: 1.5; font-weight: 500; color: #333; }
.timeline-item:first-child .timeline-status { color: #ffffff !important; font-weight: 700; font-size: 19px; }

/* 8. MENU & SOUS-MENU */
.main-header-menu > .menu-item > a, .ast-header-break-point .main-header-menu > .menu-item > a {
    color: #e0fbfc !important; font-weight: 500; letter-spacing: 0.5px; text-shadow: 0 1px 3px rgba(0,0,0,0.2); padding-bottom: 20px;
}
.main-header-menu > .menu-item > a:hover { color: #ffffff !important; text-shadow: 0 0 10px rgba(255,255,255,0.6); }
.main-header-menu .sub-menu {
    background-color: #002b45 !important; border-radius: 15px !important; box-shadow: 0 15px 40px rgba(0,0,0,0.3) !important;
    border: 1px solid #004066 !important; padding: 15px 0 !important; margin-top: 0 !important; top: 100%;
}
.main-header-menu .sub-menu::before { content: ""; display: block !important; position: absolute; top: -40px; left: -20px; width: 150%; height: 40px; background: transparent; z-index: 1; }
.main-header-menu .sub-menu::after { display: none !important; }
.main-header-menu .sub-menu .menu-item > a { color: #ffffff !important; font-weight: 500; border-bottom: 1px solid rgba(255,255,255,0.05) !important; padding: 12px 25px !important; transition: all 0.2s ease; }
.main-header-menu .sub-menu .menu-item > a:hover { color: #00dbde !important; background-color: rgba(255,255,255,0.05) !important; transform: translateX(5px); border-radius: 0; }
.ast-header-search .ast-icon, .ast-header-social-wrap svg { fill: #e0fbfc !important; }
.menu-toggle .ast-mobile-menu-trigger-icon span { background-color: #e0fbfc !important; }

/* 9. COCKPIT CRM */
.liveroom-cockpit { max-width: 800px; margin: 40px auto; background: #f8f9fa; padding: 20px; border-radius: 20px; }
.bloc-ajout { background: white; padding: 20px; border-radius: 15px; margin-bottom: 30px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.bloc-ajout h3 { font-size: 18px; color: #005177; margin-top: 0; }
.bloc-ajout input { width: 100%; margin-bottom: 10px; padding: 12px; border: 1px solid #ddd; border-radius: 8px; background: #fcfcfc; }
.bloc-ajout button { width: 100%; background: #28a745 !important; margin-top: 10px; padding: 12px; }
.liste-colis { display: flex; flex-direction: column; gap: 12px; }
.item-colis { background: white; padding: 15px; border-radius: 12px; text-decoration: none !important; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 5px rgba(0,0,0,0.05); border-left: 5px solid #0073aa; }
.colis-main { display: flex; flex-direction: column; }
.item-colis strong { color: #005177; font-size: 16px; margin-bottom: 4px; display: block; }
.client-badge { background: #e0fbfc; color: #0073aa; font-size: 11px; font-weight: bold; padding: 3px 8px; border-radius: 4px; display: inline-block; width: fit-content; }
.colis-details small { color: #888; font-size: 12px; font-style: italic; display: block; margin-top: 5px; }
.fleche { font-size: 20px; color: #ccc; margin-left: 10px; }
.btn-retour { display: inline-block; margin-bottom: 15px; padding: 8px 15px; background: #ddd; color: #333 !important; border-radius: 20px; font-size: 13px; text-decoration: none; }
.fiche-livreur { background: white; padding: 20px; border-radius: 12px; margin-bottom: 20px; border: 1px solid #eee; box-shadow: 0 5px 15px rgba(0,0,0,0.03); }
.info-row { margin-bottom: 15px; font-size: 15px; border-bottom: 1px dashed #eee; padding-bottom: 10px; }
.info-row strong { display: block; color: #005177; margin-bottom: 5px; }
.btn-action-tel, .btn-action-map { display: inline-block; text-decoration: none; font-weight: bold; padding: 10px 20px; border-radius: 50px; width: 100%; text-align: center; margin-top: 5px; box-sizing: border-box; }
.btn-action-tel { background: #e3f2fd; color: #0073aa; border: 1px solid #0073aa; }
.btn-action-map { background: #fff3cd; color: #856404; border: 1px solid #856404; }
.form-cockpit select { width: 100%; padding: 15px; font-size: 16px; border-radius: 8px; border: 2px solid #0073aa; margin-bottom: 15px; background: white; height: auto; }
.form-cockpit button { width: 100%; padding: 15px; font-size: 18px; background: #0073aa !important; color: white; border: none; border-radius: 8px; }
.historique-admin { margin-top: 30px; padding: 0; list-style: none; }
.historique-admin li { padding: 10px 0; border-bottom: 1px solid #eee; font-size: 14px; }
.historique-admin small { display: block; color: #999; margin-bottom: 2px; }

/* 10. FOOTER DARK */
.ast-footer-copyright-wrap { background-color: #001524 !important; color: #aaaaaa !important; padding: 40px 0 !important; border-top: 4px solid #0073aa; }
.ast-footer-copyright-wrap a { color: #ffffff !important; text-decoration: none !important; font-weight: 500; transition: color 0.3s ease; }
.ast-footer-copyright-wrap a:hover { color: #00dbde !important; }
.ast-footer-copyright { font-size: 14px; margin-top: 10px; }
.ast-footer-copyright span { display: inline-block; margin-right: 5px; }
.footer-social-item svg { fill: #ffffff !important; width: 20px; height: 20px; }
.footer-social-item:hover svg { fill: #00dbde !important; }
@media (max-width: 768px) { .ast-footer-copyright-wrap { text-align: center !important; } .ast-footer-copyright-wrap .ast-container { display: flex; flex-direction: column; gap: 20px; } }

/* 11. CARTES PREMIUM (SERVICES & ENGAGEMENTS) */
.wp-block-column {
    background-color: #ffffff; border-radius: 20px; padding: 30px 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); border: 1px solid #f5f5f5;
    transition: all 0.3s ease; text-align: center; margin-bottom: 20px;
}
.wp-block-column:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0, 115, 170, 0.15); border-bottom: 5px solid #0073aa; }
.wp-block-column img { border-radius: 15px; margin-bottom: 20px; transition: transform 0.5s ease; }
.wp-block-column:hover img { transform: scale(1.05); }
.wp-block-column h3, .wp-block-column h4, .wp-block-column h5 { color: #005177; font-size: 22px; margin-bottom: 15px; font-weight: 700; }
.wp-block-column p { color: #666; font-size: 15px; line-height: 1.6; }

/* 12. SECTION "COMMENT ÇA MARCHE" */
.liveroom-steps-container { max-width: 1100px; margin: 60px auto; padding: 0 20px; }
.liveroom-steps-grid { display: flex; gap: 30px; justify-content: center; }
.step-card { background: #ffffff; padding: 30px 20px; border-radius: 15px; text-align: center; flex: 1; box-shadow: 0 10px 30px rgba(0,0,0,0.05); border: 1px solid #f0f0f0; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.step-card:hover { transform: translateY(-10px); box-shadow: 0 15px 40px rgba(0, 115, 170, 0.15); border-color: #0073aa; }
.step-icon { font-size: 50px; margin-bottom: 20px; background: #f4f8fb; width: 90px; height: 90px; line-height: 90px; border-radius: 50%; margin-left: auto; margin-right: auto; }
.step-card h3 { color: #005177; font-size: 22px; margin-bottom: 15px; font-weight: 700; }
.step-card p { color: #666; font-size: 16px; line-height: 1.6; }
@media (max-width: 768px) { .liveroom-steps-grid { flex-direction: column; } .step-card { margin-bottom: 20px; } }