/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Page de connexion */
.login-box {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
    max-width: 450px;
    margin: 50px auto;
}

.login-box .header {
    text-align: center;
    margin-bottom: 30px;
}

.login-box .header h1 {
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.login-box .header .subtitle {
    color: #666;
    font-size: 1.1em;
}

.login-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.info-box {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.info-box p {
    margin-bottom: 8px;
    color: #555;
}

.info-box p:last-child {
    margin-bottom: 0;
}

/* Header principal */
.main-header {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 20px 30px;
    margin-bottom: 20px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.main-header h1 {
    color: #667eea;
    font-size: 1.8em;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.user-info span {
    color: #555;
}

/* Barre de statistiques */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-value {
    font-size: 2.5em;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
}

.stat-label {
    color: #666;
    font-size: 1.1em;
    font-weight: 600;
}

/* Contenu principal */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.card h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

/* Formulaires */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.participant-form {
    margin-top: 20px;
}

/* Boutons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-large {
    padding: 15px 30px;
    font-size: 18px;
    width: 100%;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

/* Alertes */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* Tableaux */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.data-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.summary-row {
    background: #f8f9fa;
    font-weight: bold;
}

.summary-row td {
    padding: 15px;
    border-top: 2px solid #667eea;
}

.empty-message {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 1.1em;
}

/* Logo section */
.logo-section h1 {
    margin: 0;
    font-size: 1.8em;
    color: #667eea;
}

.event-info {
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
}

.user-name {
    color: #555;
    font-weight: 600;
    margin-right: 10px;
}

/* Card améliorée */
.registration-card {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.card-icon {
    font-size: 3em;
    text-align: center;
    margin-bottom: 10px;
}

.card-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1em;
}

/* Form sections */
.form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.form-section-title {
    color: #667eea;
    font-size: 1.2em;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.label-icon {
    margin-right: 5px;
}

.form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-icon {
    font-size: 1.2em;
}

/* Liste améliorée */
.list-header {
    background: white;
    border-radius: 15px;
    padding: 20px 30px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.list-stats {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.list-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.list-stat-value {
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
}

.list-stat-label {
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
}

.list-card {
    padding: 0;
    overflow: hidden;
}

.table-wrapper {
    overflow-x: auto;
}

.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.modern-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modern-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.modern-table tbody tr {
    transition: all 0.2s;
}

.modern-table tbody tr:hover {
    background: #f0f4ff;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.modern-table td {
    padding: 15px;
    border-bottom: 1px solid #e8e8e8;
}

.numero-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1em;
    min-width: 50px;
    text-align: center;
}

.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-secondary {
    background: #e2e3e5;
    color: #383d41;
}

.text-muted {
    color: #999;
    font-style: italic;
}

.contact-link {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s;
}

.contact-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.whatsapp-link {
    color: #25d366;
}

.whatsapp-link:hover {
    color: #128c7e;
}

.date-cell {
    color: #666;
    font-size: 0.9em;
}

.vendeur-badge {
    display: inline-block;
    padding: 5px 10px;
    background: #f0f0f0;
    border-radius: 5px;
    font-size: 0.85em;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 5em;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.empty-state p {
    color: #666;
    margin-bottom: 20px;
}

/* Responsive Mobile */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        max-width: 100%;
        padding: 0 10px;
    }
    
    .login-box {
        padding: 25px 15px;
        margin: 20px auto;
        max-width: 100%;
    }
    
    .login-box .header h1 {
        font-size: 2em;
    }
    
    .main-header {
        padding: 15px 20px;
        border-radius: 10px;
    }
    
    .main-header h1 {
        font-size: 1.3em;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .logo-section h1 {
        font-size: 1.4em;
    }
    
    .user-info {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .user-name {
        font-size: 0.9em;
        margin-right: 5px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .btn-small {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .btn-outline {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .stats-bar {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px 15px;
    }
    
    .stat-value {
        font-size: 2em;
    }
    
    .stat-label {
        font-size: 0.9em;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-section {
        padding: 15px;
    }
    
    .form-group input,
    .form-group select {
        padding: 10px 12px;
        font-size: 16px;
    }
    
    .data-table {
        font-size: 12px;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table thead,
    .data-table tbody,
    .data-table tr {
        display: table;
        width: 100%;
        table-layout: fixed;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 5px;
        word-wrap: break-word;
    }
    
    .modern-table {
        font-size: 11px;
    }
    
    .modern-table th,
    .modern-table td {
        padding: 10px 5px;
    }
    
    .card {
        padding: 20px 15px;
        border-radius: 10px;
    }
    
    .card h2 {
        font-size: 1.3em;
    }
    
    .list-header {
        padding: 15px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .list-stats {
        width: 100%;
        justify-content: space-around;
        gap: 15px;
    }
    
    .list-stat-value {
        font-size: 1.5em;
    }
    
    .registration-card {
        padding: 20px 15px;
    }
    
    .card-icon {
        font-size: 2.5em;
    }
    
    .card-subtitle {
        font-size: 1em;
    }
    
    .form-section-title {
        font-size: 1.1em;
    }
    
    .btn-large {
        padding: 12px 20px;
        font-size: 16px;
    }
    
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -15px;
        padding: 0 15px;
    }
    
    .numero-badge {
        padding: 6px 10px;
        font-size: 1em;
        min-width: 40px;
    }
    
    .badge {
        padding: 4px 8px;
        font-size: 0.75em;
    }
}

/* Très petits écrans */
@media (max-width: 480px) {
    body {
        padding: 5px;
    }
    
    .login-box {
        padding: 20px 15px;
    }
    
    .login-box .header h1 {
        font-size: 1.8em;
    }
    
    .main-header {
        padding: 12px 15px;
    }
    
    .logo-section h1 {
        font-size: 1.2em;
    }
    
    .event-info {
        font-size: 0.8em;
    }
    
    .user-info {
        flex-direction: column;
        width: 100%;
    }
    
    .user-name {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .btn-outline {
        width: auto;
    }
    
    .stats-bar {
        gap: 10px;
    }
    
    .stat-card {
        padding: 15px;
        flex-direction: column;
        text-align: center;
    }
    
    .stat-value {
        font-size: 1.8em;
    }
    
    .card {
        padding: 15px 10px;
    }
    
    .card h2 {
        font-size: 1.2em;
    }
    
    .form-section {
        padding: 12px;
    }
    
    .data-table {
        font-size: 11px;
    }
    
    .data-table th,
    .data-table td {
        padding: 6px 3px;
    }
    
    .list-stat-value {
        font-size: 1.3em;
    }
    
    .list-stat-label {
        font-size: 0.8em;
    }
}