/* Styles personnalisés pour Don Crous */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --crous-red: #e30613;
    --crous-red-dark: #b90610;
    --crous-blue: #5aa6d6;
    --crous-gray-100: #f5f6f7;
    --crous-gray-200: #eceef1;
    --crous-gray-600: #6b7280;
    --crous-black: #1f2430;
    --primary-color: var(--crous-red);
    --secondary-color: #6c757d;
    --success-color: #2e8b57;
    --danger-color: #dc3545;
    --warning-color: #f0ad4e;
    --info-color: #2f8ed8;
}

/* Layout général */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'IBM Plex Sans', 'Marianne', 'Noto Sans', sans-serif;
    color: var(--crous-black);
    background: radial-gradient(1200px 600px at 10% 0%, #ffffff 0%, #ffffff 45%, #f7f7f9 100%);
}

main {
    flex: 1;
}

/* Cards avec animation */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15) !important;
}

.hover-shadow {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.hover-shadow:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-3px);
}

/* Navbar */
/* Topbar */
.topbar {
    background: var(--crous-gray-100);
    border-bottom: 1px solid var(--crous-gray-200);
    font-size: 0.85rem;
    padding: 0.35rem 0;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--crous-black);
}

.topbar-dot {
    width: 8px;
    height: 8px;
    background: var(--crous-red);
    border-radius: 50%;
}

.topbar-link {
    color: var(--crous-gray-600);
    text-decoration: none;
}

.topbar-link:hover {
    color: var(--crous-black);
}

/* Navbar */
.crous-navbar {
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(14, 20, 29, 0.08);
    padding: 0.8rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--crous-black) !important;
}

.brand-dot {
    width: 44px;
    height: 44px;
    background: var(--crous-red);
    border-radius: 50%;
    display: inline-block;
}

.brand-text {
    letter-spacing: 0.02em;
}

.nav-dot {
    position: relative;
    padding-left: 1.25rem !important;
    font-weight: 500;
}

.nav-dot::before {
    content: "";
    position: absolute;
    left: 0.3rem;
    top: 50%;
    width: 6px;
    height: 6px;
    background: var(--crous-red);
    border-radius: 50%;
    transform: translateY(-50%);
}

.nav-cta {
    color: var(--crous-red) !important;
    font-weight: 600;
}

.nav-messages {
    position: relative;
    padding-right: 2rem !important;
}

.nav-badge {
    position: absolute;
    top: 0.1rem;
    right: 0.4rem;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--crous-red);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(227, 6, 19, 0.25);
}

/* Hero */
.hero {
    background: #ffffff;
    border-radius: 28px;
    padding: 2.5rem;
    box-shadow: 0 18px 45px rgba(31, 36, 48, 0.08);
    position: relative;
    overflow: hidden;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(227, 6, 19, 0.08);
    color: var(--crous-red);
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-lead {
    font-size: 1.1rem;
    color: var(--crous-gray-600);
    margin-bottom: 2rem;
}

.hero-visual {
    position: relative;
    min-height: 320px;
    display: grid;
    place-items: center;
}

.hero-photo {
    width: min(360px, 100%);
    height: 360px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(227, 6, 19, 0.15), rgba(90, 166, 214, 0.3));
    display: grid;
    place-items: center;
    position: relative;
    z-index: 2;
}

.hero-photo-inner {
    width: 72%;
    height: 72%;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: inset 0 0 0 2px rgba(227, 6, 19, 0.08);
    display: grid;
    place-items: center;
    text-align: center;
    padding: 1.5rem;
    color: var(--crous-black);
}

.hero-icon {
    font-size: 3rem;
    color: var(--crous-red);
    margin-bottom: 0.5rem;
}

.hero-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.75;
}

.hero-circle-blue {
    width: 140px;
    height: 140px;
    background: var(--crous-blue);
    right: 8%;
    top: 5%;
}

.hero-circle-red {
    width: 90px;
    height: 90px;
    background: var(--crous-red);
    left: 5%;
    bottom: 10%;
}

.crous-main {
    margin-top: 1.5rem;
}

.crous-footer {
    background: #ffffff;
    border-top: 1px solid var(--crous-gray-200);
}

