/* --- CSS Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- Variables de couleurs --- */
:root {
    --primary-green: #16a34a;
    --primary-green-hover: #15803d;
    --primary-green-light: #22c55e;
    --primary-blue: #3b82f6;
    --primary-blue-hover: #2563eb;
    --primary-red: #ef4444;
    --primary-red-hover: #dc2626;
    --primary-orange: #f97316;
    --primary-orange-hover: #ea580c;
    --primary-yellow: #eab308;
    --primary-yellow-hover: #ca8a04;
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-card-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* --- Typography --- */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1f2937;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 700;
}

/* --- Containers --- */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* --- Cards --- */
.card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-card-hover);
}

/* --- Formulaires --- */
input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select {
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

/* --- Boutons de vote --- */
.vote-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.vote-btn:hover {
    transform: scale(1.05);
}

.vote-btn:active {
    transform: scale(0.95);
}

/* --- Score display --- */
.vote-count {
    font-weight: 700;
    font-size: 1.25rem;
    color: #16a34a;
}

.score-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-weight: 700;
}

.score-positive {
    background: linear-gradient(to right, #dcfce7, #f0fdf4);
    color: #15803d;
    border: 1px solid #86efac;
}

.score-neutral {
    background: linear-gradient(to right, #f3f4f6, #f9fafb);
    color: #374151;
    border: 1px solid #d1d5db;
}

.score-negative {
    background: linear-gradient(to right, #fee2e2, #fef2f2);
    color: #dc2626;
    border: 1px solid #fca5a5;
}

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

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

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.animate-slide-in {
    animation: slideIn 0.3s ease-out forwards;
}

/* --- Message flash --- */
.flash-message {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    animation: fadeIn 0.3s ease-out;
}

.flash-success {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #15803d;
}

.flash-error {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #dc2626;
}

.flash-warning {
    background: #fef3c7;
    border: 1px solid #fde047;
    color: #ca8a04;
}

/* --- Tableau admin --- */
.table-admin {
    width: 100%;
    border-collapse: collapse;
}

.table-admin thead th {
    background: linear-gradient(to right, #16a34a, #22c55e);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.table-admin tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.2s ease;
}

.table-admin tbody tr:hover {
    background: #f9fafb;
}

.table-admin tbody td {
    padding: 1rem;
    color: #374151;
}

/* --- Stats badges --- */
.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.stat-badge.green {
    background: #dcfce7;
    color: #15803d;
}

.stat-badge.blue {
    background: #dbeafe;
    color: #2563eb;
}

.stat-badge.red {
    background: #fee2e2;
    color: #dc2626;
}

.stat-badge.yellow {
    background: #fef3c7;
    color: #ca8a04;
}

.stat-badge.purple {
    background: #ede9fe;
    color: #7c3aed;
}

/* --- Gradients --- */
.gradient-green {
    background: linear-gradient(to right, #16a34a, #22c55e);
}

.gradient-blue {
    background: linear-gradient(to right, #3b82f6, #60a5fa);
}

.gradient-red {
    background: linear-gradient(to right, #ef4444, #f87171);
}

.gradient-orange {
    background: linear-gradient(to right, #f97316, #fb923c);
}

/* --- Grilles --- */
.grid-suggestions {
    display: grid;
    gap: 1.5rem;
}

/* --- Footer --- */
footer {
    background: white;
    border-top: 1px solid #e5e7eb;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .vote-btn {
        padding: 0.5rem 0.75rem;
    }
    
    .card {
        border: none;
    }
}