/* ============================================================
   AutoRendez-vous — Styles publics
   Palette BURINFORT : noir | rouge | blanc
   ============================================================ */

:root {
    --ar-dark: #111111;
    --ar-dark-deep: #000000;
    --ar-steel: #1f1f1f;
    --ar-primary: #d71920;
    --ar-primary-hover: #b8141a;
    --ar-gray: #6c757d;
    --ar-bg: #f5f7fb;
    --ar-card: #ffffff;
    --ar-radius: 0.25rem;
    --ar-shadow: 0 0 0.875rem 0 rgba(33, 37, 41, 0.05);
}

body {
    font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
    color: #212529;
    background: #fff;
}

.bg-app {
    background: var(--ar-bg);
}

/* Navbar */
.site-navbar {
    background: var(--ar-dark);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--ar-primary);
    color: #fff;
    font-size: 1.1rem;
}

.btn-primary {
    --bs-btn-bg: #d71920;
    --bs-btn-border-color: #d71920;
    --bs-btn-hover-bg: #b8141a;
    --bs-btn-hover-border-color: #b8141a;
    --bs-btn-active-bg: #9f1016;
    --bs-btn-active-border-color: #9f1016;
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
}

.btn-outline-primary {
    --bs-btn-color: #d71920;
    --bs-btn-border-color: #d71920;
    --bs-btn-hover-bg: #d71920;
    --bs-btn-hover-border-color: #d71920;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: #9f1016;
    --bs-btn-active-border-color: #9f1016;
}

.text-primary {
    color: var(--ar-primary) !important;
}

/* Hero plein écran — image véhicule */
.hero-home {
    position: relative;
    min-height: min(88vh, 760px);
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    color: #fff;
}

.hero-home-media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-home-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
    transform: scale(1.06);
    animation: hero-kenburns 18s ease-out forwards;
}

.hero-home-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(26, 35, 48, 0.35) 0%, rgba(26, 35, 48, 0.55) 40%, rgba(26, 35, 48, 0.92) 100%),
        linear-gradient(90deg, rgba(26, 35, 48, 0.75) 0%, rgba(26, 35, 48, 0.25) 70%);
}

.hero-home-inner {
    position: relative;
    z-index: 1;
    padding: 4.5rem 0 3.5rem;
    max-width: 720px;
}

.hero-home-brand {
    margin-top: 1rem;
    margin-bottom: 0.65rem;
    font-family: "Sora", sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #ffb3b6;
}

.hero-home-title {
    font-family: "Sora", sans-serif;
    font-weight: 700;
    font-size: clamp(1.85rem, 4vw, 3rem);
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.hero-home-lead {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.82);
    max-width: 34rem;
    margin-bottom: 1.75rem;
}

.hero-home-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hero-reveal {
    opacity: 0;
    transform: translateY(18px);
    animation: hero-rise 0.7s ease forwards;
}

.hero-reveal:nth-child(1) { animation-delay: 0.05s; }
.hero-reveal:nth-child(2) { animation-delay: 0.18s; }
.hero-reveal:nth-child(3) { animation-delay: 0.3s; }
.hero-reveal:nth-child(4) { animation-delay: 0.42s; }
.hero-reveal:nth-child(5) { animation-delay: 0.54s; }

@keyframes hero-kenburns {
    from { transform: scale(1.08); }
    to { transform: scale(1); }
}

@keyframes hero-rise {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.text-white-75 {
    color: rgba(255, 255, 255, 0.8);
}

.min-vh-60 {
    min-height: 60vh;
}

/* Flotte véhicules */
.fleet-section {
    background:
        radial-gradient(ellipse at top left, rgba(215, 25, 32, 0.08), transparent 45%),
        linear-gradient(180deg, #f5f7fb 0%, #ffffff 100%);
}

.fleet-intro .section-title,
.services-section .section-title {
    font-family: "Sora", sans-serif;
}

.fleet-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 1rem;
    min-height: 320px;
}

.fleet-item {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: 4px;
    min-height: 280px;
    background: var(--ar-dark);
}

.fleet-item--wide {
    min-height: 100%;
}

.fleet-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.fleet-item:hover img {
    transform: scale(1.06);
}

.fleet-item figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.25rem 1.1rem;
    background: linear-gradient(180deg, transparent, rgba(26, 35, 48, 0.92));
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.fleet-item figcaption strong {
    font-family: "Sora", sans-serif;
    font-size: 1.05rem;
}

.fleet-item figcaption span {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
}

@media (max-width: 991.98px) {
    body[data-mobile-auth-clean="1"] > .navbar,
    body[data-mobile-auth-clean="1"] .site-navbar,
    body[data-mobile-auth-clean="1"] .site-footer,
    body[data-mobile-auth-clean="1"] #pwaInstallBanner {
        display: none !important;
    }

    body[data-mobile-auth-clean="1"] main.flex-grow-1 {
        padding-top: 0 !important;
    }

    body[data-mobile-auth-clean="1"] .mobile-auth-entry,
    body[data-mobile-auth-clean="1"] .auth-page {
        min-height: 100vh;
        display: flex;
        align-items: center;
        padding-top: 1rem;
    }

    body[data-mobile-auth-clean="1"] .mobile-auth-entry .container,
    body[data-mobile-auth-clean="1"] .auth-page .container {
        width: 100%;
    }

    .fleet-grid {
        grid-template-columns: 1fr;
    }
    .fleet-item,
    .fleet-item--wide {
        min-height: 240px;
    }
    .hero-home {
        min-height: 72vh;
    }
}

