/* === STYLES PRINCIPAUX ORIENTAJEU === */

/* === VARIABLES CSS === */
:root {
    /* Couleurs principales - Signature Rhinodream */
    --color-primary: #d9685e; /* Rouge terracotta Rhinodream */
    --color-secondary: #5a9099; /* Bleu-vert Rhinodream */
    --color-accent: #e89b6f; /* Orange/beige Rhinodream */
    --color-success: #16a085;
    --color-warning: #f39c12;
    --color-error: #d9685e;
    
    /* Couleurs neutres - Améliorées pour l'accessibilité WCAG AA */
    --color-light: #ecf0f1;
    --color-dark: #2c3e50;
    --color-gray: #6b7280; /* Contraste amélioré (était #95a5a6) */
    --color-gray-dark: #4b5563; /* Nouveau : pour textes secondaires */
    --color-gray-light: #d1d5db; /* Contraste amélioré */
    --color-white: #ffffff;
    --color-black: #000000;
    
    /* Couleurs de fond - Inspirées Rhinodream */
    --bg-gradient-blue: linear-gradient(135deg, #5a9099 0%, #4a7d85 100%);
    --bg-gradient-green: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
    --bg-gradient-orange: linear-gradient(135deg, #e89b6f 0%, #d9685e 100%);
    --bg-gradient-teal: linear-gradient(135deg, #5a9099 0%, #16a085 100%);
    
    /* Typographie */
    --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    
    /* Espacements */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Bordures */
    --border-radius-sm: 0.25rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 1rem;
    --border-radius-xl: 1.5rem;
    
    /* Ombres */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Zones tactiles minimales (accessibilité mobile) */
    --touch-target-min: 44px;
}

/* === RESET ET BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--color-dark);
    background: linear-gradient(135deg, #5a9099 0%, #4a7d85 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* === CONTENEUR PRINCIPAL === */
#app {
    min-height: 100vh;
    width: 100%;
}

/* === BOUTONS === */
button {
    font-family: inherit;
    font-size: var(--font-size-base);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    outline: none;
    /* Amélioration accessibilité tactile */
    min-height: var(--touch-target-min);
}

.btn-primary {
    background: var(--color-secondary);
    color: var(--color-white);
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--border-radius-md);
    font-weight: 600;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: #4a7d85;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--color-gray-dark);
    color: var(--color-white);
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--border-radius-md);
    font-weight: 600;
    box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
    background: #374151;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* === UTILITAIRES === */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn var(--transition-base) ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* === BREADCRUMB === */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-md);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.breadcrumb-item {
    color: var(--color-white);
    font-size: var(--font-size-sm);
    font-weight: 500;
    /* Amélioration accessibilité tactile */
    min-height: var(--touch-target-min);
    display: flex;
    align-items: center;
    padding: var(--spacing-xs) var(--spacing-sm);
}

.breadcrumb-item.clickable {
    cursor: pointer;
    text-decoration: underline;
    opacity: 1; /* Changé de 0.8 pour meilleur contraste */
    transition: all var(--transition-fast);
    border-radius: var(--border-radius-sm);
}

.breadcrumb-item.clickable:hover {
    background: rgba(255, 255, 255, 0.1);
    opacity: 1;
}

.breadcrumb-item.active {
    font-weight: 700; /* Augmenté de 600 pour meilleure visibilité */
}

.breadcrumb-separator {
    color: var(--color-white);
    opacity: 0.8; /* Augmenté de 0.6 */
}

/* === HEADERS === */
.app-header,
.section-header,
.game-header {
    text-align: center;
    padding: var(--spacing-xl);
    animation: fadeIn 0.5s ease-in;
}

.app-title,
.section-title,
.game-title {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: var(--spacing-sm);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.app-subtitle,
.section-subtitle,
.game-instructions {
    font-size: var(--font-size-lg);
    color: var(--color-white); /* Changé de rgba(255, 255, 255, 0.9) */
    font-weight: 400; /* Augmenté de 300 */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.section-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
}

/* === GRADIENTS === */
.bg-gradient-blue {
    background: var(--bg-gradient-blue);
}

.bg-gradient-green {
    background: var(--bg-gradient-green);
}

.bg-gradient-orange {
    background: var(--bg-gradient-orange);
}

.bg-gradient-teal {
    background: var(--bg-gradient-teal);
}

/* === SCROLLBAR PERSONNALISÉE === */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius-sm);
}

::-webkit-scrollbar-thumb {
    background: rgba(90, 144, 153, 0.5);
    border-radius: var(--border-radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(90, 144, 153, 0.7);
}

/* === ANIMATIONS GLOBALES === */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* === ÉTATS DE FOCUS === */
button:focus-visible,
input:focus-visible {
    outline: 3px solid var(--color-secondary);
    outline-offset: 2px;
}

/* === ACCESSIBILITÉ === */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Skip to main content link */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-secondary);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-main:focus {
    top: 0;
}

/* === MODE SOMBRE (OPTIONNEL) === */
@media (prefers-color-scheme: dark) {
    :root {
        --color-light: #34495e;
        --color-dark: #ecf0f1;
    }
}
