/* Variables globales */
:root {
    --primary-color: #f49404;
    --primary-rgb: 244, 148, 4;
    --dark-green: #0d3320;
    --light-green: rgba(31, 102, 65, 0.98);
    --border-color: rgba(244, 148, 4, 0.6);
}

/* Style global */
* {
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(
        135deg,
        var(--dark-green) 0%,
        var(--dark-green) 85%,
        #124328 100%
    );
    margin: 0;
    padding: 0;
    min-height: 100vh;
    color: #fff;
    position: relative;
}

/* Style des cards */
.dashboard-card {
    background: linear-gradient(135deg, 
        rgba(26, 86, 55, 0.95) 0%, 
        rgba(13, 51, 32, 0.95) 100%
    );
    border: 2px solid rgba(var(--primary-rgb), 0.5);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    color: #ffffff;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.3s ease;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(var(--primary-rgb), 0.6) 50%,
        transparent 100%
    );
}

.dashboard-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.2);
    background: linear-gradient(135deg, 
        rgba(31, 102, 65, 0.95) 0%, 
        rgba(16, 61, 38, 0.95) 100%
    );
}

/* Cartes statistiques */
.stat-card {
    background: linear-gradient(135deg, 
        rgba(26, 86, 55, 0.95) 0%, 
        rgba(13, 51, 32, 0.95) 100%
    );
    border: 2px solid rgba(var(--primary-rgb), 0.5);
    border-radius: 12px;
    padding: 1.2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(var(--primary-rgb), 0.6) 50%,
        transparent 100%
    );
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.2);
    background: rgba(6, 25, 15, 0.8);
}

.stat-icon {
    font-size: 2.8rem;
    color: rgba(var(--primary-rgb), 0.8);
    margin-left: 1rem;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 8px rgba(var(--primary-rgb), 0.3));
}

.stat-card:hover .stat-icon {
    color: var(--primary-color);
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 12px rgba(var(--primary-rgb), 0.4));
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3),
                 0 0 10px rgba(var(--primary-rgb), 0.5);
    letter-spacing: 0.5px;
}

.stat-label {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    font-size: 1.1rem;
    margin-bottom: 0.1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    line-height: 1;
}

/* Indicateurs de tendance */
.trend-indicator {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.4rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.trend-up {
    background: rgba(63, 186, 84, 0.25);
    border-color: rgba(63, 186, 84, 0.5);
    color: #5dff84;
    text-shadow: 0 0 8px rgba(93, 255, 132, 0.3);
}

.trend-down {
    background: rgba(220, 53, 69, 0.25);
    border-color: rgba(220, 53, 69, 0.5);
    color: #ff7b8a;
    text-shadow: 0 0 8px rgba(255, 123, 138, 0.3);
}

.trend-indicator i {
    font-size: 0.9rem;
    margin-right: 0.4rem;
    vertical-align: middle;
}

/* Conteneurs de graphiques */
.chart-container {
    position: relative;
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(8, 32, 20, 0.95);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    height: 300px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.2);
}

.radar-container {
    height: 100%;
    min-height: 250px;
    max-height: 500px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0 !important;
}

/* Timeline */
.irrigation-timeline {
    position: relative;
    padding-left: 2rem;
    margin: 1rem 0;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 0;
    height: 100%;
    width: 2px;
    background: rgba(var(--primary-rgb), 0.3);
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: -2.35rem;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
}

.timeline-content {
    background: rgba(13, 51, 32, 0.7);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Headers et textes */
.card-header {
    background: rgba(13, 51, 32, 0.6);
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.2);
    margin: -1.2rem -1.2rem 1rem -1.2rem;
    padding: 1rem 1.2rem;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    border-radius: 10px 10px 0 0;
}

.card-header i {
    color: var(--primary-color);
    filter: drop-shadow(0 0 8px rgba(var(--primary-rgb), 0.4));
}

.card-header .btn-primary {
    background: rgba(var(--primary-rgb), 0.15);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
    height: auto;
    transition: all 0.3s ease;
}

.card-header .btn-primary:hover {
    background: rgba(var(--primary-rgb), 0.25);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.2);
}

.card-header .btn-primary i {
    font-size: 0.85rem;
    color: var(--primary-color);
}

h4 {
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.1rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    line-height: 1;
}

.text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 0.85rem;
    line-height: 1;
    margin-bottom: 0.1rem;
}