/* Services */
.section-title {
    color: var(--ar-dark);
    font-weight: 700;
}

.services-section {
    background: #fff;
}

.service-row {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 0.25rem 0;
}

.service-card {
    background: var(--ar-card);
    border: 1px solid #e4e9f0;
    border-radius: var(--ar-radius);
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(33, 37, 41, 0.1);
    border-color: transparent;
}

.service-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 10px;
    background: rgba(215, 25, 32, 0.12);
    color: var(--ar-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.cta-band {
    background:
        linear-gradient(100deg, rgba(26, 35, 48, 0.94), rgba(47, 61, 79, 0.9)),
        url("../img/hero-vehicule.jpg") center/cover no-repeat;
}

/* Footer */
.site-footer {
    background: var(--ar-dark-deep);
}

.brand-logo-nav {
    height: 40px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.brand-logo-hero {
    height: 56px;
    width: auto;
    max-width: 280px;
    object-fit: contain;
    background: #fff;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
}

.brand-logo-footer {
    height: 36px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    background: #fff;
    padding: 0.3rem 0.55rem;
    border-radius: 6px;
}

.brand-logo-auth {
    height: 48px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}

/* Auth */
.auth-page {
    background: var(--ar-bg);
    min-height: calc(100vh - 180px);
}

.auth-card {
    background: #fff;
    border-radius: var(--ar-radius);
    padding: 2rem;
    box-shadow: var(--ar-shadow);
}

.auth-card-mobile {
    border-radius: 18px;
    box-shadow: 0 18px 42px rgba(34, 46, 60, 0.08);
}

.auth-mobile-note {
    padding: 0.85rem 0.95rem;
    border-radius: 12px;
    background: rgba(215, 25, 32, 0.08);
    color: #42556c;
    font-size: 0.92rem;
}

.auth-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto;
    border-radius: 14px;
    background: rgba(215, 25, 32, 0.12);
    color: var(--ar-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.mobile-splash-screen {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top right, rgba(215, 25, 32, 0.18), transparent 30%),
        linear-gradient(160deg, #050505 0%, #111111 55%, #1f1012 100%);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.mobile-splash-screen.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.mobile-splash-inner {
    text-align: center;
    color: #fff;
}

.mobile-splash-logo {
    width: min(180px, 58vw);
    height: auto;
    background: #fff;
    border-radius: 18px;
    padding: 0.8rem 1rem;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.mobile-splash-brand {
    margin-top: 1rem;
    font-family: "Sora", sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
}

.mobile-auth-entry {
    padding: 1.25rem 0 2rem;
}

.mobile-auth-shell {
    background: #fff;
    border: 1px solid #eceff4;
    border-radius: 22px;
    padding: 1.15rem;
    box-shadow: 0 18px 42px rgba(17, 17, 17, 0.08);
}

.mobile-auth-head {
    margin-bottom: 1rem;
}

.mobile-auth-kicker {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ar-primary);
}

.mobile-auth-title {
    margin-bottom: 0.45rem;
    font-family: "Sora", sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--ar-dark);
}

.mobile-auth-subtitle {
    color: #66758a;
    font-size: 0.94rem;
}

.mobile-auth-tabs {
    background: #f6f8fb;
    border-radius: 14px;
    padding: 0.3rem;
}

.mobile-auth-tabs .nav-link {
    border-radius: 11px;
    font-weight: 700;
    color: #57677e;
}

.mobile-auth-tabs .nav-link.active {
    background: #111111 !important;
    color: #ffffff !important;
    box-shadow: 0 10px 22px rgba(17, 17, 17, 0.16);
}

.mobile-auth-content {
    margin-top: 1rem;
}

.table-row-highlight {
    background: rgba(28, 187, 140, 0.05);
}

.error-404 {
    max-width: 420px;
}

/* Forms */
.form-control:focus,
.form-select:focus {
    border-color: var(--ar-primary);
    box-shadow: 0 0 0 0.2rem rgba(215, 25, 32, 0.15);
}

.nav-pills .nav-link.active {
    background-color: var(--ar-primary) !important;
}

.mobile-page-header {
    background: #ffffff;
    border: 1px solid #eceff4;
    border-radius: 16px;
    padding: 1rem 1.1rem;
    box-shadow: 0 10px 24px rgba(17, 17, 17, 0.05);
}

.mobile-app-hero,
.mobile-form-hero {
    padding: 1.2rem 1rem;
    border-radius: 18px;
    color: #fff;
    background:
        radial-gradient(circle at top right, rgba(215, 25, 32, 0.22), transparent 34%),
        linear-gradient(145deg, #111111 0%, #191919 58%, #231012 100%);
    border: 1px solid rgba(215, 25, 32, 0.18);
    box-shadow: 0 18px 34px rgba(17, 17, 17, 0.18);
}

.mobile-app-hero-top {
    margin-bottom: 1rem;
}

.mobile-app-eyebrow {
    margin-bottom: 0.45rem;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 214, 214, 0.78);
}

.mobile-app-title {
    margin: 0;
    font-family: "Sora", sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.15;
    color: #ffffff;
}

.mobile-app-subtitle {
    margin-top: 0.55rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.94rem;
}

.mobile-app-hero-actions {
    display: grid;
    gap: 0.65rem;
}

.mobile-app-hero .btn,
.mobile-form-hero .btn {
    min-height: 46px;
    border-radius: 14px;
    font-weight: 700;
}

.mobile-app-hero .btn-outline-primary,
.mobile-form-hero .btn-outline-primary {
    --bs-btn-color: #ffffff;
    --bs-btn-border-color: rgba(255, 255, 255, 0.22);
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-border-color: #d71920;
    --bs-btn-hover-bg: rgba(215, 25, 32, 0.18);
    --bs-btn-active-color: #ffffff;
    --bs-btn-active-border-color: #d71920;
    --bs-btn-active-bg: rgba(215, 25, 32, 0.24);
    background: rgba(255, 255, 255, 0.04);
}

.mobile-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
}

.mobile-kpi-card {
    padding: 0.95rem 0.85rem;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e6ebf2;
    box-shadow: 0 10px 24px rgba(34, 46, 60, 0.06);
}

a.mobile-kpi-card {
    color: inherit;
    display: block;
}

a.mobile-kpi-card:hover {
    border-color: rgba(215, 25, 32, 0.35);
}

.mobile-kpi-card-accent {
    background: linear-gradient(135deg, rgba(215, 25, 32, 0.08), rgba(17, 17, 17, 0.03));
}

.mobile-kpi-label {
    font-size: 0.76rem;
    color: #6c7a8d;
    margin-bottom: 0.35rem;
}

.mobile-kpi-value {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--ar-dark);
    line-height: 1;
}

