/* admin_web/static/admin_web/css/home_styles.css */

/* --- 1. VIDÉO EN ARRIÈRE-PLAN FIXE (Wallpaper) --- */
.hero-background-video {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100vw;
    min-height: 100vh;
    width: auto;
    height: auto;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}

/* L'overlay sombre reste aussi fixe pour assombrir la vidéo uniformément */
.hero-video-overlay {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

/* --- 2. LAYOUT HERO --- */
.hero.home-split-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 100px;
    min-height: 100vh;
    height: auto;
    position: relative;
}

.hero-content-wrapper {
    width: 100%;
    max-width: 1200px;
    position: relative;
    z-index: 5;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
}

/* --- CARTE UNIFIÉE (Glassmorphism) --- */
.hero-unified-card {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 40px 30px;
    
    display: flex;
    flex-direction: column; /* Mobile: colonne */
    align-items: center;
    gap: 40px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

/* Partie Texte */
.hero-text-side {
    text-align: center;
    color: var(--white-color);
    width: 100%;
    z-index: 2;
}

.hero-text-side h1 {
    font-size: clamp(32px, 5vw, 64px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.hero-text-side p {
    font-size: clamp(16px, 2vw, 20px);
    margin-bottom: 30px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

/* --- NOUVEAU DESIGN TÉLÉPHONE (SAMSUNG S24 ULTRA) --- */

.hero-visual-side {
    display: none; /* Mobile : Caché par défaut */
    justify-content: center;
    align-items: center;
    position: relative;
    perspective: 1000px; /* Pour l'effet 3D */
}

/* Conteneur 3D statique (plus d'animation flottante) */
.phone-container {
    position: relative;
    transform: rotateY(-15deg) rotateX(5deg); /* Angle de présentation fixe */
    transition: transform 0.5s ease;
}

/* Petit effet interactif au survol */
.hero-unified-card:hover .phone-container {
    transform: rotateY(-10deg) rotateX(2deg) translateY(-10px);
}

/* MOCKUP S24 ULTRA : Coins très carrés */
.phone-mockup.s24-ultra {
    width: 310px; /* Un peu plus large pour faire "Ultra" */
    height: 620px;
    background: #222; /* Titane Noir */
    border-radius: 6px; /* Coins très carrés typiques du S24 Ultra */
    position: relative;
    z-index: 10;
    
    /* Bordures métalliques fines et réalistes */
    box-shadow: 
        0 0 0 1px #444, /* Biseau métal */
        0 0 0 3px #1a1a1a, /* Cadre principal */
        inset 0 0 10px rgba(0,0,0,0.8); /* Profondeur */
}

/* Boutons Physiques (Tous à droite sur Samsung) */
.s24-ultra .phone-btn {
    position: absolute;
    background: #222;
    border-radius: 2px;
    right: -3px; /* À droite */
    left: auto;
    box-shadow: -1px 0 2px rgba(0,0,0,0.5);
}
.s24-ultra .btn-vol-rocker { top: 150px; width: 3px; height: 80px; }
.s24-ultra .btn-power { top: 250px; width: 3px; height: 50px; }

/* L'Écran S24 (Quasi sans bords) */
.phone-screen {
    width: 100%;
    height: 100%;
    border-radius: 4px; /* Coins quasi droits */
    overflow: hidden;
    position: relative;
    background-color: #e5e3df; /* Fond de base carte Google Maps */
}

/* CAMÉRA POINÇON (Punch Hole) */
.punch-hole-camera {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background: #000;
    border-radius: 50%;
    z-index: 50;
    border: 1px solid #111; /* Petit contour pour le réalisme */
}

/* --- MAP RÉALISTE (Google Maps Style) --- */
.app-map-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    overflow: hidden;
}

/* 1. L'image de fond */
.map-image-layer {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* On zoome légèrement pour simuler le focus */
    transform: scale(1.2);
    /* Filtre léger pour harmoniser les couleurs */
    filter: saturate(0.9) contrast(1.05);
}

/* 2. Le trajet SVG */
.route-svg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 2;
    /* Ombre portée sous le trajet pour le décoller de la carte */
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.25));
}

/* Animation de dessin du trajet */
.route-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 0;
    animation: drawRoute 2s ease-out forwards;
}

@keyframes drawRoute {
    from { stroke-dashoffset: 1000; }
    to { stroke-dashoffset: 0; }
}

/* 3. Les Marqueurs (Pins) */
.map-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 10;
}

/* Voiture */
.car-marker {
    z-index: 15;
}
.car-icon-bg {
    width: 32px; height: 32px;
    background: #000;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    border: 2px solid #fff;
}
.car-icon-bg svg { width: 18px; height: 18px; }

/* Halo pulsant autour de la voiture */
.pulse-ring {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 60px; height: 60px;
    background: rgba(66, 133, 244, 0.2); /* Bleu Google transparent */
    border-radius: 50%;
    animation: pulse 2s infinite;
    z-index: -1;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0; }
}

