* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: #000;
    color: #fff;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

/* ======================================== */
/* === 1. ACCUEIL.HTML – FOND BLANC === */
/* ======================================== */
/* .accueil-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: #fff;
}

.accueil-content {
    text-align: center;
    max-width: 600px;
    padding: 40px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    color: #1a1a1a;
}

.accueil-content h1 {
    font-size: 2.5em;
    color: #d32f2f;
    margin-bottom: 10px;
}

.small {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 30px;
}

.mode-selection {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 30px 0;
}

.mode-btn {
    padding: 14px 28px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    opacity: 0.6;
}

.mode-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.ecolo { background: #2e7d32; color: white; }
.social { background: #c2185b; color: white; }
#default-mode { background: #1565c0; color: white; } */

/* ======================================== */
/* === 2. STARTBUDGETING.HTML – FOND + PERSONNAGE MILIEU === */
/* ======================================== */
.background {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: url('/static/fond-intro.jpg') center/cover no-repeat;
    z-index: -1;
    filter: brightness(0.92);
}
.start-character-center {
    position: fixed;
    top: 58%;                    /* Personnage plus bas */
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    z-index: 10;
    max-width: 90%;
    gap: 0;                      /* Aucune marge entre bulle et GIF */
}

.speech-bubble {
    background: rgba(255, 255, 255, 0.96);
    color: #1a1a1a;
    padding: 26px 42px;
    border-radius: 36px;
    box-shadow: 0 14px 38px rgba(0,0,0,0.42);
    font-style: italic;
    font-size: 1.45em;
    font-weight: 600;
    max-width: 440px;
    position: relative;
    z-index: 12;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.5);
    margin: 0 auto;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 24px solid transparent;
    border-right: 24px solid transparent;
    border-top: 24px solid rgba(255, 255, 255, 0.96);
    z-index: 12;
}

.start-character-img {
    width: 700px;
    max-width: 700px;
    max-height: 100vh;
    object-fit: contain;
    filter: drop-shadow(0 24px 48px rgba(0,0,0,0.65));
    z-index: 11;
    margin-top: -150px;           /* COMPENSE bulle + flèche → BULLE COLLÉE */
    position: relative;
}

/* === PANNEAUX LATÉRAUX – MARGES 20px === */
.start-sectors-panel,
.start-info-panel {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 450px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    z-index: 15;
    margin-left: 20px;
    margin-right: 20px;
}

.start-sectors-panel {
    left: 30px;
    align-items: center;
}

.start-info-panel {
    right: 30px;
    align-items: center;
    text-align: center;
}

/* === PYRAMIDE CORRIGÉE – TAILLE CROISSANTE + ALIGNEMENT PARFAIT === */
.start-sectors-panel .sector-btn {
    background: rgba(255, 255, 255, 0.95);
    border: 3.5px solid #295b85;
    color: #1a1a1a;
    border-radius: 40px;
    text-transform: uppercase;
    cursor: default;
    box-shadow: 0 7px 18px rgba(0,0,0,0.22);
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 800;
    white-space: nowrap;
    display: inline-block;
}

/* TAILLE + MARGE PROGRESSIVE – PYRAMIDE VISUELLE PARFAITE */
.start-sectors-panel .sector-btn:nth-child(1) { 
    font-size: 12px; 
    padding: 10px 16px; 
    min-width: 140px; 
    margin-left: 85px; 
}
.start-sectors-panel .sector-btn:nth-child(2) { 
    font-size: 13px; 
    padding: 11px 18px; 
    min-width: 155px; 
    margin-left: 60px; 
}
.start-sectors-panel .sector-btn:nth-child(3) { 
    font-size: 14.5px; 
    padding: 13px 22px; 
    min-width: 185px; 
    margin-left: 0; 
    font-weight: 900; /* Gras contrôlé */
}
.start-sectors-panel .sector-btn:nth-child(4) { 
    font-size: 13px; 
    padding: 11px 18px; 
    min-width: 155px; 
    margin-left: 60px; 
}
.start-sectors-panel .sector-btn:nth-child(5) { 
    font-size: 12px; 
    padding: 10px 16px; 
    min-width: 140px; 
    margin-left: 85px; 
}

.start-sectors-panel .sector-btn:hover {
    background: #274c75;
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 14px 32px rgba(67, 160, 71, 0.5);
}

/* === FICHE + BOUTON CENTRÉS + MARGE 40px === */
.info-card {
    background: rgba(255, 255, 255, 0.98);
    color: #1a1a1a;
    padding: 36px;
    border-radius: 28px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.3);
    font-size: 18px;
    line-height: 2;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.7);
    max-width: none;
    width: 100%;
    text-align: left;
}

.start-btn {
    margin-top: 40px; /* MARGE ENTRE FICHE ET BOUTON */
    background: #48b4e669;
    color: white;
    border: none;
    padding: 24px 54px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 22px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    transition: all 0.3s ease;
    box-shadow: 0 14px 32px rgba(61, 90, 108, 0.7);
    width: 100%;
    max-width: 340px;
}

.start-btn:hover {
    background: #48b4e669;
    transform: scale(1.14);
    box-shadow: 0 18px 40px rgba(61, 90, 108, 0.7);
}