.mobile-kpi-value-sm {
    font-size: 1rem;
}

.mobile-card {
    background: #fff;
    border: 1px solid #e6ebf2;
    border-radius: 14px;
    padding: 1rem;
    box-shadow: 0 10px 28px rgba(34, 46, 60, 0.06);
}

.mobile-stack {
    display: grid;
    gap: 0.95rem;
}

.mobile-card-title {
    font-weight: 700;
    color: var(--ar-dark);
    line-height: 1.25;
}

.mobile-card-subtitle {
    margin-top: 0.2rem;
    font-size: 0.9rem;
    color: var(--ar-gray);
}

.mobile-meta-list {
    display: grid;
    gap: 0.45rem;
    font-size: 0.92rem;
}

.mobile-meta-list > div {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    color: #435166;
}

.mobile-meta-list i {
    color: var(--ar-primary);
    margin-top: 0.1rem;
}

.mobile-form-panel,
.mobile-detail-panel {
    border-radius: 14px;
    overflow: hidden;
}

.mobile-form-panel {
    border: 1px solid #e6ebf2;
    box-shadow: 0 10px 28px rgba(34, 46, 60, 0.06);
}

.mobile-form-panel .panel-body {
    padding: 1.15rem;
}

.app-form-section {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid #e7edf5;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
}

.app-form-section:last-of-type {
    margin-bottom: 1.25rem;
}

.app-form-section-header {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.app-form-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(215, 25, 32, 0.12);
    color: var(--ar-primary);
    font-weight: 800;
    flex-shrink: 0;
}

.app-form-title {
    margin: 0 0 0.2rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--ar-dark);
}

.app-form-subtitle {
    color: #6c7a8d;
    font-size: 0.88rem;
}

