/* AlmaGo — couleurs d'avant migration (comparaison) : #00C7B1 + #FF5A5F */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap');

:root {
    --ag-primary: #00C7B1;
    --ag-primary-dark: #00a896;
    --ag-primary-deep: #008f7f;
    --ag-primary-bright: #00C7B1;
    --ag-primary-soft: rgba(0, 199, 177, 0.15);
    --ag-accent: #FF5A5F;
    --ag-accent-soft: rgba(255, 90, 95, 0.12);
    --ag-bg: #ffffff;
    --ag-surface: #ffffff;
    --ag-text: #282828;
    --ag-muted: #6c757d;
    --ag-border: #dee2e6;
    --ag-radius: 0.85rem;
    --ag-radius-pill: 50rem;
    --ag-shadow: 0 2px 16px rgba(0, 199, 177, 0.12);
    --ag-font: 'Outfit', 'Segoe UI', system-ui, sans-serif;
    /* Conteneur type Getaround : contenu centré, marges latérales sur grands écrans */
    --ag-shell-max: 1180px;

    --primary: var(--ag-primary);
    --secondary: var(--ag-accent);
    --bs-primary: var(--ag-primary);
    --bs-link-color: var(--ag-primary-dark);
    --bs-body-bg: var(--ag-bg);
    --bs-body-color: var(--ag-text);
    --bs-border-color: var(--ag-border);
}

html { font-size: 16px; }

body {
    background-color: var(--ag-bg) !important;
    color: var(--ag-text) !important;
    font-family: var(--ag-font);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1 0 auto; }

/* Shell global — nav / main / footer alignés */
.ag-shell {
    width: 100%;
    max-width: var(--ag-shell-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}
@media (min-width: 992px) {
    .ag-shell {
        padding-left: 1.75rem;
        padding-right: 1.75rem;
    }
}
@media (min-width: 1600px) {
    :root { --ag-shell-max: 1240px; }
}

/* Bootstrap navbar attend un .container* flex — même comportement pour .ag-shell */
.navbar.ag-navbar > .ag-shell {
    display: flex;
    flex-wrap: inherit;
    align-items: center;
    justify-content: space-between;
}

a { color: var(--ag-primary-dark); }
a:hover { color: var(--ag-primary); }

.btn-primary {
    background-color: var(--ag-primary) !important;
    border-color: var(--ag-primary) !important;
    color: #fff !important;
    font-weight: 600;
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--ag-primary-dark) !important;
    border-color: var(--ag-primary-dark) !important;
    color: #fff !important;
}
.btn-secondary {
    background-color: var(--ag-accent) !important;
    border-color: var(--ag-accent) !important;
    color: #fff !important;
}
.btn-secondary:hover, .btn-secondary:focus {
    background-color: #e04e53 !important;
    border-color: #e04e53 !important;
    color: #fff !important;
}
.btn-outline-primary {
    color: var(--ag-primary-dark) !important;
    border-color: var(--ag-primary) !important;
    background: transparent !important;
}
.btn-outline-primary:hover {
    background-color: var(--ag-primary) !important;
    border-color: var(--ag-primary) !important;
    color: #fff !important;
}
.text-primary { color: var(--ag-primary) !important; }
.bg-primary { background-color: var(--ag-primary) !important; }
.badge.bg-primary { background-color: var(--ag-primary) !important; }

/* Navbar — style pré-migration (fond teal, liens blancs) */
.navbar.ag-navbar {
    background: var(--ag-primary) !important;
    border-bottom: none;
    box-shadow: var(--ag-shadow);
    margin: 0 !important;
    border-radius: 0 !important;
}
.ag-navbar .navbar-brand {
    color: #fff !important;
    font-weight: 700;
    font-size: 1.45rem;
    letter-spacing: 0.02em;
}
.ag-navbar .nav-link {
    color: #fff !important;
    font-weight: 500;
    border-radius: var(--ag-radius-pill) !important;
}
.ag-navbar .nav-link:hover,
.ag-navbar .nav-link.active {
    background: rgba(255, 255, 255, 0.18) !important;
    color: #fff !important;
}
.ag-navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.55);
}
.ag-navbar .navbar-toggler-icon {
    filter: invert(1) brightness(2);
}
.ag-navbar .dropdown-menu {
    border-radius: var(--ag-radius);
    border-color: var(--ag-border);
    box-shadow: var(--ag-shadow);
}
.ag-navbar .dropdown-item:hover {
    background: var(--ag-primary-soft);
    color: var(--ag-primary-deep);
}