/* ======================================== */
/* === 3. JEU.HTML – INCHANGÉ === */
/* ======================================== */
/* ======================================== */
.reaction-center {
    position: fixed;
    top: 58%;                    /* Abaissé de ~8cm (au lieu de 50%) */
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    z-index: 10;
    pointer-events: none;
    gap: 8px;                    /* Rapproche le label de l'image */
}

#reaction-img {
    width: 600px;
    max-width: 600px;
    max-height: 75vh;
    object-fit: contain;
    opacity: 0;
    transition: opacity 1.2s ease;
    filter: drop-shadow(0 12px 30px rgba(0,0,0,0.5));
    margin-bottom: 4px;          /* Petit espace sous l'image */
}

#reaction-img.loaded { 
    opacity: 1; 
}

#reaction-label {
    margin-top: 0;               /* Supprime le margin-top ancien */
    font-size: 1.5em;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 2px 6px rgba(0,0,0,0.7);
    background: rgba(0,0,0,0.5);
    padding: 8px 20px;           /* Un peu plus compact */
    border-radius: 50px;
    backdrop-filter: blur(6px);
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    font-size: 1.4em;            /* Légèrement réduit pour coller mieux */
}

.questionnaire {
    position: fixed;
    top: 0; right: 0;
    width: 520px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.94);
    color: #1a1a1a;
    padding: 30px;
    overflow-y: auto;
    z-index: 20;
    border-left: 1px solid rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.questionnaire h1 {
    font-size: 1.7em;
    color: #1f5c7969;
    text-align: center;
    margin-bottom: 8px;
}

.progress-container { height: 28px; background: #e0e0e0; border-radius: 14px; overflow: hidden; }
.progress { height: 100%; width: 0; background: linear-gradient(90deg, #43a047, #66bb6a); transition: width 0.7s ease; }
.total { font-weight: bold; text-align: center; font-size: 1.3em; color: #d32f2f; }
.bulle { background: #fff; color: #333; padding: 18px; border-radius: 16px; min-height: 80px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); font-size: 1.1em; line-height: 1.5; }
.options { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.options button { padding: 14px 22px; font-size: 16px; border: 2px solid #48b4e669; background: white; color: #2e7d32; border-radius: 12px; cursor: pointer; transition: all 0.3s; min-width: 80px; font-weight: bold; }
.options button:hover { background: #e8f5e9; border-color: #2e7d32; transform: translateY(-2px); }
.next-btn, .restart-btn { display: block; margin: 20px auto; padding: 14px 36px; font-size: 18px; background: #48b4e669; color: white; border: none; border-radius: 50px; cursor: pointer; font-weight: bold; transition: 0.3s; }
.next-btn:hover, .restart-btn:hover { background: #48b4e669; transform: scale(1.05); }
.info-box { background: #e3f2fd; border-left: 4px solid #1976d2; padding: 14px; margin: 15px 0; font-style: italic; border-radius: 0 12px 12px 0; color: #1565c0; font-weight: 500; }
.recap { list-style: none; background: #f9f9f9; padding: 16px; border-radius: 14px; margin-top: 10px; font-size: 0.95em; }
.recap li { padding: 8px 0; border-bottom: 1px solid #eee; }
.recap li:last-child { border: none; }
.recap strong { color: #d32f2f; }
.warning-box { background: #ffebee; border: 2px solid #f44336; border-radius: 14px; padding: 18px; margin: 20px 0; text-align: center; }
.warning-box p { margin: 8px 0; font-weight: bold; color: #c62828; }
.warning-box button { margin: 6px; padding: 10px 18px; border: none; border-radius: 8px; cursor: pointer; font-weight: bold; font-size: 14px; }
.btn-peuple { background: #4caf50; color: white; }
.btn-ministre { background: #d32f2f; color: white; }

/* ======================================== */
/* === RESPONSIVE === */
/* ======================================== */
@media (max-width: 1400px) {
    .start-sectors-panel, .start-info-panel { width: 380px; }
    .start-character-img { max-width: 520px; }
}

@media (max-width: 1100px) {
    .start-sectors-panel, .start-info-panel { width: 320px; left: 20px !important; right: 20px !important; }
    .start-character-img { max-width: 440px; max-height: 65vh; }
    .speech-bubble { font-size: 1.3em; max-width: 360px; }
}

@media (max-width: 700px) {
    .accueil-content { padding: 30px; }
    .mode-btn { padding: 12px 20px; font-size: 16px; }
    .start-sectors-panel, .start-info-panel { 
        position: relative; 
        width: 100%; 
        left: auto !important; 
        right: auto !important; 
        transform: none; 
        padding: 0 20px; 
        margin: 0;
    }
    .start-sectors-panel { order: 1; margin-bottom: 20px; }
    .start-info-panel { order: 3; margin-top: 20px; align-items: center; }
    .start-character-center { position: relative; top: auto; left: auto; transform: none; order: 2; margin: 20px 0; }
    .start-sectors-panel .sector-btn:nth-child(n) { 
        margin-left: 0 !important; 
        font-size: 14px !important; 
        padding: 12px 20px !important; 
        min-width: 180px !important;
    }
    .info-card, .start-btn { max-width: 100%; }
    .start-btn { margin-top: 30px; }
}