:root {
    --bg-black: #09090b;
    --surface: rgba(39, 39, 42, 0.4);
    --surface-hover: rgba(63, 63, 70, 0.6);
    --border: rgba(255, 255, 255, 0.08);
    --text-main: #fafafa;
    --text-muted: #a1a1aa;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --danger: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-black);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Modifié pour le scroll de l'accueil */
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(255,255,255,0.03) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(255,255,255,0.02) 0%, transparent 50%);
}

/* Conteneurs principaux */
.auth-container {
    width: 100%;
    max-width: 480px;
    padding: 48px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 32px;
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    margin: auto; /* Centre verticalement */
    margin-top: 5vh;
    margin-bottom: 5vh;
}

.auth-container-large {
    max-width: 600px;
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-header i {
    font-size: 48px;
    color: var(--text-main);
    margin-bottom: 24px;
}

.auth-header h1 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-muted);
}

/* Formulaires */
.form-group {
    margin-bottom: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-row-uneven {
    grid-template-columns: 2fr 1fr;
}

.form-label {
    display: block;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0,0,0,0.4);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Boutons et Checkbox */
.btn-submit {
    width: 100%;
    background: var(--text-main);
    color: var(--bg-black);
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    margin-top: 16px;
}

.btn-submit:hover {
    background: #e4e4e7;
    transform: translateY(-2px);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    cursor: pointer;
}

.checkbox-group input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.checkbox-label {
    color: var(--text-muted);
    font-size: 14px;
}

/* Alertes et Liens */
.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-links {
    margin-top: 32px;
    text-align: center;
    font-size: 14px;
}

.auth-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.auth-links a:hover {
    color: var(--text-main);
}

.link-highlight {
    color: var(--text-main) !important;
    font-weight: 600;
}

/* Utilitaires margin/text */
.mb-3 {
    margin-bottom: 12px;
}

.text-muted {
    color: var(--text-muted);
}

/* Layout Privé */
.private-body {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    background-image: none; /* Retire le gradient de l'accueil */
}

/* Sidebar */
.sidebar {
    width: 100px;
    height: 100vh;
    padding: 32px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-right: 1px solid var(--border);
    backdrop-filter: blur(10px);
    position: fixed;
    left: 0;
    top: 0;
}

.sidebar .logo {
    font-size: 28px;
    color: var(--text-main);
    text-shadow: 0 0 20px rgba(255,255,255,0.3);
    margin-bottom: 40px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.nav-item {
    color: var(--text-muted);
    font-size: 24px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nav-item:hover, .nav-item.active {
    color: var(--text-main);
    transform: scale(1.1);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    right: -38px;
    top: 50%;
    transform: translateY(-50%);
    height: 32px;
    width: 3px;
    background: var(--text-main);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
}

.nav-logout {
    margin-top: auto;
    color: var(--danger);
}

/* Main Content */
.main-content {
    flex-grow: 1;
    padding: 48px;
    max-width: 1600px;
    margin: 0 auto;
    margin-left: 100px; /* Compense la sidebar fixed */
}

.header-private {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

.header-private h1 {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -1.5px;
    background: linear-gradient(180deg, #fff, #71717a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-subtitle {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.profile-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.2s;
}

.profile-btn:hover {
    background: var(--surface-hover);
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 240px;
    gap: 24px;
}

.bento-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 32px;
    padding: 32px;
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.bento-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.bento-link:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: var(--surface-hover);
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.span-2 { grid-column: span 2; }
.span-2-row { grid-row: span 2; }

/* Styles spécifiques des cartes */
.card-main { background: linear-gradient(135deg, rgba(21, 128, 61, 0.1) 0%, var(--surface) 100%); }
.card-secondary { background: linear-gradient(135deg, rgba(30, 58, 138, 0.15) 0%, var(--surface) 100%); }
.card-tertiary { background: var(--surface); }

.card-main:hover { border-color: rgba(21, 128, 61, 0.5); box-shadow: 0 0 40px rgba(21, 128, 61, 0.15); }
.card-secondary:hover { border-color: rgba(30, 58, 138, 0.5); box-shadow: 0 0 40px rgba(30, 58, 138, 0.2); }

/* Typo et contenu des cartes */
.car-model {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 8px;
    z-index: 2;
}

.car-specs {
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 400;
    z-index: 2;
}

.card-content-bottom {
    margin-top: auto;
    z-index: 2;
}

/* Badges & Plaques */
.status-badge {
    align-self: flex-start;
    padding: 6px 16px;
    border-radius: 99px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 2;
}

.badge-green { background: rgba(16, 185, 129, 0.1); color: #34d399; border: 1px solid rgba(52, 211, 153, 0.2); }

.plate-minimal {
    position: absolute;
    bottom: 32px;
    right: 32px;
    font-family: monospace;
    font-size: 16px;
    color: rgba(255,255,255,0.4);
    letter-spacing: 2px;
    z-index: 2;
}

/* Alertes (Pillules) */
@keyframes pulse-warning {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

@keyframes pulse-critical {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.alert-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    margin-top: 16px;
    animation: pulse-warning 2s infinite;
}

.alert-pill.critical {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
    animation: pulse-critical 2s infinite;
}

/* Carte Ajout & Stats */
.card-add {
    border: 2px dashed rgba(255,255,255,0.1);
    background: transparent;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.card-add i {
    font-size: 48px;
    transition: transform 0.3s ease;
}

.card-add:hover i {
    transform: rotate(90deg);
}

.card-stats {
    background: rgba(16, 185, 129, 0.05);
}

.stat-title {
    color: var(--text-muted);
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-number {
    font-size: 64px;
    font-weight: 800;
    line-height: 1;
    margin-top: 16px;
}

.text-green { color: #34d399; }
.font-semibold { font-weight: 600; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }

/* Panneaux de Formulaire (Création/Édition) */
.form-panel {
    max-width: 800px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px;
    backdrop-filter: blur(20px);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

/* Header Fiche Véhicule */
.vehicle-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.vehicle-title-area h1 {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 8px;
}

.vehicle-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.plate-display {
    background: #fff;
    color: #000;
    padding: 6px 16px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 20px;
    font-weight: 800;
    border: 2px solid #ccc;
}

/* Layout Fiche Véhicule (2 colonnes) */
.vehicle-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 40px;
}

/* Mémos Techniques */
.memo-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
}

.memo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    color: var(--text-muted);
}

.memo-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-main);
}

/* Timeline Entretien */
.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.timeline {
    position: relative;
    padding-left: 24px;
}

/* La ligne verticale */
.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 32px;
}

/* Le point sur la ligne */
.timeline-marker {
    position: absolute;
    left: -29px; /* Centré sur la ligne */
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--bg-black);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.timeline-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    transition: transform 0.2s, border-color 0.2s;
}

.timeline-content:hover {
    border-color: var(--border-hover);
    transform: translateX(4px);
}

.timeline-date {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 600;
}

.text-highlight {
    color: var(--primary);
}

.timeline-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 12px;
}

.timeline-notes {
    color: #d4d4d8;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
    background: rgba(0,0,0,0.2);
    padding: 16px;
    border-radius: 8px;
}

.timeline-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 16px;
    margin-top: 16px;
}

.timeline-cost {
    font-weight: 800;
    color: #10b981; /* Vert */
}

/* Boutons d'action standards */
.btn-primary {
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    transition: all 0.2s;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hover-white:hover {
    color: white;
}

/* Entête de la section Outils */
.tools-header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.tools-summary {
    display: flex;
    align-items: center;
    gap: 48px;
}

.tools-total-value {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 16px 24px;
    border-radius: 16px;
}

.value-amount {
    font-size: 32px;
    font-weight: 800;
    color: #34d399;
}

/* Grille des outils */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.tool-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s, border-color 0.2s;
}

.tool-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
}

.tool-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-muted);
}

