        *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

        :root {
            --brand-accent: #38bdf8;
            --brand-accent2:#818cf8;
            --page-bg: #0f172a;
            --page-radial: rgba(56,189,248,0.06);
            --page-radial-end: rgba(15,23,42,0);
            --surface: rgba(30, 41, 59, 0.72);
            --surface-strong: rgba(15,23,42,0.78);
            --surface-soft: rgba(30,41,59,0.86);
            --border: rgba(255,255,255,0.09);
            --border-strong: rgba(255,255,255,0.14);
            --text-main: #f8fafc;
            --text-muted: #94a3b8;
            --text-soft: #64748b;
            --text-faint: #475569;
            --button-plain-bg: #f8fafc;
            --button-plain-text: #0f172a;
            --shadow-strong: rgba(0,0,0,0.5);
            --logo-opacity: 0.58;
            --watermark-opacity: 0.04;
        }

        body[data-theme="light"] {
            --brand-accent: #0f766e;
            --brand-accent2: #2563eb;
            --page-bg: #f6f8fb;
            --page-radial: rgba(14,116,144,0.10);
            --page-radial-end: rgba(246,248,251,0);
            --surface: rgba(255,255,255,0.82);
            --surface-strong: rgba(255,255,255,0.94);
            --surface-soft: rgba(255,255,255,0.96);
            --border: rgba(15,23,42,0.10);
            --border-strong: rgba(15,23,42,0.16);
            --text-main: #111827;
            --text-muted: #475569;
            --text-soft: #64748b;
            --text-faint: #64748b;
            --button-plain-bg: #111827;
            --button-plain-text: #ffffff;
            --shadow-strong: rgba(15,23,42,0.14);
            --logo-opacity: 0.88;
            --watermark-opacity: 0.035;
        }

        /* ══ FOND : logo en watermark répété sur toute la page ══ */
        body {
            min-height: 100vh;
            font-family: 'Inter', sans-serif;
            background-color: var(--page-bg);
            background-image:
                radial-gradient(ellipse 80% 70% at 50% 50%,
                    var(--page-radial) 0%,
                    var(--page-radial-end) 70%),
                url('Images/logo-ghost.png');
            background-size: auto, 220px 220px;
            background-repeat: no-repeat, repeat;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding: 24px 16px;
            position: relative;
            overflow-x: hidden;
            overflow-y: auto;
            transition: background-color 0.25s ease, color 0.25s ease;
        }

        /* Gros logo décoratif coin haut-droite */
        body::before {
            content: '';
            position: fixed;
            top: -80px; right: -80px;
            width: 420px; height: 420px;
            background-image: url('Images/logo-white.png');
            background-size: contain;
            background-repeat: no-repeat;
            opacity: var(--watermark-opacity);
            pointer-events: none;
            z-index: 0;
        }
        /* Gros logo décoratif coin bas-gauche */
        body::after {
            content: '';
            position: fixed;
            bottom: -100px; left: -80px;
            width: 380px; height: 380px;
            background-image: url('Images/logo-white.png');
            background-size: contain;
            background-repeat: no-repeat;
            opacity: var(--watermark-opacity);
            pointer-events: none;
            z-index: 0;
        }

        body[data-theme="light"]::before,
        body[data-theme="light"]::after {
            background-image: url('Images/logo.png');
        }

        /* ══ WRAPPER CENTRÉ ══ */
        .login-wrapper {
            position: relative;
            z-index: 10;
            width: 100%;
            max-width: 420px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 28px;
        }

        .top-bar {
            width: 100%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 18px;
        }

        .site-logo {
            width: 72px;
            height: 72px;
            background-image: url('Images/logo-white.png');
            background-size: contain;
            background-repeat: no-repeat;
            background-position: center;
            opacity: var(--logo-opacity);
            filter: drop-shadow(0 16px 28px rgba(56,189,248,0.24));
        }

        body[data-theme="light"] .site-logo,
        body[data-theme="light"] .footer-logo {
            background-image: url('Images/logo.png');
            filter: drop-shadow(0 14px 24px rgba(15,23,42,0.12));
        }

        .theme-toggle {
            width: 44px;
            height: 44px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border: 1px solid var(--border-strong);
            border-radius: 999px;
            background: var(--surface-strong);
            color: var(--text-main);
            cursor: pointer;
            box-shadow: 0 14px 28px rgba(15,23,42,0.10);
            transition: transform 0.2s, border-color 0.2s, background 0.2s;
        }
        .theme-toggle:hover {
            transform: translateY(-1px);
            border-color: var(--brand-accent);
        }

        .theme-toggle .icon-light { display: none; }
        body[data-theme="light"] .theme-toggle .icon-dark { display: none; }
        body[data-theme="light"] .theme-toggle .icon-light { display: block; }

        .theme-toggle svg,
        .btn-search svg {
            width: 18px;
            height: 18px;
            stroke: currentColor;
            stroke-width: 2;
            fill: none;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        /* ══ RECHERCHE PUBLIQUE ══ */
        .public-search {
            width: 100%;
            display: flex;
            flex-direction: column;
            gap: 14px;
            text-align: center;
        }

        .public-search-form {
            display: flex;
            align-items: stretch;
            gap: 10px;
            width: 100%;
        }

        .public-search-form input {
            min-width: 0;
            flex: 1;
            padding: 16px 18px;
            background: var(--surface-strong);
            border: 1px solid var(--border-strong);
            border-radius: 999px;
            font-size: 15px;
            color: var(--text-main);
            font-family: 'Inter', sans-serif;
            box-shadow: 0 18px 40px rgba(15,23,42,0.12);
        }

        .public-search-form input::placeholder { color: var(--text-soft); }
        .public-search-form input:focus {
            outline: none;
            border-color: var(--brand-accent);
            box-shadow: 0 0 0 3px rgba(56,189,248,0.12);
        }

        .btn-search {
            flex: 0 0 auto;
            min-width: 54px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0 18px;
            border: none;
            border-radius: 999px;
            background: var(--button-plain-bg);
            color: var(--button-plain-text);
            font-size: 14px;
            font-weight: 700;
            font-family: 'Inter', sans-serif;
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s;
        }
        .btn-search:hover {
            transform: translateY(-1px);
            box-shadow: 0 8px 24px rgba(248,250,252,0.18);
        }

        .public-search-panel {
            width: 100%;
            background: var(--surface-strong);
            border: 1px solid var(--border);
            border-radius: 14px;
            padding: 14px;
            text-align: left;
        }

        .public-search-message {
            color: var(--text-muted);
            font-size: 13px;
            text-align: center;
            line-height: 1.4;
        }

        .public-result {
            padding: 14px;
            border-radius: 10px;
            background: var(--surface-soft);
            border: 1px solid var(--border);
        }
        .public-result + .public-result { margin-top: 10px; }

        .public-result-top {
            display: flex;
            justify-content: space-between;
            gap: 12px;
            align-items: flex-start;
            margin-bottom: 8px;
        }

        .public-result-type {
            color: var(--brand-accent);
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }

        .public-result-ref {
            color: var(--text-main);
            font-size: 13px;
            font-weight: 700;
            white-space: nowrap;
        }

        .public-result-title {
            color: var(--text-main);
            font-size: 14px;
            font-weight: 700;
            line-height: 1.35;
            margin-bottom: 8px;
        }

        .public-result-status {
            display: inline-flex;
            color: #0f172a;
            background: linear-gradient(135deg, var(--brand-accent) 0%, var(--brand-accent2) 100%);
            font-size: 12px;
            font-weight: 700;
            border-radius: 999px;
            padding: 5px 9px;
            margin-bottom: 10px;
        }

        .public-eta-widget {
            position: relative;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            min-height: 58px;
            margin: 0 0 10px;
            padding: 11px 13px;
            border-radius: 12px;
            background: linear-gradient(135deg, rgba(56,189,248,0.14), rgba(129,140,248,0.12));
            border: 1px solid var(--border-strong);
        }

        .public-eta-widget::before {
            content: '';
            position: absolute;
            left: 12px;
            right: 12px;
            bottom: 13px;
            height: 2px;
            background: linear-gradient(90deg, transparent, var(--brand-accent), transparent);
            opacity: 0.55;
        }

        .public-eta-label {
            position: relative;
            z-index: 1;
            color: var(--text-soft);
            font-size: 10px;
            font-weight: 800;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }

        .public-eta-date {
            position: relative;
            z-index: 1;
            color: var(--text-main);
            font-size: 18px;
            font-weight: 800;
            line-height: 1.1;
            margin-top: 3px;
        }

        .public-eta-vehicle {
            position: relative;
            z-index: 1;
            flex: 0 0 82px;
            height: 34px;
            font-size: 28px;
            text-align: center;
            animation: etaVehicle 3.2s ease-in-out infinite;
        }

        @keyframes etaVehicle {
            0% { transform: translateX(-18px) translateY(2px); opacity: 0.55; }
            50% { transform: translateX(8px) translateY(-2px); opacity: 1; }
            100% { transform: translateX(28px) translateY(2px); opacity: 0.75; }
        }

        .public-result-meta {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px 12px;
        }

        .public-result-meta div {
            min-width: 0;
            color: var(--text-muted);
            font-size: 12px;
            line-height: 1.35;
        }

        .public-result-meta strong {
            display: block;
            color: var(--text-soft);
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        /* ══ CARD PRINCIPALE (glassmorphism) ══ */
        .login-card {
            position: relative;
            overflow: hidden;
            width: 100%;
            background: var(--surface);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid var(--border);
            border-radius: 20px;
            padding: 40px 36px;
            box-shadow:
                0 25px 50px var(--shadow-strong),
                inset 0 0 0 1px rgba(56,189,248,0.05);
        }

        /* Petit logo watermark en bas-droite de la card */
        .login-card::after {
            content: '';
            position: absolute;
            bottom: -18px; right: -18px;
            width: 130px; height: 130px;
            background-image: url('Images/logo-white.png');
            background-size: contain;
            background-repeat: no-repeat;
            opacity: 0.05;
            pointer-events: none;
        }

        body[data-theme="light"] .login-card::after {
            background-image: url('Images/logo.png');
            opacity: 0.035;
        }

        .login-card h1 {
            font-size: 1.2rem;
            font-weight: 600;
            color: var(--text-main);
            margin-bottom: 28px;
            text-align: center;
        }

        /* ══ FORMULAIRE ══ */
        .form-group { margin-bottom: 20px; }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-size: 0.78rem;
            font-weight: 600;
            color: var(--text-soft);
            text-transform: uppercase;
            letter-spacing: 0.09em;
        }

        .form-group input {
            width: 100%;
            padding: 13px 16px;
            background: var(--surface-strong);
            border: 1px solid var(--border);
            border-radius: 10px;
            font-size: 15px;
            color: var(--text-main);
            font-family: 'Inter', sans-serif;
            transition: border-color 0.25s, box-shadow 0.25s;
        }
        .form-group input::placeholder { color: var(--text-soft); }
        .form-group input:focus {
            outline: none;
            border-color: var(--brand-accent);
            box-shadow: 0 0 0 3px rgba(56,189,248,0.12);
        }

        /* ══ BOUTON ══ */
        .btn-login {
            width: 100%;
            padding: 14px;
            border: none;
            border-radius: 10px;
            background: linear-gradient(135deg, var(--brand-accent) 0%, var(--brand-accent2) 100%);
            color: #0f172a;
            font-size: 15px;
            font-weight: 700;
            font-family: 'Inter', sans-serif;
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s;
            letter-spacing: 0.02em;
            margin-top: 4px;
        }
        .btn-login:hover {
            transform: translateY(-1px);
            box-shadow: 0 8px 25px rgba(56,189,248,0.35);
        }
        .btn-login:active { transform: translateY(0); }

        /* ══ ERREUR ══ */
        .error-message {
            background: rgba(220,38,38,0.12);
            border: 1px solid rgba(220,38,38,0.3);
            color: #fca5a5;
            padding: 12px 16px;
            border-radius: 10px;
            margin-bottom: 20px;
            font-size: 14px;
            text-align: center;
        }

        /* ══ LIENS SECONDAIRES ══ */
        .login-links {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
            margin-top: 22px;
        }
        .login-links a {
            font-size: 13px;
            color: var(--text-faint);
            text-decoration: none;
            transition: color 0.2s;
        }
        .login-links a:hover { color: var(--brand-accent); }
        .login-links .link-create {
            color: var(--brand-accent);
            font-weight: 600;
            font-size: 14px;
        }

        /* ══ PIED DE PAGE ══ */
        .login-footer {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            font-size: 11px;
            color: var(--text-soft);
            text-align: center;
            line-height: 1.5;
        }

        .sr-only {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }

        .footer-logo {
            width: 30px;
            height: 30px;
            flex: 0 0 auto;
            background-image: url('Images/logo-white.png');
            background-size: contain;
            background-repeat: no-repeat;
            background-position: center;
            opacity: 0.6;
        }

        .footer-brand {
            display: block;
            color: var(--text-main);
            font-size: 13px;
            font-weight: 700;
        }

        .footer-tagline {
            display: block;
            color: var(--text-faint);
            font-size: 10px;
            font-weight: 700;
            letter-spacing: 0.12em;
            text-transform: uppercase;
        }

        @media (max-width: 480px) {
            .login-card { padding: 28px 20px; }
            .site-logo { width: 60px; height: 60px; }
            .btn-search { min-height: 46px; }
            .public-result-top { flex-direction: column; gap: 4px; }
            .public-result-ref { white-space: normal; }
            .public-result-meta { grid-template-columns: 1fr; }
            .login-footer { align-items: flex-start; text-align: left; }
        }
    