.app-form-actions {
    position: sticky;
    bottom: 5rem;
    padding-top: 0.35rem;
    background: linear-gradient(180deg, rgba(245, 247, 251, 0), rgba(245, 247, 251, 0.92));
}

.mobile-cta-btn,
.mobile-submit-btn {
    min-height: 46px;
    border-radius: 12px;
    font-weight: 700;
}

.mobile-profile-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
}

.mobile-profile-action-card {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.95rem 1rem;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e6ebf2;
    color: var(--ar-dark);
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(34, 46, 60, 0.05);
}

.mobile-profile-action-card i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(215, 25, 32, 0.12);
    color: var(--ar-primary);
    font-size: 1.05rem;
}

.mobile-profile-action-card span {
    font-weight: 700;
    font-size: 0.92rem;
}

.mobile-logout-block form {
    width: 100%;
}

.client-sidebar-nav .sidebar-link {
    border-radius: 10px;
}

.mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1035;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    width: 100%;
    padding: 0 0 env(safe-area-inset-bottom);
    background: #ffffff;
    border-top: 1px solid #dce3ec;
    box-shadow: 0 -4px 16px rgba(34, 46, 60, 0.08);
}

.mobile-bottom-nav--driver {
    grid-template-columns: repeat(4, 1fr);
}

.mobile-bottom-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    width: 100%;
    color: #55657b;
    text-decoration: none;
    border-radius: 0;
    font-weight: 600;
    border-top: 3px solid transparent;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.mobile-bottom-link i {
    font-size: 1.28rem;
}

.mobile-bottom-link.active {
    color: var(--ar-primary);
    background: rgba(215, 25, 32, 0.08);
    border-top-color: var(--ar-primary);
}

.navbar .nav-link .bi-person-circle,
.navbar .nav-link .bi-bell {
    vertical-align: middle;
}

.mobile-bottom-badge {
    position: absolute;
    top: 0.15rem;
    right: 0.55rem;
    min-width: 18px;
    height: 18px;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: #dc3545;
    color: #fff;
    font-size: 0.68rem;
    line-height: 18px;
    text-align: center;
}

.pwa-install-banner {
    position: sticky;
    top: 0;
    z-index: 1045;
    padding: 0.65rem 0;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid #e6ebf2;
    backdrop-filter: blur(8px);
}

.pwa-install-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(215, 25, 32, 0.08), rgba(17, 17, 17, 0.04));
}

@media (max-width: 991.98px) {
    .navbar {
        min-height: 60px;
        padding-left: 0.35rem;
        padding-right: 0.55rem;
    }

    .navbar .nav-link {
        padding: 0.45rem 0.55rem;
    }

    .content {
        padding: 1rem 0.85rem 6.2rem !important;
    }

    .mobile-page-header {
        padding: 1rem;
        margin-top: 0.1rem;
    }

    .mobile-page-header p {
        font-size: 0.95rem;
    }

    .mobile-page-header h1,
    .mobile-page-header .h3 {
        font-size: 1.35rem;
    }

    .mobile-bottom-nav {
        gap: 0;
        padding: 0 0 env(safe-area-inset-bottom);
    }

    .mobile-bottom-link {
        min-height: 56px;
    }

    .mobile-bottom-link i {
        font-size: 1.22rem;
    }

    .mobile-cta-btn,
    .mobile-submit-btn {
        width: 100%;
        justify-content: center;
    }

    .mobile-kpi-grid {
        grid-template-columns: 1fr;
    }

    .app-form-section {
        padding: 0.9rem;
        border-radius: 14px;
    }

    .app-form-section-header {
        gap: 0.7rem;
    }

    .app-form-step {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }

    .app-form-actions {
        bottom: 5.4rem;
    }

    .nav-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.2rem;
    }

    .nav-pills .nav-item {
        flex: 0 0 auto;
    }

    .card .card-body form .btn,
    .panel .panel-body form .btn {
        min-height: 48px;
    }

    .detail-list dt {
        font-size: 0.8rem;
    }

    .detail-list dd {
        font-size: 0.95rem;
    }

    .client-footer {
        padding: 1rem 0 6rem;
    }

    .client-footer .row {
        gap: 0.35rem;
    }

    .client-footer .text-end {
        text-align: left !important;
    }

    .client-footer p,
    .client-footer span {
        font-size: 0.88rem;
    }

    .auth-card {
        padding: 1.25rem;
    }

    .brand-logo-auth {
        max-width: 180px;
        height: auto;
    }

    .pwa-install-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .pwa-install-inner .btn {
        min-height: 42px;
    }

    .mobile-profile-actions {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-home-img,
    .hero-reveal,
    .fleet-item img {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}
