:root {
    --primary: #273170;
    --secondary: #0c9790;
    --accent: #fff;
    --muted: #888;
    --light: #f4f4f4;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #fff;
    color: #273170;
}

/* Login */
.login-container {
    max-width: 400px;
    width: 100%;
    margin: 60px auto;
    background: #fff;
    border: 4px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    padding-bottom: 10px;
}

.login-header {
    padding: 10px 20px 5px;
    text-align: center;
    background-color: white;
}

.login-header img {
    width: 300px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 0;
}

.login-body {
    padding: 20px;
}

.login-body h2 {
    margin: 0 0 10px 0;
    text-align: center;
}

.login-body form {
    display: flex;
    flex-direction: column;
}

.login-body input {
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #aaa;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.2s;
}

.login-body input:focus {
    border-color: #007BFF;
}

.toggle-password {
    margin: -10px 0 15px;
    font-size: 0.9em;
    color: #007BFF;
    cursor: pointer;
    text-align: right;
}

.btn-login {
    padding: 10px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
}

.btn-login:hover {
    background-color: #1a224f;
}

.error-message {
    color: red;
    text-align: center;
    margin-bottom: 10px;
}

/* Accueil centré */
.accueil-fullscreen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    /* header + footer compensés */
    text-align: center;
    padding: 0;
    gap: 15px;
    /* espace maîtrisé entre éléments */
}



/* Layout général */
.main-container {
    display: flex;
    min-height: calc(100vh - 80px);
}

.content-area {
    flex: 1;
    padding: 20px;
}

/* Header */
header {
    background-color: #fff;
    border-top: 4px solid var(--primary);
    border-bottom: 4px solid var(--primary);
    padding: 2px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.header-left img,
.logo-crf {
    height: 80px;
    width: auto;
    display: block;
}

.header-center {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary);
    flex: 1;
    text-align: center;
}

.header-right {
    text-align: right;
    font-size: 12px;
}

.logout-link {
    color: var(--primary);
    font-weight: bold;
    margin-left: 10px;
    text-decoration: underline;
    font-size: 12px;
}

/* Footer */
.footer-top {
    background-color: var(--primary);
    color: #fff;
    text-align: center;
    padding: 5px 5px;
    font-size: 10px;
    line-height: 1.2;
    border-top: 1px solid #1f254c;
}

.footer-bottom {
    background-color: #fff;
    color: var(--primary);
    text-align: center;
    padding: 4px 6px;
    font-size: 10px;
    border-top: 1px solid #ccc;
}

.footer-bottom-text {
    margin: 0;
    font-weight: bold;
}

/* Sidebar */
aside {
    width: 180px;
    background-color: var(--secondary);
    color: #fff;
    padding: 20px;
    font-size: 12px;
    display: flex;
    flex-direction: column;
}

aside ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

aside li {
    margin-bottom: 10px;
}

aside a {
    color: #fff;
    text-decoration: none;
    font-size: 12px;
}

/* Visiteur - menu désactivé */
.disabled-link {
    display: block;
    color: #999;
    text-decoration: none;
    cursor: not-allowed;
    opacity: 0.6;
    font-size: 12px;
}

/* Titre menu latéral */
.menu-header {
    font-weight: bold;
    margin-bottom: 10px;
    color: white;
}

.accueil-logo {
    max-width: 180px;
    width: 100%;
    height: auto;
    margin-bottom: 10px;
}

.app-sidebar {
    width: 180px;
    background-color: var(--secondary);
    color: #fff;
    padding: 20px;
    font-size: 12px;
    display: flex;
    flex-direction: column;
}

.menu-header {
    font-weight: bold;
    margin-bottom: 12px;
    color: #fff;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 10px;
}

.sidebar-menu a {
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    display: block;
}

.sidebar-menu a:hover {
    text-decoration: underline;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    padding: 10px;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

.dashboard-welcome {
    text-align: center;
    padding: 30px 15px;
}

.dashboard-logo {
    max-width: 180px;
    margin-bottom: 20px;
    height: auto;
}

.dashboard-title {
    font-size: 18px;
    color: var(--primary);
    font-weight: 600;
    margin: 0;
}

.dashboard-subtitle {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
}

.dashboard-separator {
    margin: 5px 0;
}

.dashboard-cards {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.dashboard-card {
    background: #f8f9fa;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 6px;
    width: 240px;
    font-size: 12px;
    text-align: left;
}

.dashboard-settings-link {
    margin-top: 15px;
    text-align: center;
}
