/* ===============================
   DESIGN SYSTEM
   Amicale Sapeurs-Pompiers Saint-Pryvé
================================= */

:root {
    --bleu-nuit: #0B1323;
    --rouge-pompier: #E1261C;
    --vert-lisere: #6FA36A;
    --orange-accent: #F47A1F;
    --bleu-eau: #2C5F9E;
    --blanc-casse: #F2F2F2;
    --gris-clair: #C9CDD2;
    --card-bg: #111B2E;
}

/* ===============================
   GLOBAL
================================= */

body {
    background-color: var(--bleu-nuit);
    color: var(--blanc-casse);
    --bs-body-font-family: Roboto;
    margin: 0;
    padding: 0;
    /* background: url(https://i.ibb.co/VQmtgjh/6845078.png) no-repeat; */
    min-height: 100vh;
    font-family: sans-serif;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    overflow-y: auto;
}

.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--blanc-casse);
}

body {
    --bs-body-font-family: Roboto;
    background-color: skyblue;
    margin: 0;
    padding: 0;
    /* background: url(https://i.ibb.co/VQmtgjh/6845078.png) no-repeat; */
    min-height: 100vh;
    font-family: sans-serif;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    overflow-y: auto;
}

.header {
    height: calc(55px +(constant(safe-area-inset-top))* 0.75) !important;
    height: calc(55px +(env(safe-area-inset-top))* 0.75) !important;
}

.header-auto-show {
    opacity: 0;
    pointer-events: none;
    transition: all 300ms ease;
}

.header {
    position: fixed;
    top: 0px;
    left: 0px;
    right: 0px;
    height: 55px;
    z-index: 99;
    transition: all 300ms ease;
    background-color: #fff;
    border-bottom: solid 1px rgba(0, 0, 0, .03);
    box-shadow: 0 4px 18px 0 rgba(0, 0, 0, .08);
    padding: 10px;
}

.header a {
    color: #000;
    text-decoration: none;
    font-weight: 600;
}

/* ===============================
   NAVIGATION FOOTER BAR (DESIGN & ACCESSIBILITÉ)
================================= */

#footer-bar {
    position: fixed;
    bottom: 12px;
    left: 12px;
    right: 12px;
    max-width: 540px;
    margin: 0 auto;
    z-index: 999;
    height: 64px;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 32px;
    box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#footer-bar .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 50px;
    min-width: 48px;
    color: #94A3B8;
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    border-radius: 20px;
    transition: all 0.2s ease-in-out;
    position: relative;
}

#footer-bar .nav-item:hover {
    color: #F8FAFC;
    transform: translateY(-2px);
}

#footer-bar .nav-item:focus-visible {
    outline: 2px solid var(--rouge-pompier, #E1261C);
    outline-offset: 2px;
    color: #FFFFFF;
}

#footer-bar .nav-item.active {
    color: #FFFFFF;
    font-weight: 700;
}

#footer-bar .nav-item.active .nav-icon {
    transform: scale(1.12);
    color: var(--rouge-pompier, #E1261C);
}

#footer-bar .nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 3px;
    width: 40%;
    height: 3px;
    background-color: var(--rouge-pompier, #E1261C);
    border-radius: 3px;
    box-shadow: 0 0 8px rgba(225, 38, 28, 0.8);
}

#footer-bar .nav-item-home {
    flex: 0 0 52px;
    height: 52px;
    min-width: 52px;
    background: linear-gradient(135deg, #E1261C 0%, #B91C1C 100%);
    color: #FFFFFF !important;
    border-radius: 50%;
    margin: 0 4px;
    box-shadow: 0 6px 16px rgba(225, 38, 28, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-6px);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#footer-bar .nav-item-home:hover {
    transform: translateY(-10px) scale(1.06);
    box-shadow: 0 10px 22px rgba(225, 38, 28, 0.65);
}

#footer-bar .nav-item-home.active {
    outline: 2px solid #FFFFFF;
    outline-offset: 2px;
}

#footer-bar .nav-item-home::after {
    display: none !important;
}

#footer-bar .nav-label {
    margin-top: 2px;
    line-height: 1;
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
    #footer-bar {
        bottom: calc(12px + env(safe-area-inset-bottom));
    }
}

.page-content {
    overflow-x: hidden;
    transition: all 300ms ease;
    z-index: 90;
    padding-bottom: 80px;
    padding-bottom: calc(80px +(constant(safe-area-inset-bottom))* 1.1);
    padding-bottom: calc(80px +(env(safe-area-inset-bottom))* 1.1);
    margin-top: 45px;
}

/* Login page layout */
.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 2rem;
    padding: 2rem;
}

@media (min-width: 992px) {
    .login-page {
        flex-direction: row;
        align-items: center;
        padding: 4rem;
    }
}

@media (max-width: 768px) {
    .card {
        border-width: 1.5px;
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 12px 30px rgba(0, 0, 0, 0.45);
        padding: 16px;
    }
}

.login-side {
    flex: 1;
    max-width: 540px;
    color: #f6f9ff;
}

.login-side--hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.25rem;
    padding: 2.5rem;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
}

.login-side--hero .logo {
    width: 104px;
    height: auto;
    margin-bottom: 0.25rem;
}

.login-side--hero h1 {
    margin: 0;
    font-size: clamp(2rem, 3.9vw, 2.8rem);
    letter-spacing: 0.01em;
    font-weight: 800;
    line-height: 1.05;
}

