.adj-usado {
    background-color: #c8f7c5;
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: bold;
}

#contadorAdjetivos {
    margin-top: 8px;
    font-weight: bold;
    font-size: 16px;
}

.btn-consigna {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-consigna:hover {
    background: #005fcc;
}

#zoneHistoire {
    display: block;
    margin: 20px auto;
    width: 80%;
    max-width: 700px;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    font-size: 1.1rem;
    line-height: 1.6;
    background: #fff;
    text-align: left;
}

/* Bulle style iOS */
.cube {
    position: relative;
}

.cube:hover::after {
    content: attr(data-info);
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 12px 16px;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    white-space: pre-line;
    font-size: 14px;
    color: #333;
    z-index: 20;
    width: max-content;
    max-width: 200px;
    text-align: left;
    opacity: 0;
    animation: fadeInTooltip 0.25s forwards ease-out;
}

@keyframes fadeInTooltip {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(110%);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(100%);
    }
}

body {
    font-family: Arial, sans-serif;
    background: #f7f7f7;
    text-align: center;
    padding: 40px;
}

#cubes {
    display: grid;
    grid-template-columns: repeat(3, 120px);
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.cube {
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    font-size: 18px;
}

.emoji {
    font-size: 45px;
}

button, select {
    padding: 12px 20px;
    font-size: 18px;
    border-radius: 8px;
    border: none;
    margin: 10px;
}

button {
    background: #ff7b00;
    color: white;
    cursor: pointer;
}

button:hover {
    background: #e56f00;
}

#consigneBox, #connecteurBox {
    padding: 15px;
    margin-top: 20px;
    border-radius: 10px;
    color: white;
    font-size: 18px;
    font-weight: bold;
}

.rgpd-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.rgpd-content {
    background: white;
    padding: 25px;
    width: 90%;
    max-width: 450px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
    animation: fadeIn 0.4s ease;
}

.rgpd-content h2 {
    margin-top: 0;
}

#rgpdBtn {
    margin-top: 15px;
    padding: 10px 20px;
    background: #1976d2;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
}

#rgpdBtn:hover {
    background: #0d47a1;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}

#reglaPopup .rgpd-content {
    text-align: justify;
}

.logo-neon {
    height: 140px;
    animation: neonPulse 2.5s infinite ease-in-out;
}

@keyframes neonPulse {
    0% {
        filter: drop-shadow(0 0 4px #00eaff) drop-shadow(0 0 8px #00eaff);
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 0 12px #00eaff) drop-shadow(0 0 20px #00eaff);
        transform: scale(1.04);
    }
    100% {
        filter: drop-shadow(0 0 4px #00eaff) drop-shadow(0 0 8px #00eaff);
        transform: scale(1);
    }
}

#consignaCompleta {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 10px;
}

#reglaBtn {
    position: sticky;
    bottom: 0;
    background: #3f51b5;
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    margin-top: 10px;
}

/* ============================================================
   STYLES – Correcteur IA
   ============================================================ */

#btnCorregir {
    background: linear-gradient(135deg, #1a237e, #3949ab);
    color: white;
    padding: 14px 28px;
    font-size: 17px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    margin-top: 12px;
    box-shadow: 0 4px 14px rgba(57, 73, 171, 0.4);
    transition: all 0.2s ease;
    display: none;
}

#btnCorregir:hover:not(:disabled) {
    background: linear-gradient(135deg, #283593, #5c6bc0);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(57, 73, 171, 0.5);
}

#btnCorregir:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

#correccionBox {
    display: none;
    margin: 20px auto;
    width: 80%;
    max-width: 700px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
    overflow: hidden;
    text-align: left;
    animation: fadeInCorreccion 0.4s ease;
}

@keyframes fadeInCorreccion {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.correccion-header {
    background: linear-gradient(135deg, #1a237e, #3949ab);
    color: white;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.correccion-title {
    font-size: 16px;
    font-weight: bold;
}

.btn-cerrar-correccion {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 5px 12px;
    cursor: pointer;
    font-size: 13px;
    margin: 0;
}

.btn-cerrar-correccion:hover {
    background: rgba(255,255,255,0.35);
}

.correccion-contenido {
    padding: 20px 25px;
}

.nivel-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 18px;
}

.nivel-A { background: #e8f5e9; color: #2e7d32; border: 2px solid #4caf50; }
.nivel-B { background: #fff8e1; color: #f57f17; border: 2px solid #ffc107; }
.nivel-C { background: #fce4ec; color: #c62828; border: 2px solid #f44336; }

.seccion-correccion {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f0f0f0;
}

.seccion-correccion h3 {
    margin: 0 0 8px 0;
    font-size: 15px;
    color: #333;
}

.seccion-correccion p,
.seccion-correccion ul {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #444;
}

.seccion-correccion ul {
    padding-left: 18px;
}

.seccion-correccion li {
    margin-bottom: 6px;
}

.error-original {
    background: #fce4ec;
    color: #c62828;
    padding: 1px 5px;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: line-through;
}

.error-correcto {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 1px 5px;
    border-radius: 4px;
    font-weight: bold;
}

.mensaje-final {
    background: linear-gradient(135deg, #e8eaf6, #f3f4ff);
    border-left: 4px solid #3949ab;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    color: #333;
    margin-top: 4px;
}

.mensaje-final p { margin: 0; }

.correccion-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px;
    color: #666;
    font-size: 15px;
}

.correccion-spinner {
    width: 36px;
    height: 36px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #3949ab;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 14px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}