@import "../vendor/bootstrap/dist/css/bootstrap.min-z0zQt-h.css";

:root {
    --color-primary: #0d6efd;
    --color-accent: #ffc107;
    --color-logo-orange: #ff5a1f;
    --color-dark: #252525;
    --color-dark-lighter: #3a3a3a;
    --font-family-base: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-base);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color: #2c3e50;
    line-height: 1.6;
}

/* Focus visible pour la navigation clavier */
:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

/* Bannière réseau (hors connexion) */
.network-banner {
    background: var(--color-accent);
    color: #212529;
    font-weight: 600;
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1050;
}

.network-banner[hidden] {
    display: none;
}

body > .container {
    flex: 1;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--color-primary) 0%, #0a58ca 100%);
    color: #fff;
    border-top: 4px solid #fff;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 90, 31, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.15rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-cta {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Section Titles */
.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2c3e50;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--color-logo-orange);
    border-radius: 2px;
}

/* How It Works - Step Cards */
.step-card {
    padding: 2rem 1.5rem;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    background: linear-gradient(135deg, var(--color-logo-orange), var(--color-accent));
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(255, 90, 31, 0.3);
}

/* Feature Cards */
.feature-card {
    min-height: 17rem;
    overflow: hidden;
    border: 0;
    border-top: 4px solid var(--color-logo-orange);
    border-radius: var(--radius-lg);
    background: var(--color-dark);
    color: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-logo-orange), var(--color-accent));
    font-size: 2.35rem;
    line-height: 1;
    box-shadow: 0 4px 12px rgba(255, 90, 31, 0.3);
}

.feature-card .card-text {
    color: #e9ecef;
    line-height: 1.65;
}

.feature-badges {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.feature-card .badge {
    padding: 0.55rem 0.75rem;
    font-size: 0.75rem;
    background: var(--color-logo-orange);
    color: #fff;
    border-radius: var(--radius-sm);
}

.feature-card .badge.badge-outline {
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    color: #fff;
}

/* Payment Cards */
.payment-card {
    background: #fff;
    border-radius: var(--radius-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.payment-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.payment-icon {
    font-size: 1.5rem;
}

.payment-logo {
    height: 48px;
    max-width: 100%;
    object-fit: contain;
}

/* Contact Card */
.contact-card {
    border-radius: var(--radius-lg);
    border-top: 4px solid var(--color-logo-orange) !important;
    background: var(--color-dark);
    color: #fff;
}

.contact-card p {
    color: #e9ecef;
}

/* Auth Cards (Login & Register) */
.auth-card {
    border-radius: var(--radius-lg);
    border-top: 4px solid var(--color-logo-orange) !important;
    background: var(--color-dark);
    color: #fff;
    overflow: hidden;
}

.auth-card-header {
    padding: 2rem 2rem 1.5rem;
    color: #fff;
    background: linear-gradient(135deg, var(--color-primary), #084298);
}

.auth-card-header p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.95rem;
}

.auth-card .form-label,
.auth-card .form-check-label {
    color: #fff;
    font-weight: 600;
}

.auth-card .form-control {
    background-color: #fff;
    color: #212529;
    border-radius: var(--radius-sm);
}

.auth-card .form-control:focus {
    border-color: var(--color-logo-orange);
    box-shadow: 0 0 0 0.2rem rgba(255, 90, 31, 0.2);
}

.auth-card a {
    color: var(--color-accent);
    font-weight: 600;
}

.auth-card a:hover,
.auth-card a:focus {
    color: #ff8c42;
}

.auth-submit {
    min-height: 3.25rem;
    background: linear-gradient(135deg, var(--color-logo-orange), #e84a1a);
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 90, 31, 0.4);
}

/* Registration Card */
.registration-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--color-dark);
    border-top: 4px solid var(--color-logo-orange) !important;
    color: #fff;
}

.registration-card-header {
    padding: 2rem 2rem 1.5rem;
    color: #fff;
    background: linear-gradient(135deg, var(--color-primary), #084298);
}

.registration-card-header p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.95rem;
}

.registration-section {
    margin-bottom: 1.5rem;
    padding: 0;
    border: 0;
}

.registration-section legend {
    width: 100%;
    margin-bottom: 0.9rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: #f8f9fa;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.registration-card .form-label {
    color: #fff;
}

.registration-card .form-text,
.auth-card .form-text {
    color: #ced4da;
}

.registration-card .form-control {
    background-color: #fff;
    color: #212529;
    border-radius: var(--radius-sm);
}

.registration-card .form-control:focus {
    border-color: var(--color-logo-orange);
    box-shadow: 0 0 0 0.2rem rgba(255, 90, 31, 0.2);
}

.registration-submit {
    min-height: 3.25rem;
}

/* Estimate Card */
.estimate-card {
    border-radius: var(--radius-lg);
    border-top: 4px solid var(--color-logo-orange) !important;
    background: var(--color-dark);
    color: #fff;
}

.estimate-card .form-label,
.estimate-card .form-check-label {
    color: #fff;
    font-weight: 600;
}

.estimate-card .form-control,
.estimate-card .form-select {
    background-color: #fff;
    color: #212529;
    border-radius: var(--radius-sm);
}

.estimate-card .form-control:focus,
.estimate-card .form-select:focus {
    border-color: var(--color-logo-orange);
    box-shadow: 0 0 0 0.2rem rgba(255, 90, 31, 0.2);
}

/* Tracking Card */
.tracking-card {
    border-radius: var(--radius-lg);
    border-top: 4px solid var(--color-logo-orange) !important;
    background: var(--color-dark);
    color: #fff;
}

.tracking-card .form-label {
    color: #fff;
    font-weight: 600;
}

.tracking-card .form-control {
    background-color: #fff;
    color: #212529;
    border-radius: var(--radius-sm);
}

.tracking-card .form-control:focus {
    border-color: var(--color-logo-orange);
    box-shadow: 0 0 0 0.2rem rgba(255, 90, 31, 0.2);
}

.tracking-card .text-muted {
    color: #ced4da !important;
}

.tracking-card hr {
    border-color: rgba(255, 255, 255, 0.25);
}

/* Page Loader */
.page-loader {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.82);
    color: #252525;
    backdrop-filter: blur(2px);
}