/* Hero section */
.bg-gradient {
    background: linear-gradient(135deg, #ffffff 0%, #f7f7f9 100%) !important;
}

/* Forms */
.form-control:focus,
.form-select:focus {
    border-color: var(--crous-red);
    box-shadow: 0 0 0 0.2rem rgba(227, 6, 19, 0.18);
}

.form-control-lg {
    font-size: 1.1rem;
}

/* Buttons avec animation */
.btn {
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(31, 36, 48, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-lg {
    padding: 0.75rem 1.75rem;
    border-radius: 999px;
}

.btn-crous {
    background: var(--crous-red);
    color: #ffffff;
    border-radius: 999px;
    border: none;
}

.btn-crous:hover {
    background: var(--crous-red-dark);
    color: #ffffff;
}

.btn-crous-outline {
    border: 1.5px solid var(--crous-red);
    color: var(--crous-red);
    background: transparent;
    border-radius: 999px;
}

.btn-crous-outline:hover {
    background: var(--crous-red);
    color: #ffffff;
}

/* Bootstrap color overrides */
.btn-primary {
    background-color: var(--crous-red);
    border-color: var(--crous-red);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--crous-red-dark);
    border-color: var(--crous-red-dark);
}

.bg-primary {
    background-color: var(--crous-red) !important;
}

.text-primary {
    color: var(--crous-red) !important;
}

/* Images d'objets */
.object-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0.375rem 0.375rem 0 0;
}

.object-card-img {
    height: 250px;
    object-fit: cover;
}

/* Badges et status */
.badge {
    font-weight: 600;
    padding: 0.4em 0.75em;
    border-radius: 999px;
}

/* Avatar */
.avatar-placeholder {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #f7b6b6 0%, #e30613 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
    border-radius: 50%;
}

.avatar-sm {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
}

.avatar-md {
    width: 80px;
    height: 80px;
    font-size: 2rem;
}

/* Footer */
footer {
    margin-top: auto;
    background-color: #ffffff !important;
    border-top: 1px solid #dee2e6;
}

/* Alerts personnalisés */
.alert {
    border: none;
    border-left: 4px solid;
}

.alert-info {
    border-left-color: var(--info-color);
}

.alert-success {
    border-left-color: var(--success-color);
}

.alert-warning {
    border-left-color: var(--warning-color);
}

.alert-danger {
    border-left-color: var(--danger-color);
}

/* Messages de chat */
.message {
    animation: fadeIn 0.3s ease;
}

.chat-image {
    width: 220px;
    max-width: 100%;
    border-radius: 0.75rem;
    display: block;
}

/* Chat composer (style ChatGPT-like) */
.chat-composer {
    background: #ffffff;
    border-top: 1px solid var(--crous-gray-200);
}

.chat-composer__form {
    display: flex;
    align-items: flex-end;
    gap: 0.6rem;
    background: #ffffff;
    border: 1px solid var(--crous-gray-200);
    border-radius: 18px;
    padding: 0.6rem 0.75rem;
    box-shadow: 0 8px 22px rgba(31, 36, 48, 0.06);
}

.chat-composer__attach {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--crous-black);
    background: var(--crous-gray-100);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.chat-composer__attach:hover {
    background: var(--crous-gray-200);
    transform: translateY(-1px);
}

.chat-composer__file {
    display: none;
}

.chat-composer__input {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.chat-composer__textarea {
    border: none;
    outline: none;
    resize: none;
    width: 100%;
    font-size: 1rem;
    line-height: 1.4;
    background: transparent;
    color: var(--crous-black);
    min-height: 40px;
    max-height: 160px;
}

.chat-composer__hint {
    font-size: 0.85rem;
    color: var(--crous-gray-600);
}

.chat-composer__send {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: none;
    background: var(--crous-red);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.chat-composer__send:hover {
    background: var(--crous-red-dark);
    transform: translateY(-1px);
}

@media (max-width: 576px) {
    .chat-composer__form {
        padding: 0.5rem 0.6rem;
    }

    .chat-composer__attach,
    .chat-composer__send {
        width: 38px;
        height: 38px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Liste d'objets */
.object-list .card {
    height: 100%;
}

.object-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--success-color);
}

/* Pagination */
.pagination {
    gap: 0.25rem;
}

.page-link {
    border-radius: 0.375rem;
    margin: 0 0.125rem;
}

/* Carousel d'images */
.carousel-item img {
    border-radius: 0.375rem;
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Utility classes */
.text-muted {
    color: #6c757d !important;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.shadow {
    box-shadow: 0 0.5rem 1rem rgba(31, 36, 48, 0.12) !important;
}

/* Feature icons (page d'accueil) */
.feature-icon {
    transition: transform 0.3s ease;
}

.feature-icon:hover {
    transform: scale(1.1);
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .topbar-right {
        display: none !important;
    }

    .hero {
        padding: 2rem;
    }

    .navbar-brand {
        font-size: 1rem;
    }

    h1.display-4 {
        font-size: 2rem;
    }

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

    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }

    .object-card-img {
        height: 180px;
    }

    .feature-icon {
        width: 60px !important;
        height: 60px !important;
    }

    .feature-icon i {
        font-size: 1.5rem !important;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .card-body {
        padding: 1rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }
}

/* Print styles */
@media print {
    .navbar,
    footer,
    .btn,
    .alert {
        display: none;
    }
}

/* Dark mode support (optionnel) */
@media (prefers-color-scheme: dark) {
    /* À implémenter plus tard si souhaité */
}
