#---------------------------------------------------
#dashboard pages styles
#--------------------------------------------------
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f6f9;
}

/* Layout principal (Dashboard et Missions) */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */

.layout {
    display: flex;
    height: 100vh;
    overflow: hidden; /* empêche le scroll global */
}

/* SIDEBAR */
.sidebar {
    width: 240px;
    background: #fa8927;
    color: white;
    padding: 20px;

    height: 100vh;
    overflow-y: auto; /* sidebar scrollable si contenu long */
}

/* MAIN */
.main {
    flex: 1;
    height: 100vh;
    overflow-y: auto; /* 👈 scroll principal */
    padding: 20px;
    overflow-x: auto; 
}
.logo {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 30px;
}

.user {
    margin-bottom: 30px;
    color: #9ca3af;
}

.menu a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.menu a:hover {
    background: #374151;
}

/* MAIN */
.main {
    flex: 1;
    padding: 20px;
}

/* TOPBAR */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px
}

.header-left h1 {
    margin: 0;
}

.header-left p {
    color: gray;
    font-size: 14px;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.search-bar {
    background: #f1f1f1;
    padding: 8px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    width: 300px;
}

.search-bar input {
    border: none;
    background: none;
    outline: none;
    margin-left: 8px;
    width: 100%;
}
/* CARDS */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-decoration: none;
    color: black;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: 0.2s ease;
    overflow-x: auto;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.card-icon {
    font-size: 30px;
    margin-bottom: 10px;
}

.card h3 {
    margin: 0;
}

.card p {
    color: #6b7280;
}
/* CHARTS */
.charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.chart-card {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}
.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo svg {
    width: 24px;
    height: 24px;
}

.sidebar-title {
    font-size: 12px;
    font-weight: bold;
    line-height: 1.3;
}

.sidebar-subtitle {
    font-size: 10px;
    opacity: 0.8;
}

.sidebar-section {
    margin-bottom: 30px;
}

.sidebar-section-title {
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav-item {
    margin-bottom: 4px;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s;
    position: relative;
}

.sidebar-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-nav-link.active {
    background-color: var(--light-green);
}

.sidebar-nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.delete-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
}
.select-btn {
    background: #47ace2;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
}
.edit-btn {
    background: hsl(103, 84%, 60%);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
}
.delete-btn:hover {
    background: #dc2626;
}

.form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.form input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.form button {
    padding: 10px 15px;
    background: #111827;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
    min-width: 150px;
}

.table th {
    background: #f3f4f6;
}
/* formulaire de création et d'édition */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.subtitle {
    color: gray;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.form-actions {
    display: flex;
    justify-content: space-between;
}
.cancel-btn {
    text-decoration: none;
    padding: 10px 15px;
    background: #ccc;
    border-radius: 8px;
}
input:focus {
    border-color: #4e73df;
    outline: none;
}
/* Afficher message de succes */
.flash-container {
    margin: 20px;
}

.flash {
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
    color: white;
    animation: fadeIn 0.5s ease;
}

.flash.success {
    background-color: #28a745;
}

.flash.error {
    background-color: #dc3545;
}


@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.flash-text {
    flex: 1;              /* 🔥 prend tout l'espace */
    word-break: break-word; /* 🔥 gère les longs textes */
}
/* form row */
.form-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.form-row label {
    width: 200px; /* largeur fixe = effet tableau */
    font-weight: bold;
}

.form-row input {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
}
.settings-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.card_settings {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.btn-save {
    margin-top: 15px;
    padding: 12px;
    background: #2d5016;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* STATS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-card {
    background: #f9fafb;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.stat-card.red{
    background: #f5dadc;
}
.stat-card.green{
    background: #a5f181;
}
.stat-card.yellow{
    background: #dfe4a2;
}
.stat-card.blue{
    background: #8fc0e3;
}
.stat-card.black{
    background: #f36e73;
}
/* Titre */
.stat-card h4 {
    font-size: 14px;
    color: #777;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* VALEUR PRINCIPALE */
.stat-card p {
    font-size: 28px;
    font-weight: bold;
    color: #222;
    margin: 0;
}
/* GRID */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

/* CARD */
.quick-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px;
    background: #f9fafb;
    border-radius: 12px;
    text-decoration: none;
    color: #111;
    transition: all 0.2s ease;
    border: 1px solid #eee;
}

/* HOVER EFFECT */
.quick-card:hover {
    background: #2d5016;
    color: white;
    transform: translateY(-3px);
}

/* ICON */
.quick-card .icon {
    font-size: 24px;
    background: rgba(45, 80, 22, 0.1);
    padding: 10px;
    border-radius: 10px;
}

/* TITLES */
.quick-card h4 {
    margin: 0;
    font-size: 16px;
}

.quick-card p {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}

/* hover texte */
.quick-card:hover p {
    color: #ddd;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.info-item {
    background: #f9fafb;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.label {
    font-size: 12px;
    color: #6b7280;
}

.value {
    font-size: 16px;
    font-weight: bold;
    margin-top: 5px;
}
.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 8px;
}
/* filtre de recherches */
.filter-form {
    display: flex;
    gap: 20px;
    align-items: center;
}

.filter-form select {
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.filter-form button {
    padding: 8px 12px;
    background: #2d5016;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
/* boutons d'exportation */
.export-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.excel-btn,
.pdf-btn {
    padding: 10px 16px;
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.excel-btn {
    background: #16a34a;
}

.pdf-btn {
    background: #dc2626;
}