.tool-info {
    flex-grow: 1;
}

.tool-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.tool-brand {
    font-size: 13px;
    color: var(--text-muted);
}

.tool-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.tool-price {
    font-weight: 800;
    color: var(--text-main);
}

.btn-icon-small {
    width: 32px;
    height: 32px;
    font-size: 12px;
}

/* Textareas pour les formulaires */
textarea.form-control {
    resize: vertical;
    font-family: inherit;
}

/* États vides (Listes sans éléments) */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 64px;
    background: var(--surface);
    border: 2px dashed var(--border);
    border-radius: 24px;
}

/* =========================================
   STYLES LANDING PAGE (HOME)
   ========================================= */

.landing-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Navbar Fixe */
.landing-nav {
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 48px;
    border-bottom: 1px solid var(--border);
    background: rgba(9, 9, 11, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
}

.landing-logo {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.5px;
}

.landing-logo i {
    color: var(--primary);
    font-size: 24px;
}

/* Boutons de la Navbar */
.landing-auth {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-ghost {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-ghost:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.btn-primary-small {
    background: var(--text-main);
    color: var(--bg-black);
    text-decoration: none;
    font-weight: 800;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: 8px;
    transition: transform 0.2s;
}

.btn-primary-small:hover {
    transform: translateY(-2px);
    background: #e4e4e7;
}

/* Section Héro (Haut de page) */
.landing-main {
    flex-grow: 1;
    padding-top: 140px; /* Compense la nav fixe */
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-section {
    text-align: center;
    padding: 40px 24px 80px;
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    padding: 6px 16px;
    border-radius: 99px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 32px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #60a5fa;
    border-radius: 50%;
    box-shadow: 0 0 10px #60a5fa;
    animation: pulse-dot-anim 2s infinite;
}

@keyframes pulse-dot-anim {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

.hero-title {
    font-size: 64px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -2px;
}

.text-gradient {
    background: linear-gradient(135deg, #fff 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 48px;
}

.hero-cta {
    display: flex;
    justify-content: center;
}

.hero-btn {
    width: auto;
    padding: 16px 32px;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border-radius: 99px; /* Bouton arrondi pour l'appel à l'action principal */
}

/* Grille des fonctionnalités */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 0 24px 80px;
    width: 100%;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 32px;
    backdrop-filter: blur(20px);
    transition: transform 0.3s, border-color 0.3s;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.2);
}

.feature-icon-wrapper {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary);
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
}

/* Footer public */
.landing-footer {
    text-align: center;
    padding: 32px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 14px;
    margin-top: auto;
}
/* Utilitaires Profil */
.form-section-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--text-main);
}

.mb-4 {
    margin-bottom: 32px;
}

.separator {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 32px 0;
}

/* Zone de Danger */
.danger-zone {
    margin-top: 48px;
    padding: 24px;
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 16px;
    background: rgba(239, 68, 68, 0.05);
}

.danger-zone h3 {
    color: #ef4444;
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 8px;
}

.danger-zone p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.5);
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: #ef4444;
    color: white;
}
.btn-icon-danger:hover {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}