fieldset {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    background: #f8f9fa;
}

legend {
    width: auto;
    padding: 0 0.5rem;
    margin-bottom: 0;
    font-size: 1rem;
    font-weight: 600;
}

.form-label {
    font-weight: 500;
    color: #495057;
}

.card-header h6 {
    color: #495057;
    font-weight: 600;
}

.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

.btn-group .btn:last-child {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

.leaflet-container {
    border-radius: 8px;
}

/* regies.php */
.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #6c757d;
}

.form-control-color {
    width: 60px;
    height: 38px;
    border-radius: 6px;
}

.modal-header {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}
/* fin regies.php */

/* detail.php */ 
.mission-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.mission-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transform: translate(50px, -50px);
}

.mission-info {
    position: relative;
    z-index: 1;
}

.mission-title {
    margin: 0 0 15px 0;
    font-size: 28px;
}

.mission-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.mission-detail-item {
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 10px;
}

.status-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    color: white;
    margin-bottom: 15px;
}

.status-badge-sm {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 11px;
    color: white;
    margin-left: 8px;
}

.status-planifiee { background: #ffc107; color: #333; }
.status-en_cours { background: #28a745; }
.status-terminee { background: #6c757d; }
.status-annulee { background: #dc3545; }
.status-assigne { background: #17a2b8; }
.status-confirme { background: #28a745; }
.status-presente { background: #20c997; }
.status-absent { background: #dc3545; }

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.section-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.section-title {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.benevole-list {
    display: grid;
    gap: 15px;
}

.benevole-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.benevole-item.has-conflict {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.benevole-info {
    flex: 1;
}

.benevole-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.benevole-details {
    font-size: 13px;
    color: #666;
}

.benevole-actions {
    display: flex;
    gap: 8px;
}

.available-benevoles {
    max-height: 400px;
    overflow-y: auto;
}

.available-benevole {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.benevole-tag:hover {
    background: #bbdefb !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.benevole-remove-btn:hover {
    color: #b71c1c !important;
    transform: scale(1.2);
}

/* Version responsive pour mobile */
@media (max-width: 768px) {
    .benevole-tag {
        font-size: 11px !important;
        padding: 3px 6px !important;
        margin: 1px !important;
    }
    
    .benevole-remove-btn {
        font-size: 9px !important;
        margin-left: 4px !important;
    }
}

.materiel-list {
    display: grid;
    gap: 15px;
}

.materiel-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.materiel-info {
    flex: 1;
}

.materiel-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.materiel-details {
    font-size: 13px;
    color: #666;
    margin-bottom: 3px;
}

.materiel-actions {
    display: flex;
    gap: 8px;
}

.available-materiels {
    max-height: 400px;
    overflow-y: auto;
}

.available-materiel {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.materiel-info-available {
    flex: 1;
}

/* CSS pour la modal d'assignation multiple */
.materiel-selection-item {
    transition: all 0.2s ease;
}

.materiel-selection-item:hover {
    background: #f0f8ff !important;
    transform: translateX(2px);
}

.materiel-checkbox {
    cursor: pointer;
}

.materiel-checkbox:checked + label {
    color: #1976d2;
    font-weight: 500;
}

#materiels-list {
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

#materiels-list::-webkit-scrollbar {
    width: 6px;
}

#materiels-list::-webkit-scrollbar-track {
    background: transparent;
}

#materiels-list::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
    margin-left: 5px;
}

/* Animation pour les éléments sélectionnés */
.materiel-selection-item input[type="number"]:not(:disabled) {
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
    animation: pulse 2s infinite;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.progress {
    height: 0.5rem;
    background-color: #e9ecef;
    border-radius: 0.25rem;
}

.btn-group-sm > .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: #495057;
    background-color: #f8f9fa;
}

.table-hover tbody tr:hover {
    background-color: rgba(0,0,0,.025);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-header h1 {
    margin: 0;
    color: #212529;
}

.dashboard-header > div {
    display: flex;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        text-align: center;
    }
    
    .btn-group-sm {
        flex-direction: column;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

.icon-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.icon-btn {
    min-width: 45px;
    min-height: 45px;
    border: 2px solid #dee2e6;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.icon-btn.btn-primary {
    border-color: #0d6efd;
    background-color: #0d6efd;
    color: white;
    transform: scale(1.15);
}

/* Style pour l'affichage de l'icône dans le tableau */
.table td:first-child {
    vertical-align: middle;
    background-color: #f8f9fa;
}

/* Animation pour la sélection d'icône */
@keyframes iconSelect {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1.15); }
}

.icon-btn.btn-primary {
    animation: iconSelect 0.3s ease-out;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2); }
    50% { box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1); }
    100% { box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2); }
}

#assignButton:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#assignButton:not(:disabled) {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#assignButton:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .materiel-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .available-materiel {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

.materiel-assignment {
    transition: all 0.3s ease;
}

.materiel-assignment:hover {
    background-color: #f8f9fa;
}

.materiel-info {
    background-color: #e3f2fd;
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 3px solid #2196f3;
}

.materiel-select:focus,
.quantite-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.remove-materiel:hover {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}

/* Animation pour l'ajout d'éléments */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.materiel-assignment {
    animation: slideInDown 0.3s ease-out;
}

/*.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}*/

.stat-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.conflict-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 10px;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 12px;
}

.btn {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    cursor: pointer;
    border: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
}


.btn-primary { background: #0d6efd; color: white; } /*#667eea;*/
.btn-success { background: #28a745; color: white; }
.btn-warning { background: #ffc107; color: #333; }
.btn-danger { background: #dc3545; color: white; }
.btn-secondary { background: #6c757d; color: white; }

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .mission-details {
        grid-template-columns: 1fr;
    }
    
    .benevole-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .benevole-actions {
        width: 100%;
        justify-content: center;
    }
}
/* fin de detail.php */

details summary {
    transition: all 0.2s ease;
}

details[open] summary {
    margin-bottom: 8px;
}

details summary:hover {
    background-color: rgba(255, 193, 7, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
}