/* ==========================================================================
   1. VARIABLES ET BASE
   ========================================================================== */
:root {
    --primary: #2c3e50;
    --accent: #1565c0;
	--accent-hover: #0d47a1;
    --bg: #f4f7f9;
    --success: #27ae60;
    --focus-color: orange;
    --error-red: #c0392b;
    --screen-reader-bg: #1a1a1a;
    --sr-green: #00ff00;
    --white: #ffffff;
    --text: #333;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Conteneur principal élargi (Style Experte/Metaforweb) */
#main-experience {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    width: 95%;
    max-width: 1250px;
    box-sizing: border-box;
}

/* ==========================================================================
   2. NAVIGATION ET STRUCTURE
   ========================================================================== */
header { 
    background-color: transparent; 
    color: var(--text); 
    padding: 1.5rem 0; /* Ajusté pour le logo */
    width: 100%; 
    margin-bottom: 10px; 
    border: none; 
}

.header-inner {
    max-width: 1250px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 0 40px;
    box-sizing: border-box;
}

/* Taille par défaut (pour toutes les pages d'ateliers) */
.main-logo {
    height: 60px; 
    width: auto;
    display: block;
}

/* Taille spécifique quand on est sur l'index */
.home-page .main-logo {
    height: 120px;
}

.header-titles {
    text-align: left;
}

.header-titles h1 {
    margin: 0;
    font-size: 1.5rem;
}

.header-titles p {
    margin: 5px 0 0 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.top-bar { 
    width: 95%; 
    max-width: 1250px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 20px; 
}

.back-link { text-decoration: none; color: var(--primary); font-weight: bold; cursor: pointer; }

.reload-btn { 
    background: #666; 
    color: white; 
    border: none; 
    padding: 8px 15px; 
    border-radius: 4px; 
    font-weight: bold; 
    cursor: pointer; 
    display: none;
}

/* ==========================================================================
   3. ÉLÉMENTS COMMUNS ATELIERS
   ========================================================================== */
.intro-text { 
    background: transparent; 
    padding: 0 0 20px 0; 
    margin-bottom: 20px; 
    width: 100%; 
    border: none;
}

.instr { 
    background: #e8f4fd; 
    padding: 20px; 
    border-radius: 8px; 
    border-left: 5px solid #2980b9; 
    margin-bottom: 30px; 
    line-height: 1.5; 
    width: 100%; 
    box-sizing: border-box;
}

.experience-layout { 
    display: flex; 
    gap: 30px; 
    align-items: flex-start; 
    width: 100%; 
}

.container { 
    background: white; 
    padding: 30px; 
    border-radius: 12px; 
    position: relative; 
    overflow: hidden; 
    border: 1px solid #eee; 
}

/* ==========================================================================
   4. BOUTONS UI ET GESTION DU CURSEUR
   ========================================================================== */
.btn-ui { 
    padding: 15px; 
    border: 1px solid #ddd; 
    border-radius: 4px; 
    background: #f9f9f9; 
    width: 100%; 
    margin-bottom: 10px; 
    font-size: 1.5rem; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 10px; 
}

.main-payment { background-color: var(--success) !important; color: white !important; border: none !important; }

.icon-btn {
    width: 24px;      /* Taille idéale pour la lisibilité */
    height: 24px;
    margin-right: 12px;
    vertical-align: middle;
    pointer-events: none; /* Évite que l'image n'interfère avec le clic sur le bouton */
    filter: brightness(0) saturate(100%) invert(30%) sepia(10%) saturate(1500%) hue-rotate(170deg); /* Optionnel : pour colorer le SVG en gris/bleu sombre */
}

/* Pour le bouton de paiement qui est vert, on peut mettre l'icône en blanc */
.main-payment .icon-btn {
    filter: brightness(0) invert(1);
}

.reload-btn, .help-btn, .repair-action-btn, .back-link, .btn-launch, .peek-btn, body:not(.is-broken) .btn-ui { 
    cursor: pointer !important; 
}

body.is-broken #exp-container, 
body.is-broken #exp-container * { 
    cursor: none !important; 
}