.page-loader[hidden] {
    display: none;
}

.page-loader-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-md);
    font-weight: 600;
}

.page-loader-spinner {
    width: 1.4rem;
    height: 1.4rem;
    border: 3px solid #dee2e6;
    border-top-color: var(--color-primary);
    border-right-color: var(--color-logo-orange);
    border-radius: 50%;
    animation: page-loader-spin 0.75s linear infinite;
}

@keyframes page-loader-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .page-loader-spinner {
        animation: none;
    }
}

/* Navbar */
.app-navbar {
    background: linear-gradient(135deg, var(--color-primary) 0%, #084298 100%);
}

.app-navbar .navbar-brand {
    color: #fff;
    letter-spacing: 0.01em;
}

.app-navbar .navbar-brand:hover,
.app-navbar .navbar-brand:focus {
    color: #fff;
}

.app-navbar .nav-link {
    margin: 0.15rem 0.15rem;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.96rem;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link:focus,
.app-navbar .nav-link[aria-current="page"] {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.16);
}

.app-navbar .navbar-toggler {
    border: 0;
    padding: 0.4rem;
}

.app-navbar .navbar-toggler:focus {
    box-shadow: none;
}

@media (max-width: 991.98px) {
    .app-navbar .navbar-nav {
        padding-top: 0.5rem;
    }

    .app-navbar .nav-link {
        margin: 0.1rem 0;
    }
}

/* Brand Logo */
.brand-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 50%;
}

.footer-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 50%;
}

/* Responsive */
@media (max-width: 576px) {
    .hero-section {
        padding: 2.5rem 0;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .feature-icon {
        width: 3.5rem;
        height: 3.5rem;
        font-size: 1.85rem;
    }

    .step-number {
        width: 3rem;
        height: 3rem;
        font-size: 1.25rem;
    }

    /* Cibles tactiles confortables sur mobile (>= 44 px) */
    .btn,
    .btn-sm,
    .page-link,
    .nav-link,
    .form-control,
    .form-select,
    .btn-close {
        min-height: 2.75rem;
    }

    .btn-sm {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .navbar-brand span {
        font-size: 1.05rem;
        font-weight: 700;
    }

    .brand-logo {
        width: 44px;
        height: 44px;
    }
}

/* Driver Cards */
.driver-next-action-card .btn {
    min-height: 3rem;
}

@media (max-width: 576px) {
    .driver-next-action-card {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1030;
        margin: 0;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        border-top: 3px solid var(--color-primary);
        box-shadow: 0 -0.25rem 0.75rem rgba(0, 0, 0, 0.15);
    }

    .driver-next-action-card .card-body {
        padding: 0.75rem 1rem;
    }

    .driver-delivery-page {
        padding-bottom: 15rem;
    }
}

/* Footer */
footer a {
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}
