/* Fichier style.css amélioré pour le validateur JSON */

/* === Variables de couleur === */
:root {
    --primary-color: #00e676;
    --primary-dark: #2e7d32;
    --primary-light: #76ff03;
    --accent-color: #3d5afe;
    --background-dark: #1c1c1c;
    --background-light: #2e2e2e;
    --text-light: #e0e0e0;
    --text-medium: #9e9e9e;
    --error-color: #f44336;
    --warning-color: #ff9800;
    --success-color: #00e676;
}

/* === Styles globaux === */
body {
    font-family: 'Roboto', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #2b2b2b, #1c1c1c);
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    line-height: 1.6;
}

/* === Container === */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
    background: var(--background-light);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    color: var(--text-light);
}

/* === Titres === */
h1, h2, h3 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 700;
}

h1 {
    font-size: 2.5rem;
    text-shadow: 0 3px 10px rgba(0, 255, 100, 0.5);
    position: relative;
    padding-bottom: 15px;
}

h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

h2 {
    font-size: 1.8rem;
    margin-top: 25px;
    text-shadow: 0 2px 5px rgba(0, 255, 100, 0.4);
}

h3 {
    font-size: 1.5rem;
    color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* === Panneau d'information === */
.info-panel {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.info-panel p {
    text-align: center;
    color: var(--text-medium);
    margin-bottom: 20px;
}

.features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 230, 118, 0.1);
    padding: 10px 15px;
    border-radius: 50px;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 8px rgba(0, 0, 0, 0.4);
    background: rgba(0, 230, 118, 0.2);
}

.feature-icon {
    font-size: 1.2rem;
}

.feature-text {
    font-weight: 500;
}

/* === Bouton de retour === */
.back-button-container {
    text-align: center;
    margin: 20px 0;
}

.back-button {
    padding: 8px 15px;
    background-color: var(--background-dark);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    border: 1px solid var(--primary-dark);
}

.back-button:hover {
    background-color: var(--primary-dark);
    color: white;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.back-button::before {
    content: '←';
    margin-right: 8px;
    font-size: 1.1rem;
}

/* === Formulaire === */
form {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.file-input-container {
    width: 100%;
    max-width: 500px;
    position: relative;
}

label {
    font-size: 1.1rem;
    display: block;
    margin-bottom: 10px;
    color: var(--text-medium);
    font-weight: 500;
    text-align: center;
}

input[type="file"] {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    border: 2px dashed var(--primary-light);
    background: var(--background-dark);
    color: var(--text-medium);
    border-radius: 10px;
    outline: none;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

input[type="file"]:hover, 
input[type="file"]:focus {
    background: rgba(46, 125, 50, 0.2);
    border-color: var(--primary-color);
    color: white;
}

/* === Boutons === */
button {
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 12px 35px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 50px;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(0, 255, 100, 0.3);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

button:hover {
    background: linear-gradient(90deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 255, 100, 0.5);
}

button:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 255, 100, 0.4);
}

button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 300%;
    height: 300%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: transform 0.6s ease;
    z-index: 0;
}

button:hover::before {
    transform: translate(-50%, -50%) scale(1);
}

/* Boutons d'action secondaires */
.btn-action {
    background: linear-gradient(90deg, var(--accent-color), #304ffe);
    padding: 10px 25px;
    margin: 10px;
    font-size: 0.95rem;
}

.btn-action:hover {
    background: linear-gradient(90deg, #304ffe, var(--accent-color));
}

/* Boutons de contrôle de l'éditeur */
.editor-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.control-button {
    background: var(--background-dark);
    color: var(--text-light);
    border: 1px solid var(--primary-dark);
    padding: 8px 15px;
    font-size: 0.9rem;
    border-radius: 5px;
    box-shadow: none;
    text-transform: none;
    letter-spacing: normal;
}

.control-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.3);
}

/* === Éditeur === */
.editor-container {
    margin: 30px 0;
    position: relative;
}

.editor-status {
    font-size: 0.9rem;
    color: var(--text-medium);
    font-weight: normal;
    margin-left: 10px;
}

#editor {
    height: 500px;
    border: 2px solid var(--primary-dark);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    background: var(--background-dark);
    transition: all 0.3s ease;
    position: relative;
}

