/* Reset global */
* {
    box-sizing: border-box;
}

/* Fonts */
@font-face {
    font-family: 'PublicaPlay';
    src: url('fonts/PublicaPlay.otf') format('opentype');
    font-weight: normal; font-style: normal;
}
@font-face {
    font-family: 'OctinPrison';
    src: url('fonts/OctinPrison.otf') format('opentype');
    font-weight: normal; font-style: normal;
}
@font-face {
    font-family: 'OpenSans';
    src: url('fonts/OpenSans.ttf') format('truetype');
    font-weight: normal; font-style: normal;
}

/* Layout Body */
body {
    font-family: 'OpenSans', sans-serif;
    background-color: #222;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px 0;
}

.game-container {
    text-align: center;
    width: 90%;
    max-width: 600px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Titre */
h1 { 
    margin-bottom: 20px; 
    font-size: 42px;
    letter-spacing: 1px;
    line-height: 1.2;
}

.font-crous { font-family: 'PublicaPlay', sans-serif; color: #3498db; text-transform: uppercase; }
.font-prison { font-family: 'OctinPrison', sans-serif; color: #e74c3c; text-transform: uppercase; font-size: 1.1em; }
.font-normal { font-family: 'OpenSans', sans-serif; font-weight: bold; color: #ccc; font-size: 0.6em; vertical-align: middle; padding: 0 10px; }
.font-question { font-family: 'OpenSans', sans-serif; font-weight: bold; color: white; font-size: 1em; vertical-align: baseline; margin-left: 5px; }

/* Score */
.score-board {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1rem;
    font-family: 'OpenSans', sans-serif;
}
.score-item span { color: #f1c40f; }

/* Images & Overlay */
.image-wrapper {
    position: relative;
    width: 100%;
    height: 400px;
    margin: 10px 0 20px 0;
    border-radius: 12px;
    overflow: hidden;
    background-color: #333;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

#game-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    flex-direction: column; 
    justify-content: center;
    align-items: center;
    gap: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    padding: 20px;
    z-index: 10;
}
.overlay.visible { opacity: 1; pointer-events: auto; }

#overlay-text {
    font-family: 'OpenSans', sans-serif;
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    text-align: center;
    line-height: 1.4;
}

.btn-retry {
    padding: 12px 30px;
    background: transparent;
    color: white;
    border: 2px solid white;
    font-family: 'OpenSans', sans-serif;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.btn-retry:hover { background: white; color: #c0392b; }

/* Boutons Jeu */
.buttons-container { display: flex; gap: 20px; justify-content: center; }

.btn {
    padding: 15px 0;
    width: 140px;
    font-size: 18px;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    color: white;
    transition: transform 0.1s, filter 0.2s;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: scale(0.95); }

.btn-crous { background-color: #3498db; font-family: 'PublicaPlay', sans-serif; }
.btn-prison { background-color: #e74c3c; font-family: 'OctinPrison', sans-serif; font-size: 1.2rem; letter-spacing: 1px; }
.hidden { display: none; }

/* Footer */
footer {
    width: 100%;
    text-align: center;
    font-size: 0.85rem;
    font-family: 'OpenSans', sans-serif;
    margin-top: 40px;
    color: #777;
}
footer a { color: #aaa !important; text-decoration: none; transition: color 0.2s; }
footer a:hover { color: white !important; text-decoration: underline; }

.copyright { opacity: 0.5; font-size: 0.9em; display: inline-block; margin-top: 5px; }

/* Mentions Legales */
body.legal-page { display: block; padding: 40px 20px; height: auto; }
.legal-container {
    max-width: 800px; margin: 0 auto;
    background: rgba(255, 255, 255, 0.05);
    padding: 40px; border-radius: 10px; text-align: left;
}
.legal-container h1 { text-align: center; font-family: 'PublicaPlay', sans-serif; color: #3498db; margin-bottom: 30px; }
.legal-container h2 { font-family: 'OpenSans', sans-serif; color: #e74c3c; border-bottom: 1px solid #444; padding-bottom: 10px; margin-top: 30px; }
.legal-container p { font-family: 'OpenSans', sans-serif; line-height: 1.6; color: #ddd; }
.legal-container a { color: #3498db; text-decoration: none; }
.btn-back { display: inline-block; margin-bottom: 20px; color: #aaa; font-family: 'OpenSans', sans-serif; font-weight: bold; text-decoration: none; }
.btn-back:hover { color: white; }