* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
}

/* Animations globales */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
}

/* Mobile-First Optimisations */
@media (max-width: 1024px) {
    body {
        padding: 10px;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
    }
    
    h1 {
        font-size: 28px;
    }
    
    h2 {
        font-size: 22px;
    }
    
    h3 {
        font-size: 18px;
    }
    
    /* Augmenter les zones tactiles */
    button, a {
        min-height: 48px;
        min-width: 48px;
        padding: 15px 20px !important;
        font-size: 16px !important;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px;
        padding: 15px !important;
        min-height: 48px;
    }
}

/* Écrans très petits (< 480px) */
@media (max-width: 480px) {
    * {
        padding-left: 5px;
        padding-right: 5px;
    }
    
    body {
        font-size: 15px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    .container {
        padding: 10px;
    }
    
    button, a, .btn {
        padding: 12px 16px !important;
        font-size: 15px !important;
        min-height: 44px;
    }
    
    input, textarea, select {
        font-size: 16px !important;
        min-height: 44px;
    }
}

/* Landscape mode */
@media (max-height: 500px) and (orientation: landscape) {
    .header, .intro-text {
        padding: 15px !important;
    }
    
    button {
        padding: 10px 15px !important;
    }
}

/* Utilitaires */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

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

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-30 {
    margin-top: 30px;
}

.mb-30 {
    margin-bottom: 30px;
}

/* Ombres */
.shadow-sm {
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.shadow {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.shadow-lg {
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

/* Couleurs de gradient */
.gradient-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.gradient-secondary {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

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

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: bold;
}

tr:hover {
    background: #f9f9f9;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 8px rgba(102, 126, 234, 0.2);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.badge-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.badge-success {
    background: #2ecc71;
    color: white;
}

.badge-danger {
    background: #e74c3c;
    color: white;
}

.badge-warning {
    background: #f39c12;
    color: white;
}

/* Alertes */
.alert {
    padding: 15px;
    margin: 20px 0;
    border-radius: 8px;
    animation: slideUp 0.3s ease-out;
}

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

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

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

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease-out;
}

.modal.show {
    display: block;
}

/* Loader */
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Transition smooth */
* {
    transition: background-color 0.3s ease, color 0.3s ease;
}

button,
a {
    transition: all 0.3s ease;
}