#editor:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 5px 20px rgba(0, 255, 100, 0.3);
}

/* CodeMirror styling */
.CodeMirror {
    height: 100%;
    font-size: 16px;
    font-family: 'Fira Code', 'Consolas', monospace;
    line-height: 1.6;
    background: var(--background-dark);
}

.CodeMirror-gutters {
    background: rgba(0, 0, 0, 0.3);
    border-right: 1px solid rgba(0, 230, 118, 0.2);
}

.CodeMirror-linenumber {
    color: var(--text-medium);
}

/* Highlight pour erreurs */
.CodeMirror .line-error {
    background-color: rgba(244, 67, 54, 0.2);
    position: relative;
}

.CodeMirror .line-error::after {
    content: '⚠';
    position: absolute;
    right: 10px;
    color: var(--error-color);
    font-size: 1.2rem;
    opacity: 0.8;
}

.CodeMirror-lint-markers {
    width: 20px;
}

.CodeMirror-lint-marker-error {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f44336' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");
    background-size: contain;
    margin-left: 2px;
}

/* === Résultats === */
#result {
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    background: var(--background-dark);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

#result.hidden {
    display: none;
}

/* Message de succès */
.success-message {
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    background: rgba(0, 230, 118, 0.1);
    border: 1px solid var(--primary-dark);
    margin-bottom: 20px;
}

/* Bloc d'erreur */
.error-block {
    background: rgba(244, 67, 54, 0.1);
    border-left: 4px solid var(--error-color);
    padding: 15px;
    margin: 15px 0;
    border-radius: 0 10px 10px 0;
    transition: all 0.3s ease;
}

.error-block:hover {
    background: rgba(244, 67, 54, 0.15);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.error-context {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    padding: 15px;
    margin-top: 10px;
    overflow-x: auto;
    position: relative;
}

.error-context pre {
    margin: 0;
    font-family: 'Fira Code', 'Consolas', monospace;
    color: var(--text-light);
    font-size: 0.95rem;
    white-space: pre-wrap;
}

/* Boutons de correction */
.correction-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 25px 0;
}

/* Messages d'état */
.correction-success, 
.correction-error,
.correction-partial,
.correction-manual,
.format-success,
.format-error,
.correction-note {
    padding: 15px;
    margin: 15px 0;
    border-radius: 10px;
    text-align: center;
}

.correction-success, 
.format-success {
    background: rgba(0, 230, 118, 0.1);
    border: 1px solid var(--primary-dark);
}

.correction-error,
.format-error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid var(--error-color);
}

.correction-partial,
.correction-manual {
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid var(--warning-color);
}

.correction-note {
    background: rgba(0, 0, 0, 0.2);
    border: 1px dashed var(--text-medium);
    font-size: 0.9rem;
    color: var(--text-medium);
}

/* Classes utilitaires */
.success {
    color: var(--success-color);
    font-weight: bold;
}

.error {
    color: var(--error-color);
    font-weight: bold;
}

.warning {
    color: var(--warning-color);
    font-weight: bold;
}

/* Animation de traitement */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(0, 230, 118, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 230, 118, 0);
    }
}

.analyzing {
    animation: pulse 1.5s infinite;
}

/* === Media Queries === */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        width: 95%;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    #editor {
        height: 350px;
    }
    
    .features {
        flex-direction: column;
        align-items: center;
    }
    
    .correction-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    button, .btn-action {
        width: 100%;
        max-width: 300px;
    }
    
    .editor-controls {
        flex-wrap: wrap;
    }
    
    .control-button {
        flex: 1;
        min-width: 70px;
        padding: 8px 5px;
        font-size: 0.8rem;
        margin-bottom: 5px;
    }
}