/* Nouveau design moderne */
:root {
    --primary-color: #2c5282;
    --secondary-color: #4299e1;
    --success-color: #38a169;
    --warning-color: #ed8936;
    --danger-color: #e53e3e;
    --light-color: #f7fafc;
    --dark-color: #2d3748;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

body {
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

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

/* Header avec logo */
.header {
    background: white;
    box-shadow: var(--shadow);
    padding: 15px 0;
    margin-bottom: 30px;
    border-bottom: 3px solid var(--primary-color);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    height: 80px;
    width: auto;
}

.university-info h1 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.university-info p {
    color: #4a5568;
    font-size: 14px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
    border-radius: 10px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Z" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: cover;
}

.hero h1 {
    font-size: 36px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.hero p {
    font-size: 18px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Search Section */
.search-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.search-section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

.search-container {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.search-container input {
    flex: 1;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.search-container input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.search-container button {
    padding: 15px 30px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.search-container button:hover {
    background: #2c5282;
}

/* Concours Cards */
.concours-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.concours-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border-color);
}

.concours-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.concours-card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 20px;
}

.concours-card-header h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.concours-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.concours-meta span {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.concours-card-body {
    padding: 25px;
}

.concours-description {
    color: #4a5568;
    margin-bottom: 20px;
    line-height: 1.7;
}

.concours-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
}

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

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.concours-actions {
    display: flex;
    gap: 10px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-size: 15px;
}

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

.btn-primary:hover {
    background: #2a4365;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #2f855a;
}

.btn-print {
    background: #4a5568;
    color: white;
    padding: 10px 20px;
}

.btn-print:hover {
    background: #2d3748;
}

/* Results Table */
.results-container {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 30px;
}

.results-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 25px;
}

.results-header h2 {
    margin-bottom: 10px;
}

.results-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.results-table-container {
    overflow-x: auto;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.results-table th {
    background: #f7fafc;
    padding: 18px 15px;
    text-align: left;
    font-weight: 600;
    color: #4a5568;
    border-bottom: 2px solid var(--border-color);
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
}

.results-table td {
    padding: 16px 15px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.results-table tbody tr:hover {
    background: #f7fafc;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    min-width: 120px;
}

.status-admis {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.status-liste-attente {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #fc8181;
}

.status-non-admis {
    background: #e2e8f0;
    color: #4a5568;
    border: 1px solid #cbd5e0;
}

/* Print Styles */
@media print {
    .header, .search-section, .concours-grid, .btn-print, footer {
        display: none !important;
    }
    
    body {
        background: white !important;
        font-size: 12pt;
    }
    
    .results-table {
        border: 1px solid #000;
    }
    
    .results-table th {
        background: #ddd !important;
        -webkit-print-color-adjust: exact;
    }
}

/* Footer */
footer {
    background: var(--dark-color);
    color: white;
    padding: 40px 0;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #e2e8f0;
}

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

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #cbd5e0;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid #4a5568;
    color: #a0aec0;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .logo-container {
        justify-content: center;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .concours-grid {
        grid-template-columns: 1fr;
    }
    
    .concours-stats {
        grid-template-columns: 1fr;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Modal pour l'impression */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #718096;
}