:root {
    /* Colors */
    --primary-color: #5d80b6;  /* Bleu plus vif */
    --primary-dark: #4a6fa5;   /* Bleu plus foncé */
    --primary-light: #e8f0fe;  /* Bleu très clair pour les fonds */
    --secondary-color: #6c757d; /* Gris pour les boutons secondaires */
    --success-color: #2ecc71;  /* Vert plus moderne */
    --danger-color: #e74c3c;   /* Rouge plus vif */
    --warning-color: #f39c12;  /* Orange plus chaud */
    --info-color: #3498db;     /* Bleu ciel */
    --light-color: #f8f9fa;    /* Gris très clair */
    --dark-color: #2c3e50;     /* Bleu nuit plus profond */
    --white: #ffffff;          /* Blanc pur */
    --text-color: #2c3e50;     /* Couleur de texte principale */
    --border-color: #e0e6ed;   /* Couleur de bordure plus douce */
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    /* Border radius */
    --border-radius-sm: 4px;
    --border-radius: 6px;
    --border-radius-lg: 8px;
    
    /* Box shadow */
    --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --box-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --box-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition: all 0.3s ease;
    
    /* Back to top button */
    --back-to-top-size: 2.5rem;
    --back-to-top-offset: 2rem;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    height: 100%;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

/* Back to top button */
#back-to-top {
    position: fixed;
    bottom: -60px;
    right: var(--back-to-top-offset);
    width: var(--back-to-top-size);
    height: var(--back-to-top-size);
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 999;
    transform: translateY(20px);
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
    bottom: var(--back-to-top-offset);
    transform: translateY(0);
}

#back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

#back-to-top i {
    font-size: 1.25rem;
    transition: var(--transition);
}

#back-to-top:hover i {
    transform: translateY(-2px);
}

/* Newsletter Form */
.newsletter-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.newsletter-form input[type="email"] {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.2);
}

/* Bouton de la newsletter */
.btn-newsletter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.btn-newsletter:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-newsletter:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-newsletter .btn-icon {
    transition: transform 0.3s ease;
}

.btn-newsletter:hover .btn-icon {
    transform: translateX(3px);
}

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
}

.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.btn-primary {
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Style spécifique pour le bouton Nouvelle intervention */
#newInterventionBtn {
    background-color: #28a745; /* Vert */
    border-color: #28a745;
}

#newInterventionBtn:hover {
    background-color: #218838; /* Vert plus foncé au survol */
    border-color: #1e7e34;
}

.btn-secondary {
    color: var(--white);
    background: linear-gradient(135deg, #6c757d, #5a6268);
    border: none;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268, #6c757d);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

.btn-outline {
    color: var(--primary-color);
    background-color: transparent;
    border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    color: var(--white);
    background-color: var(--primary-color);
}

.btn-text {
    background: none;
    border: none;
    color: var(--primary-color);
    padding: 0.25rem 0.5rem;
}

.btn-text:hover {
    background-color: rgba(74, 111, 165, 0.1);
    border-radius: var(--border-radius);
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: var(--white);
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Cards */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: var(--white);
    background-clip: border-box;
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: var(--spacing-md);
}

.card-body {
    flex: 1 1 auto;
    padding: var(--spacing-md);
}

.card-title {
    margin-bottom: var(--spacing-md);
    font-size: 1.25rem;
}

/* Dashboard header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #0976e3;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dashboard-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn .icon {
    margin-right: 0.5rem;
    font-size: 1.1em;
    vertical-align: middle;
}

/* Alerts */
.alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: #6c757d !important;
}

.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }

.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

/* Responsive images */
.img-fluid {
    max-width: 100%;
    height: auto;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .hide-on-mobile {
        display: none !important;
    }
}
