/* Styles communs pour toutes les pages */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #f5f6fa;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: clamp(1.5rem, 4vw, 2rem);
}

.header p {
    color: #7f8c8d;
    font-size: clamp(1rem, 3vw, 1.1em);
}

.info-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: center;
    font-size: clamp(0.9rem, 2.5vw, 1.1em);
    color: #2c3e50;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.form-group input:focus,
.form-group select:focus {
    border-color: #3498db;
    outline: none;
}

.btn-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    width: 60%;
    max-width: 300px;
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    cursor: pointer;
    transition: background 0.3s;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.error {
    color: #e74c3c;
    margin-top: 10px;
    display: none;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}

/* Styles pour les tableaux responsifs */
.table-container {
    overflow-x: auto;
    margin-bottom: 30px;
    -webkit-overflow-scrolling: touch;
}

.table-container table {
    min-width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.table-container th,
.table-container td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}

.table-container th {
    background: #f8f9fa;
    font-weight: 500;
    color: #2c3e50;
    position: sticky;
    top: 0;
    z-index: 1;
}

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

.total-row {
    background: #f8f9fa;
    font-weight: 500;
}

.total-row td {
    border-top: 2px solid #ddd;
}

/* Styles pour les statistiques des modèles */
.model-stats {
    margin: 15px 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    font-size: 0.9em;
    color: #7f8c8d;
}

.model-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px;
    background: #f8f9fa;
    border-radius: 4px;
}

/* Styles pour les modales */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background: white;
    width: 90%;
    max-width: 500px;
    margin: 50px auto;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-title {
    font-size: clamp(1.2rem, 3vw, 1.5em);
    color: #2c3e50;
    margin: 0;
}

.close-modal {
    font-size: 1.5em;
    cursor: pointer;
    color: #7f8c8d;
}

.close-modal:hover {
    color: #2c3e50;
}

.modal-body {
    margin-bottom: 20px;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.modal-footer {
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* Styles pour les cartes de modèles */
.model-list {
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
}

.model-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.model-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.model-card.processed {
    border-left: 4px solid #2ecc71;
}

/* Styles pour les barres de progression */
.progress-box {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.progress-box h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.progress-bar {
    background: #eee;
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    background: #3498db;
    height: 100%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    color: #7f8c8d;
    margin: 0;
}

/* Styles pour la grille de modèles */
.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.model-card h3 {
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-size: 1.2em;
}

/* Media queries pour la responsivité */
@media (max-width: 768px) {
    .table-container {
        margin: 0 -20px;
        padding: 0 20px;
    }

    .model-stats {
        grid-template-columns: 1fr;
    }

    .table-container th,
    .table-container td {
        padding: 8px;
        font-size: 0.9em;
    }

    .btn-container {
        flex-direction: column;
        gap: 10px;
    }

    .btn {
        width: 100%;
    }

    .model-stats {
        flex-direction: column;
        gap: 8px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 20px auto;
        padding: 20px;
    }

    .models-grid {
        grid-template-columns: 1fr;
    }

    .model-stats {
        grid-template-columns: 1fr;
    }
}

.form-container {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.model-form {
    max-width: 600px;
    margin: 0 auto;
}

.selected-models {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-top: 30px;
}

.selected-models h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    text-align: center;
}

.btn-sm {
    padding: 8px 15px;
    font-size: 0.9em;
    width: 100%;
    margin-top: 10px;
}

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

.btn-danger:hover {
    background: #c0392b;
}

/* Styles pour le select */
select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5em;
}

.success {
    display: block;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .form-container,
    .selected-models {
        padding: 20px;
    }

    .btn-sm {
        padding: 6px 12px;
        font-size: 0.8em;
    }
} 