/* --- Styles de base --- */
body {
    background-image: url('images/fond_mission1.png');
    background-size: cover;
    background-position: center;
    font-family: 'Lora', serif;
    color: #e0dacc;
    margin: 0;
    overflow: hidden;
}
.mission-wrapper {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: rgba(26, 18, 11, 0.7);
}
h1, h2 { font-family: 'Cinzel', serif; color: #d4af37; }
em { color: #d4af37; font-style: normal; }

/* --- Écran de départ --- */
#start-screen { padding: 2rem; }
#start-mission-btn {
    background-color: #d4af37;
    color: #1a120b;
    border: none;
    padding: 15px 30px;
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
}
#start-mission-btn:hover { background-color: #e0dacc; }

/* --- Styles des Overlays --- */
.trial-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.5s ease-in-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.trial-content {
    background: #1a120b;
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid #4a3f35;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
}
.feedback-message { margin-top: 1rem; font-style: italic; min-height: 24px; }
.feedback-message.error { color: #dc3545; }
.feedback-message.success { color: #28a745; }

/* --- Modal de Zoom --- */
.zoom-modal-container {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
}
#zoom-content { max-width: 90vw; max-height: 90vh; display: flex; justify-content: center; align-items: center; }
#zoom-content svg, #zoom-content img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.close-zoom-btn {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}
.close-zoom-btn:hover { color: #bbb; }

/* --- Épreuve 1 : Taquin --- */
#taquin-container {
    width: 300px;
    height: 300px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    border: 2px solid #d4af37;
    margin: 1rem auto;
}
.taquin-tile {
    background-image: url('images/enigme_perspective.png');
    background-size: 300px 300px;
    border: 1px solid #4a3f35;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
}
.taquin-tile:hover { transform: scale(1.05); z-index: 10; }
.taquin-tile.empty { background-image: none; background-color: #111; cursor: default; }

/* --- Épreuve 2 : Couleurs --- */
.puzzle-double-container { display: flex; gap: 2rem; justify-content: center; align-items: flex-start; }
.puzzle-zone { text-align: center; }
#ciel-container-small svg { max-width: 250px; height: auto; border: 1px solid #4a3f35; }
#pots-container svg { max-width: 250px; height: auto; border: 1px solid #4a3f35; cursor: pointer; }
#pots-container path, #pots-container ellipse {
    fill: transparent;
    transition: fill 0.3s;
}
#pots-container path:hover, #pots-container ellipse:hover {
    fill: rgba(212, 175, 55, 0.4) !important;
}
#zoom-content #zone-secrete-ciel:hover {
    fill: rgba(255, 255, 0, 0.7) !important;
    cursor: pointer;
}
.inspect-button {
    margin-top: 1rem;
    background-color: transparent;
    border: 1px solid #d4af37;
    color: #d4af37;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s;
}
.inspect-button:hover { background-color: #d4af37; color: #1a120b; }

/* --- Épreuve 3 : Sfumato --- */
.image-container { display: flex; flex-direction: column; align-items: center; }
.trial-image { max-width: 300px; margin-bottom: 0; border-radius: 5px; }
#sfumato-form { margin-top: 1rem; display: flex; justify-content: center; gap: 1rem; }
#sfumato-input {
    background: transparent;
    border: 1px solid #4a3f35;
    color: #e0dacc;
    padding: 0.5rem;
    font-family: 'Lora', serif;
}
#sfumato-form button { background: #d4af37; border: none; padding: 0.5rem 1rem; cursor: pointer; }

/* --- Écran de succès --- */
.reward-image { max-width: 200px; margin: 1rem 0; }
.proceed-button { display: inline-block; text-decoration: none; margin-top: 1rem; background-color: #d4af37; color: #1a120b; padding: 10px 25px; font-family: 'Cinzel', serif; }