/* ==========================================================
   AzotCar — Barre de navigation, menu mobile et pied de page
   Chargé après app.css par layouts/app.blade.php : ces règles
   remplacent l'habillage d'origine sans toucher aux autres pages.
   ========================================================== */

:root {
    --chrome-ink: #0b1528;
    --chrome-ink-soft: #16284a;
    --chrome-blue: var(--color-primary, #267df0);
    --chrome-sky: var(--color-primary-accent, #38bdf8);
    --chrome-line: #e4e9f0;
    --chrome-display: 'Barlow Semi Condensed', 'Outfit', 'Segoe UI', system-ui, sans-serif;
    --chrome-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
}

/* ==============================================
   LOGO (navbar, menu mobile, pied de page)
   ============================================== */
.navbar .logo-box,
.mobile-sidebar .logo-box,
.site-footer .logo-box {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 0;
    background: none;
    border-radius: 0;
    font-family: var(--chrome-display);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1;
    color: var(--chrome-ink);
}

.navbar .logo-box::before,
.mobile-sidebar .logo-box::before,
.site-footer .logo-box::before {
    content: '';
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    margin-right: 9px;
    border-radius: 7px;
    background: var(--chrome-ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4.5 10.5l3.6 3.6 7.4-8.2' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 17px no-repeat;
}

.navbar .logo-box span,
.mobile-sidebar .logo-box span {
    color: var(--chrome-blue);
}

.site-footer .logo-box {
    color: #ffffff;
}

.site-footer .logo-box::before {
    background-color: var(--chrome-blue);
}

.site-footer .logo-box span {
    color: var(--chrome-sky);
}

/* ==============================================
   NAVBAR
   ============================================== */
.navbar {
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: saturate(1.5) blur(12px);
    backdrop-filter: saturate(1.5) blur(12px);
    border-bottom: 1px solid var(--chrome-line);
    transition: box-shadow 0.2s ease;
}

.navbar.is-scrolled {
    box-shadow: 0 10px 28px -18px rgba(11, 21, 40, 0.45);
}

.navbar-inner {
    max-width: 1160px;
    height: 66px;
    padding: 0 24px;
}

.navbar-inner > a {
    display: inline-flex;
    border-radius: 6px;
}

.navbar-nav {
    gap: 2px;
}

.navbar-nav a {
    position: relative;
    height: 66px;
    padding: 0 14px;
    font-size: 14.5px;
    font-weight: 500;
    color: #4a5a72;
    border-bottom: none;
    transition: color 0.15s ease;
}

.navbar-nav a::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: -1px;
    height: 2px;
    background: var(--chrome-blue);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.22s ease;
}

.navbar-nav a:hover,
.navbar-nav a.nav-active {
    color: var(--chrome-ink);
}

.navbar-nav a.nav-active {
    font-weight: 600;
}

.navbar-nav a:hover::after,
.navbar-nav a.nav-active::after {
    transform: scaleX(1);
}

.navbar-right {
    gap: 10px;
}

/* Visiteur : bouton « S'inscrire » */
.navbar-auth-desktop {
    display: flex;
    align-items: center;
}

.navbar-right .btn-inscription {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 16px 0 18px;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    color: #ffffff;
    background: #1a5ec6;
    border: none;
    border-radius: 9px;
    box-shadow: none;
    transition: background-color 0.15s ease;
}

.navbar-right .btn-inscription:hover {
    color: #ffffff;
    background: #174fa8;
}

.navbar-right .btn-inscription svg {
    transition: transform 0.2s ease;
}

.navbar-right .btn-inscription:hover svg {
    transform: translateX(3px);
}

.user-avatar-btn {
    padding: 5px 12px 5px 5px;
    background: #ffffff;
    border: 1px solid var(--chrome-line);
}

.user-avatar-btn:hover {
    background: #f3f5f9;
}

.user-initials-avatar {
    background: var(--chrome-ink);
}

.navbar-burger {
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0 -10px 0 4px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-radius: 8px;
}

.navbar-burger span {
    width: 22px;
    height: 2px;
    background-color: var(--chrome-ink);
}

.navbar a:focus-visible,
.navbar button:focus-visible,
.mobile-sidebar a:focus-visible,
.mobile-sidebar button:focus-visible {
    outline: 2px solid var(--chrome-blue);
    outline-offset: 2px;
}

/* ==============================================
   MENU MOBILE
   ============================================== */
.mobile-sidebar {
    width: 308px;
}

.sidebar-header {
    height: 60px;
    padding: 0 12px 0 18px;
    border-bottom-color: var(--chrome-line);
}

.sidebar-close {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: transparent;
    color: var(--chrome-ink);
}

.sidebar-close i {
    font-size: 22px;
}

.sidebar-nav {
    padding: 12px 0;
}

.sidebar-nav a {
    position: relative;
    gap: 14px;
    margin: 1px 12px;
    padding: 13px 14px;
    font-size: 15.5px;
    font-weight: 500;
    color: #26344b;
    border-radius: 8px;
}

.sidebar-nav a .s-icon {
    width: 24px;
    font-size: 20px;
    color: #64748b;
}

.sidebar-nav a.nav-active {
    background-color: #eef4fe;
    color: var(--chrome-ink);
    font-weight: 600;
}

.sidebar-nav a.nav-active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 11px;
    bottom: 11px;
    width: 3px;
    border-radius: 2px;
    background: var(--chrome-blue);
}

.sidebar-section-divider {
    margin: 10px 26px;
    background: var(--chrome-line);
}

.sidebar-auth {
    padding: 16px 18px calc(18px + env(safe-area-inset-bottom));
    border-top-color: var(--chrome-line);
}

.sidebar-btn-login {
    padding: 14px 16px;
    font-size: 15.5px;
    font-weight: 700;
    border-radius: 9px;
    background: #1a5ec6;
}

.sidebar-btn-login:hover {
    background: #174fa8;
}


.sidebar-btn-logout {
    padding: 13px 16px;
    font-size: 15px;
    border-radius: 8px;
}

/* ==============================================
   RESPONSIVE
   ============================================== */
@media (max-width: 1100px) {
    .navbar-nav a {
        padding: 0 10px;
        font-size: 13.5px;
    }

    .navbar-nav a::after {
        left: 10px;
        right: 10px;
    }
}

/* Tablette et mobile : logo + bouton menu uniquement */
@media (max-width: 900px) {
    .navbar-nav {
        display: none;
    }

    .navbar-burger {
        display: flex;
    }

    .navbar-inner {
        height: 58px;
        padding: 0 18px;
    }

    .navbar-right .btn-inscription,
    .navbar-right .btn-user,
    .navbar-right > form,
    .navbar-auth-desktop > form {
        display: none;
    }

    .navbar-right {
        gap: 0;
    }

    .navbar .logo-box,
    .mobile-sidebar .logo-box {
        font-size: 22px;
    }

    .navbar .logo-box::before,
    .mobile-sidebar .logo-box::before {
        width: 26px;
        height: 26px;
        margin-right: 8px;
        background-size: 16px;
    }

    .user-avatar-btn {
        padding: 4px;
        border: none;
        background: none;
    }

    .user-name-label,
    .user-avatar-btn i {
        display: none;
    }

    .user-initials-avatar {
        width: 34px;
        height: 34px;
        font-size: 12.5px;
    }
}

/* ==============================================
   PIED DE PAGE — mobile d'abord
   Base = téléphone ; on élargit à partir de 640px puis 960px.
   Classes « ft-* » propres : aucune règle héritée d'app.css ne s'y applique.
   ============================================== */
.site-footer {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 48px 20px calc(32px + env(safe-area-inset-bottom));
    background-color: var(--chrome-ink);
    color: #a9b6c9;
}

/* Halo bleu + quadrillage fin qui s'estompe vers le bas */
.ft-fond {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(70% 45% at 85% 0%, rgba(56, 189, 248, 0.22), transparent 70%),
        radial-gradient(55% 40% at 0% 30%, rgba(38, 125, 240, 0.16), transparent 70%);
}

.ft-fond::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 40px 40px;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 75%);
    mask-image: linear-gradient(to bottom, #000 0%, transparent 75%);
}