/* ==========================================================================
   5. GESTION DU FOCUS (Priorité aux modes de handicap)
   ========================================================================== */
body:not(.is-broken) .btn-ui:focus {
    outline: 5px solid var(--focus-color) !important;
    outline-offset: 2px !important;
}

body.is-broken.mode-moteur .btn-ui:focus { outline: none !important; }

body.is-broken.mode-malvoyant .btn-ui:focus { 
    outline: 1px solid #d1d1d1 !important; 
    outline-offset: 1px !important;
}

/* ==========================================================================
   6. MODES VISUELS SPÉCIFIQUES
   ========================================================================== */
.vision-blur .container { filter: blur(1.5px); transition: filter 0.5s; }

#blind-overlay { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    background: black; z-index: 10; 
}

/* ==========================================================================
   7. ANALYSE ET CONSOLE
   ========================================================================= */
#explanation { 
    display: none; 
    margin-top: 30px; 
    background: #fff; 
    padding: 25px; 
    border-left: 8px solid var(--focus-color); 
    border-radius: 4px; 
    width: 100%; 
    box-sizing: border-box; 
    border-top: 1px solid #eee;
    border-right: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.repair-action-btn { background: var(--success); color: white; border: none; padding: 12px 25px; border-radius: 4px; font-weight: bold; margin-top: 15px; }

.action-btns-row { display: flex; gap: 10px; margin-top: 20px; width: 100%; }

.help-btn { 
    flex: 2; 
    padding: 15px; 
    background: var(--primary); 
    color: white; 
    border: none; 
    border-radius: 4px; 
    font-weight: bold; 
    font-size: 1rem; 
}

.peek-btn { 
    flex: 1; 
    padding: 15px; 
    background: #fff; 
    color: var(--primary); 
    border: 2px solid var(--primary); 
    border-radius: 4px; 
    font-weight: bold; 
    display: none; 
    align-items: center; 
    justify-content: center; 
    gap: 10px;
}

#sr-console { 
    width: 400px; 
    background: var(--screen-reader-bg); 
    padding: 15px; 
    border-radius: 8px; 
    font-family: 'Courier New', monospace; 
    height: 400px; 
    overflow-y: auto; 
    border: 4px solid #444; 
}

.sr-title { color: #ffffff !important; font-size: 0.9rem; margin-bottom: 15px; font-weight: bold; border-bottom: 1px solid #555; padding-bottom: 8px; text-transform: uppercase; }
.sr-line { color: var(--sr-green); border-bottom: 1px solid #333; padding: 5px 0; font-weight: bold; }

/* ==========================================================================
   8. ACCUEIL (INDEX)
   ========================================================================== */
.welcome-section { width: 100%; text-align: center; margin: 0; border: none; background: transparent; }

.intro-desc { 
    max-width: 100%; 
    margin: 0 auto 40px auto; 
    line-height: 1.7; 
    color: #444; 
}

.grid-home { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; 
    width: 100%; 
}

/* ==========================================================================
   8. ACCUEIL (INDEX) - Modifications minimales
   ========================================================================== */
.card-home { 
    background: white; 
    padding: 40px; 
    border-radius: 12px; 
    text-align: center; 
    /* On garde tes bordures mais on ajoute juste une ombre légère */
    border-top: 1px solid #eee; 
    border-left: 1px solid #eee;   
    border-right: 1px solid #eee; 
    border-bottom: 1px solid #eee; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between;
    transition: transform 0.2s ease;
}

/* Un petit effet au survol qui ne déplace pas le reste du contenu */
.card-home:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.btn-launch { 
    display: block; 
    background: var(--accent); 
    color: white !important; /* Force le blanc pour l'accessibilité */
    text-decoration: none; 
    padding: 12px; 
    border-radius: 6px; 
    font-weight: bold; 
    margin-top: 20px; 
}