/* Formulaires */
.form-control,
.form-select {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(var(--primary-rgb), 0.4) !important;
    color: #ffffff !important;
    font-weight: 500;
    appearance: none;
    -webkit-appearance: none;
}

.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus,
.form-control:-webkit-autofill:active,
.form-select:-webkit-autofill,
.form-select:-webkit-autofill:hover,
.form-select:-webkit-autofill:focus,
.form-select:-webkit-autofill:active {
    -webkit-text-fill-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0 30px rgba(13, 51, 32, 0.95) inset !important;
    transition: background-color 5000s ease-in-out 0s;
    background: rgba(255, 255, 255, 0.08) !important;
}

.form-control:focus,
.form-select:focus {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(var(--primary-rgb), 0.6) !important;
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-rgb), 0.25) !important;
}

.form-floating > label {
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Boutons */
.btn-primary {
    background: linear-gradient(135deg, 
        rgba(var(--primary-rgb), 0.15) 0%, 
        rgba(209, 127, 3, 0.15) 100%
    );
    border: 1px solid rgba(var(--primary-rgb), 0.4);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, 
        rgba(var(--primary-rgb), 0.25) 0%, 
        rgba(209, 127, 3, 0.25) 100%
    );
    border-color: rgba(var(--primary-rgb), 0.6);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.15);
}

.btn-outline-primary {
    background: rgba(8, 32, 20, 0.95);
    border: 1px solid rgba(var(--primary-rgb), 0.4);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background: rgba(var(--primary-rgb), 0.15);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.2);
}

