/** @format */

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

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    padding: 40px 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.textarea-wrapper {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: bold;
}

#textareaTexteNonCorrige {
    width: 100%;
    min-height: 200px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    font-family: Arial, sans-serif;
    resize: none;
    transition: border-color 0.3s;
}

#textareaTexteNonCorrige:focus {
    outline: none;
    border-color: #4caf50;
}

.button-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.btn-corriger,
.btn-raccourcir,
.btn-developper,
.btn-style,
.btn-traduire,
.btn-generer {
    padding: 14px;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-corriger {
    background-color: #2196f3;
}

.btn-corriger:hover {
    background-color: #1976d2;
}

.btn-raccourcir {
    background-color: #ff9800;
}

.btn-raccourcir:hover {
    background-color: #f57c00;
}

.btn-developper {
    background-color: #9c27b0;
}

.btn-developper:hover {
    background-color: #7b1fa2;
}

.btn-style {
    background-color: #e91e63;
}

.btn-style:hover {
    background-color: #c2185b;
}

.btn-traduire {
    background-color: #4caf50;
}

.btn-traduire:hover {
    background-color: #45a049;
}

.btn-generer {
    background-color: #009688;
}

.btn-generer:hover {
    background-color: #00796b;
}

.translate-group {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: stretch;
}

.generate-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.select-langue {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    background: white;
    transition: border-color 0.3s;
}

.select-langue:focus {
    outline: none;
    border-color: #4caf50;
}

.translation-status {
    margin-top: 12px;
    min-height: 18px;
    font-size: 14px;
    color: #2e7d32;
}

.generated-block {
    margin-top: 20px;
}

#textareaSujetGen {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    resize: vertical;
    background-color: #fff;
    transition: border-color 0.3s;
}

#textareaSujetGen:focus {
    outline: none;
    border-color: #009688;
}


/* Overlay sombre */
#escape {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* Popup correction */
.propositionContainer {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 700px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    flex-direction: column;
}

/* Popup choix mots */
.choixMotsContainer {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    flex-direction: column;
}

/* Popup choix style */
.choixStyleContainer {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    flex-direction: column;
}

.popup-header {
    padding: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.popup-header h2 {
    color: #333;
    font-size: 20px;
}

.popup-content {
    padding: 20px;
}

.propositionContainer .popup-content {
    max-height: 400px;
    overflow-y: auto;
}

#textareaTexteCorrige {
    min-height: 150px;
    line-height: 1.6;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
}

#nombreMots {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    margin-top: 10px;
    transition: border-color 0.3s;
}

#nombreMots:focus {
    outline: none;
    border-color: #ff9800;
}

/* Style options */
.style-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.style-btn {
    padding: 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.style-btn:hover {
    border-color: #e91e63;
    background-color: #fef5f8;
    transform: translateY(-2px);
}

.style-btn.selected {
    border-color: #e91e63;
    background-color: #fce4ec;
    border-width: 3px;
}

.style-icon {
    font-size: 32px;
}

.style-name {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.popup-actions {
    padding: 20px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.btn-refuser,
.btn-accepter {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-refuser {
    background-color: #f44336;
    color: white;
}

.btn-refuser:hover {
    background-color: #d32f2f;
}

.btn-accepter {
    background-color: #4caf50;
    color: white;
}

.btn-accepter:hover {
    background-color: #45a049;
}
