/* Styles de base responsive pour la page de connexion SIGU */
:root {
    --bg: #f4f8ff;
    --card: #ffffff;
    --accent: #2f6fdd;
    --accent-dark: #1f4db4;
    --text: #1b2438;
    --muted: #65718a;
    --shadow: 0 18px 45px rgba(25, 57, 107, 0.12);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: radial-gradient(circle at top, rgba(47, 111, 221, 0.12), transparent 35%),
                linear-gradient(180deg, #f8fbff 0%, #eff4fb 100%);
    color: var(--text);
    min-height: 100vh;
}

.page-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.login-card {
    width: min(520px, 100%);
    background: var(--card);
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: 36px;
    border: 1px solid rgba(31, 77, 180, 0.08);
}

.login-card h1 {
    font-size: clamp(1.8rem, 2.4vw, 2.4rem);
    margin-bottom: 12px;
}

.login-card p.subtitle {
    color: var(--muted);
    margin-bottom: 28px;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: var(--muted);
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(101, 113, 138, 0.22);
    border-radius: 14px;
    font-size: 1rem;
    color: var(--text);
    background: #fff;
    transition: border-color 0.2s ease;
}

.password-field {
    position: relative;
}

.password-field input[type="password"],
.password-field input[type="text"] {
    padding-right: 52px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--muted);
    padding: 0;
    line-height: 1;
}

.password-toggle:focus {
    outline: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--accent);
}

button[type="submit"] {
    width: 100%;
    padding: 15px 16px;
    border: none;
    border-radius: 14px;
    background: var(--accent);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

button[type="submit"]:hover {
    background: var(--accent-dark);
}

.alert {
    padding: 14px 16px;
    border-radius: 14px;
    background: #ffefef;
    color: #a62f2f;
    border: 1px solid #f4c2c2;
    margin-bottom: 18px;
}

.login-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    gap: 16px;
}

.login-meta .remember {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
}

.login-meta a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.95rem;
}

.login-footer {
    font-size: 0.95rem;
    color: var(--muted);
    text-align: center;
    margin-top: 24px;
    line-height: 1.6;
}

.login-footer a {
    color: var(--accent);
    text-decoration: none;
}

@media (max-width: 520px) {
    .login-card {
        padding: 28px 20px;
    }
}

/* Layout pour les pages d'administration */
.app-shell {
    min-height: 100vh;
    background: #f7f9fc;
}

.app-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #ffffff;
    box-shadow: 0 1px 10px rgba(38, 72, 153, 0.08);
    position: sticky;
    top: 0;
    z-index: 20;
}

.navbar-start {
    display: flex;
    align-items: center;
    gap: 16px;
}

.navbar-toggle {
    border: none;
    background: transparent;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text);
}

.navbar-brand {
    font-weight: 700;
    color: var(--accent);
}

.navbar-end {
    display: flex;
    align-items: center;
    gap: 16px;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text);
}

.navbar-user-name {
    font-weight: 600;
}

.navbar-logout {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.95rem;
}

.app-layout {
    display: flex;
    min-height: calc(100vh - 72px);
}

.app-sidebar,
.sidebar {
    width: 260px;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(to bottom, #e6e5f2, #4599cd);
    color: #ffffff;
    box-shadow: 0 18px 45px rgba(25, 57, 107, 0.12);
    padding: 0;
}

.sidebar-brand-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    padding: 0 20px;
}

.sidebar-brand {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
}

.sidebar-brand-mini {
    display: none;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.nav-profile {
    margin: 0 0 0.75rem 0;
}

.nav-profile .nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: #ffffff;
}

.nav-profile-image {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #ffffff;
}

.nav-profile-text {
    display: flex;
    flex-direction: column;
}

.profile-name {
    font-weight: 700;
    font-size: 0.95rem;
}

.profile-role {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.8);
}

.sidebar-menu {
    flex: 1;
    padding: 1rem 0 1.5rem;
}

.sidebar-menu .nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-menu .nav-item {
    padding: 0 1rem;
}

.sidebar-menu .nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.95rem 0.9rem;
    border-radius: 14px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.25s ease;
    background: transparent;
    border: none;
}

.sidebar-menu .nav-link:hover,
.sidebar-menu .nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.sidebar-menu .menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-right: 10px;
    font-size: 1.05rem;
    color: #ffffff;
}

.sidebar-menu .menu-title {
    flex: 1;
    text-align: left;
    color: #ffffff;
    font-size: 0.95rem;
}

.sidebar-menu .menu-arrow::before {
    content: '▾';
    display: inline-block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75);
}

.sidebar-menu .nav-link[aria-expanded="true"] .menu-arrow::before {
    content: '▴';
}

.sidebar-menu .collapse {
    width: 100%;
}

.sidebar-menu .sub-menu {
    margin: 0.5rem 0 0 0;
    padding-left: 0.5rem;
    list-style: none;
}

.sidebar-menu .sub-menu .nav-item {
    position: relative;
    margin-bottom: 4px;
}

.sidebar-menu .sub-menu .nav-link {
    justify-content: flex-start;
    padding: 0.75rem 1rem;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.25s ease;
}

.sidebar-menu .sub-menu .nav-link:before {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border: 2px solid rgba(255, 255, 255, 0.75);
    border-radius: 50%;
}

.sidebar-menu .sub-menu .nav-link.active,
.sidebar-menu .sub-menu .nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.sidebar-menu .nav-link.active {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}


.app-main {
    flex: 1;
    padding: 32px;
    background: transparent;
}

.page-header {
    margin-bottom: 24px;
}

.page-pretitle {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.page-description {
    color: var(--muted);
    max-width: 640px;
    line-height: 1.6;
}

.app-footer {
    padding: 20px 24px;
    background: #fff;
    border-top: 1px solid rgba(31, 77, 180, 0.08);
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 0.95rem;
}

@media (max-width: 960px) {
    .app-layout {
        flex-direction: column;
    }

    .app-sidebar {
        width: 100%;
        min-width: auto;
        border-right: none;
        border-bottom: 1px solid rgba(31, 77, 180, 0.08);
    }

    .app-main {
        padding: 20px;
    }
}

@media (max-width: 720px) {
    .navbar-end {
        display: none;
    }

    .page-header h1 {
        font-size: 1.75rem;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
    }
}