.btn-group .btn {
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.btn-group .btn:hover,
.btn-group .btn.active {
    background: rgba(var(--primary-rgb), 0.2);
    border-color: var(--primary-color);
}

/* Tableaux */
.stat-content {
    width: 100%;
}

.stat-content .d-flex {
    width: 100%;
    margin-bottom: 0.35rem;
}

.table-responsive {
    width: 100%;
    margin: 0;
    background: rgba(13, 51, 32, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
}

.table {
    width: 100%;
    margin-bottom: 0;
    text-align: center;
    min-width: 800px;
}

.table-dark {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(13, 51, 32, 0.6);
    --bs-table-hover-bg: rgba(244, 148, 4, 0.15);
    --bs-table-hover-color: var(--primary-color);
    color: rgba(255, 255, 255, 0.9);
}

.table-dark thead {
    background: rgba(13, 51, 32, 0.8);
    border-bottom: 2px solid var(--primary-color);
}

.table-dark thead th {
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 1rem;
    vertical-align: middle;
    white-space: nowrap;
    text-align: center;
}

.table-dark tbody tr {
    border-color: rgba(244, 148, 4, 0.1);
    transition: all 0.3s ease;
}

.table-dark tbody tr:hover {
    background: rgba(13, 51, 32, 0.8);
    border-color: var(--primary-color);
}

.table-dark td {
    padding: 1rem;
    vertical-align: middle;
    text-align: center;
}

.table-dark td:first-child {
    text-align: left;
    padding-left: 1.5rem;
}

.actions-column {
    text-align: right !important;
    white-space: nowrap;
    width: 1%;
    padding-right: 1.5rem !important;
}

/* Boutons d'action */
.btn-action {
    background: rgba(8, 32, 20, 0.95);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    color: var(--primary-color);
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-action:hover {
    background: rgba(var(--primary-rgb), 0.15);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(244, 148, 4, 0.2);
}

.btn-outline-warning {
    background: rgba(8, 32, 20, 0.95);
    border-color: rgba(var(--primary-rgb), 0.4);
    color: var(--primary-color);
}

.btn-outline-warning:hover {
    background: rgba(var(--primary-rgb), 0.15);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-danger {
    background: rgba(8, 32, 20, 0.95);
    border-color: rgba(220, 53, 69, 0.4);
    color: #dc3545;
}

.btn-outline-danger:hover {
    background: rgba(220, 53, 69, 0.15);
    border-color: #dc3545;
    color: #dc3545;
}

/* Badges */
.badge {
    padding: 0.5em 0.8em;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.badge.bg-success {
    background: rgba(25, 135, 84, 0.2) !important;
    color: #4ade80;
    border: 1px solid rgba(25, 135, 84, 0.4);
}

.badge.bg-warning {
    background: rgba(255, 159, 67, 0.2) !important;
    color: #ffa426;
    border: 1px solid rgba(255, 159, 67, 0.4);
}

.badge.bg-primary {
    background: rgba(var(--primary-rgb), 0.2) !important;
    color: var(--primary-color);
    border: 1px solid rgba(var(--primary-rgb), 0.4);
}

/* Sous-navbar */
.sub-navbar {
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    border-radius: 10px;
    padding: 0.5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.sub-navbar .nav-pills {
    gap: 0.5rem;
    display: flex;
    justify-content: space-between;
}

.sub-navbar .nav-item {
    flex: 1;
}

.sub-navbar .nav-link {
    color: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    padding: 0.8rem 1.2rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sub-navbar .nav-link:hover {
    color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.1);
}

.sub-navbar .nav-link.active {
    background: rgba(var(--primary-rgb), 0.2);
    color: var(--primary-color);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
}

/* Modals */
.modal-dialog {
    position: relative;
    top: 50%;
    transform: translateY(-50%) !important;
    margin: 0 auto;
    width: 100%;
    max-width: 500px;
}

.modal-content {
    background: linear-gradient(135deg, 
        rgba(26, 86, 55, 0.98) 0%, 
        rgba(13, 51, 32, 0.98) 100%
    );
    border: 2px solid rgba(var(--primary-rgb), 0.3);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                0 0 0 1000px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.modal.show .modal-content {
    opacity: 1;
}

.modal-header {
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.2);
    padding: 1rem 1.5rem;
}

.modal-header .modal-title {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(var(--primary-rgb), 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header .modal-title i {
    color: var(--primary-color);
    filter: drop-shadow(0 0 8px rgba(var(--primary-rgb), 0.4));
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid rgba(var(--primary-rgb), 0.2);
    padding: 1rem 1.5rem;
    gap: 0.75rem;
}

.modal .btn-close {
    color: rgba(255, 255, 255, 0.8);
    text-shadow: none;
    opacity: 0.8;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.3));
}

.modal .btn-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.modal .form-control,
.modal .form-select {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(var(--primary-rgb), 0.3) !important;
    color: #ffffff !important;
}

.modal .form-control:focus,
.modal .form-select:focus {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(var(--primary-rgb), 0.5) !important;
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-rgb), 0.25) !important;
}

.modal .form-floating > label {
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.modal .form-floating > .form-control:focus ~ label,
.modal .form-floating > .form-control:not(:placeholder-shown) ~ label,
.modal .form-floating > .form-select ~ label {
    color: rgba(var(--primary-rgb), 0.9);
    text-shadow: 0 0 8px rgba(var(--primary-rgb), 0.3);
}

.modal .btn-outline-light {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.modal .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal .btn-primary {
    background: linear-gradient(135deg, 
        rgba(var(--primary-rgb), 0.2) 0%, 
        rgba(209, 127, 3, 0.2) 100%
    );
    border: 1px solid rgba(var(--primary-rgb), 0.4);
    color: var(--primary-color);
}

.modal .btn-primary:hover {
    background: linear-gradient(135deg, 
        rgba(var(--primary-rgb), 0.3) 0%, 
        rgba(209, 127, 3, 0.3) 100%
    );
    border-color: rgba(var(--primary-rgb), 0.6);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.2);
}

@media (max-width: 768px) {
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-header {
        padding: 0.75rem 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 0.75rem 1rem;
        flex-wrap: nowrap;
    }
    
    .modal .btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.9rem;
    }
}

/* SweetAlert2 Customization */
.swal2-popup {
    border: 1px solid rgba(var(--primary-rgb), 0.2) !important;
    border-radius: 10px !important;
    background: rgba(13, 51, 32, 0.85) !important;
    backdrop-filter: blur(10px) !important;
    padding: 0.75rem !important;
    width: 300px !important;
}

.swal2-title {
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    color: rgba(255, 255, 255, 0.9) !important;
    margin-bottom: 0.25rem !important;
    padding: 0 !important;
    line-height: 1.4 !important;
}

.swal2-html-container {
    font-size: 0.85rem !important;
    color: rgba(255, 255, 255, 0.7) !important;
    margin: 0.25rem 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
}

.swal2-confirm, .swal2-cancel {
    font-size: 0.85rem !important;
    padding: 0.35rem 0.75rem !important;
    margin: 0.25rem !important;
    height: 32px !important;
}

.swal2-icon {
    border-color: rgba(var(--primary-rgb), 0.4) !important;
    color: var(--primary-color) !important;
    margin: 0.25rem auto !important;
    height: 3em !important;
    width: 3em !important;
    font-size: 0.85rem !important;
}

.swal2-icon .swal2-icon-content {
    font-size: 1.75em !important;
}

.swal2-icon.swal2-warning {
    border-color: rgba(var(--primary-rgb), 0.4) !important;
    color: var(--primary-color) !important;
}

/* Toast Customization */
.swal2-toast {
    background: rgba(13, 51, 32, 0.85) !important;
    backdrop-filter: blur(10px) !important;
    padding: 0.5rem 1rem !important;
    width: auto !important;
    max-width: 280px !important;
}

.swal2-toast .swal2-title {
    font-size: 0.9rem !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sub-navbar .nav-pills {
        flex-direction: column;
    }
    
    .sub-navbar .nav-item {
        width: 100%;
    }
    
    .table-responsive {
        margin: 0 -1rem;
        padding: 0 1rem;
        border-radius: 0;
    }
    
    .table .actions-column {
        position: sticky;
        right: 0;
        background: rgba(13, 51, 32, 0.95);
        z-index: 1;
    }
    
    .btn-action {
        padding: 0.35rem 0.65rem;
    }

    .modal-footer {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .chart-container {
        height: 250px;
    }

    .chart-container.radar-container,
    .radar-container {
        height: 300px !important;
        min-height: 200px !important;
        max-height: 300px !important;
        padding: 0 !important;
    }

    .center-health-canvas {
        padding: 0.5rem;
    }

    #healthChart {
        transform: scale(0.9);
        transform-origin: center;
    }

    .dashboard-card.chatbot-card {
        min-height: 500px;
    }
}

.gps-helper .btn {
    background: rgba(8, 32, 20, 0.95);
    border: 1px solid rgba(var(--primary-rgb), 0.4);
    color: var(--primary-color);
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.gps-helper .btn:hover {
    background: rgba(var(--primary-rgb), 0.15);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.2);
}

/* Suppression des styles connection-card */

/* Styles spécifiques pour la page Analyse */
.dropzone {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 2px dashed rgba(var(--primary-rgb), 0.4) !important;
    border-radius: 12px;
    min-height: 200px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dropzone:hover {
    border-color: var(--primary-color) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

.dropzone .dz-message {
    margin: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
}

.ai-analysis {
    padding: 1.5rem;
}

.ai-suggestion {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.chat-container {
    background: rgba(13, 51, 32, 0.4);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
    border: 1px solid rgba(244, 148, 4, 0.2);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    margin-bottom: 1rem;
    max-height: 550px;
}

.chat-input-wrapper {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(244, 148, 4, 0.2);
    border-radius: 12px;
    padding: 0.75rem;
    margin-top: 1rem;
}

.chat-controls {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.chat-image-upload {
    position: relative;
    flex-shrink: 0;
}

.chat-image-upload input[type="file"] {
    display: none;
}

.chat-image-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(244, 148, 4, 0.1);
    border: 1px solid rgba(244, 148, 4, 0.3);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-image-btn:hover {
    background: rgba(244, 148, 4, 0.2);
    transform: translateY(-2px);
}

.chat-image-preview {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 0.5rem;
    max-width: 150px;
    border-radius: 8px;
    border: 2px solid rgba(244, 148, 4, 0.3);
    display: none;
}

.chat-input-container {
    flex-grow: 1;
    position: relative;
}

.chat-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(244, 148, 4, 0.2);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: #fff;
    font-size: 0.95rem;
    resize: none;
    min-height: 45px;
    max-height: 120px;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.12);
}

.chat-actions {
    display: flex;
    gap: 0.5rem;
}

.chat-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(244, 148, 4, 0.1);
    border: 1px solid rgba(244, 148, 4, 0.3);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-btn:hover {
    background: rgba(244, 148, 4, 0.2);
    transform: translateY(-2px);
}

.chat-btn.analyze-btn {
    background: rgba(63, 186, 84, 0.1);
    border-color: rgba(63, 186, 84, 0.3);
    color: #3fba54;
}

.chat-btn.analyze-btn:hover {
    background: rgba(63, 186, 84, 0.2);
}

.chat-image-name {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: none;
}

/* Styles de connexion */
.login-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

.login-page .card {
    border-radius: 15px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: linear-gradient(135deg, 
        rgba(26, 86, 55, 0.45) 0%, 
        rgba(13, 51, 32, 0.45) 100%
    );
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(244, 148, 4, 0.3);
}

.login-page .card-body {
    color: #fff;
    padding: 2rem;
}

.login-page .form-floating {
    position: relative;
    margin-bottom: 1.5rem;
}

.login-page .form-floating > .form-control {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(244, 148, 4, 0.3);
    color: #fff !important;
}

.login-page .form-floating > .form-control:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-color: rgba(244, 148, 4, 0.5);
    box-shadow: 0 0 0 0.25rem rgba(244, 148, 4, 0.25);
}

.login-page .form-floating > .form-control:-webkit-autofill,
.login-page .form-floating > .form-control:-webkit-autofill:hover,
.login-page .form-floating > .form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff;
    -webkit-box-shadow: 0 0 0 30px rgba(13, 51, 32, 0.95) inset;
    box-shadow: 0 0 0 30px rgba(13, 51, 32, 0.95) inset;
    caret-color: #fff;
}

.login-page .form-floating > label {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    padding: 1rem 0.75rem;
    pointer-events: none;
    border: 1px solid transparent;
    transform-origin: 0 0;
    transition: all 0.2s ease-in-out;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.login-page .form-floating > .form-control:focus ~ label,
.login-page .form-floating > .form-control:not(:placeholder-shown) ~ label {
    opacity: 1;
    transform: scale(0.85) translateY(-0.5rem);
    color: var(--primary-color);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.login-page .btn-primary {
    background: linear-gradient(135deg, 
        rgba(244, 148, 4, 0.2) 0%, 
        rgba(209, 127, 3, 0.2) 100%
    );
    border: 1px solid rgba(244, 148, 4, 0.4);
    color: var(--primary-color);
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.login-page .btn-primary:hover {
    background: linear-gradient(135deg, 
        rgba(244, 148, 4, 0.3) 0%, 
        rgba(209, 127, 3, 0.3) 100%
    );
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(244, 148, 4, 0.2);
}

.login-page .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.login-page .text-primary {
    color: var(--primary-color) !important;
}

.login-page a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.login-page a:hover {
    color: #d17f03;
    text-shadow: 0 0 8px rgba(244, 148, 4, 0.3);
}

/* Toast personnalisé */
.colored-toast {
    max-width: 300px !important;
    width: auto !important;
    padding: 0.5rem 1rem !important;
}

.colored-toast .swal2-title {
    margin: 0.5rem 0 !important;
    font-size: 1rem !important;
    color: #fff !important;
}

.login-page .divider {
    display: flex;
    align-items: center;
    margin: 30px 0;
    gap: 15px;
}

.login-page .divider-line {
    flex-grow: 1;
    height: 1px;
    background: rgba(244, 148, 4, 0.2);
}

.login-page .divider-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    white-space: nowrap;
}

.login-page .social-login {
    margin-top: 20px;
}

.login-page .btn-social {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(244, 148, 4, 0.3);
}

.login-page .btn-google {
    color: #db4437;
}

.login-page .btn-facebook {
    color: #4267B2;
}

.login-page .btn-social:hover {
    transform: translateY(-2px);
    background: rgba(244, 148, 4, 0.1);
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(244, 148, 4, 0.2);
}

.login-page .btn-google .google-icon {
    background: conic-gradient(from -45deg, #ea4335 110deg, #4285f4 90deg 180deg, #34a853 180deg 270deg, #fbbc05 270deg) 73% 55%/150% 150% no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    font-size: 1.5rem;
}

.login-page .btn-google:hover .google-icon {
    opacity: 0.9;
}

.login-page .btn-facebook .facebook-icon {
    background: linear-gradient(to bottom, #4267B2, #3b5998);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    font-size: 1.5rem;
}

.login-page .btn-facebook:hover .facebook-icon {
    opacity: 0.9;
}

.center-health-canvas {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#healthChart {
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
}

/* Largeur maximale du chat sur desktop */
@media (min-width: 768px) {
    .dashboard-card .w-100.w-md-50 {
        max-width: 900px !important;
        min-width: 320px;
        margin: 0 auto;
    }
}

/* Zone de saisie large */
.chat-input-container {
    width: 100%;
    max-width: 100%;
}

.chat-input {
    width: 100%;
    max-width: 100%;
}

.dashboard-card.chatbot-card {
    background: rgba(20, 40, 30, 0.97);
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.25);
    border-radius: 22px;
    border: 1.5px solid rgba(244, 148, 4, 0.18);
    padding: 1.2rem 1rem 1rem 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 650px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    margin-bottom: 1rem;
    max-height: 550px;
} 