/* Compact user menu (navbar) */
.ag-user-trigger {
    padding: 0.2rem !important;
    margin-left: 0.25rem;
    border-radius: 999px !important;
    line-height: 1;
}
.ag-user-trigger::after { display: none !important; }
.ag-user-trigger__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 2px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.ag-user-trigger__guest {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    border: 2px solid rgba(255, 255, 255, 0.55);
    color: #fff;
    font-size: 1rem;
}
.ag-user-trigger:hover,
.ag-user-trigger.show {
    background: rgba(255, 255, 255, 0.12) !important;
}
.ag-user-trigger:hover .ag-user-trigger__avatar,
.ag-user-trigger.show .ag-user-trigger__avatar {
    border-color: #fff;
}
.ag-user-menu {
    min-width: 15.5rem;
    padding: 0.45rem;
    margin-top: 0.45rem !important;
}
.ag-user-menu__head {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.55rem 0.65rem;
}
.ag-user-menu__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--ag-border);
}
.ag-user-menu__name {
    font-weight: 650;
    font-size: 0.92rem;
    color: var(--ag-ink, #1a1d21);
    line-height: 1.25;
}
.ag-user-menu__email {
    font-size: 0.78rem;
    color: var(--ag-muted);
    line-height: 1.2;
}
.ag-user-menu__item {
    display: flex !important;
    align-items: center;
    gap: 0.65rem;
    border-radius: calc(var(--ag-radius) - 2px);
    padding: 0.5rem 0.55rem !important;
    font-weight: 500;
    font-size: 0.9rem;
}
.ag-user-menu__icon {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ag-primary-soft);
    color: var(--ag-primary-deep);
    flex-shrink: 0;
    font-size: 0.95rem;
}
.ag-user-menu__item--danger {
    color: #b42318;
}
.ag-user-menu__item--danger .ag-user-menu__icon {
    background: rgba(180, 35, 24, 0.08);
    color: #b42318;
}
.ag-user-menu__item--danger:hover {
    background: rgba(180, 35, 24, 0.08) !important;
    color: #912018;
}

