/* Layout: make the page a column flex container so footer stays at bottom */
:root {
    /* Burgundy modern theme */
    --brand-bordeaux-900: #3a0b14;
    /* very dark */
    --brand-bordeaux-700: #6b0f1b;
    /* deep burgundy */
    --brand-bordeaux-500: #8f1630;
    /* primary burgundy */
    --brand-bordeaux-300: #c94a5b;
    /* lighter accent */
    --brand-cream: #f7f3ef;
    /* soft background accent */
    --muted: #6c6b6b;
    --success: #0f8b6e;
    --danger: #c83a3a;
    --bg-page: linear-gradient(180deg, #ffffff 0%, #fffafa 40%, rgba(145, 25, 35, 0.03) 100%);
    --header-bg: linear-gradient(90deg, rgba(58, 11, 20, 1) 0%, rgba(139, 18, 36, 1) 100%);
    --footer-bg: rgba(58, 11, 20, 0.06);
    --glass-bg: rgba(255, 255, 255, 0.6);
}

html,
body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    background: var(--bg-page);
    color: var(--brand-bordeaux-900);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.site-header {
    background: var(--header-bg) !important;
    color: var(--brand-cream);
    padding: 1rem 1.5rem;
    box-shadow: 0 6px 18px rgba(58, 11, 20, 0.08);
}

.site-main {
    flex: 1 0 auto;
    padding: 2rem;
}

.site-footer {
    background: var(--footer-bg);
    color: var(--muted);
    padding: 1.25rem 1.5rem;
    text-align: center;
    border-top: 1px solid rgba(145, 25, 35, 0.06);
}

/* helper badge colors to match templates */
.badge-primary {
    background: var(--brand-primary);
    color: #fff
}

.badge-primary {
    background: var(--brand-bordeaux-500);
    color: #fff
}

.badge-secondary {
    background: rgba(58, 11, 20, 0.12);
    color: var(--brand-bordeaux-900)
}

.badge-success {
    background: var(--success);
    color: #fff
}

.badge-danger {
    background: var(--danger);
    color: #fff
}

.badge-dark {
    background: var(--brand-bordeaux-900);
    color: #fff
}

/* Buttons */
.btn-primary {
    background: linear-gradient(180deg, var(--brand-bordeaux-500), var(--brand-bordeaux-700));
    border: none;
    color: #fff;
    box-shadow: 0 6px 18px rgba(139, 18, 36, 0.12);
}

.btn-outline-light {
    color: var(--brand-cream);
    border-color: rgba(255, 255, 255, 0.12);
}

/* Glass cards (used for comptes cards) */
.card.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(6px) saturate(120%);
    border: 1px solid rgba(58, 11, 20, 0.06);
    box-shadow: 0 10px 30px rgba(58, 11, 20, 0.06);
}

.card .card-title {
    color: var(--brand-bordeaux-900);
    font-weight: 600
}

.card .card-text {
    color: var(--muted)
}

/* Small utilities */
.text-muted {
    color: var(--muted) !important
}

/* small utility spacing */
.mt-1 {
    margin-top: .25rem
}

.me-2 {
    margin-right: .5rem
}

/* Animated hamburger styles */
.navbar-toggler .hamburger {
    display: inline-block;
    width: 36px;
    height: 24px;
    position: relative;
}

.navbar-toggler .hamburger span {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    background: #fff;
    border-radius: 3px;
    transition: transform 320ms cubic-bezier(.2, .8, .2, 1), opacity 220ms ease, top 320ms cubic-bezier(.2, .8, .2, 1);
}

.navbar-toggler .hamburger span:nth-child(1) {
    top: 0
}

.navbar-toggler .hamburger span:nth-child(2) {
    top: 9px
}

.navbar-toggler .hamburger span:nth-child(3) {
    top: 18px
}

.navbar-toggler.open .hamburger span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.navbar-toggler.open .hamburger span:nth-child(2) {
    opacity: 0;
}

.navbar-toggler.open .hamburger span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

/* Toggler colors on dark header */
.navbar-toggler {
    border: none;
}

.navbar-toggler .hamburger span {
    background: rgba(255, 255, 255, 0.95);
}


/* Collapse animation: fade+slide for navbar items */
.navbar-collapse {
    transition: opacity 240ms ease, transform 260ms cubic-bezier(.2, .8, .2, 1);
    transform-origin: top;
}

.navbar-collapse.collapse {
    display: block;
    height: 0;
    opacity: 0;
    transform: scaleY(0.95);
    overflow: hidden;
}

.navbar-collapse.collapse.show {
    height: auto;
    opacity: 1;
    transform: scaleY(1);
}

@media (min-width: 992px) {

    /* On large screens, reset collapse visuals */
    .navbar-collapse.collapse,
    .navbar-collapse.collapse.show {
        height: auto;
        opacity: 1;
        transform: none;
        overflow: visible
    }
}

/* Card layout helpers for mobile-first design */
.account-card {
    border-radius: 12px;
    overflow: hidden
}

.account-card .card-body {
    padding: 1rem 1.25rem
}

/* Footer small print */
.site-footer p {
    margin: 0;
    font-size: .95rem
}

/* improve table contrast for DataTables */
.table thead th {
    background: rgba(139, 18, 36, 0.04);
    color: var(--brand-bordeaux-900)
}

/* Global link style */
a {
    color: var(--brand-bordeaux-700);
    text-decoration: none;
    transition: color 180ms ease;
}

a:hover {
    color: var(--brand-bordeaux-300);
    text-decoration: underline;
}

/* Form controls refined */
.form-control {
    border-radius: 10px;
    border: 1px solid rgba(58, 11, 20, 0.06);
    padding: .6rem .75rem;
    transition: box-shadow 160ms ease, border-color 160ms ease;
}

.form-control:focus {
    box-shadow: 0 6px 18px rgba(139, 18, 36, 0.06);
    border-color: var(--brand-bordeaux-500);
    outline: none;
}

/* Smooth card hover */
.card {
    transition: transform 220ms cubic-bezier(.2, .9, .2, 1), box-shadow 220ms ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(58, 11, 20, 0.08);
}

/* Toast style adjustments */
.toast {
    border-radius: 10px;
}

.toast .toast-body {
    font-size: .95rem
}

/* Small animations */
@keyframes floatIn {
    from {
        transform: translateY(6px);
        opacity: 0
    }

    to {
        transform: translateY(0);
        opacity: 1
    }
}

.animate-fade-in {
    animation: floatIn .36s cubic-bezier(.2, .9, .2, 1) both
}

/* Focus ring for accessibility */
:focus {
    outline: none
}

.focus-ring:focus {
    box-shadow: 0 0 0 4px rgba(143, 22, 48, 0.12);
    border-radius: 8px
}

/* Ensure toggler has initial aria-expanded if missing */
.navbar-toggler[aria-expanded="true"] .hamburger span {
    background: #fff
}

/* Responsiveness tweaks for large screens */
@media (min-width: 1200px) {
    .site-main {
        padding-left: 4rem;
        padding-right: 4rem
    }
}

/* Formulaire */

label {
    font-weight: 500;
    color: var(--brand-bordeaux-900);
    font-style: italic;
    /* color: #6c0f1e; */
    background: rgb(247, 247, 244);
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 5px;
}