.ft-inner {
    position: relative;
    max-width: 1112px;
    margin: 0 auto;
}

/* ── Marque + liens ── */
.ft-haut {
    display: grid;
    gap: 32px;
    padding: 0 0 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}

.ft-logo {
    display: inline-flex;
    border-radius: 6px;
}

.site-footer .ft-logo .logo-box {
    margin-bottom: 0;
    font-size: 24px;
}

.ft-slogan {
    max-width: 340px;
    margin: 12px 0 0;
    font-size: 14.5px;
    line-height: 1.6;
    color: #a9b6c9;
}

.ft-liens {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.ft-titre {
    margin: 0 0 8px;
    font-family: var(--chrome-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #8394ad;
}

.ft-liste,
.ft-legal {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ft-liste a {
    display: inline-block;
    padding: 7px 0; /* zone tactile confortable */
    font-size: 15px;
    color: #d5deea;
    overflow-wrap: anywhere;
    text-decoration: underline transparent;
    text-underline-offset: 5px;
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.ft-liste a:hover,
.ft-legal a:hover {
    color: #ffffff;
    text-decoration-color: var(--chrome-sky);
}

/* ── Barre du bas ── */
.ft-bas {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 0 8px;
    font-size: 13px;
    color: #8394ad;
}

.ft-copyright {
    margin: 0;
}

.ft-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
}

.ft-legal a {
    display: inline-block;
    padding: 4px 0;
    color: #a9b6c9;
    text-decoration: underline transparent;
    text-underline-offset: 4px;
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.site-footer a:focus-visible {
    outline: 2px solid var(--chrome-sky);
    outline-offset: 3px;
}

/* ── Grand logo en filigrane, en fond derrière tout le contenu ── */
.ft-filigrane {
    position: absolute;
    z-index: -1; /* au-dessus du halo (.ft-fond), sous le texte */
    left: 50%;
    top: 58%; /* mobile : derrière les liens, au cœur du footer */
    transform: translate(-50%, -50%);
    font-family: var(--chrome-display);
    font-size: clamp(88px, 27vw, 300px); /* le mot tient dans la largeur */
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    white-space: nowrap;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(148, 197, 255, 0.24);
    background: linear-gradient(to bottom, rgba(56, 189, 248, 0.24) 0%, rgba(38, 125, 240, 0.08) 60%, transparent 95%);
    -webkit-background-clip: text;
    background-clip: text;
    user-select: none;
    pointer-events: none;
}

/* Tablette : marque à gauche, liens à droite */
@media (min-width: 640px) {
    .ft-filigrane {
        top: auto;
        bottom: -0.12em;
        transform: translateX(-50%);
    }

    .site-footer {
        padding: 64px 24px 40px;
    }

    .ft-haut {
        grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
        gap: 40px;
        padding-bottom: 40px;
    }

    .ft-bas {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px 24px;
    }
}

/* Ordinateur : le mot devient immense, on l'adoucit pour qu'il reste un fond */
@media (min-width: 960px) {
    .site-footer {
        padding-top: 80px;
    }

    .ft-haut {
        gap: 64px;
        padding-bottom: 48px;
    }

    .site-footer .ft-logo .logo-box {
        font-size: 26px;
    }

    .ft-liens {
        gap: 40px;
    }

    .ft-filigrane {
        -webkit-text-stroke: 1px rgba(148, 197, 255, 0.18);
        background: linear-gradient(to bottom, rgba(56, 189, 248, 0.18), transparent 85%);
        -webkit-background-clip: text;
        background-clip: text;
    }
}

@media (prefers-reduced-motion: reduce) {
    .navbar,
    .navbar-nav a::after {
        transition: none;
    }
}

/* ==============================================
   PANNEAU « MON COMPTE » — mobile d'abord
   Pleine hauteur, glisse depuis la droite au clic sur l'avatar.
   Base = téléphone (presque tout l'écran) ; 400px à partir de 640px.
   ============================================== */
.pc-voile {
    position: fixed;
    inset: 0;
    z-index: 1300;
    background: rgba(11, 21, 40, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.pc-voile.is-ouvert {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease;
}

.pc-panneau {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1310;
    display: flex;
    flex-direction: column;
    width: calc(100% - 40px); /* une bande de voile reste visible : on comprend qu'on peut fermer */
    max-width: 420px;
    height: 100vh;
    height: 100dvh;
    background: #ffffff;
    box-shadow: -24px 0 60px -20px rgba(11, 21, 40, 0.45);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.38s;
    outline: none;
}

.pc-panneau.is-ouvert {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── En-tête sombre : identité + chiffres ── */
.pc-entete {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    flex-shrink: 0;
    padding: calc(10px + env(safe-area-inset-top)) 18px 20px 20px;
    background-color: #ffffff;
    border-bottom: 1px solid var(--chrome-line);
    color: #475569;
}

.pc-entete::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(rgba(11, 21, 40, 0.085) 1px, transparent 1px) 0 0 / 32px 32px,
        linear-gradient(90deg, rgba(11, 21, 40, 0.085) 1px, transparent 1px) 0 0 / 32px 32px;
    -webkit-mask-image: linear-gradient(to bottom, #000 20%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 20%, transparent 100%);
}

.pc-barre {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
}

.pc-etiquette {
    font-family: var(--chrome-mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #8394ad;
}

.pc-fermer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-right: -8px;
    border: 0;
    border-radius: 10px;
    background: #f1f5f9;
    color: var(--chrome-ink);
    font-size: 20px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.pc-fermer:hover {
    background: #e2e8f0;
}

.pc-identite {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 14px;
}

.pc-avatar {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: linear-gradient(135deg, #38bdf8 0%, #267df0 100%);
    box-shadow: 0 12px 28px -12px rgba(56, 189, 248, 0.8), inset 0 0 0 1px rgba(255, 255, 255, 0.25);
    font-family: var(--chrome-display);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #ffffff;
    text-transform: uppercase;
}

.pc-qui {
    min-width: 0;
}

.pc-nom {
    margin: 0;
    font-family: var(--chrome-display);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--chrome-ink);
    overflow-wrap: anywhere;
}

.pc-tel {
    margin: 3px 0 0;
    font-family: var(--chrome-mono);
    font-size: 13px;
    letter-spacing: 0.02em;
    color: #475569;
}

.pc-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    padding: 3px 9px 3px 7px;
    border: 1px solid #a7f3d0;
    border-radius: 999px;
    background: #ecfdf5;
    font-size: 11.5px;
    font-weight: 600;
    color: #047857;
}

.pc-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 20px;
    border: 1px solid var(--chrome-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.pc-stats:hover {
    border-color: #bcd3f5;
    background: #f8fbff;
}

.pc-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 10px;
    text-align: center;
}

.pc-stat + .pc-stat {
    border-left: 1px solid var(--chrome-line);
}

.pc-stat strong {
    font-family: var(--chrome-display);
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
    color: var(--chrome-ink);
}

.pc-stat span {
    font-size: 11.5px;
    line-height: 1.3;
    color: #64748b;
}

.pc-stat--alerte strong { color: #dc2626; }
.pc-stat--attention strong { color: #d97706; }

/* ── Corps : liens (défile si l'écran est petit) ── */
.pc-corps {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px 12px 16px;
}

.pc-section {
    margin: 18px 10px 6px;
    font-family: var(--chrome-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #8394ad;
}

.pc-liste {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pc-lien {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 56px;
    padding: 10px;
    border-radius: 12px;
    color: var(--chrome-ink);
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.pc-lien:hover {
    background: #f3f6fb;
}

.pc-lien.is-actif {
    background: #eef4fe;
}

.pc-ico {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: #f1f5f9;
    font-size: 20px;
    color: #26344b;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.pc-lien.is-actif .pc-ico,
.pc-lien:hover .pc-ico {
    background: var(--chrome-blue);
    color: #ffffff;
}

.pc-texte {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 15.5px;
    font-weight: 600;
}

.pc-texte small {
    font-size: 12.5px;
    font-weight: 400;
    color: #64748b;
}

.pc-fleche {
    font-size: 18px;
    color: #94a3b8;
    transition: transform 0.2s ease, color 0.15s ease;
}

.pc-lien:hover .pc-fleche {
    transform: translateX(3px);
    color: var(--chrome-blue);
}

/* ── Pied : déconnexion ── */
.pc-pied {
    flex-shrink: 0;
    padding: 14px 20px calc(16px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--chrome-line);
}

.pc-pied form {
    margin: 0;
}

.pc-deconnexion {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 50px;
    border: 1px solid #fecaca;
    border-radius: 12px;
    background: #fff5f5;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    color: #dc2626;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.pc-deconnexion i {
    font-size: 19px;
}

.pc-deconnexion:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}

.pc-panneau a:focus-visible,
.pc-panneau button:focus-visible {
    outline: 2px solid var(--chrome-blue);
    outline-offset: 2px;
}

/* Petits téléphones (≤ 360px) : on resserre un peu */
@media (max-width: 360px) {
    .pc-panneau {
        width: calc(100% - 28px);
    }

    .pc-avatar {
        width: 52px;
        height: 52px;
        font-size: 21px;
    }

    .pc-nom {
        font-size: 20px;
    }
}

/* Tablette et plus : largeur fixe, plus d'air */
@media (min-width: 640px) {
    .pc-panneau {
        width: 400px;
    }

    .pc-entete {
        padding: 14px 22px 24px 26px;
    }

    .pc-corps {
        padding: 8px 16px 20px;
    }

    .pc-pied {
        padding-inline: 26px;
    }
}

/* Avatar de la navbar : il signale qu'il est cliquable */
.user-avatar-btn {
    cursor: pointer;
}

.user-avatar-btn[aria-expanded="true"] .user-initials-avatar {
    box-shadow: 0 0 0 3px rgba(38, 125, 240, 0.35);
}

@media (prefers-reduced-motion: reduce) {
    .pc-panneau,
    .pc-voile,
    .pc-fleche {
        transition: none;
    }
}