/* Staff shell */
body.ag-staff { background: #f8f9fa !important; }
.ag-staff-main { max-width: var(--ag-shell-max); }
.ag-page-title {
    color: var(--ag-primary-deep);
    font-weight: 700;
    letter-spacing: 0.02em;
}
.ag-card {
    background: var(--ag-surface);
    border: 1px solid var(--ag-border);
    border-radius: var(--ag-radius);
    box-shadow: var(--ag-shadow);
}

/* Hero public */
.hero-section {
    min-height: auto;
    padding: 2.5rem 0 3rem;
    background: var(--ag-bg);
}
.hero-section .display-4,
.hero-section .ag-hero-title {
    font-weight: 700;
    color: var(--ag-text);
    letter-spacing: -0.02em;
}
.ag-hero-visual {
    width: min(280px, 70vw);
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1.25rem;
    background: var(--ag-primary-soft);
    border: 1px solid var(--ag-border);
    box-shadow: var(--ag-shadow);
}
.ag-hero-visual .bi {
    font-size: 4.5rem;
    color: var(--ag-primary);
    opacity: 0.95;
}
.search-form-container,
.search-form {
    background: #fff;
    border-radius: 1.25rem;
    box-shadow: var(--ag-shadow);
    border: 1px solid var(--ag-border);
    padding: 1.5rem;
}
.form-control:focus,
.form-select:focus {
    border-color: var(--ag-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 199, 177, 0.25) !important;
}
.rounded-pill { border-radius: var(--ag-radius-pill) !important; }

.footer.ag-footer {
    position: static;
    margin-top: auto;
    padding: 1.25rem 0;
    background: #f8f9fa;
    border-top: 1px solid var(--ag-border);
    color: var(--ag-muted);
    font-size: 0.9rem;
}
.footer.ag-footer a { color: var(--ag-primary-dark); text-decoration: none; }
.footer.ag-footer a:hover { color: var(--ag-primary); }

/* Auth layout */
body.ag-auth {
    background: #f8f9fa;
}
.ag-auth-card {
    max-width: 420px;
    margin: 2rem auto;
    background: var(--ag-surface);
    border-radius: 1.25rem;
    border: 1px solid var(--ag-border);
    box-shadow: var(--ag-shadow);
    padding: 2rem;
}

/* Client car card / detail */
.ag-car-card {
    border: 1px solid var(--ag-border);
    border-radius: var(--ag-radius);
    overflow: hidden;
    background: var(--ag-surface);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.ag-car-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ag-shadow);
}
.ag-car-card img { width: 100%; height: 160px; object-fit: cover; }
.ag-car-card__placeholder {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ag-primary-soft);
    color: var(--ag-primary-dark);
    font-size: 2.25rem;
}
.ag-car-card__body {
    padding: 0.9rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.ag-car-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    line-height: 1.3;
}
.ag-car-card__meta,
.ag-car-card__place {
    font-size: 0.82rem;
    color: var(--ag-muted);
    margin: 0 0 0.25rem;
}
.ag-car-card__footer {
    margin-top: auto;
    padding-top: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.ag-car-card__price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ag-primary-deep);
}

/* Search results */
.ag-search-results__bar { padding: 1.1rem 1.25rem; }
.ag-search-results__count {
    font-size: 1.05rem;
    margin: 0;
}
.ag-search-results__summary {
    font-size: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.15rem 0.35rem;
}
.ag-search-results__dot { opacity: 0.55; }
.ag-search-results__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.ag-search-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.7rem;
    border-radius: var(--ag-radius-pill);
    background: var(--ag-primary-soft);
    color: var(--ag-primary-deep);
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid transparent;
}
.ag-search-results__filters {
    position: sticky;
    top: 0.85rem;
}
.ag-search-results__empty { border-style: dashed; }
.ag-search-results__pager .page-link {
    border-radius: var(--ag-radius-pill) !important;
    margin: 0 0.15rem;
    color: var(--ag-primary-deep);
    border-color: var(--ag-border);
}
.ag-search-results__pager .page-item.active .page-link {
    background: var(--ag-primary);
    border-color: var(--ag-primary);
    color: #fff;
}
.ag-search-results__pager .page-link:hover {
    background: var(--ag-primary-soft);
    color: var(--ag-primary-deep);
}
.ag-stat-tile {
    background: var(--ag-surface);
    border: 1px solid var(--ag-border);
    border-radius: var(--ag-radius);
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}
.ag-stat-tile:hover { border-color: var(--ag-primary); color: inherit; }
.ag-stat-tile .ag-stat-n {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ag-primary-deep);
}

/* legacy purple removed — use text-primary / --ag-primary */