.login-side--hero h2 {
    margin: 0.5rem 0 0;
    font-size: clamp(1.05rem, 2.4vw, 1.4rem);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

.login-side--hero .subtitle {
    margin: 0.75rem 0 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
}

.login-card {
    background: rgba(6, 12, 33, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 2.5rem;
    box-shadow: 0 28px 50px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(12px);
    color: #fff;
}

.login-card h3 {
    margin: 0 0 1.25rem;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #fff;
}

.login-card label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.8);
}

.login-card input[type="email"],
.login-card input[type="password"] {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    margin-bottom: 1rem;
    outline: none;
}

.login-card input[type="email"]:focus,
.login-card input[type="password"]:focus {
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(18, 135, 246, 0.18);
}

.login-card .actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1.25rem;
}

.login-card .actions a {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: underline;
}

.login-card .actions a:hover {
    color: #fff;
}

.login-card button {
    width: 100%;
    padding: 0.9rem;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #ff2d55, #ff5c00);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.login-card button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px rgba(255, 45, 85, 0.35);
}

.login-card .alert {
    margin-bottom: 1rem;
}

.loginBox {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 350px;
    min-height: 200px;
    background: #000000;
    border-radius: 10px;
    padding: 40px;
    box-sizing: border-box;
    color: #fff;
}

.loginBox h3 {
    margin: 0;
    padding: 0 0 20px;
    color: #59238F;
    text-align: center;
}

.loginBox .user {
    margin: 0 auto;
    display: block;
    margin-bottom: 20px;
}

/* ===============================
   TITRES
================================= */

h1,
h2,
h3 {
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 1px;
}

.highlight {
    color: var(--rouge-pompier);
    font-weight: 800;
}

/* ===============================
   BOUTONS
================================= */

.btn-primary,
.btn-tournee {
    background-color: var(--rouge-pompier);
    color: white;
    padding: 14px 20px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #C91F17;
}

.btn-primary:active {
    background-color: #A81812;
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--bleu-eau);
    color: var(--bleu-eau);
    padding: 14px 20px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
}

.btn-success {
    background-color: var(--vert-lisere);
    color: white;
    padding: 14px 20px;
    border-radius: 12px;
    border: none;
}

/* ===============================
   CARTES
================================= */

.card {
    background-color: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 10px 28px rgba(0, 0, 0, 0.35);
    margin-bottom: 16px;
}

.card-title {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--rouge-pompier);
    font-weight: 800;
}

.card-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--rouge-pompier);
}

/* ===============================
   INPUTS
================================= */

input,
select {
    background-color: #0F1A2D;
    border: 1px solid var(--bleu-eau);
    border-radius: 10px;
    padding: 12px;
    color: white;
    width: 100%;
}

input:focus {
    border-color: var(--rouge-pompier);
    outline: none;
}

/* ===============================
   BADGES
================================= */

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.badge-success {
    background-color: var(--vert-lisere);
}

.badge-warning {
    background-color: var(--orange-accent);
}

.badge-danger {
    background-color: var(--rouge-pompier);
}

.badge-info {
    background-color: var(--bleu-eau);
}

/* ===============================
   TABLEAU
================================= */

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 12px;
    text-align: left;
}

tr:nth-child(even) {
    background-color: #0F1A2D;
}

.amount {
    color: var(--rouge-pompier);
    font-weight: 700;
}

/* ===============================
     DASHBOARD (scoped)
     Styles spécifiques pour la page d'accueil `.dash`
================================= */
.dash {
    max-width: 1200px;
    margin: 24px auto;
    padding: 18px;
}

.dash .top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px
}

.dash .brand {
    display: flex;
    align-items: center;
    gap: 12px
}

.dash .brand h1 {
    margin: 0;
    font-size: 20px;
    color: var(--rouge-pompier)
}

.dash .welcome {
    color: var(--gris-clair);
    font-size: 14px
}

.dash .metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin: 18px 0
}

.dash .card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 18px;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(2, 6, 23, .75), 0 0 0 1px rgba(255, 255, 255, 0.04)
}

.dash .card h2 {
    margin: 0;
    font-size: 28px
}

.dash .card p {
    margin: 6px 0 0;
    color: var(--gris-clair)
}

.dash .progress {
    height: 14px;
    background: #122436;
    border-radius: 12px;
    overflow: hidden
}

.dash .progress>span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--rouge-pompier), #ff8a5a);
    width: 38%
}

.dash .layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 18px;
    margin-top: 18px
}

.dash .new-collect {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-between
}

.dash .btn {
    background: var(--rouge-pompier);
    color: white;
    padding: 12px 18px;
    border-radius: 8px;
    border: none
}

.dash table {
    width: 100%;
    border-collapse: collapse
}

.dash th,
.dash td {
    padding: 10px;
    text-align: left;
    font-size: 14px
}

.dash .muted {
    color: var(--gris-clair);
    font-size: 13px
}

/* Helpers for moved inline styles */
.dash .logo-img {
    height: 44px;
    opacity: .95;
}

.dash .mt-8 {
    margin-top: 8px;
}

.dash .mt-14 {
    margin-top: 14px;
}

.dash .mt-10 {
    margin-top: 10px;
}

.dash .progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    color: white;
}

.dash .progress-percent {
    color: var(--rouge-pompier);
    font-weight: 700;
}

.dash .text-left {
    text-align: left;
}

.dash .flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}