/* NissaPark.fr — Styles principaux */

:root {
    --np-primary:   #2563eb;
    --np-secondary: #64748b;
    --np-success:   #16a34a;
    --np-danger:    #dc2626;
    --np-warning:   #d97706;
    --np-light:     #f8fafc;
    --np-dark:      #0f172a;
}

/* ── Général ──────────────────────────────────────────────────────────────── */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--np-dark);
}

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

/* ── Hero (page accueil) ─────────────────────────────────────────────────── */
.hero-section {
    background: linear-gradient(135deg, var(--np-primary) 0%, #1e40af 100%);
    padding: 80px 0;
    color: white;
}
.hero-section h1 { font-size: 2.8rem; font-weight: 800; }
.hero-section .search-box {
    background: white;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

/* ── Carte Google Maps ───────────────────────────────────────────────────── */
#map {
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* ── Cartes garages ──────────────────────────────────────────────────────── */
.garage-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
    cursor: pointer;
}
.garage-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.garage-card img {
    height: 180px;
    object-fit: cover;
    width: 100%;
}
.garage-card .badge-status-active   { background: var(--np-success); }
.garage-card .badge-status-rented   { background: var(--np-warning); }
.garage-card .badge-status-inactive { background: var(--np-secondary); }

/* ── Pins carte ──────────────────────────────────────────────────────────── */
.map-pin-available { color: var(--np-success); }
.map-pin-rented    { color: var(--np-warning); }

/* ── Formulaires ─────────────────────────────────────────────────────────── */
.form-control:focus, .form-select:focus {
    border-color: var(--np-primary);
    box-shadow: 0 0 0 0.2rem rgba(37,99,235,0.15);
}

/* ── Indicateur force MDP ────────────────────────────────────────────────── */
.password-strength .bar {
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    transition: background 0.3s, width 0.3s;
}
.password-strength .bar.weak   { background: var(--np-danger); }
.password-strength .bar.fair   { background: var(--np-warning); }
.password-strength .bar.good   { background: #3b82f6; }
.password-strength .bar.strong { background: var(--np-success); }

/* ── Chat ────────────────────────────────────────────────────────────────── */
.chat-container {
    height: 400px;
    overflow-y: auto;
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e2e8f0;
}
.chat-bubble {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 16px;
    margin-bottom: 8px;
    word-break: break-word;
}
.chat-bubble.sent {
    background: var(--np-primary);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}
.chat-bubble.received {
    background: white;
    color: var(--np-dark);
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
}

/* ── Notation étoiles ────────────────────────────────────────────────────── */
.star-rating {
    color: #fbbf24;
    font-size: 1.2rem;
}
.star-rating .empty { color: #d1d5db; }

/* ── Status badges ───────────────────────────────────────────────────────── */
.badge-active            { background: #dcfce7; color: #16a34a; }
.badge-pending           { background: #fef3c7; color: #d97706; }
.badge-pending_signature { background: #dbeafe; color: #2563eb; }
.badge-cancelled         { background: #fee2e2; color: #dc2626; }
.badge-rented            { background: #f3e8ff; color: #7c3aed; }

/* ── Sidebar membre ──────────────────────────────────────────────────────── */
nav .nav-link { border-radius: 8px; margin-bottom: 2px; font-size: 0.9rem; }
nav .nav-link:hover { background: rgba(255,255,255,0.15); }
nav .nav-link.active { background: rgba(255,255,255,0.25); font-weight: 600; }

/* ── Transitions globales ────────────────────────────────────────────────── */
a, .btn, .card, .nav-link, .form-control, .form-select {
    transition: all 0.2s ease;
}

/* ── Focus visible (accessibilité) ──────────────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--np-primary);
    outline-offset: 2px;
}

/* ── Boutons améliorés ──────────────────────────────────────────────────── */
.btn { border-radius: 8px; font-weight: 500; }
.btn-primary { background: var(--np-primary); border-color: var(--np-primary); }
.btn-primary:hover { background: #1d4ed8; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,0.3); }
.btn-lg { padding: 12px 28px; font-size: 1rem; }

/* ── Cards améliorées ───────────────────────────────────────────────────── */
.card { border-radius: 12px; }

/* ── Badges statut ──────────────────────────────────────────────────────── */
.badge { border-radius: 6px; font-weight: 500; letter-spacing: 0.02em; }

/* ── Scroll smooth ──────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

/* ── Images lazy loading ────────────────────────────────────────────────── */
img { max-width: 100%; height: auto; }

/* ── Footer links hover ─────────────────────────────────────────────────── */
footer a:hover { opacity: 1 !important; text-decoration: underline !important; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero-section { padding: 40px 0; }
    .hero-section h1 { font-size: 1.6rem; line-height: 1.3; }
    .hero-section .lead { font-size: 0.95rem; }
    .hero-section .search-box { padding: 20px; border-radius: 12px; }
    .hero-section .d-flex.gap-3 { flex-direction: column; }
    .hero-section .btn-lg { width: 100%; }

    #map { height: 300px !important; }

    .display-5 { font-size: 2rem; }
    .display-6 { font-size: 1.5rem; }

    nav[style*="width:240px"] { width: 100% !important; min-width: 100% !important; }

    /* Search page mobile */
    .row.g-0[style*="height:calc"] { height: auto !important; flex-direction: column-reverse; }
    .row.g-0[style*="height:calc"] > .col-md-5 { height: auto !important; max-height: 60vh; }
    .row.g-0[style*="height:calc"] > .col-md-7 { height: 250px !important; }

    /* Garage detail sticky sidebar → normal flow on mobile */
    .sticky-top[style*="top:80px"] { position: static !important; }

    /* Navbar brand */
    .navbar-brand { font-size: 1.1rem; }

    /* Footer */
    footer .row > div { text-align: center; }
    footer h6 { margin-top: 0.5rem; }

    /* Cookie banner */
    #np-cookie-banner .d-flex.gap-2 { flex-direction: column; }
    #np-cookie-banner .btn { width: 100%; }
    #np-cookie-banner .col-md-4 { margin-bottom: 8px; }
}

@media (max-width: 576px) {
    .hero-section h1 { font-size: 1.4rem; }
    .container { padding-left: 12px; padding-right: 12px; }
    .garage-card img { height: 140px; }
    .card-body { padding: 12px; }

    /* Prix display garage detail */
    .display-6 { font-size: 1.3rem; }
}

/* ── Animations subtiles ────────────────────────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.garage-card { animation: fadeInUp 0.4s ease both; }
.garage-card:nth-child(2) { animation-delay: 0.1s; }
.garage-card:nth-child(3) { animation-delay: 0.2s; }

/* ── Loading skeleton ───────────────────────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