/* Accueil public — sections récit */
.ag-home-section {
    padding: 3.5rem 0;
}
.ag-home-section--soft {
    background: #f4faf9;
    border-top: 1px solid var(--ag-border);
    border-bottom: 1px solid var(--ag-border);
}
.ag-home-section__title {
    font-weight: 700;
    color: var(--ag-text);
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}
.ag-home-section__lead {
    color: var(--ag-muted);
    font-size: 1.1rem;
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.55;
}
.ag-home-section__lead.text-start {
    margin-left: 0;
    margin-right: 0;
}
.ag-home-step {
    height: 100%;
    padding: 1.25rem 1rem;
    border-radius: var(--ag-radius);
    border: 1px solid var(--ag-border);
    background: var(--ag-surface);
}
.ag-home-step__n {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--ag-primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}
.ag-home-step h3 {
    font-size: 1.1rem;
    font-weight: 650;
    margin-bottom: 0.4rem;
}
.ag-home-step p {
    margin: 0;
    color: var(--ag-muted);
    font-size: 0.95rem;
    line-height: 1.45;
}
.ag-home-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
}
.ag-home-list li {
    position: relative;
    padding-left: 1.4rem;
    margin-bottom: 0.55rem;
    color: var(--ag-text);
}
.ag-home-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--ag-primary);
}
.ag-home-story {
    background:
        radial-gradient(600px 240px at 50% 0%, rgba(0, 199, 177, 0.14), transparent 60%),
        var(--ag-bg);
}
.ag-home-story__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ag-primary-dark);
    margin-bottom: 0.5rem;
}
.ag-home-story__text {
    font-size: 1.15rem;
    line-height: 1.65;
    color: var(--ag-text);
    margin-bottom: 1.25rem;
}
.ag-home-story__sign {
    color: var(--ag-muted);
    font-style: italic;
    margin-bottom: 0.5rem;
}

/* Mon profil — hub compte */
.ag-profile {
    max-width: 820px;
    margin: 0 auto;
    padding-bottom: 2rem;
}
.ag-profile-header {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: center;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}
.ag-profile-header__avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--ag-primary-soft);
    box-shadow: var(--ag-shadow);
}
.ag-profile-header__meta {
    flex: 1 1 220px;
    min-width: 0;
}
.ag-profile-badge {
    background: var(--ag-primary) !important;
    color: #fff !important;
    font-weight: 600;
    padding: 0.4em 0.85em;
}
.ag-profile-block {
    padding: 1.35rem 1.5rem;
}
.ag-profile-avatar-details {
    border: 1px dashed var(--ag-border);
    border-radius: var(--ag-radius);
    padding: 0.65rem 0.9rem;
    background: #f8f9fa;
}
.ag-profile-avatar-details summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--ag-primary-dark);
}
.ag-profile .alert-success {
    background: rgba(0, 199, 177, 0.12);
    color: var(--ag-primary-deep);
    border: 1px solid rgba(0, 199, 177, 0.35);
}

/* Reporting avis */
.ag-reporting-table-wrap { height: 100%; }
.ag-reporting-table thead th {
    color: var(--ag-muted);
    font-weight: 600;
    font-size: 0.8rem;
    border-bottom-color: var(--ag-border);
}
.ag-reporting-table tbody td {
    border-color: var(--ag-border);
}
.ag-reporting-table a {
    color: var(--ag-primary-dark);
    text-decoration: none;
    font-weight: 600;
}
.ag-reporting-table a:hover { color: var(--ag-primary); text-decoration: underline; }

/* Fiche société / agence Details */
.ag-societe-details__header,
.ag-agence-details__header { padding: 1.35rem 1.5rem; }
.ag-societe-details__logo,
.ag-agence-details__logo {
    width: 88px;
    height: 88px;
    border-radius: var(--ag-radius);
    background: var(--ag-primary-soft);
    border: 1px solid var(--ag-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.ag-societe-details__logo img,
.ag-agence-details__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}
.ag-societe-details__logo .bi,
.ag-agence-details__logo .bi {
    font-size: 2rem;
    color: var(--ag-primary-dark);
}
.ag-societe-details__dl > div,
.ag-agence-details__dl > div {
    display: grid;
    grid-template-columns: 8rem 1fr;
    gap: 0.35rem 1rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--ag-border);
}
.ag-societe-details__dl > div:last-child,
.ag-agence-details__dl > div:last-child { border-bottom: none; }
.ag-societe-details__dl dt,
.ag-agence-details__dl dt {
    color: var(--ag-muted);
    font-weight: 600;
    font-size: 0.85rem;
    margin: 0;
}
.ag-societe-details__dl dd,
.ag-agence-details__dl dd { margin: 0; }
