/* style.css - Thème clair moderne et responsive */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --background-color: #f8f9fa;
    --card-background: #ffffff;
    --text-color: #343a40;
    --border-color: #ced4da;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--card-background);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

h1 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 5px;
}

.subtitle {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-size: 0.9em;
}

/* Contrôles (Langue et Contexte) */
.controls-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.control-group label {
    font-weight: bold;
    margin-right: 10px;
    color: var(--primary-color);
}

.radio-group {
    display: inline-flex;
    gap: 10px;
}

.radio-group input[type="radio"] {
    display: none;
}

.radio-group label {
    padding: 5px 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: normal;
    color: var(--text-color);
}

.radio-group input[type="radio"]:checked + label {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

/* Zones de texte */
.source-area, .translation-area {
    margin-bottom: 20px;
}

.source-area label, .translation-area label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
}

textarea {
    width: 100%;
    height: 250px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1em;
    font-family: var(--font-family);
    resize: vertical;
    transition: border-color 0.3s;
}

textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.translation-area textarea {
    background-color: #f1f1f1; /* Légèrement grisé pour readonly */
}

/* Barre de progression et de statut */
.status-bar-container {
    margin-bottom: 20px;
}

.progress-bar-wrapper {
    background-color: #e9ecef;
    border-radius: 5px;
    height: 10px;
    margin-bottom: 5px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--success-color);
    transition: width 0.4s ease;
}

.status-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
    color: var(--secondary-color);
}

#status-message {
    font-weight: bold;
}

/* Barre de boutons */
.buttons-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

button {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s, transform 0.1s;
}

button:hover {
    transform: translateY(-1px);
}

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

.btn-primary:hover {
    background-color: #0056b3;
}

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

.btn-secondary:hover {
    background-color: #5a6268;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
}

.link-style {
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
}

/* Modal */
.modal {
    display: none; /* Caché par défaut */
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4); /* Fond noir semi-transparent */
}

.modal-content {
    background-color: var(--card-background);
    margin: 15% auto; /* 15% du haut et centré */
    padding: 20px;
    border-radius: 10px;
    width: 80%; /* Largeur par défaut */
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.modal-content h2 {
    margin-top: 0;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.setting-item {
    margin-bottom: 15px;
}

.setting-item label {
    display: block;
    margin-bottom: 5px;
    font-weight: normal;
}

.setting-item input[type="number"],
.setting-item select {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

.setting-item input[type="checkbox"] {
    margin-right: 10px;
}

.session-info {
    font-size: 0.8em;
    color: var(--secondary-color);
    margin-top: 20px;
}

/* Responsive Design */
@media (min-width: 768px) {
    .source-area, .translation-area {
        width: 49%;
        display: inline-block;
    }
    .source-area {
        margin-right: 1%;
    }
    .translation-area {
        margin-left: 1%;
    }
    .controls-bar {
        justify-content: flex-start;
    }
    .buttons-bar {
        justify-content: space-between;
    }
}

@media (max-width: 767px) {
    .container {
        padding: 15px;
    }
    .controls-bar {
        flex-direction: column;
        gap: 10px;
    }
    .control-group {
        width: 100%;
    }
    .radio-group {
        flex-wrap: wrap;
    }
    .buttons-bar button {
        width: 100%;
    }
}
