:root {
    --noir: #171717;
    --bordeaux: #5a0d1a;
    --jaune: #D4880a;
    --beige: #c6ac8f;
    --ivoire: #e8d9c4;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
}

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

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8d9c4 100%);
    color: var(--noir);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    overflow-x: hidden;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .container {
        padding: 0 2rem;
    }
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 280px);
    padding: 2rem 0;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    margin: 1rem auto;
    max-width: 1200px;
    border-radius: 10px;
    border-left: 4px solid;
    animation: slideIn 0.3s ease;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.alert i {
    font-size: 1.5rem;
}

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

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #dc3545;
}

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

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--bordeaux) 0%, var(--jaune) 100%);
    border-radius: 20px;
    color: white;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-lg);
}

.hero h1 {
    font-size: clamp(1.5rem, 4.5vw, 2.5rem);
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    text-align: center;
    max-width: 100%;
}

.hero .lead {
    font-size: clamp(0.95rem, 2.2vw, 1.2rem);
    line-height: 1.5;
    text-align: center;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: var(--shadow);
    text-align: center;
}

.btn i {
    font-size: 1.1rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary {
    background: linear-gradient(135deg, var(--bordeaux) 0%, #7a1523 100%);
    color: var(--ivoire);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #7a1523 0%, var(--bordeaux) 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--jaune) 0%, #e59b1a 100%);
    color: var(--noir);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #e59b1a 0%, var(--jaune) 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-sizing: border-box;
    overflow: hidden;
    word-wrap: break-word;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    transition: all 0.3s;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
    border-color: var(--jaune) !important;
}

.card-title {
    color: var(--bordeaux);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: bold;
}

/* Correction globale des titres */
h1, h2, h3, h4, h5, h6 {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    max-width: 100%;
    line-height: 1.3;
}

/* Titres dans les cartes */
.card h1,
.card h2,
.card h3,
.card h4 {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    max-width: 100%;
    text-align: center;
}

.card h1 {
    font-size: clamp(1.3rem, 3.5vw, 2rem);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.card h2 {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    line-height: 1.3;
    margin-bottom: 1rem;
}

.card h3 {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    line-height: 1.4;
    margin-bottom: 0.8rem;
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .grid {
        gap: 1.5rem;
        grid-template-columns: 1fr;
    }
}

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

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--noir);
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--beige);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--bordeaux);
    box-shadow: 0 0 0 3px rgba(90, 13, 26, 0.1);
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Footer */
.main-footer {
    background: linear-gradient(135deg, var(--noir) 0%, var(--bordeaux) 100%);
    color: var(--ivoire);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h3, .footer-col h4 {
    color: var(--jaune);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: var(--ivoire);
    text-decoration: none;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-col a:hover {
    color: var(--jaune);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(198, 172, 143, 0.3);
}

/* Badge */
.badge {
    background: linear-gradient(135deg, var(--bordeaux) 0%, var(--jaune) 100%);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    box-shadow: var(--shadow);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

table th {
    background: linear-gradient(135deg, var(--bordeaux) 0%, #7a1523 100%);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

table td {
    padding: 1rem;
    border-bottom: 1px solid var(--ivoire);
}

table tr:hover {
    background: rgba(232, 217, 196, 0.3);
}

table tr:last-child td {
    border-bottom: none;
}

/* Action Buttons Container */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Features Section */
.features {
    margin: 3rem 0;
}

.features h2 {
    text-align: center;
    color: var(--bordeaux);
    font-size: 2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: linear-gradient(135deg, var(--bordeaux), var(--jaune));
    color: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px) scale(1.02);
}

.stat-card h3 {
    margin: 0;
    font-size: 3rem;
    font-weight: bold;
}

.stat-card p {
    margin: 0.5rem 0 0 0;
    opacity: 0.95;
    font-size: 1.1rem;
}

/* Scroll to top button */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, var(--bordeaux), var(--jaune));
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s;
    opacity: 0;
    visibility: hidden;
    border: none;
    font-size: 1.5rem;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px) scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero .lead {
        font-size: 1.1rem;
    }
    
    .stat-card h3 {
        font-size: 2rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card, .alert {
    animation: fadeIn 0.5s ease;
}