/* Pin Destination */
.dest-marker {
    /* Position définie inline dans le HTML */
}
.pin-head {
    width: 14px; height: 14px;
    background: #EA4335; /* Rouge Google */
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.pin-point {
    width: 2px; height: 8px;
    background: #EA4335;
    margin: -2px auto 0; /* Centrer sous la tête */
}

/* --- UI ANDROID (Adaptation) --- */
.app-ui-layer {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none; /* Laisse passer les clics vers la map si besoin */
}

/* Top Bar Android (Texte sombre sur fond clair) */
.app-top-bar.android-bar {
    padding: 10px 20px 0 20px;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: #333; 
    z-index: 40;
    /* Dégradé léger blanc vers transparent pour lisibilité */
    background: linear-gradient(to bottom, rgba(255,255,255,0.8), transparent);
}

.status-icons { display: flex; gap: 6px; align-items: center; }
.network-icon { font-size: 11px; font-weight: 700; }
.signal-icon { letter-spacing: -2px; font-size: 10px; }

/* Batterie Android (Verticale pleine) */
.battery-android { 
    width: 10px; height: 16px; 
    border: 1px solid #555; 
    border-radius: 2px; 
    padding: 1px;
    display: flex; align-items: flex-end;
}
.battery-android .level { width: 100%; height: 65%; background: #333; }

/* BARRE DE RECHERCHE FLOTTANTE (Style Google Maps) */
.gmaps-search-bar {
    margin: 10px 15px;
    background: #fff;
    border-radius: 8px; /* Coins arrondis mais pas trop (style Android) */
    height: 48px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    pointer-events: auto;
    color: #444;
    font-size: 15px;
}
.g-icon {
    width: 24px; height: 24px;
    /* Petit trick CSS pour le logo G multicolore */
    background: conic-gradient(from 0deg, #EA4335 0deg 90deg, #FBBC05 90deg 180deg, #34A853 180deg 270deg, #4285F4 270deg 360deg);
    border-radius: 50%;
    margin-right: 15px;
    mask: radial-gradient(transparent 45%, black 46%);
    -webkit-mask: radial-gradient(transparent 45%, black 46%);
}
.mic-icon {
    margin-left: auto;
    width: 12px; height: 18px;
    border: 2px solid #555;
    border-radius: 10px;
}

/* --- CARTE CHAUFFEUR (Glassmorphism Sombre) --- */
.driver-arrival-card {
    /* On garde le fond sombre pour contraster avec la carte claire */
    background: rgba(26, 26, 26, 0.95); 
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    padding: 25px 20px 30px 20px;
    color: #fff;
    border-top: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
    pointer-events: auto;
    margin-bottom: 0;
}

.card-handle {
    width: 40px; height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    margin: 0 auto 15px auto;
}

.driver-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.driver-info { display: flex; flex-direction: column; }
.status-text { font-size: 13px; font-weight: 700; }
.time-text { font-size: 12px; color: var(--primary-color); font-weight: 600; }
.car-badge { 
    background: rgba(255,255,255,0.1); padding: 4px 8px; 
    border-radius: 6px; font-size: 10px; font-weight: 600; 
}

.driver-profile-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.avatar-circle {
    width: 48px; height: 48px; border-radius: 50%; overflow: hidden;
    border: 2px solid var(--primary-color);
}
.avatar-circle img { width: 100%; height: 100%; object-fit: cover; }
.details-col { flex: 1; }
.name-row { display: flex; gap: 8px; align-items: baseline; }
.name { font-weight: 700; font-size: 15px; }
.rating { font-size: 11px; color: #ccc; }
.plate-number { font-size: 12px; color: #888; font-family: monospace; letter-spacing: 1px; }
.price-tag { 
    font-size: 18px; font-weight: 800; color: var(--primary-color); 
}

.action-buttons-row {
    display: flex; gap: 10px;
}
.app-btn {
    flex: 1; border: none; padding: 12px; border-radius: 12px;
    font-size: 13px; font-weight: 600; cursor: pointer;
}
.btn-message { background: rgba(255,255,255,0.1); color: #fff; }
.btn-call { background: var(--primary-color); color: var(--dark-color); }

/* OMBRE PORTÉE CARRÉE (Adaptée au S24) */
.phone-shadow.square-shadow {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 260px; /* Largeur adaptée au téléphone */
    height: 15px;
    background: rgba(0,0,0,0.6);
    border-radius: 4px;
    filter: blur(15px);
    z-index: 0;
}

/* --- RESPONSIVE DESKTOP (PC) --- */
@media (min-width: 992px) {
    .hero-unified-card {
        flex-direction: row;
        text-align: left;
        padding: 60px;
        gap: 60px;
        align-items: center;
    }

    .hero-text-side {
        flex: 1.2;
        text-align: left;
    }

    .hero-visual-side {
        display: flex; /* APPARAÎT SUR DESKTOP */
        flex: 1;
        padding-left: 40px;
    }

    .cta-buttons {
        justify-content: flex-start;
        flex-direction: row;
    }
}