/* CSS Reset et base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Thème Classique (Bleu/Or) */
:root {
    --primary-color: #c41e3a;
    --secondary-color: #2f5233;
    --accent-color: #ffd700;
    --background-color: #0f1419;
    --surface-color: #1e2328;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --border-color: #333840;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --error-color: #dc3545;
    
    --border-radius: 8px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s ease;
    
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-md: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 20px;
    --font-size-xxl: 24px;
    
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
}

/* Thème Alternatif (Vert/Rouge) */
:root[data-theme="alternate"],
html[data-theme="alternate"] {
    --primary-color: #8B0F1A;
    --secondary-color: #0D3B2E;
    --accent-color: #CD7F32;
    --background-color: #1A0B0D;
    --surface-color: #2A1B1D;
    --text-primary: #FFF8E7;
    --text-secondary: #C0C0C0;
    --border-color: #4A3B3D;
    --success-color: #FFBF00;
    --warning-color: #CD7F32;
    --error-color: #8B0F1A;
}

/* Thème Minimaliste Chic */
:root[data-theme="minimal"],
html[data-theme="minimal"] {
    --primary-color: #C9A646;
    --secondary-color: #0B1C2C;
    --accent-color: #C9A646;
    --background-color: #0B1C2C;
    --surface-color: #142332;
    --text-primary: #F9FAFB;
    --text-secondary: #C9A646;
    --border-color: rgba(201, 166, 70, 0.3);
    --success-color: #C9A646;
    --warning-color: #C9A646;
    --error-color: #B73232;
}

/* ===== ANIMATIONS ET EFFETS SPÉCIAUX ===== */

/* Neige animée supprimée pour éviter l'ascenseur */

/* Aurores boréales pour le fond - seulement si pas d'image de fond */
html[data-theme="alternate"] body:not([class*="day-"]) {
    background: linear-gradient(45deg,
        #1A0B0D 0%,
        #0D3B2E 25%,
        #2A1B3D 50%,
        #0D3B2E 75%,
        #1A0B0D 100%
    );
    background-size: 400% 400%;
    animation: aurora 15s ease-in-out infinite;
}

@keyframes aurora {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Lueur magique */
@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(255,191,0,0.4); }
    50% { box-shadow: 0 0 40px rgba(255,191,0,0.8); }
}

/* Effet brillant pour les textes importants */
@keyframes sparkle {
    0%, 100% { text-shadow: 0 0 10px rgba(205,127,50,0.5); }
    25% { text-shadow: 0 0 20px rgba(205,127,50,0.8), 0 0 30px rgba(255,191,0,0.6); }
    50% { text-shadow: 0 0 15px rgba(205,127,50,0.7); }
    75% { text-shadow: 0 0 25px rgba(205,127,50,0.9), 0 0 35px rgba(255,191,0,0.4); }
}

/* Animation de particules */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(120deg); }
    66% { transform: translateY(5px) rotate(240deg); }
}

/* Shake pour les erreurs */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Fade in élégant */
@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ===== CALENDRIER LIVRE POP-UP (THÈME ALTERNATIF) ===== */

/* Container du livre */
html[data-theme="alternate"] .calendar-view {
    perspective: 1000px;
    animation: fadeIn 1s ease-out;
}

html[data-theme="alternate"] .calendar-grid {
    transform-style: preserve-3d;
    background: linear-gradient(45deg, #8B4513 0%, #CD853F 50%, #8B4513 100%);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.4),
        inset 0 0 50px rgba(205,127,50,0.2);
    border: 3px solid var(--accent-color);
    position: relative;
    overflow: visible;
    margin: 20px;
}

/* Effet de reliure de livre */
html[data-theme="alternate"] .calendar-grid:before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(90deg, #654321 0%, #8B4513 50%, #654321 100%);
    border-radius: 15px 0 0 15px;
    box-shadow: inset -5px 0 10px rgba(0,0,0,0.5);
}

/* Pages du livre - Chaque jour ressemble à une page */
html[data-theme="alternate"] .calendar-day {
    background: linear-gradient(135deg, #FFF8E7 0%, #F5F5DC 100%);
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    position: relative;
    transform-style: preserve-3d;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    overflow: hidden;
    color: #2F1B14;
    font-weight: bold;
    margin: 0;
}

/* Texture papier ancien */
html[data-theme="alternate"] .calendar-day:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(45deg, 
            transparent 0px, 
            rgba(205,127,50,0.1) 1px, 
            transparent 2px
        ),
        radial-gradient(circle at 30% 20%, rgba(139,69,19,0.1) 1px, transparent 1px);
    pointer-events: none;
}

/* Animation d'ouverture de page */
html[data-theme="alternate"] .calendar-day:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 
        0 10px 20px rgba(0,0,0,0.3),
        0 0 15px rgba(255,191,0,0.4);
    z-index: 10;
}

/* État verrouillé - page fermée */
html[data-theme="alternate"] .calendar-day.locked {
    background: linear-gradient(135deg, #8B4513 0%, #654321 100%);
    color: var(--accent-color);
    opacity: 0.7;
}

html[data-theme="alternate"] .calendar-day.locked:before {
    content: "🔒";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    opacity: 0.8;
}

/* Jour disponible - page qui brille */
html[data-theme="alternate"] .calendar-day.available {
    box-shadow: 
        0 5px 15px rgba(0,0,0,0.2),
        0 0 25px rgba(255,191,0,0.6);
}

/* Jour complété - page avec tampon doré */
html[data-theme="alternate"] .calendar-day.completed {
    background: linear-gradient(135deg, #FFD700 0%, #FFF8E7 50%, #FFD700 100%);
    border-color: #CD7F32;
    position: relative;
}

html[data-theme="alternate"] .calendar-day.completed:after {
    content: "✓";
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--accent-color);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Ruban marque-page pour le jour actuel */
html[data-theme="alternate"] .calendar-day.current:before {
    content: "";
    position: absolute;
    top: -5px;
    right: 10px;
    width: 8px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 2;
}

/* Titre du calendrier avec effet manuscrit */
html[data-theme="alternate"] .calendar-header h2 {
    font-family: 'Brush Script MT', 'Lucida Handwriting', cursive;
    font-size: 2.5rem;
    color: var(--accent-color);
    text-align: center;
    margin-bottom: 1rem;
    animation: sparkle 3s ease-in-out infinite;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* ===== TYPOGRAPHIES AVANCÉES (THÈME ALTERNATIF) ===== */

/* Titres principaux avec effet métallique */
html[data-theme="alternate"] .title,
html[data-theme="alternate"] h1 {
    font-family: 'Cinzel', 'Times New Roman', serif;
    background: linear-gradient(45deg, #CD7F32, #FFD700, #CD7F32);
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: aurora 10s ease-in-out infinite;
    text-shadow: 0 0 10px rgba(205,127,50,0.3);
}

/* Sous-titres avec effet italien */
html[data-theme="alternate"] .enigma-title,
html[data-theme="alternate"] h2:not(.calendar-header h2) {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    color: var(--accent-color);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Textes de contenu avec effet parchemin */
html[data-theme="alternate"] .enigma-story,
html[data-theme="alternate"] p {
    font-family: 'Crimson Text', serif;
    line-height: 1.8;
    color: var(--text-primary);
    text-shadow: 1px 1px 1px rgba(0,0,0,0.2);
}

/* ===== MICRO-INTERACTIONS AVANCÉES ===== */

/* Boutons avec effet ripple */
html[data-theme="alternate"] .btn,
html[data-theme="alternate"] button {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: 2px solid var(--accent-color);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

html[data-theme="alternate"] .btn:hover,
html[data-theme="alternate"] button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255,191,0,0.4);
    animation: glow 1s ease-in-out;
}

/* Effet ripple au clic */
html[data-theme="alternate"] .btn:active::after,
html[data-theme="alternate"] button:active::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    transform: translate(-50%, -50%);
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    0% { width: 0; height: 0; opacity: 1; }
    100% { width: 200px; height: 200px; opacity: 0; }
}

/* Navigation avec effet 3D */
html[data-theme="alternate"] .nav-btn {
    background: linear-gradient(135deg, var(--surface-color), var(--border-color));
    transform-style: preserve-3d;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html[data-theme="alternate"] .nav-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 10px 20px rgba(0,0,0,0.3),
        0 0 15px rgba(205,127,50,0.4);
}

/* Drag and drop avec effet magique */
html[data-theme="alternate"] [draggable="true"] {
    transition: all 0.3s ease;
    cursor: grab;
}

html[data-theme="alternate"] [draggable="true"]:hover {
    filter: drop-shadow(0 0 10px rgba(255,191,0,0.6));
    transform: scale(1.05);
}

html[data-theme="alternate"] [draggable="true"]:active {
    cursor: grabbing;
    transform: scale(1.1);
    filter: drop-shadow(0 0 20px rgba(255,191,0,0.8));
}

/* Zones de drop avec effet attractif */
html[data-theme="alternate"] .drop-zone {
    border: 2px dashed var(--accent-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

html[data-theme="alternate"] .drop-zone.drag-over {
    border-style: solid;
    background: radial-gradient(circle, rgba(255,191,0,0.2) 0%, transparent 70%);
    animation: glow 1s ease-in-out infinite;
    transform: scale(1.02);
}

/* Modal avec effet d'apparition magique */
html[data-theme="alternate"] .modal {
    background: linear-gradient(135deg, var(--surface-color), var(--background-color));
    border: 3px solid var(--accent-color);
    border-radius: 15px;
    box-shadow: 
        0 20px 60px rgba(0,0,0,0.5),
        0 0 50px rgba(205,127,50,0.3),
        inset 0 0 30px rgba(255,191,0,0.1);
    transform: scale(0) rotateY(180deg);
    animation: modalAppear 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes modalAppear {
    0% { 
        transform: scale(0) rotateY(180deg); 
        opacity: 0; 
    }
    50% { 
        transform: scale(1.1) rotateY(90deg); 
        opacity: 0.7; 
    }
    100% { 
        transform: scale(1) rotateY(0deg); 
        opacity: 1; 
    }
}

/* ===== THÈME MINIMALISTE CHIC ===== */

/* Fond avec gradient subtil - seulement si pas d'image de fond */
html[data-theme="minimal"] body:not([class*="day-"]) {
    background: radial-gradient(circle at center, #0F2433 0%, #0B1C2C 100%);
}

html[data-theme="minimal"] body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Supprimé : animation de flocons */

/* Header minimaliste */
html[data-theme="minimal"] .header {
    background: linear-gradient(180deg, rgba(11,28,44,0.95) 0%, rgba(11,28,44,0.85) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(201,166,70,0.2);
    box-shadow: none;
}

/* Titre avec typographie élégante */
html[data-theme="minimal"] .title {
    font-family: 'Playfair Display', serif;
    font-weight: 300;
    font-size: 1.8rem;
    letter-spacing: 0.1em;
    color: var(--primary-color);
    text-transform: uppercase;
}

/* Calendrier minimaliste avec cercles */
html[data-theme="minimal"] .calendar-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
    padding: 2rem;
    background: transparent;
}

html[data-theme="minimal"] .calendar-day {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 300;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

/* Hover subtil */
html[data-theme="minimal"] .calendar-day:hover {
    background: rgba(201,166,70,0.1);
    box-shadow: 0 0 20px rgba(201,166,70,0.3);
    transform: scale(1.05);
}

/* Jour disponible */
html[data-theme="minimal"] .calendar-day.available {
    background: var(--primary-color);
    color: var(--background-color);
    border: none;
    font-weight: 400;
}

/* Jour complété avec check subtil */
html[data-theme="minimal"] .calendar-day.completed {
    background: transparent;
    border: 1px solid rgba(201,166,70,0.5);
    color: rgba(201,166,70,0.7);
}

html[data-theme="minimal"] .calendar-day.completed:after {
    content: "✓";
    position: absolute;
    top: -5px;
    right: -5px;
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    color: var(--background-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

/* Jour verrouillé */
html[data-theme="minimal"] .calendar-day.locked {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Zone énigme minimaliste */
html[data-theme="minimal"] .enigma-container {
    background: transparent;
    padding: 2rem;
}

html[data-theme="minimal"] .enigma-content {
    background: var(--surface-color);
    border-radius: 8px;
    padding: 2rem;
    color: var(--background-color);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

html[data-theme="minimal"] .enigma-title {
    font-family: 'Playfair Display', serif;
    font-weight: 300;
    color: var(--primary-color);
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

html[data-theme="minimal"] .enigma-story {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.8;
    color: var(--background-color);
}

/* Input minimaliste */
html[data-theme="minimal"] input,
html[data-theme="minimal"] .answer-input,
html[data-theme="minimal"] textarea {
    background: rgba(11,28,44,0.1) !important;
    border: 1px solid var(--primary-color) !important;
    border-radius: 4px;
    color: #C9A646 !important;
    padding: 0.8rem 1rem;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
}

html[data-theme="minimal"] input[type="text"],
html[data-theme="minimal"] input[type="number"],
html[data-theme="minimal"] input[type="password"],
html[data-theme="minimal"] input[type="email"] {
    color: #C9A646 !important;
    -webkit-text-fill-color: #C9A646 !important;
}

html[data-theme="minimal"] input:focus,
html[data-theme="minimal"] .answer-input:focus,
html[data-theme="minimal"] textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(11,28,44,0.15) !important;
    box-shadow: 0 0 10px rgba(201,166,70,0.3);
    color: #C9A646 !important;
}

html[data-theme="minimal"] input::placeholder,
html[data-theme="minimal"] .answer-input::placeholder,
html[data-theme="minimal"] textarea::placeholder {
    color: rgba(201,166,70,0.6);
}

/* Modales et contenus des indices */
html[data-theme="minimal"] .modal-content {
    background: rgba(249, 250, 251, 0.98) !important;
    color: var(--background-color) !important;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    padding: 2rem;
}

html[data-theme="minimal"] .hint-content,
html[data-theme="minimal"] .hint-text,
html[data-theme="minimal"] .modal p,
html[data-theme="minimal"] .modal div,
html[data-theme="minimal"] .hint-modal p,
html[data-theme="minimal"] .hint-modal div {
    color: var(--background-color) !important;
}

html[data-theme="minimal"] .hint-modal,
html[data-theme="minimal"] #hintModal {
    background: transparent !important;
    color: var(--background-color) !important;
    border: none;
    border-radius: 12px;
    box-shadow: none;
    backdrop-filter: none;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 2000 !important;
    max-width: 70vw;
    max-height: 60vh;
    overflow-y: auto;
    padding: 2rem;
}

/* Pas d'overlay généré automatiquement */

/* Assurer que le fond reste bleu nuit seulement quand il n'y a pas d'image de fond */
html[data-theme="minimal"] body:not([class*="day-"]) .main-content,
html[data-theme="minimal"] body:not([class*="day-"]) .calendar-view,
html[data-theme="minimal"] body:not([class*="day-"]) .enigma-view {
    background: transparent;
}

/* Pour les jours avec fond d'image, ne pas appliquer de gradient par-dessus */
html[data-theme="minimal"] body[class*="day-"] {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
}

html[data-theme="minimal"] body[class*="day-"] .main-content {
    background: rgba(249, 250, 251, 0.95) !important;
    backdrop-filter: blur(2px);
    border-radius: 8px;
    margin: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

html[data-theme="minimal"] body[class*="day-"] .header {
    background: rgba(11, 28, 44, 0.95) !important;
    backdrop-filter: blur(5px);
}

html[data-theme="minimal"] body[class*="day-"] .navigation {
    background: rgba(11, 28, 44, 0.95) !important;
    backdrop-filter: blur(5px);
}

/* Navigation des indices */
html[data-theme="minimal"] .hint-navigation button,
html[data-theme="minimal"] .hint-nav-btn {
    background: var(--primary-color) !important;
    color: var(--background-color) !important;
    border: 1px solid var(--primary-color);
}

html[data-theme="minimal"] .hint-navigation button:hover,
html[data-theme="minimal"] .hint-nav-btn:hover {
    background: rgba(201,166,70,0.9) !important;
}

/* Boutons minimalistes */
html[data-theme="minimal"] button,
html[data-theme="minimal"] .btn {
    background: var(--primary-color);
    color: var(--background-color);
    border: none;
    padding: 0.8rem 2rem;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
}

html[data-theme="minimal"] button:hover,
html[data-theme="minimal"] .btn:hover {
    background: rgba(201,166,70,0.9);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(201,166,70,0.3);
}

html[data-theme="minimal"] button:active,
html[data-theme="minimal"] .btn:active {
    transform: scale(0.98);
}

/* Navigation minimaliste */
html[data-theme="minimal"] .navigation {
    background: transparent;
    border-top: 1px solid rgba(201,166,70,0.2);
}

html[data-theme="minimal"] .nav-btn {
    background: transparent;
    color: var(--primary-color);
    border: none;
    transition: all 0.3s ease;
}

html[data-theme="minimal"] .nav-btn:hover {
    background: rgba(201,166,70,0.1);
    transform: none;
}

html[data-theme="minimal"] .nav-btn.active {
    border-bottom: 2px solid var(--primary-color);
    background: rgba(201,166,70,0.05);
}

/* Modal minimaliste */
html[data-theme="minimal"] .modal {
    background: rgba(249, 250, 251, 0.95) !important;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    animation: fadeInScale 0.3s ease-out;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 2000 !important;
    max-width: 70vw;
    max-height: 60vh;
    overflow-y: auto;
    padding: 2rem;
}

/* Supprimer tous les overlays gris indésirables */
html[data-theme="minimal"] .modal-overlay,
html[data-theme="minimal"] .overlay,
html[data-theme="minimal"] .backdrop,
html[data-theme="minimal"] .modal-backdrop {
    display: none !important;
}

/* S'assurer que les conteneurs de modales n'ont pas de fond gris */
html[data-theme="minimal"] .modal-container,
html[data-theme="minimal"] .hint-container,
html[data-theme="minimal"] .modal-wrapper {
    background: transparent !important;
    backdrop-filter: none !important;
}

@keyframes fadeInScale {
    0% { 
        opacity: 0;
        transform: scale(0.95);
    }
    100% { 
        opacity: 1;
        transform: scale(1);
    }
}

/* Succès avec halo doré */
html[data-theme="minimal"] .success-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 1px solid var(--primary-color);
    background: transparent;
    animation: successGlow 2s ease-in-out;
}

@keyframes successGlow {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(201,166,70,0);
    }
    50% { 
        box-shadow: 0 0 0 20px rgba(201,166,70,0.2);
    }
}

/* Scintillement subtil pour les titres */
html[data-theme="minimal"] h1,
html[data-theme="minimal"] h2,
html[data-theme="minimal"] .enigma-title {
    animation: shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.9; filter: brightness(1.1); }
}

/* Icônes minimalistes dorées */
html[data-theme="minimal"] .theme-btn svg,
html[data-theme="minimal"] .nav-icon svg {
    stroke: var(--primary-color);
    transition: all 0.3s ease;
}

html[data-theme="minimal"] .theme-btn:hover svg,
html[data-theme="minimal"] .nav-btn:hover svg {
    stroke: rgba(201,166,70,0.8);
    transform: scale(1.1);
}

html[data-theme="minimal"] .theme-btn.active svg {
    stroke: var(--background-color);
}

/* Bouton thème minimal en blanc */
.theme-btnhtml[data-theme="minimal"] {
    background: white !important;
    color: #333 !important;
}

html[data-theme="minimal"] .nav-btn.active svg {
    stroke: var(--primary-color);
    filter: drop-shadow(0 0 3px rgba(201,166,70,0.4));
}

/* Menu hamburger minimaliste */
html[data-theme="minimal"] .hamburger,
html[data-theme="minimal"] .hamburger:before,
html[data-theme="minimal"] .hamburger:after {
    background: var(--primary-color);
}

/* Icône du titre */
html[data-theme="minimal"] .title-icon {
    stroke: var(--primary-color);
    margin-right: 0.5rem;
    animation: shimmer 4s ease-in-out infinite;
}

/* Icônes dans les boutons */
html[data-theme="minimal"] button svg,
html[data-theme="minimal"] .btn svg,
html[data-theme="minimal"] .btn-primary svg,
html[data-theme="minimal"] .btn-secondary svg {
    stroke: currentColor;
    margin-right: 0.5rem;
    transition: all 0.3s ease;
}

html[data-theme="minimal"] button:hover svg,
html[data-theme="minimal"] .btn:hover svg {
    transform: scale(1.1);
}

/* Ajustement du titre avec icône */
html[data-theme="minimal"] .title {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Alignement des boutons d'action */
html[data-theme="minimal"] .action-buttons,
html[data-theme="minimal"] .enigma-buttons,
html[data-theme="minimal"] .buttons-container,
html[data-theme="minimal"] .digicode-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

html[data-theme="minimal"] .action-buttons button,
html[data-theme="minimal"] .enigma-buttons button,
html[data-theme="minimal"] .buttons-container button,
html[data-theme="minimal"] .digicode-actions button {
    flex: 0 1 auto;
    min-width: 120px;
}

/* Alignement spécifique pour les interfaces d'énigmes */
html[data-theme="minimal"] .numeric-input-container .action-buttons,
html[data-theme="minimal"] .text-input-container .action-buttons,
html[data-theme="minimal"] .qr-input-container .action-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 0 1rem;
}

/* Espacement uniforme pour tous les types de boutons */
html[data-theme="minimal"] .action-buttons > *,
html[data-theme="minimal"] .enigma-buttons > *,
html[data-theme="minimal"] .buttons-container > *,
html[data-theme="minimal"] .digicode-actions > * {
    margin: 0;
}

/* Mobile : boutons empilés */
@media (max-width: 480px) {
    html[data-theme="minimal"] .action-buttons,
    html[data-theme="minimal"] .enigma-buttons,
    html[data-theme="minimal"] .buttons-container,
    html[data-theme="minimal"] .digicode-actions {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    html[data-theme="minimal"] .action-buttons button,
    html[data-theme="minimal"] .enigma-buttons button,
    html[data-theme="minimal"] .buttons-container button,
    html[data-theme="minimal"] .digicode-actions button {
        width: 100%;
        max-width: 200px;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: var(--font-size-md);
    overflow-x: hidden;
    transition: background-image 0.5s ease-in-out;
}

/* Styles pour les fonds d'écran des jours */
body[class*="day-"][class*="-background"] {
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Améliorer la lisibilité avec fond d'écran */
body[class*="day-"][class*="-background"] .main-content {
    background-color: rgba(15, 20, 25, 0.85);
    backdrop-filter: blur(2px);
    border-radius: var(--border-radius);
    margin: var(--spacing-sm);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

body[class*="day-"][class*="-background"] .header {
    background: rgba(196, 30, 58, 0.95);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

body[class*="day-"][class*="-background"] .navigation {
    background: rgba(30, 35, 40, 0.95);
    backdrop-filter: blur(5px);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

/* Styles spécifiques pour certains jours (optionnel) */
body.day-1-background {
    /* Styles spécifiques pour le jour 1 si nécessaire */
}

body.day-24-background {
    /* Styles spécifiques pour le jour 24 si nécessaire */
}

/* Layout principal */
#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Main */
main {
    flex: 1;
    position: relative;
    min-height: 400px;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.menu-toggle {
    display: none !important; /* Menu hamburger complètement désactivé */
}

/* Hamburger supprimé - Navigation toujours visible */

.title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    text-align: center;
    flex: 1;
}

.progress-indicator {
    background: rgba(255, 255, 255, 0.2);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
    min-width: 50px;
    text-align: center;
}

/* Sélecteur de thème */
.theme-selector {
    display: flex;
    gap: var(--spacing-xs);
    margin: 0 var(--spacing-md);
}

.theme-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid transparent;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.theme-btn svg {
    transition: all 0.3s ease;
}

.theme-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.theme-btn.active {
    background: var(--accent-color);
    border-color: var(--text-primary);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.theme-btn:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Navigation */
.navigation {
    background: var(--surface-color);
    display: flex !important;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 999;
    visibility: visible !important;
    opacity: 1 !important;
    justify-content: center;
    padding: 10px 0;
}

.nav-btn {
    flex: 1;
    max-width: 120px;
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: var(--spacing-sm) var(--spacing-xs);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: var(--font-size-sm);
}

.nav-btn:hover,
.nav-btn.active {
    color: var(--primary-color);
    background: rgba(196, 30, 58, 0.1);
}

.nav-icon {
    font-size: var(--font-size-lg);
}

/* Main content */
.main-content {
    flex: 1;
    padding: var(--spacing-lg);
    padding-top: 20px;
    overflow-y: auto;
}

.view {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.view.active {
    display: block;
}

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

/* Calendrier */
.calendar-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.calendar-header h2 {
    font-size: var(--font-size-xxl);
    margin-bottom: var(--spacing-sm);
    color: var(--accent-color);
}

.calendar-header p {
    color: var(--text-secondary);
    font-size: var(--font-size-md);
}

/* ===== TEMPLE SYMBOLIC FIREPLACE AND DOORS ===== */

/* Symbolic fireplace for temple */
.temple-fireplace {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.fireplace-rect {
    position: relative;
    width: 100px;
    height: 20px;
    background: #8B4513;
    border-radius: 6px 6px 0 0;
    border: 2px solid #654321;
}

.fireplace-rect::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 12px;
    background: #1a1a1a;
    border-radius: 8px 8px 0 0;
    border: 1px solid #333;
}

.fireplace-rect::after {
    content: '🔥';
    position: absolute;
    top: 1px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    animation: flicker-mini 1.5s infinite;
}

@keyframes flicker-mini {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Symbolic doors for temple */
.temple-doors {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 4px;
    margin-top: 15px;
    height: 25px;
}

.door-bar {
    background: #8B4513;
    border: 1px solid #654321;
    position: relative;
}

.door-bar.left {
    width: 35px;
    height: 20px;
    border-radius: 3px 3px 0 0;
    transform: perspective(100px) rotateY(25deg);
    transform-origin: right center;
}

.door-bar.left::after {
    content: '';
    position: absolute;
    width: 3px;
    height: 3px;
    background: gold;
    border-radius: 50%;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 2px rgba(255, 215, 0, 0.8);
}

.door-bar.right {
    width: 35px;
    height: 20px;
    border-radius: 3px 3px 0 0;
    transform: perspective(100px) rotateY(-25deg);
    transform-origin: left center;
}

.door-bar.right::after {
    content: '';
    position: absolute;
    width: 3px;
    height: 3px;
    background: gold;
    border-radius: 50%;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 2px rgba(255, 215, 0, 0.8);
}

.door-bar.center {
    width: 40px;
    height: 4px;
    background: #4a3018;
    border-radius: 0;
    border: 1px solid #333;
    margin-bottom: 0;
}

/* Responsive adjustments for temple elements */
@media (max-width: 768px) {
    .fireplace-rect {
        width: 80px;
        height: 16px;
    }
    
    .fireplace-rect::before {
        width: 55px;
        height: 10px;
    }
    
    .fireplace-rect::after {
        font-size: 0.6rem;
    }
    
    .temple-doors {
        height: 20px;
    }
    
    .door-bar.left, .door-bar.right {
        width: 28px;
        height: 16px;
    }
    
    .door-bar.center {
        width: 30px;
        height: 3px;
    }
}

@media (max-width: 480px) {
    .fireplace-rect {
        width: 70px;
        height: 14px;
    }
    
    .fireplace-rect::before {
        width: 45px;
        height: 8px;
    }
    
    .fireplace-rect::after {
        font-size: 0.5rem;
    }
    
    .temple-doors {
        height: 18px;
    }
    
    .door-bar.left, .door-bar.right {
        width: 24px;
        height: 14px;
    }
    
    .door-bar.center {
        width: 25px;
        height: 3px;
    }
}

/* ===== CALENDAR STYLES ===== */

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(50px, 1fr));
    gap: var(--spacing-sm);
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-md);
}

.calendar-day {
    aspect-ratio: 1;
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-lg);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    min-height: 80px;
    min-width: 80px;
}

.calendar-day:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.calendar-day.available {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: var(--accent-color);
    color: var(--text-primary);
}

.calendar-day.completed {
    background: linear-gradient(135deg, var(--success-color), var(--secondary-color));
    border-color: var(--accent-color);
    color: var(--text-primary);
}

.calendar-day.completed::after {
    content: '✓';
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: var(--font-size-sm);
    color: var(--accent-color);
}

.calendar-day.locked {
    background: var(--surface-color);
    border-color: var(--border-color);
    color: var(--text-secondary);
    cursor: not-allowed;
}

.calendar-day.locked::before {
    content: '🔒';
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: var(--font-size-xs);
}

/* Énigme */
.enigma-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.back-btn {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: var(--font-size-md);
}

.back-btn:hover {
    background: var(--border-color);
}

.enigma-day {
    background: var(--primary-color);
    color: var(--text-primary);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: var(--font-size-sm);
}

.enigma-content {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.story-text {
    margin-bottom: var(--spacing-lg);
    line-height: 1.8;
    font-size: var(--font-size-md);
    color: var(--text-primary);
}

/* Fix pour le thème minimal - forcer la couleur du texte */
html[data-theme="minimal"] .story-text,
html[data-theme="minimal"] .story-content p {
    color: var(--accent-color) !important;
}

.qr-section,
.puzzle-section {
    margin-bottom: var(--spacing-lg);
}

.qr-section h3,
.puzzle-section h3 {
    color: var(--accent-color);
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-lg);
}

.qr-options {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.code-input {
    background: var(--background-color);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.unlock-info {
    margin-bottom: var(--spacing-md);
    text-align: center;
    color: var(--text-secondary);
}

.accessoire-message {
    margin-bottom: var(--spacing-lg);
}

.accessoire-requirement {
    background: var(--surface-color);
    border: 1px solid var(--warning-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    text-align: center;
}

.accessoire-icon {
    font-size: 48px;
    margin: var(--spacing-md) 0;
}

.accessoire-hint {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin-top: var(--spacing-sm);
}

.code-input label {
    display: block;
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.code-input input {
    width: 100%;
    max-width: 200px;
    padding: var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--surface-color);
    color: var(--text-primary);
    font-size: var(--font-size-md);
    margin-bottom: var(--spacing-md);
}

.code-input input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(196, 30, 58, 0.2);
}

.puzzle-content {
    background: var(--surface-color);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    margin-bottom: var(--spacing-lg);
    color: var(--text-primary);
}

/* Fix pour le thème minimal */
html[data-theme="minimal"] .puzzle-content {
    background: var(--surface-color);
    border: 1px solid var(--accent-color);
    color: var(--text-primary);
}

/* Fix pour les sections avec arrière-plan sombre */
.puzzle-content div[style*="background: #333"],
.puzzle-content div[style*="background:#333"] {
    color: var(--accent-color) !important;
}

.puzzle-content div[style*="background: #333"] p,
.puzzle-content div[style*="background:#333"] p,
.puzzle-content div[style*="background: #333"] select,
.puzzle-content div[style*="background:#333"] select {
    color: var(--accent-color) !important;
    background-color: var(--surface-color) !important;
    border: 1px solid var(--accent-color) !important;
}

.puzzle-content div[style*="background: #333"] option,
.puzzle-content div[style*="background:#333"] option {
    color: var(--accent-color) !important;
    background-color: var(--surface-color) !important;
}

/* Interface de reconstitution de carte pleine largeur */
.map-reconstruction-fullwidth {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: var(--spacing-lg);
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.map-puzzle-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-md);
}

.map-pieces-container,
.map-assembly-container,
.compass-container {
    padding: var(--spacing-md);
    background: var(--surface-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.map-pieces {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.map-piece {
    padding: var(--spacing-sm);
    background: var(--accent-color);
    color: var(--background-color);
    border-radius: var(--border-radius);
    cursor: grab;
    text-align: center;
    font-weight: 600;
}

.map-piece:hover {
    opacity: 0.8;
}

.map-piece.dragging {
    opacity: 0.5;
}

.map-assembly-area {
    min-height: 200px;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    position: relative;
}

.map-assembly-area.dragover {
    border-color: var(--accent-color);
    background: rgba(201, 166, 70, 0.1);
}

.compass {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.compass-direction {
    padding: var(--spacing-sm);
    background: var(--border-color);
    color: var(--text-primary);
    text-align: center;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.compass-direction:hover {
    background: var(--accent-color);
    color: var(--background-color);
}

.direction-sequence {
    min-height: 40px;
    padding: var(--spacing-sm);
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

@media (max-width: 768px) {
    .map-puzzle-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .map-reconstruction-fullwidth {
        margin-left: calc(-50vw + 50%);
        width: 100vw;
        padding: var(--spacing-md);
    }
}

.answer-section label {
    display: block;
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.answer-section input {
    width: 100%;
    padding: var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--surface-color);
    color: var(--text-primary);
    font-size: var(--font-size-md);
    margin-bottom: var(--spacing-md);
}

.answer-section input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(196, 30, 58, 0.2);
}

.action-buttons,
.digicode-actions,
.enigma-buttons,
.buttons-container,
.puzzle-actions {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

/* Media query générale pour mobile - boutons en colonne */
@media (max-width: 768px) {
    .action-buttons,
    .digicode-actions,
    .enigma-buttons,
    .buttons-container,
    .puzzle-actions,
    .lake-actions,
    .navigation-actions,
    .statuettes-actions,
    .cooking-actions,
    .subway-actions,
    .gifts-actions,
    .sweets-actions,
    .alchemy-actions,
    .chess-actions,
    .numeric-actions,
    .text-actions {
        display: flex !important;
        flex-direction: column !important;
        gap: var(--spacing-sm) !important;
        width: 100% !important;
        align-items: center !important;
        padding: var(--spacing-md) 0 !important;
    }

    .action-buttons button,
    .digicode-actions button,
    .enigma-buttons button,
    .buttons-container button,
    .puzzle-actions button,
    .lake-actions button,
    .navigation-actions button,
    .statuettes-actions button,
    .cooking-actions button,
    .subway-actions button,
    .gifts-actions button,
    .sweets-actions button,
    .alchemy-actions button,
    .chess-actions button,
    .numeric-actions button,
    .text-actions button,
    #hintBtn,
    #resetBtn,
    #validateBtn,
    #clearBtn,
    #resetSequenceBtn {
        width: 100% !important;
        max-width: 280px !important;
        min-width: 200px !important;
        margin: 5px auto !important;
        padding: 12px 20px !important;
        font-size: 16px !important;
        display: block !important;
    }

    /* Ordre spécifique pour les 3 boutons principaux */
    #hintBtn { order: 1; }
    #resetBtn, #clearBtn, #resetSequenceBtn { order: 2; }
    #validateBtn { order: 3; }
}

/* Pour très petits écrans (smartphones) */
@media (max-width: 480px) {
    .action-buttons button,
    .digicode-actions button,
    .enigma-buttons button,
    .buttons-container button,
    .puzzle-actions button,
    .lake-actions button,
    .navigation-actions button,
    .statuettes-actions button,
    #hintBtn,
    #resetBtn,
    #validateBtn,
    #clearBtn,
    #resetSequenceBtn {
        width: 90% !important;
        max-width: 250px !important;
        min-width: 180px !important;
        padding: 10px 15px !important;
        font-size: 14px !important;
    }
}

/* Interface Digicode améliorée */
.digicode-container {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-xl);
    border: 1px solid var(--border-color);
    text-align: center;
}

.digicode-label {
    display: block;
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: var(--spacing-sm);
}

.digicode-instruction {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    font-size: var(--font-size-md);
}

.digicode-display {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin: var(--spacing-xl) 0;
}

.digicode-display.numeric6 {
    gap: var(--spacing-sm);
}

.digicode-display.numeric6 .digit-slot {
    width: 60px;
    height: 70px;
}

.digicode-display.numeric6 .digit-input {
    height: 60px;
    font-size: var(--font-size-xl);
}

/* Styles pour l'interface du lac gelé (Jour 4) */
.lake-container {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 50%, #d0d0d0 100%);
    border-radius: 16px;
    padding: var(--spacing-xl);
    margin: var(--spacing-md) 0;
    border: 2px solid rgba(128, 128, 128, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.lake-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid rgba(128, 128, 128, 0.2);
}

.lake-header h3 {
    color: #000000;
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(255,255,255,0.3);
}

.lake-subtitle {
    color: #333333;
    font-size: var(--font-size-lg);
    margin: var(--spacing-xs) 0 0 0;
    font-weight: 500;
}

.lake-rules {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    border: 1px solid rgba(128, 128, 128, 0.2);
    backdrop-filter: blur(10px);
}

.lake-rules h4 {
    color: #000000;
    margin: 0 0 var(--spacing-md) 0;
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.rules-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rules-list li {
    padding: var(--spacing-xs) 0;
    color: #333333;
    font-size: var(--font-size-md);
    position: relative;
    padding-left: var(--spacing-lg);
}

.rules-list li:before {
    content: '❄️';
    position: absolute;
    left: 0;
    top: var(--spacing-xs);
}

.lake-equipment {
    margin-bottom: var(--spacing-xl);
}

.lake-equipment h4 {
    color: #000000;
    margin: 0 0 var(--spacing-lg) 0;
    font-size: var(--font-size-lg);
    font-weight: 600;
    text-align: center;
}

.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.lake-equipment-item {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(128, 128, 128, 0.3);
    border-radius: 12px;
    padding: var(--spacing-lg);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    backdrop-filter: blur(10px);
}

.lake-equipment-item:hover {
    background: rgba(255, 255, 255, 1);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(128, 128, 128, 0.3);
}

.lake-equipment-item.selected {
    background: linear-gradient(135deg, #666666 0%, #4a4a4a 100%);
    border-color: var(--accent-color);
    color: white;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(128, 128, 128, 0.4);
}

.lake-equipment-item.error {
    background: linear-gradient(135deg, #ff4757 0%, #ff3838 100%);
    border-color: #ff4757;
    animation: shake 0.5s ease-in-out;
    color: white;
}

.lake-equipment-item.error .equipment-name {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: 700;
}

.equipment-image-container {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-sm) auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
}

.equipment-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    transition: transform 0.3s ease;
}

.lake-equipment-item:hover .equipment-image {
    transform: scale(1.1);
}

.equipment-name {
    font-size: var(--font-size-md);
    font-weight: 600;
    margin-top: var(--spacing-sm);
    text-align: center;
    color: #000000;
}

.lake-equipment-item.selected .equipment-name {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: 700;
}

.equipment-order {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
    border: 2px solid white;
}

.lake-sequence {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    border: 1px solid rgba(128, 128, 128, 0.2);
    backdrop-filter: blur(10px);
}

.lake-sequence h4 {
    color: #000000;
    margin: 0 0 var(--spacing-md) 0;
    font-size: var(--font-size-lg);
    font-weight: 600;
    text-align: center;
}

.sequence-display {
    background: rgba(128, 128, 128, 0.1);
    border-radius: 8px;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    text-align: center;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sequence-text {
    color: #000000;
    font-size: var(--font-size-md);
    font-weight: 500;
}

.sequence-progress {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    justify-content: center;
}

.progress-bar {
    width: 200px;
    height: 8px;
    background: rgba(128, 128, 128, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #666666 0%, #4a4a4a 100%);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: var(--font-size-sm);
    color: #333333;
    font-weight: 600;
}

.lake-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin-top: var(--spacing-lg);
}

.lake-actions button {
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: var(--font-size-md);
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.btn-primary {
    background: linear-gradient(135deg, #666666 0%, #4a4a4a 100%);
    color: white;
    border: 2px solid transparent;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4a4a4a 0%, #666666 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 32px rgba(128, 128, 128, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #333333;
    border: 2px solid rgba(128, 128, 128, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-color: #333333;
}

.btn-icon {
    font-size: 1.2rem;
}

.btn-text {
    font-weight: 600;
}

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

/* Styles spécifiques pour le jour 4 avec fond d'écran */
body.day-4-background .lake-container {
    background: linear-gradient(135deg, rgba(245, 245, 245, 0.95) 0%, rgba(232, 232, 232, 0.95) 50%, rgba(208, 208, 208, 0.95) 100%);
    backdrop-filter: blur(5px);
    border: 2px solid rgba(128, 128, 128, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

body.day-4-background .lake-rules,
body.day-4-background .lake-sequence {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(128, 128, 128, 0.3);
}

body.day-4-background .lake-equipment-item {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(128, 128, 128, 0.4);
}

body.day-4-background .lake-equipment-item:hover {
    background: rgba(255, 255, 255, 1);
    backdrop-filter: blur(10px);
}

/* Styles pour le jour 5 - Les statuettes */
.statuettes-container {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 50%, #d0d0d0 100%);
    border-radius: 16px;
    padding: var(--spacing-xl);
    margin: var(--spacing-md) 0;
    border: 2px solid rgba(128, 128, 128, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.statuettes-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid rgba(128, 128, 128, 0.2);
}

.statuettes-header h3 {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.statuettes-header p {
    color: #f0f0f0;
    font-size: 1.1rem;
    margin: var(--spacing-sm) 0 0 0;
    opacity: 0.9;
}

.statuettes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.statuette-slot {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    border: 3px dashed rgba(128, 128, 128, 0.4);
    border-radius: 12px;
    padding: var(--spacing-lg);
    min-height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.statuette-slot.drag-over {
    background: linear-gradient(135deg, #e8f5e8 0%, #d0f0d0 100%);
    border-color: rgba(40, 167, 69, 0.6);
    transform: scale(1.02);
}

.statuette-slot.filled {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    border: 3px solid rgba(70, 130, 180, 0.5);
}

.statuette-slot-label {
    position: absolute;
    top: 8px;
    left: 12px;
    color: #666666;
    font-size: 0.9rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.8);
    padding: 4px 8px;
    border-radius: 4px;
}

.statuette-placed {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.slot-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    width: 100%;
}

.slot-number {
    position: absolute;
    top: 8px;
    right: 12px;
    color: #666666;
    font-size: 1.2rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.8);
    padding: 4px 8px;
    border-radius: 4px;
}

.statuette-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 2px solid rgba(128, 128, 128, 0.3);
    object-fit: cover;
    transition: transform 0.3s ease;
    background-color: #f0f0f0;
}

.statuette-image[style*="display: block"] {
    border: 3px solid #28a745 !important;
}

.statuette-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    margin: 0 auto;
}

.statuette-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.rotation-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.rotate-btn {
    background: linear-gradient(135deg, #666666 0%, #555555 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    min-width: 30px;
}

.rotate-btn:hover {
    background: linear-gradient(135deg, #555555 0%, #444444 100%);
    transform: translateY(-1px);
}

.statuette-name {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(128, 128, 128, 0.3);
    border-radius: 6px;
    padding: var(--spacing-sm);
    font-size: 0.9rem;
    color: #000000;
    text-align: center;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 150px;
    margin-top: var(--spacing-sm);
}

.statuette-name:focus {
    outline: none;
    border-color: rgba(70, 130, 180, 0.6);
    background: rgba(255, 255, 255, 1);
}

.rotation-btn {
    background: linear-gradient(135deg, #666666 0%, #555555 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.rotation-btn:hover {
    background: linear-gradient(135deg, #555555 0%, #444444 100%);
    transform: translateY(-1px);
}

.rotation-display {
    color: #000000;
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
}

.statuette-name-input {
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    padding: var(--spacing-sm);
    font-size: 0.9rem;
    color: var(--text-primary);
    text-align: center;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 150px;
}

.statuette-name-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: var(--surface-color);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

.statuettes-available {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 2px solid rgba(128, 128, 128, 0.2);
}

.statuettes-bank {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 2px solid rgba(128, 128, 128, 0.2);
}

.statuettes-bank h4 {
    color: #000000;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.statuettes-grid-container h4 {
    color: #000000;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.statuettes-story {
    margin-bottom: var(--spacing-xl);
}

.story-card {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    padding: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    border: 1px solid rgba(128, 128, 128, 0.3);
}

.story-icon {
    font-size: 2rem;
}

.story-content {
    flex: 1;
}

.story-content p {
    color: #000000;
    margin: 0;
    font-size: 1rem;
}

.statuettes-actions {
    margin-top: var(--spacing-xl);
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
}

.placement-status {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    align-items: center;
}

.status-text {
    color: #000000;
    font-size: 1rem;
    font-weight: 600;
}

.placement-details {
    color: #666666;
    font-size: 0.9rem;
}

.statuettes-available h4 {
    color: #000000;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.statuettes-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--spacing-md);
}

.statuette-item {
    background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
    border: 2px solid rgba(128, 128, 128, 0.3);
    border-radius: 12px;
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: grab;
    transition: all 0.3s ease;
    position: relative;
}

.statuette-item:hover {
    background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 100%);
    border-color: rgba(128, 128, 128, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.statuette-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.statuette-item.used {
    opacity: 0.3;
    cursor: not-allowed;
    filter: grayscale(100%);
}

.statuette-item img,
.statuette-item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 2px solid rgba(128, 128, 128, 0.2);
    object-fit: cover;
}

.statuette-item span {
    color: #000000;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

.statuette-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}

.statuette-name {
    color: #000000;
    font-size: 0.9rem;
    font-weight: 600;
}

.statuette-description {
    color: #666666;
    font-size: 0.8rem;
    font-style: italic;
}

.statuettes-status {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    border: 1px solid rgba(128, 128, 128, 0.3);
    text-align: center;
}

.statuettes-status p {
    color: #000000;
    font-size: 1rem;
    margin: 0;
    font-weight: 500;
}

.statuettes-validation {
    margin-top: var(--spacing-lg);
    text-align: center;
}

.validate-statuettes-btn {
    background: linear-gradient(135deg, #666666 0%, #555555 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.validate-statuettes-btn:hover {
    background: linear-gradient(135deg, #555555 0%, #444444 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.validate-statuettes-btn:disabled {
    background: linear-gradient(135deg, #cccccc 0%, #aaaaaa 100%);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

/* Styles pour les arrière-plans du jour 5 */
body.day-5-background .statuettes-container {
    background: linear-gradient(135deg, rgba(245, 245, 245, 0.95) 0%, rgba(232, 232, 232, 0.95) 50%, rgba(208, 208, 208, 0.95) 100%);
    backdrop-filter: blur(5px);
    border: 2px solid rgba(128, 128, 128, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

body.day-5-background .statuette-slot {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border: 3px dashed rgba(128, 128, 128, 0.5);
}

body.day-5-background .statuette-item {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(128, 128, 128, 0.4);
}

body.day-5-background .statuette-item:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(128, 128, 128, 0.6);
}

body.day-5-background .statuettes-status {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(128, 128, 128, 0.5);
}

/* Styles pour l'interface mobile */
.statuette-item.selected {
    background: linear-gradient(135deg, #e8f5e8 0%, #d0f0d0 100%);
    border-color: rgba(40, 167, 69, 0.8);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.mobile-hint {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 20px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-hint.show {
    opacity: 1;
}

.mobile-rotation-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-rotation-panel.show {
    opacity: 1;
}

.mobile-rotation-panel .modal-content {
    background: white;
    border-radius: 16px;
    padding: 0;
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.rotation-panel-header {
    background: linear-gradient(135deg, #666666 0%, #555555 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
}

.close-panel {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rotation-panel-content {
    padding: 20px;
    max-height: 80vh;
    overflow-y: auto;
}

.rotation-preview-container {
    text-align: center;
    margin-bottom: 20px;
}

.rotation-preview-container img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 2px solid #ddd;
    transition: transform 0.3s ease;
}

.rotation-instructions {
    text-align: center;
    margin-bottom: 20px;
}

.rotation-instructions p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.rotation-grid-3x3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 20px auto;
    max-width: 200px;
}

.grid-cell {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #f8f8f8 0%, #e8e8e8 100%);
    border: 2px solid #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.grid-cell:hover {
    background: linear-gradient(135deg, #e8e8e8 0%, #d8d8d8 100%);
    border-color: #999;
    transform: scale(1.05);
}

.grid-cell.active {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-color: #20c997;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.grid-cell.center-cell {
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    border: 2px solid #ccc;
    cursor: default;
}

.grid-cell.center-cell:hover {
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    border-color: #ccc;
    transform: none;
}

.grid-cell.center-cell img {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.rotation-info {
    text-align: center;
    margin: 20px 0;
    padding: 12px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
}

.rotation-info p {
    margin: 0;
    color: #333;
    font-size: 14px;
}

.rotation-info span {
    font-weight: 600;
    color: #666;
}

.rotation-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.rotation-actions .btn-secondary {
    flex: 1;
    background: linear-gradient(135deg, #666666 0%, #555555 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rotation-actions .btn-secondary:hover {
    background: linear-gradient(135deg, #555555 0%, #444444 100%);
    transform: translateY(-2px);
}

.confirm-rotation {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.confirm-rotation:hover {
    background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
    transform: translateY(-2px);
}

/* Styles pour l'interface du temple */
.puzzle-layout-container {
    margin: var(--spacing-xl) 0;
}

.temple-plan {
    background: linear-gradient(135deg, #f8f8f8 0%, #e8e8e8 100%);
    border: 3px solid rgba(128, 128, 128, 0.4);
    border-radius: 16px;
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    position: relative;
}

.temple-door {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
    border-radius: 12px;
    border: 2px solid #8b7355;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.door-symbol {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

.temple-door span {
    color: #2f1b14;
    font-weight: 600;
    font-size: 1.1rem;
}

.main-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    min-height: 400px;
}

.temple-cell {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    border: 2px solid rgba(128, 128, 128, 0.3);
    border-radius: 12px;
    padding: var(--spacing-md);
    position: relative;
    transition: all 0.3s ease;
}

.temple-cell.drag-over {
    background: linear-gradient(135deg, #e8f5e8 0%, #d0f0d0 100%);
    border-color: rgba(40, 167, 69, 0.6);
    transform: scale(1.02);
}

.cell-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
    padding-bottom: var(--spacing-xs);
    border-bottom: 1px solid rgba(128, 128, 128, 0.2);
}

.cell-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.cell-number {
    background: linear-gradient(135deg, #666666 0%, #555555 100%);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.sub-grid-3x3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 2px;
    height: 120px;
    margin-bottom: var(--spacing-sm);
}

.sub-cell {
    background: rgba(128, 128, 128, 0.1);
    border: 1px solid rgba(128, 128, 128, 0.2);
    border-radius: 4px;
}

.sub-cell.center-cell {
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    border: 2px solid rgba(128, 128, 128, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sub-cell.center-cell:hover {
    background: linear-gradient(135deg, #e8e8e8 0%, #d8d8d8 100%);
    border-color: rgba(128, 128, 128, 0.6);
    transform: scale(1.05);
}

.statuette-placement {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
}

.empty-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    padding: 8px;
    background: rgba(128, 128, 128, 0.1);
    border: 2px dashed rgba(128, 128, 128, 0.3);
}

.empty-placeholder:hover {
    color: #666;
    background: rgba(40, 167, 69, 0.1);
    border-color: rgba(40, 167, 69, 0.4);
    transform: scale(1.05);
}

.placeholder-icon {
    font-size: 1.5rem;
    margin-bottom: 2px;
}

.placeholder-text {
    font-size: 0.7rem;
    font-weight: 500;
}

.cell-controls {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.statuette-name-input {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(128, 128, 128, 0.3);
    border-radius: 6px;
    padding: 6px;
    font-size: 0.8rem;
    color: #000;
    text-align: center;
}

.rotation-info {
    text-align: center;
}

.temple-entrance {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: linear-gradient(135deg, #8b4513 0%, #654321 100%);
    border-radius: 12px;
    border: 2px solid #5d4037;
}

.entrance-lever {
    width: 40px;
    height: 60px;
    background: linear-gradient(135deg, #696969 0%, #2f4f4f 100%);
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.left-lever {
    transform: rotate(-15deg);
}

.right-lever {
    transform: rotate(15deg);
}

.entrance-text {
    color: #f5deb3;
    font-weight: 600;
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.puzzle-legend {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(128, 128, 128, 0.3);
    border-radius: 12px;
    padding: var(--spacing-lg);
}

.puzzle-legend h5 {
    color: #333;
    font-size: 1.2rem;
    margin: 0 0 var(--spacing-md) 0;
    text-align: center;
}

.legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.legend-item {
    background: rgba(248, 248, 248, 0.8);
    border: 1px solid rgba(128, 128, 128, 0.2);
    border-radius: 8px;
    padding: var(--spacing-md);
    font-size: 0.9rem;
    color: #333;
}

.legend-item strong {
    color: #2c5530;
    display: block;
    margin-bottom: 4px;
}

/* Modal de sélection de statuettes */
.statuette-selection-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.statuette-selection-modal.show {
    opacity: 1;
}

.statuette-selection-modal .modal-content {
    background: white;
    border-radius: 16px;
    padding: 0;
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    max-width: 600px;
}

.statuette-selection-modal .modal-header {
    background: linear-gradient(135deg, #666666 0%, #555555 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
}

.statuette-selection-modal .modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.statuette-selection-modal .modal-body {
    padding: 20px;
}

.selection-instruction {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    font-size: 16px;
}

.selection-instruction span {
    font-weight: 600;
    color: #666;
}

.available-statuettes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    max-height: 400px;
    overflow-y: auto;
}

.selectable-statuette {
    background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
    border: 2px solid rgba(128, 128, 128, 0.3);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.selectable-statuette:hover {
    background: linear-gradient(135deg, #e8f5e8 0%, #d0f0d0 100%);
    border-color: rgba(40, 167, 69, 0.6);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.selectable-statuette img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 2px solid rgba(128, 128, 128, 0.2);
    object-fit: cover;
}

.selectable-statuette .statuette-info {
    text-align: center;
}

.selectable-statuette .statuette-name {
    color: #000;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.selectable-statuette .statuette-desc {
    color: #666;
    font-size: 12px;
    font-style: italic;
}

.no-statuettes {
    text-align: center;
    color: #999;
    font-size: 16px;
    padding: 40px;
    font-style: italic;
}

/* Responsive pour le modal de sélection */
@media (max-width: 768px) {
    .available-statuettes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .selectable-statuette {
        padding: 12px;
    }
    
    .selectable-statuette img {
        width: 60px;
        height: 60px;
    }
    
    .statuette-selection-modal .modal-content {
        max-width: 95%;
        max-height: 95%;
    }
}

/* Styles pour la nouvelle interface d'orientation des statuettes */
.statuettes-orientation-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-md);
}

.temple-container {
    background: linear-gradient(135deg, #f8f8f8 0%, #e8e8e8 100%);
    border-radius: 16px;
    padding: var(--spacing-lg);
    margin: var(--spacing-md) 0;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
}

.temple-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: var(--spacing-md);
    max-width: 800px;
    margin: 0 auto;
}

.statuette-item {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    border: 2px solid rgba(128, 128, 128, 0.3);
    border-radius: 12px;
    padding: var(--spacing-md);
    text-align: center;
    transition: all 0.3s ease;
}

.statuette-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-color: rgba(40, 167, 69, 0.4);
}

.statuette-item.error {
    border-color: #dc3545;
    background: linear-gradient(135deg, #ffeaea 0%, #ffe0e0 100%);
    animation: shake 0.5s ease-in-out;
}

.statuette-visual {
    margin-bottom: var(--spacing-md);
}

.statuette-image-container {
    position: relative;
    display: inline-block;
    width: 120px;
    height: 120px;
    margin-bottom: var(--spacing-sm);
}

.statuette-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid rgba(128, 128, 128, 0.2);
    transition: transform 0.3s ease;
}

.rotation-indicator {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    background: rgba(40, 167, 69, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    font-weight: bold;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.orientation-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.rotate-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rotate-btn:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea085 100%);
    transform: scale(1.1);
}

.rotate-btn:active {
    transform: scale(0.95);
}

.rotation-display {
    background: rgba(128, 128, 128, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
}

.statuette-naming {
    margin-bottom: var(--spacing-sm);
}

.statuette-name-input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid rgba(128, 128, 128, 0.3);
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    transition: all 0.2s ease;
    background: white;
}

.statuette-name-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.validation-feedback {
    font-size: 12px;
    margin-top: 4px;
    min-height: 16px;
    font-weight: 600;
}

.validation-feedback.correct {
    color: #28a745;
}

.validation-feedback.incorrect {
    color: #dc3545;
}

.position-label {
    font-size: 12px;
    color: #666;
    font-weight: 600;
    background: rgba(128, 128, 128, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.descriptions-toggle {
    text-align: center;
    margin: var(--spacing-md) 0;
}

.statuettes-descriptions {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: var(--spacing-lg);
    margin: var(--spacing-md) 0;
    border: 2px solid rgba(128, 128, 128, 0.2);
}

.descriptions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.description-card {
    background: white;
    border-radius: 8px;
    padding: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.description-card:hover {
    transform: translateY(-2px);
}

.description-icon {
    font-size: 24px;
    width: 40px;
    text-align: center;
}

.description-content h5 {
    margin: 0 0 4px 0;
    color: #333;
    font-size: 16px;
}

.description-content p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.orientation-status {
    text-align: center;
    padding: var(--spacing-md);
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 8px;
    margin: var(--spacing-md) 0;
    border: 2px solid rgba(33, 150, 243, 0.3);
}

.orientation-status .status-text {
    font-weight: 600;
    color: #1976d2;
    font-size: 16px;
}

/* Responsive pour mobile - Garde 2 colonnes pour les statuettes */
@media (max-width: 768px) {
    .temple-container {
        padding: 12px;
        margin: 10px 0;
    }
    
    .temple-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
        gap: 10px;
        max-width: 100%;
    }
    
    .statuette-item {
        padding: 8px;
        min-height: 180px;
    }
    
    /* Interface clans responsive */
    .clan-selection-container {
        padding: var(--spacing-md);
    }
    
    .table-positions {
        max-width: 100%;
    }
    
    .clan-position {
        min-width: 50px;
        min-height: 50px;
        padding: 6px;
    }
    
    .table-center {
        min-width: 60px;
        min-height: 60px;
        padding: 15px;
        font-size: 12px;
    }
    
    .clans-grid {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        gap: 8px;
    }
    
    .clan-item .clan-image {
        width: 35px;
        height: 35px;
    }
    
    .clan-item .clan-name {
        font-size: 10px;
    }
    
    /* Interface paniers responsive */
    .sweets-selection-container {
        padding: var(--spacing-md);
    }
    
    .selected-slots {
        gap: 8px;
    }
    
    .basket-slot {
        min-width: 70px;
        min-height: 70px;
        padding: 6px;
    }
    
    .baskets-grid {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 8px;
    }
    
    .basket-image {
        width: 40px;
        height: 40px;
    }
    
    .basket-letter {
        font-size: 16px;
    }
    
    .basket-details {
        font-size: 10px;
    }

    /* Interface symboles responsive (Jour 12) */
    .symbols-selection-container {
        padding: var(--spacing-md);
    }
    
    .symbols-grid {
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
        gap: var(--spacing-sm);
    }
    
    .symbol-item {
        width: 60px;
        height: 60px;
    }
    
    .sequence-slots {
        gap: 6px;
    }
    
    .symbol-slot {
        width: 65px;
        height: 65px;
    }
    
    .symbol-slot img {
        width: 40px;
        height: 40px;
    }

    /* Interface alchimie responsive (Jour 13) */
    .alchemy-selection-container {
        padding: var(--spacing-md);
    }
    
    .ingredients-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: var(--spacing-sm);
    }
    
    .ingredient-item {
        width: 75px;
    }
    
    .ingredient-item img {
        width: 40px;
        height: 40px;
    }
    
    .potion-steps {
        gap: var(--spacing-sm);
    }
    
    .ingredient-slot {
        width: 75px;
        min-height: 70px;
    }
    
    .ingredient-slot img {
        width: 35px;
        height: 35px;
    }

    /* Interface carte responsive (Jour 14) */
    .map-selection-container {
        padding: var(--spacing-md);
    }
    
    .map-pieces-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: var(--spacing-sm);
    }
    
    .map-piece-item {
        width: 100px;
        height: 80px;
    }
    
    .map-assembly-area {
        height: 300px;
    }
    
    .compass-container {
        width: 250px;
        height: 250px;
    }
    
    .compass-btn {
        padding: 4px 8px;
        font-size: 0.8rem;
    }
    
    .placed-piece {
        width: 80px;
        height: 64px;
    }
    }
    
    .statuette-image-container {
        width: 100px;
        height: 100px;
    }
    
    .rotate-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .descriptions-grid {
        grid-template-columns: 1fr;
    }
    
    .description-card {
        flex-direction: column;
        text-align: center;
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Styles pour l'interface de cuisine (Jour 6) */
.cooking-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-md);
}

.cooking-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.cooking-subtitle {
    color: #666;
    font-size: 16px;
    margin-top: var(--spacing-sm);
}

.ingredients-selection {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    padding: var(--spacing-lg);
    margin: var(--spacing-md) 0;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
}

.ingredient-categories {
    display: grid;
    gap: var(--spacing-lg);
}

.ingredient-category {
    background: white;
    border-radius: 12px;
    padding: var(--spacing-lg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 2px solid rgba(128, 128, 128, 0.1);
}

.category-title {
    color: #333;
    font-size: 18px;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid #eee;
}

.ingredient-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.ingredient-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
    border: 2px solid rgba(128, 128, 128, 0.2);
    border-radius: 10px;
    padding: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    transition: all 0.3s ease;
    cursor: pointer;
}

.ingredient-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border-color: rgba(40, 167, 69, 0.4);
}

.ingredient-card.fresh {
    border-color: rgba(40, 167, 69, 0.6);
    background: linear-gradient(135deg, #e8f5e8 0%, #d0f0d0 100%);
}

.ingredient-card.fresh::after {
    content: "✨ Frais";
    position: absolute;
    top: -5px;
    right: -5px;
    background: #28a745;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: bold;
}

.ingredient-card.not-fresh {
    border-color: rgba(220, 53, 69, 0.4);
    background: linear-gradient(135deg, #ffeaea 0%, #ffe0e0 100%);
    opacity: 0.7;
}

.ingredient-card.not-fresh::after {
    content: "🚫 Pas frais";
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: bold;
}

.ingredient-card {
    position: relative;
}

.ingredient-icon {
    font-size: 32px;
    min-width: 40px;
    text-align: center;
}

.ingredient-info {
    flex-grow: 1;
}

.ingredient-info h5 {
    margin: 0 0 4px 0;
    color: #333;
    font-size: 16px;
}

.ingredient-description {
    margin: 4px 0;
    color: #666;
    font-size: 12px;
    font-style: italic;
}

.ingredient-count {
    display: block;
    color: #28a745;
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
}

.ingredient-selection {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.selection-checkbox {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.selection-checkbox input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
}

.checkmark {
    position: relative;
    display: inline-block;
    width: 24px;
    height: 24px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.selection-checkbox:hover .checkmark {
    border-color: #28a745;
}

.selection-checkbox input:checked ~ .checkmark {
    background: #28a745;
    border-color: #28a745;
}

.selection-checkbox input:checked ~ .checkmark::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.selection-radio {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.selection-radio input[type="radio"] {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
}

.radiomark {
    position: relative;
    display: inline-block;
    width: 24px;
    height: 24px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.selection-radio:hover .radiomark {
    border-color: #28a745;
}

.selection-radio input:checked ~ .radiomark {
    background: #28a745;
    border-color: #28a745;
}

.selection-radio input:checked ~ .radiomark::after {
    content: "•";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 18px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-xs);
}

.ingredient-image {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: var(--spacing-xs);
    position: relative;
}

.ingredient-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.runic-symbol {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.8);
    color: #ffd700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    text-shadow: 0 0 2px rgba(255, 215, 0, 0.5);
    border: 1px solid #ffd700;
}



.quantity-controls label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
}

.quantity-input[type="text"] {
    width: 50px;
    height: 32px;
    border: 2px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    background: white;
    color: #333;
    transition: border-color 0.2s ease;
}

.quantity-input[type="text"]:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

.quantity-input[type="text"]::placeholder {
    color: #999;
    font-weight: normal;
}

.quantity-input {
    width: 60px;
    padding: 4px 8px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    color: #333;
    background: white;
}

.quantity-input:focus {
    outline: none;
    border-color: #007bff;
}

.recipe-summary {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 12px;
    padding: var(--spacing-lg);
    margin: var(--spacing-md) 0;
    border: 2px solid rgba(33, 150, 243, 0.3);
}

.recipe-summary h4 {
    color: #1976d2;
    margin-bottom: var(--spacing-md);
}

.selected-ingredients {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-sm);
}

.selected-item {
    background: white;
    padding: var(--spacing-sm);
    border-radius: 8px;
    border: 2px solid rgba(33, 150, 243, 0.2);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-weight: 600;
    color: #333;
}

.no-selection {
    color: #666;
    font-style: italic;
    text-align: center;
    grid-column: 1 / -1;
}

.cooking-actions {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .ingredient-items {
        grid-template-columns: 1fr;
    }
    
    .ingredient-card {
        flex-direction: column;
        text-align: center;
    }
    
    .selected-ingredients {
        grid-template-columns: 1fr;
    }
    
    .cooking-actions {
        flex-direction: column;
        align-items: center;
    }
}

/* Responsive design pour les statuettes */
@media (max-width: 768px) {
    .statuettes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    .statuette-slot {
        min-height: 140px;
        padding: var(--spacing-md);
    }
    
    .statuette-slot-label {
        font-size: 0.8rem;
    }
    
    .statuettes-list {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: var(--spacing-sm);
    }
    
    .statuette-item {
        padding: var(--spacing-sm);
    }
    
    .statuette-item img,
    .statuette-item-image {
        width: 50px;
        height: 50px;
    }
    
    .statuette-image {
        width: 60px;
        height: 60px;
    }
    
    .statuette-name {
        font-size: 0.8rem;
        padding: 6px;
    }
    
    .rotation-controls {
        flex-direction: column;
        gap: 8px;
    }
    
    .rotate-btn {
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .rotation-display {
        font-size: 0.8rem;
    }
    
    .statuettes-container {
        padding: var(--spacing-md);
    }
    
    .statuettes-header h3 {
        font-size: 1.5rem;
    }
    
    .statuettes-header p {
        font-size: 1rem;
    }
    
    /* Responsive pour le temple - Garde 2 colonnes, 3 lignes pour le jour 5 */
    .main-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
        min-height: auto;
        gap: 10px;
    }
    
    .temple-cell {
        padding: var(--spacing-sm);
    }
    
    .sub-grid-3x3 {
        height: 100px;
    }
    
    .cell-label {
        font-size: 0.8rem;
    }
    
    .legend-grid {
        grid-template-columns: 1fr;
    }
    
    .temple-door {
        padding: var(--spacing-sm);
    }
    
    .door-symbol {
        font-size: 1.5rem;
    }
    
    .entrance-lever {
        width: 30px;
        height: 45px;
    }
}

/* Responsive pour le lac gelé */
@media (max-width: 768px) {
    .equipment-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }
    
    .lake-equipment-item {
        padding: var(--spacing-md);
    }
    
    .equipment-image-container {
        width: 60px;
        height: 60px;
    }
    
    .equipment-name {
        font-size: var(--font-size-sm);
    }
    
    .lake-actions {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .lake-actions button {
        width: 100%;
        justify-content: center;
    }
    
    .progress-bar {
        width: 150px;
    }
}



.digit-slot {
    position: relative;
    width: 70px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.digit-input {
    width: 100%;
    height: 70px;
    text-align: center;
    font-size: var(--font-size-xxl);
    font-weight: 700;
    border: none;
    border-radius: var(--border-radius);
    background: var(--background-color);
    color: var(--text-primary);
    transition: var(--transition);
    position: relative;
    z-index: 2;
}

.digit-input:focus {
    outline: none;
    background: var(--primary-color);
    color: var(--text-primary);
    transform: scale(1.05);
}

.digit-underline {
    position: absolute;
    bottom: 5px;
    left: 10px;
    right: 10px;
    height: 3px;
    background: var(--border-color);
    border-radius: 2px;
    transition: var(--transition);
}

.digit-slot.focused .digit-underline {
    background: var(--primary-color);
    box-shadow: 0 0 8px rgba(196, 30, 58, 0.5);
}

.digit-slot.filled .digit-underline {
    background: var(--accent-color);
    transform: scaleX(1.1);
}

.digit-slot.filled .digit-input {
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid var(--accent-color);
}

.digit-input.error {
    background: rgba(220, 53, 69, 0.2);
    border: 2px solid var(--error-color);
    animation: shake 0.5s ease-in-out;
}

.digicode-status {
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    background: var(--background-color);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.digicode-status.progress {
    background: rgba(255, 215, 0, 0.1);
    border-color: var(--accent-color);
}

.digicode-status.complete {
    background: rgba(40, 167, 69, 0.1);
    border-color: var(--success-color);
}

/* Styles pour l'interface interphone (Jour 9) */
.interphone-container {
    max-width: 400px;
    margin: 0 auto;
    padding: var(--spacing-lg);
}

.interphone-keypad {
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow);
}

.keypad-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.key {
    aspect-ratio: 1;
    background: var(--background-color);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: var(--font-size-lg);
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.key:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

.key:active {
    transform: translateY(0);
}

.key.clear-key {
    background: var(--error-color);
    border-color: var(--error-color);
    color: white;
}

.key.clear-key:hover {
    background: #c82333;
    border-color: #c82333;
}

.key.delete-key {
    background: var(--warning-color);
    border-color: var(--warning-color);
    color: var(--background-color);
}

.key.delete-key:hover {
    background: #e0a800;
    border-color: #e0a800;
}

.key.error {
    background: rgba(220, 53, 69, 0.2);
    border-color: var(--error-color);
    animation: shake 0.5s ease-in-out;
}

.code-display {
    position: relative;
    background: #000;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    text-align: center;
}

#interphone-display {
    background: transparent;
    border: none;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 2em;
    font-weight: bold;
    text-align: center;
    width: 100%;
    letter-spacing: 0.2em;
    outline: none;
}

#interphone-display::placeholder {
    color: #008000;
    opacity: 0.7;
}

/* Responsive design pour l'interphone */
@media (max-width: 768px) {
    .interphone-container {
        padding: var(--spacing-md);
    }
    
    .keypad-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-sm);
    }
    
    .key {
        min-height: 50px;
        font-size: var(--font-size-md);
    }
    
    #interphone-display {
        font-size: 1.5em;
    }
}

.interphone-actions {
    margin-top: var(--spacing-lg);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    align-items: center;
}

.interphone-actions .btn {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--font-size-md);
    min-width: 120px;
    width: 200px;
}

/* Styles pour l'interface sucreries (Jour 10) */
.sweets-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-lg);
}

.sweets-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.sweets-header h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.sweets-header p {
    color: var(--text-secondary);
}

.sweets-available {
    margin-bottom: var(--spacing-xl);
}

.sweets-available h4 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.available-baskets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
}

.basket-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-md);
    background: var(--background-color);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: grab;
    transition: var(--transition);
}

.basket-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.2);
}

.basket-item.dragging {
    opacity: 0.5;
    transform: scale(0.9);
}

.basket-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: var(--spacing-sm);
    pointer-events: none;
}

.basket-label {
    text-align: center;
    pointer-events: none;
}

.basket-letter {
    font-size: var(--font-size-lg);
    font-weight: bold;
    color: var(--text-primary);
    display: block;
}

.sweets-drop-zone {
    margin-bottom: var(--spacing-xl);
}

.sweets-drop-zone h4 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.drop-slots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
}

.drop-slot {
    min-height: 120px;
    background: var(--background-color);
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.drop-slot:hover {
    border-color: var(--primary-color);
}

.drop-slot.drag-over {
    border-color: var(--accent-color);
    background: rgba(255, 215, 0, 0.1);
    border-style: solid;
}

.slot-placeholder {
    text-align: center;
    color: var(--text-secondary);
}

.slot-number {
    display: block;
    font-size: var(--font-size-xl);
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
}

.slot-text {
    font-size: var(--font-size-sm);
}

.basket-in-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: var(--spacing-sm);
}

.slot-basket-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-bottom: var(--spacing-sm);
}

.slot-basket-letter {
    font-size: var(--font-size-lg);
    font-weight: bold;
    color: var(--accent-color);
}

.remove-basket {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--error-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.remove-basket:hover {
    background: #c82333;
    transform: scale(1.1);
}

.sweets-actions {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.sweets-actions .btn {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--font-size-md);
    min-width: 140px;
}

.basket.error {
    border-color: var(--error-color);
    background: rgba(220, 53, 69, 0.1);
    animation: shake 0.5s ease-in-out;
}

/* Responsive design pour les sucreries */
@media (max-width: 768px) {
    .sweets-container {
        padding: var(--spacing-md);
    }
    
    .available-baskets {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .drop-slots {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    .sweets-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .sweets-actions .btn {
        width: 100%;
        max-width: 200px;
    }
}

.status-text {
    font-weight: 600;
    color: var(--text-primary);
}

.digicode-status.progress .status-text {
    color: var(--accent-color);
}

.digicode-status.complete .status-text {
    color: var(--success-color);
}

.btn-clear {
    background: var(--warning-color);
    color: var(--background-color);
    border: none;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: var(--font-size-md);
    font-weight: 600;
    transition: var(--transition);
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.btn-clear:hover {
    background: #e0a800;
    transform: translateY(-1px);
}

/* Responsive pour le digicode */
@media (max-width: 480px) {
    .digicode-display {
        gap: var(--spacing-sm);
    }
    
    .digit-slot {
        width: 60px;
        height: 70px;
    }
    
    .digit-input {
        height: 60px;
        font-size: var(--font-size-xl);
    }
    
    .digicode-container {
        padding: var(--spacing-lg);
    }
    
    .action-buttons {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
}

@media (max-width: 360px) {
    .digit-slot {
        width: 50px;
        height: 60px;
    }
    
    .digit-input {
        height: 50px;
        font-size: var(--font-size-lg);
    }
    
    .digicode-display {
        gap: var(--spacing-xs);
    }
}

/* Interface de saisie de texte améliorée */
.text-input-container {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-xl);
    border: 1px solid var(--border-color);
    text-align: left;
}

.text-input-label {
    display: block;
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: var(--spacing-sm);
}

.text-input-instruction {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    font-size: var(--font-size-md);
    line-height: 1.5;
}

.text-input-wrapper {
    position: relative;
    margin-bottom: var(--spacing-lg);
}

.text-input-field {
    width: 100%;
    padding: var(--spacing-lg);
    padding-right: 50px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--background-color);
    color: var(--text-primary);
    font-size: var(--font-size-lg);
    font-weight: 500;
    transition: var(--transition);
    letter-spacing: 0.5px;
}

.text-input-field:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.2);
    background: var(--surface-color);
}

.text-input-field::placeholder {
    color: var(--text-secondary);
    font-style: italic;
}

.text-input-wrapper.focused {
    transform: translateY(-2px);
}

.text-input-wrapper.focused .text-input-field {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.2);
}

.input-clear-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: var(--text-secondary);
    color: var(--background-color);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: var(--transition);
    border: none;
    line-height: 1;
}

.input-clear-btn:not([style*="display: none"]) {
    display: flex !important;
}

.input-clear-btn:hover {
    background: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

.text-input-status {
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    background: var(--background-color);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: var(--transition);
}

.text-input-status.typing {
    background: rgba(255, 215, 0, 0.1);
    border-color: var(--accent-color);
}

.text-input-status.ready {
    background: rgba(40, 167, 69, 0.1);
    border-color: var(--success-color);
}

.text-input-status .status-text {
    font-weight: 500;
    color: var(--text-primary);
    font-size: var(--font-size-sm);
}

.text-input-status.typing .status-text {
    color: var(--accent-color);
}

.text-input-status.ready .status-text {
    color: var(--success-color);
}

.text-input-field.error {
    border-color: var(--error-color);
    background: rgba(220, 53, 69, 0.1);
    animation: shake 0.5s ease-in-out;
}

/* Responsive pour l'input texte */
@media (max-width: 480px) {
    .text-input-container {
        padding: var(--spacing-lg);
    }
    
    .text-input-field {
        padding: var(--spacing-md);
        padding-right: 45px;
        font-size: var(--font-size-md);
    }
    
    .input-clear-btn {
        width: 20px;
        height: 20px;
        right: 12px;
        font-size: 10px;
    }
}

/* Boutons */
.btn-primary,
.btn-secondary {
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: var(--font-size-md);
    font-weight: 600;
    transition: var(--transition);
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-primary);
}

.btn-primary:hover {
    background: #a91b32;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--surface-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
    transform: translateY(-1px);
}

/* Profil */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.codes-section {
    margin-bottom: var(--spacing-xl);
}

.codes-section h3 {
    color: var(--accent-color);
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-lg);
}

.codes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.code-item {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    text-align: center;
    transition: var(--transition);
    opacity: 0.6;
    position: relative;
}

.code-item.collected {
    border-color: var(--accent-color);
    background: rgba(255, 215, 0, 0.1);
    opacity: 1;
}

.code-item:not(.collected) .code-value {
    filter: blur(3px);
    user-select: none;
}

.code-number {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
}

.code-value {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: var(--spacing-xs);
}

.code-day {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
}

.codes-requirement,
.codes-equation-display {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    text-align: center;
}

.equation-steps {
    margin: var(--spacing-lg) 0;
    text-align: left;
}

.equation-steps p {
    margin: var(--spacing-md) 0;
    font-size: var(--font-size-md);
    line-height: 1.6;
}

.final-equation {
    background: var(--background-color);
    border: 1px solid var(--accent-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    margin-top: var(--spacing-lg) !important;
    font-weight: 600;
    color: var(--accent-color);
}

.stat-item {
    background: var(--surface-color);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-number {
    display: block;
    font-size: var(--font-size-xxl);
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: var(--spacing-sm);
}

.stat-label {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.achievements h3 {
    color: var(--accent-color);
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-lg);
}

.achievement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.achievement-item {
    background: var(--surface-color);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    text-align: center;
}

.achievement-item.unlocked {
    border-color: var(--accent-color);
    background: rgba(255, 215, 0, 0.1);
}

.achievement-icon {
    font-size: var(--font-size-xl);
    margin-bottom: var(--spacing-sm);
}

.achievement-title {
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.achievement-description {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

/* Avertissement de stockage */
.storage-warning {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid var(--warning-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.storage-warning p {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    line-height: 1.6;
    margin: 0;
}

/* Onglets des récompenses */
.rewards-tabs {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--border-color);
}

.reward-tab-btn {
    background: transparent;
    border: none;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.reward-tab-btn:hover {
    color: var(--text-primary);
}

.reward-tab-btn.active {
    color: var(--accent-color);
    font-weight: 600;
}

.reward-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-color);
}

.reward-content {
    position: relative;
}

.reward-tab-content {
    display: none;
}

.reward-tab-content.active {
    display: block;
}

/* Grille des trophées */
.trophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.trophy-item {
    background: var(--surface-color);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    border: 2px solid var(--border-color);
    text-align: center;
    position: relative;
    transition: var(--transition);
}

.trophy-item.unlocked {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 193, 7, 0.1));
    box-shadow: 0 4px 8px rgba(255, 215, 0, 0.2);
}

.trophy-item.locked {
    opacity: 0.5;
}

.trophy-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    filter: grayscale(100%);
    transition: var(--transition);
}

.trophy-item.unlocked .trophy-icon {
    filter: grayscale(0%);
    animation: trophy-shine 2s ease-in-out;
}

@keyframes trophy-shine {
    0%, 100% { transform: scale(1) rotateY(0); }
    50% { transform: scale(1.1) rotateY(360deg); }
}

.trophy-title {
    font-weight: 700;
    font-size: var(--font-size-md);
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.trophy-description {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-sm);
}

.trophy-progress {
    background: var(--border-color);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-top: var(--spacing-sm);
}

.trophy-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--warning-color));
    transition: width 0.5s ease;
}

.trophy-progress-text {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    margin-top: var(--spacing-xs);
}

.profile-actions {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

/* Aide */
.help-view {
    position: absolute !important;
    top: 160px !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 50 !important;
    min-height: calc(100vh - 160px) !important;
    width: 100% !important;
    opacity: 1 !important;
    visibility: visible !important;
    overflow: visible !important;
    padding: 20px !important;
    background: var(--background-color) !important;
}
.help-view h2 {
    color: var(--accent-color);
    text-align: center;
    margin-bottom: var(--spacing-xl);
    font-size: var(--font-size-xxl);
}

.help-content {
    max-width: 600px;
    margin: 0 auto;
}

.help-section {
    background: var(--surface-color);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-lg);
    border: 1px solid var(--border-color);
}

.help-section h3 {
    color: var(--accent-color);
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-lg);
}

.help-section p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.help-section ul {
    color: var(--text-secondary);
    line-height: 1.8;
}

.help-section a {
    color: var(--accent-color);
    text-decoration: none;
}

.help-section a:hover {
    text-decoration: underline;
}

/* Modales */
.hint-modal,
.success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: var(--spacing-lg);
    overflow: hidden;
    overscroll-behavior: none;
}

/* Désactiver le scroll du body quand une modal est ouverte */
body.modal-open,
html.modal-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100%;
    height: 100%;
}

body.modal-open .main-content {
    overflow: hidden !important;
}

body.modal-open .view {
    overflow: hidden !important;
}

body.modal-open #app {
    overflow: hidden !important;
}

.modal-content {
    background: var(--surface-color);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius);
    max-width: 85vw;
    max-height: 80vh;
    width: auto;
    text-align: left;
    border: 1px solid var(--border-color);
    overflow-y: auto;
    overflow-x: hidden;
    line-height: 1.6;
    box-sizing: border-box;
}

.modal-content * {
    overflow-x: hidden;
}

.modal-content img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.modal-content h3 {
    color: var(--accent-color);
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-lg);
}

.modal-content p {
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
    overflow-x: hidden !important;
    word-wrap: break-word;
}

/* Styles spécifiques pour le contenu de succès */
#successText {
    max-width: 100%;
    overflow-x: hidden !important;
    white-space: pre-wrap;
    word-break: break-word;
}

#successText img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: var(--spacing-sm) auto;
}

/* S'assurer qu'aucun élément ne crée de scroll horizontal */
.success-modal *,
.success-modal *:before,
.success-modal *:after {
    box-sizing: border-box !important;
    max-width: 100%;
    overflow-x: hidden !important;
}

.modal-content .btn-primary,
.modal-content .btn-secondary {
    margin: var(--spacing-sm);
}

/* Navigation des indices */
.hint-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
}

.hint-navigation button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--surface-color);
}

#hintCounter {
    font-weight: 600;
    color: var(--accent-color);
    font-size: var(--font-size-md);
}

#hintText {
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
    min-height: 80px;
}

/* Loading */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 20, 25, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: var(--spacing-md);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Classes utilitaires */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-success {
    color: var(--success-color);
}

.text-error {
    color: var(--error-color);
}

.text-warning {
    color: var(--warning-color);
}

/* Responsive Design */

/* Téléphones (320px - 768px) */
@media (max-width: 768px) {
    .header {
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .title {
        font-size: var(--font-size-md);
    }
    
    .theme-selector {
        margin: 0 var(--spacing-sm);
        order: 3;
        flex-basis: 100%;
        justify-content: center;
        margin-top: var(--spacing-sm);
    }
    
    .theme-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .main-content {
        padding: var(--spacing-md);
        padding-top: 10px;
    }
    
    .calendar-grid {
        display: grid;
        grid-template-columns: repeat(6, minmax(45px, 1fr));
        gap: 8px;
        padding: 10px;
        width: 100%;
        max-width: 100vw;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .calendar-day {
        min-height: 45px;
        min-width: 45px;
        max-width: 55px;
        font-size: 14px;
        padding: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .enigma-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .enigma-header h2 {
        order: 1;
        margin-bottom: var(--spacing-sm);
    }
    
    .back-btn {
        order: 2;
    }
    
    .enigma-day {
        order: 3;
    }
    
    .qr-options {
        flex-direction: column;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .profile-actions {
        flex-direction: column;
    }
    
    .modal-content {
        margin: var(--spacing-sm);
        padding: var(--spacing-lg);
        max-width: 95vw;
        max-height: 90vh;
    }
}

/* Très petits écrans (320px - 480px) */
@media (max-width: 480px) {
    /* Temple du jour 5 - Garde toujours 2 colonnes x 3 lignes */
    .main-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
        gap: 8px;
        min-height: auto;
    }
    
    /* Grille des statuettes pour orientation */
    .temple-container {
        padding: 8px;
        margin: 8px 0;
    }
    
    .temple-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
        gap: 6px;
        max-width: 100%;
    }
    
    .statuette-item {
        padding: 6px;
        min-height: 150px;
    }
    
    .statuette-image-container {
        width: 80px;
        height: 80px;
    }
    
    .temple-cell {
        padding: 6px;
        min-height: 90px;
    }
    
    .sub-grid-3x3 {
        height: 70px;
    }
    
    .cell-label {
        font-size: 0.7rem;
    }
    
    .calendar-grid {
        display: grid;
        grid-template-columns: repeat(6, minmax(40px, 1fr));
        gap: 6px;
        padding: 8px;
        margin: 0 auto;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .calendar-day {
        min-height: 40px;
        min-width: 40px;
        max-width: 50px;
        font-size: 12px;
        padding: var(--spacing-xs);
        box-sizing: border-box;
    }
    
    .enigma-content {
        padding: var(--spacing-md);
    }
    
    .menu-toggle {
        display: none !important;
    }
    
    .navigation {
        position: sticky;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: auto;
        background: var(--surface-color);
        flex-direction: row;
        justify-content: center;
        border-bottom: 1px solid var(--border-color);
        padding: 8px 0;
        z-index: 1000;
        display: flex !important;
    }
    
    .nav-btn {
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        width: auto !important;
        flex: 1 !important;
        max-width: 100px !important;
        padding: 6px 2px !important;
        border: none !important;
        font-size: 0.7rem !important;
        height: auto !important;
        white-space: nowrap !important;
    }
    
    .nav-icon {
        margin-right: 0;
        margin-bottom: 4px;
        width: 24px;
        height: 24px;
    }
}

/* Navigation forcée pour tous les petits écrans */
@media (max-width: 480px) {
    .navigation {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 9999 !important;
        background: var(--surface-color) !important;
        min-height: 50px !important;
    }
    
    .nav-btn {
        display: flex !important;
        visibility: visible !important;
        font-size: 0.65rem !important;
        padding: 5px 1px !important;
    }
    
    .nav-icon {
        width: 18px !important;
        height: 18px !important;
        display: block !important;
    }
}

/* Très petits écrans (320px - 375px) - Spécifique jour 5 */
@media (max-width: 375px) {
    /* Navigation encore plus compacte */
    .navigation {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 9999 !important;
        background: var(--surface-color) !important;
        min-height: 45px !important;
    }
    
    .nav-btn {
        display: flex !important;
        visibility: visible !important;
        font-size: 0.6rem !important;
        padding: 4px 1px !important;
    }
    
    .nav-icon {
        width: 16px !important;
        height: 16px !important;
        display: block !important;
    }
    
    /* Temple du jour 5 - Toujours 2 colonnes x 3 lignes */
    .main-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: repeat(3, 1fr);
        gap: 5px;
    }
    
    /* Grille des statuettes pour orientation */
    .temple-container {
        padding: 6px;
        margin: 6px 0;
    }
    
    .temple-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: repeat(3, 1fr);
        gap: 4px;
        max-width: 100%;
    }
    
    .statuette-item {
        padding: 4px;
        min-height: 130px;
    }
    
    .statuette-image-container {
        width: 60px;
        height: 60px;
    }
    
    .temple-cell {
        padding: 4px;
        min-height: 75px;
    }
    
    .sub-grid-3x3 {
        height: 50px;
        gap: 1px;
    }
    
    .cell-label {
        font-size: 0.6rem;
    }
}

/* Tablettes (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .calendar-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .calendar-day {
        min-height: 90px;
        min-width: 90px;
    }
    
    .enigma-content {
        padding: var(--spacing-xl);
    }
    
    .stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .qr-options {
        justify-content: center;
    }
    
    .action-buttons {
        justify-content: center;
    }
}

/* Desktop (1025px+) */
@media (min-width: 1025px) {
    .navigation {
        position: static;
        border-top: none;
        border-bottom: 1px solid var(--border-color);
        justify-content: center;
        gap: var(--spacing-lg);
    }
    
    .nav-btn {
        flex: none;
        min-width: 120px;
    }
    
    .calendar-grid {
        grid-template-columns: repeat(8, 1fr);
    }
    
    .calendar-day {
        min-height: 100px;
        min-width: 100px;
    }
    
    .enigma-content {
        max-width: 800px;
        margin: 0 auto var(--spacing-lg);
    }
    
    .qr-options {
        justify-content: center;
    }
    
    .action-buttons {
        justify-content: center;
    }
    
    .stats {
        grid-template-columns: repeat(3, 1fr);
        max-width: 600px;
        margin: 0 auto var(--spacing-xl);
    }
    
    .modal-content {
        max-width: 85vw;
        max-height: 85vh;
    }
}

/* Améliorations pour l'accessibilité */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --background-color: #000000;
        --surface-color: #1a1a1a;
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
        --border-color: #666666;
        --primary-color: #ff0000;
        --accent-color: #ffff00;
    }
}

/* Focus visible pour l'accessibilité */
button:focus-visible,
input:focus-visible,
.calendar-day:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Amélioration des contrastes pour les boutons */
.btn-primary:disabled,
.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-primary:disabled:hover,
.btn-secondary:disabled:hover {
    transform: none;
}

/* Print styles */
@media print {
    .header,
    .navigation,
    .loading-overlay,
    .hint-modal,
    .success-modal {
        display: none !important;
    }
    
    .main-content {
        padding: 0;
    }
    
    .view {
        display: block !important;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* Styles pour l'interface dragdrop_table (Jour 7) */
.dragdrop-table-container {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    margin: var(--spacing-md) 0;
    box-shadow: var(--shadow);
}

.table-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.table-header h3 {
    color: var(--accent-color);
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-xl);
}

.table-subtitle {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.table-main {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

/* Écran de réunion en haut */
.meeting-screen {
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.screen-content {
    font-size: var(--font-size-lg);
    color: var(--text-primary);
    font-weight: 600;
}

/* Portes en bas */
.meeting-doors {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    margin-top: var(--spacing-md);
}

.door-left, .door-right {
    font-size: var(--font-size-xl);
    color: var(--text-secondary);
    transform: rotate(0deg);
}

.door-left {
    transform: rotate(-15deg);
}

.door-right {
    transform: rotate(15deg);
}

.clan-table {
    background: var(--background-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    border: 2px solid var(--border-color);
}

.table-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
}

.table-row {
    display: flex;
    gap: var(--spacing-lg);
}

.table-middle {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.table-column {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.table-center {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-xl);
    border: 2px solid var(--secondary-color);
}

.table-surface {
    width: 180px;
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    border-radius: var(--border-radius);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow);
}

.table-icon {
    font-size: var(--font-size-xl);
    margin-bottom: 4px;
}

.table-text {
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-align: center;
}

.clan-seat {
    width: 80px;
    height: 80px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--surface-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.clan-seat .clan-image {
    background: white;
    border-radius: 50%;
    padding: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.clan-seat:hover {
    border-color: var(--accent-color);
    background: var(--background-color);
}

.clan-seat.drag-over {
    border-color: var(--success-color);
    background: rgba(40, 167, 69, 0.1);
}

.clan-seat.error {
    border-color: var(--error-color);
    background: rgba(220, 53, 69, 0.1);
    animation: shake 0.5s ease-in-out;
}

.seat-number {
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    background: var(--background-color);
    padding: 1px 4px;
    border-radius: 3px;
}

.seat-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clan-pieces-container {
    background: var(--background-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    border: 2px solid var(--border-color);
}

.clan-pieces-container h4 {
    color: var(--accent-color);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.clan-pieces {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: var(--spacing-sm);
    max-height: 400px;
    overflow-y: auto;
}

.clan-piece {
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: grab;
    transition: var(--transition);
    user-select: none;
    min-height: 100px;
    position: relative;
    -webkit-user-drag: element;
}

.clan-piece:hover {
    border-color: var(--accent-color);
    background: var(--background-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.clan-piece.dragging {
    opacity: 0.5;
    cursor: grabbing;
    transform: scale(0.95);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.clan-piece.placed {
    cursor: default;
    transform: scale(0.8);
    min-height: 70px;
    padding: var(--spacing-xs);
}

.clan-piece.placed .clan-image {
    width: 40px;
    height: 40px;
}

.clan-piece.placed .clan-name {
    font-size: var(--font-size-xs);
    line-height: 1.2;
}

.clan-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: brightness(0.8);
    transition: var(--transition);
    background: white;
    border-radius: 50%;
    padding: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    pointer-events: none;
}

.clan-piece:hover .clan-image {
    filter: brightness(1);
    transform: scale(1.1);
}

.clan-icon {
    font-size: var(--font-size-xl);
}

.clan-name {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: 500;
    text-align: center;
    pointer-events: none;
}

.table-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin-top: var(--spacing-lg);
}

.table-actions .btn-primary.ready {
    background: var(--success-color);
    border-color: var(--success-color);
}

.table-actions .btn-primary.ready:hover {
    background: #218838;
    border-color: #1e7e34;
}

/* Responsive pour l'interface dragdrop_table */
@media (max-width: 768px) {
    .table-middle {
        display: flex;
        align-items: flex-start;
        gap: var(--spacing-sm);
        width: 100%;
        justify-content: center;
    }
    
    .table-column {
        display: flex;
        flex-direction: column;
        gap: var(--spacing-xs);
        min-width: 80px;
    }
    
    .table-column.left {
        align-items: flex-end;
    }
    
    .table-column.right {
        align-items: flex-start;
    }
    
    .clan-seat {
        width: 50px;
        height: 50px;
        min-width: 50px;
        min-height: 50px;
        font-size: var(--font-size-xs);
    }
    
    .table-surface {
        width: 120px;
        height: 80px;
        min-width: 120px;
        min-height: 80px;
    }
    
    .table-center {
        padding: var(--spacing-md);
        min-width: 120px;
    }
    
    .table-visual {
        width: 100%;
        max-width: 350px;
        margin: 0 auto;
    }
    
    .clan-pieces {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: var(--spacing-sm);
    }
    
    /* Styles pour la sélection mobile */
    .clan-piece.selected {
        background: var(--primary-color) !important;
        color: var(--text-on-primary) !important;
        transform: scale(1.05);
        border: 2px solid var(--accent-color) !important;
        box-shadow: 0 0 15px rgba(var(--primary-color-rgb), 0.5);
    }
    
    .clan-piece {
        cursor: pointer;
        transition: all 0.2s ease;
        border: 2px solid transparent;
    }
    
    .clan-piece:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }
    
    .clan-piece {
        padding: var(--spacing-sm);
    }
}

/* ============================================
   Interface Subway (Jour 8)
   ============================================ */

.subway-container {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    margin: var(--spacing-md) 0;
    box-shadow: var(--shadow);
}

.subway-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.subway-header h3 {
    color: var(--accent-color);
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-xl);
}

.subway-subtitle {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.subway-main {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.route-info {
    background: var(--background-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    border: 2px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
    justify-content: space-between;
}

.station-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
}

.station-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: 600;
}

.station-name {
    font-size: var(--font-size-md);
    color: var(--text-primary);
    font-weight: 700;
}

.stations-selection {
    background: var(--background-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    border: 2px solid var(--border-color);
}

.stations-selection h4 {
    color: var(--accent-color);
    margin-bottom: var(--spacing-sm);
    text-align: center;
}

.selection-note {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: var(--border-radius);
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-sm);
    color: #856404;
    text-align: center;
    font-weight: 600;
}

.stations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.station-step {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.step-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: 600;
}

.station-select {
    padding: var(--spacing-sm);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--surface-color);
    color: var(--text-primary);
    font-size: var(--font-size-md);
    cursor: pointer;
    transition: var(--transition);
}

/* Fix pour le thème minimal */
html[data-theme="minimal"] .station-select {
    background: var(--surface-color);
    border: 2px solid var(--accent-color);
    color: var(--text-primary);
}

.station-select:hover {
    border-color: var(--accent-color);
}

.station-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.2);
}

.station-select.error {
    border-color: var(--error-color);
    background: rgba(220, 53, 69, 0.1);
    animation: shake 0.5s ease-in-out;
}

.journey-progress {
    background: var(--background-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    border: 2px solid var(--border-color);
}

.progress-info {
    display: flex;
    justify-content: center;
    margin-bottom: var(--spacing-sm);
}

.progress-text {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    width: 0%;
    transition: width 0.3s ease;
}

.subway-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin-top: var(--spacing-lg);
}

.subway-actions .btn-primary.ready {
    background: var(--success-color);
    border-color: var(--success-color);
}

.subway-actions .btn-primary.ready:hover {
    background: #218838;
    border-color: #1e7e34;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .route-info {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .stations-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .station-step {
        gap: var(--spacing-xs);
    }
    
    .subway-actions {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
}

/* ==================== */
/* JOUR 11 - MODERN FULL-WIDTH GIFTS INTERFACE */
/* ==================== */

.gifts-container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: rgba(255, 255, 255, 0.9);
    position: relative;
    overflow: hidden;
}

.gifts-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.gifts-header {
    text-align: center;
    padding: 2rem 0 3rem 0;
    position: relative;
    z-index: 1;
}

.gifts-header h3 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

.gifts-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.excel-table-container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto 4rem auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.2),
        0 8px 20px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.excel-table-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(102, 126, 234, 0.1), 
        rgba(118, 75, 162, 0.1), 
        rgba(255, 154, 158, 0.1), 
        rgba(250, 208, 196, 0.1));
    border-radius: 20px;
    z-index: -1;
}

.excel-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 15px;
    position: relative;
}

.excel-cell {
    border: none;
    padding: 20px 24px;
    text-align: center;
    vertical-align: middle;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.header-cell {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    font-weight: 800;
    color: #ffffff;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.header-cell::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    opacity: 0;
    transition: opacity 0.3s ease;
}


.header-cell:first-child {
    border-top-left-radius: 20px;
}

.header-cell:last-child {
    border-top-right-radius: 20px;
}

.row-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    font-weight: 700;
    color: #1a202c;
    text-align: left;
    padding: 20px 28px;
    min-width: 180px;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-right: 3px solid rgba(102, 126, 234, 0.3);
}

/* Couleurs modernes pour chaque type de rangée */
.prenom-cell {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid #0ea5e9;
    position: relative;
    overflow: hidden;
}

.prenom-cell::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.05), rgba(56, 189, 248, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.prenom-cell:hover::before {
    opacity: 1;
}

.signe-cell {
    background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
    border-left: 4px solid #f59e0b;
    position: relative;
    overflow: hidden;
}

.signe-cell::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), rgba(251, 191, 36, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.signe-cell:hover::before {
    opacity: 1;
}

.couleur-cell {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    border-left: 4px solid #8b5cf6;
    position: relative;
    overflow: hidden;
}

.couleur-cell::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(167, 139, 250, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.couleur-cell:hover::before {
    opacity: 1;
}

.forme-cell {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-left: 4px solid #10b981;
    position: relative;
    overflow: hidden;
}

.forme-cell::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(52, 211, 153, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.forme-cell:hover::before {
    opacity: 1;
}

.excel-dropdown {
    width: 100%;
    height: 100%;
    border: none;
    background: rgba(255, 255, 255, 0.8);
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    padding: 12px 40px 12px 16px;
    appearance: none;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="%23667eea"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" /></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: relative;
    z-index: 1;
}


.excel-dropdown:focus {
    outline: none;
    background: #ffffff;
    box-shadow: 
        0 0 0 3px rgba(102, 126, 234, 0.1),
        0 0 0 6px rgba(102, 126, 234, 0.05),
        0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px) scale(1.02);
}

.excel-dropdown option {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    background: #ffffff;
    border: none;
}

.excel-dropdown option:disabled {
    color: #9ca3af;
    background: #f9fafb;
    font-style: italic;
}

.excel-dropdown option:checked {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff;
    font-weight: 600;
}

}

/* Animation d'apparition moderne */
.excel-table {
    animation: modernFadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modernFadeIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

}

/* Coins arrondis modernes */
.excel-row:last-child .excel-cell:first-child {
    border-bottom-left-radius: 20px;
}

.excel-row:last-child .excel-cell:last-child {
    border-bottom-right-radius: 20px;
}

.gifts-actions {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin: 3rem auto 0 auto;
    padding: 2rem;
    max-width: 800px;
    width: 90%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 2;
}

.gifts-actions::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1), 
        rgba(255, 255, 255, 0.05));
    border-radius: 24px;
    z-index: -1;
}

.gifts-actions .btn {
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 700;
    min-width: 180px;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    backdrop-filter: blur(20px);
}

.gifts-actions .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    transition: left 0.5s ease;
}

.gifts-actions .btn:hover::before {
    left: 100%;
}

.gifts-actions .btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.gifts-actions .btn:active {
    transform: translateY(-2px) scale(1.02);
    transition: all 0.1s ease;
}

.gifts-actions .btn-secondary {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(100, 116, 139, 0.3);
}

.gifts-actions .btn-secondary:hover {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    box-shadow: 0 20px 40px rgba(100, 116, 139, 0.4);
}

.gifts-actions .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.gifts-actions .btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.5);
}

.gifts-actions .btn-primary:disabled {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: 0 4px 10px rgba(156, 163, 175, 0.2);
}

.gifts-actions .btn-primary:disabled:hover {
    transform: none;
    box-shadow: 0 4px 10px rgba(156, 163, 175, 0.2);
}

/* Animation de succès moderne */
@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.excel-table.success {
    animation: successPulse 0.8s ease-in-out;
}

.excel-table.success .excel-cell {
    animation: successGlow 1.2s ease-in-out;
}

@keyframes successGlow {
    0%, 100% { 
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); 
    }
    50% { 
        box-shadow: 
            0 0 30px rgba(16, 185, 129, 0.4),
            0 10px 25px rgba(0, 0, 0, 0.15);
    }
}

/* Responsive design moderne */
@media (max-width: 1024px) {
    .gifts-header h3 {
        font-size: 2rem;
    }
    
    .excel-table-container {
        width: 98%;
        margin: 0 auto 3rem auto;
    }
}

@media (max-width: 768px) {
    .gifts-header {
        padding: 1.5rem 0 2rem 0;
    }
    
    .gifts-header h3 {
        font-size: 1.8rem;
    }
    
    .gifts-header p {
        font-size: 1rem;
    }
    
    .excel-table-container {
        width: 100%;
        border-radius: 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0;
        margin: 10px 0;
    }
    
    .excel-table {
        min-width: 600px; /* Largeur minimum pour éviter que le tableau soit trop compressé */
        font-size: 12px;
    }
    
    .excel-cell {
        padding: 8px 6px;
        font-size: 11px;
        min-width: 80px;
        white-space: nowrap;
    }
    
    .header-cell {
        padding: 10px 8px;
        font-size: 10px;
        font-weight: 600;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
    }
    
    .row-header {
        min-width: 70px;
        font-size: 10px;
        font-weight: 600;
    }
    
    .excel-dropdown {
        font-size: 10px;
        padding: 4px 2px;
        min-width: 70px;
    }
}

/* Très petits écrans (480px et moins) - Interface cadeaux */
@media (max-width: 480px) {
    .gifts-container {
        padding: 10px;
    }
    
    .excel-table-container {
        width: 100%;
        border-radius: 10px;
        margin: 5px 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .excel-table {
        min-width: 500px; /* Largeur minimum pour très petits écrans */
        font-size: 10px;
    }
    
    .excel-cell {
        padding: 5px 3px;
        font-size: 9px;
        min-width: 65px;
        min-height: 35px;
    }
    
    .header-cell {
        padding: 6px 4px;
        font-size: 8px;
        font-weight: 600;
        min-width: 65px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
    }
    
    .row-header {
        min-width: 55px;
        font-size: 8px;
        font-weight: 600;
        padding: 5px 3px;
    }
    
    .excel-dropdown {
        font-size: 8px;
        padding: 2px 1px;
        min-width: 60px;
        border-radius: 4px;
    }
    
    .gifts-header h3 {
        font-size: 1.4rem;
    }
    
    .gifts-header p {
        font-size: 0.85rem;
    }
    
    .mobile-scroll-hint {
        background: rgba(255, 193, 7, 0.1);
        border: 1px solid rgba(255, 193, 7, 0.3);
        border-radius: 8px;
        padding: 8px 12px;
        margin-top: 10px;
        text-align: center;
    }
    
    .mobile-scroll-hint small {
        color: #856404;
        font-weight: 500;
    }
    
    .row-header {
        min-width: 140px;
        font-size: 13px;
        padding: 16px 20px;
    }
    
    .excel-dropdown {
        font-size: 13px;
        padding: 10px 32px 10px 12px;
    }
    
    .gifts-actions {
        width: 95%;
        gap: 1.5rem;
        margin: 2rem auto 0 auto;
        padding: 1.5rem;
    }
    
    .gifts-actions .btn {
        min-width: 150px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .gifts-header h3 {
        font-size: 1.5rem;
    }
    
    .excel-table-container {
        width: 98%;
        border-radius: 12px;
    }
    
    .excel-cell {
        padding: 12px 8px;
        font-size: 12px;
    }
    
    .header-cell {
        padding: 16px 12px;
        font-size: 12px;
        letter-spacing: 0.5px;
    }
    
    .row-header {
        min-width: 120px;
        font-size: 11px;
        padding: 12px 16px;
        letter-spacing: 0.3px;
    }
    
    .excel-dropdown {
        font-size: 12px;
        padding: 8px 28px 8px 10px;
        background-size: 14px;
    }
    
    .gifts-actions {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .gifts-actions .btn {
        min-width: 120px;
        font-size: 13px;
        padding: 14px 24px;
    }
}

/* ===== Interface Alchimie (Jour 13) ===== */
.alchemy-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: linear-gradient(135deg, rgba(47, 82, 51, 0.1), rgba(196, 30, 58, 0.05));
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.alchemy-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.alchemy-header h3 {
    color: var(--accent-color);
    font-size: 2rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.alchemy-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.alchemy-main {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
    margin-bottom: 30px;
}

.ingredients-available {
    background: rgba(30, 35, 40, 0.8);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ingredients-available h4 {
    color: var(--accent-color);
    font-size: 1.3rem;
    margin-bottom: 15px;
    text-align: center;
}

.ingredients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
}

.ingredient-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 8px;
    padding: 15px 10px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.1);
    cursor: grab;
    transition: all 0.3s ease;
    user-select: none;
}

.ingredient-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
    border-color: rgba(255, 215, 0, 0.5);
}

.ingredient-item.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.ingredient-symbol {
    font-size: 24px;
    margin-bottom: 8px;
}

.ingredient-name {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.alchemy-formula {
    background: rgba(30, 35, 40, 0.8);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.alchemy-formula h4 {
    color: var(--accent-color);
    font-size: 1.3rem;
    margin-bottom: 10px;
    text-align: center;
}

.formula-instruction {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 20px;
}

.formula-lines {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.formula-line {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.line-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.line-number {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 1.1rem;
}

.line-controls {
    display: flex;
    gap: 8px;
}

.add-slot, .remove-slot {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.add-slot:hover, .remove-slot:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

.ingredients-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 60px;
}

.ingredient-slot {
    min-width: 120px;
    min-height: 60px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.3s ease;
}

.ingredient-slot.dragover {
    border-color: var(--accent-color);
    background: rgba(255, 215, 0, 0.1);
    transform: scale(1.05);
}

.ingredient-slot:empty::before {
    content: 'Glissez un ingrédient';
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
    text-align: center;
}

.alchemy-ingredient {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    border-radius: 6px;
    padding: 8px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.alchemy-ingredient .ingredient-symbol {
    font-size: 20px;
}

.alchemy-ingredient .ingredient-name {
    font-size: 10px;
    color: var(--text-secondary);
}

.ingredient-quantity {
    margin-top: 4px;
}

.quantity-select {
    background: rgba(30, 35, 40, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 11px;
    padding: 2px 6px;
    width: 50px;
}

.remove-ingredient {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 16px;
    height: 16px;
    border: none;
    border-radius: 50%;
    background: var(--error-color);
    color: white;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-ingredient:hover {
    background: #dc3545;
    transform: scale(1.1);
}

.alchemy-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.alchemy-actions .btn {
    min-width: 160px;
    font-size: 1rem;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.alchemy-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.alchemy-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.alchemy-actions .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

.alchemy-actions .btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(196, 30, 58, 0.4);
}

.alchemy-ingredient.error {
    border-color: var(--error-color);
    background: rgba(220, 53, 69, 0.1);
    animation: shake 0.5s ease-in-out;
}

/* Responsive design pour l'interface alchimie */
@media (max-width: 768px) {
    .alchemy-main {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .ingredients-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 8px;
    }
    
    .ingredient-item {
        padding: 12px 8px;
    }
    
    .ingredient-symbol {
        font-size: 20px;
    }
    
    .ingredient-name {
        font-size: 11px;
    }
    
    .ingredients-slots {
        flex-direction: column;
        gap: 8px;
    }
    
    .ingredient-slot {
        min-width: 100%;
        min-height: 50px;
    }
    
    .alchemy-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .alchemy-actions .btn {
        min-width: 100%;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .alchemy-container {
        padding: 15px;
    }
    
    .alchemy-header h3 {
        font-size: 1.5rem;
    }
    
    .formula-lines {
        gap: 15px;
    }
    
    .formula-line {
        padding: 12px;
    }
    
    .line-controls {
        gap: 6px;
    }
    
    .add-slot, .remove-slot {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
}

/* ===== Interface Labyrinthe Drag & Drop (Jour 12) ===== */
.maze-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: linear-gradient(135deg, rgba(47, 82, 51, 0.1), rgba(196, 30, 58, 0.05));
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.maze-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.maze-header h3 {
    color: var(--accent-color);
    font-size: 2rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.maze-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.maze-main {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.maze-sequence-area {
    background: rgba(30, 35, 40, 0.8);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.maze-sequence-area h4 {
    color: var(--accent-color);
    font-size: 1.3rem;
    margin-bottom: 10px;
    text-align: center;
}

.sequence-instruction {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 20px;
}

.maze-symbol-sequence {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    position: relative;
}

.maze-symbol-sequence::before {
    content: '⬇️';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    opacity: 0.6;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(-50%); }
    50% { transform: translateY(-40%); }
}

/* Labels supprimés pour interface plus épurée */

.maze-symbol-slot {
    width: 80px;
    height: 80px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

/* Numéros de slots supprimés */

.maze-symbol-slot.fixed {
    border-color: var(--accent-color);
    background: rgba(255, 215, 0, 0.1);
    cursor: not-allowed;
}

.maze-symbol-slot.dragover {
    border-color: var(--accent-color);
    background: rgba(255, 215, 0, 0.2);
    transform: scale(1.05);
}

.maze-symbol-slot.error {
    border-color: var(--error-color);
    background: rgba(220, 53, 69, 0.1);
    animation: shake 0.5s ease-in-out;
}

.maze-symbol-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: brightness(0.9);
    background: white;
    border-radius: 4px;
    padding: 4px;
}

.maze-symbol-img.fixed {
    filter: brightness(1) drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
}

.maze-symbol-img.placed {
    filter: brightness(1) drop-shadow(0 0 3px rgba(255, 255, 255, 0.3));
}

.slot-placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-size: 24px;
    font-weight: bold;
}

.symbol-label {
    font-size: 10px;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 4px;
    line-height: 1.2;
}

.remove-symbol {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 16px;
    height: 16px;
    background: var(--error-color);
    color: white;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.remove-symbol:hover {
    background: #dc3545;
    transform: scale(1.1);
}

.maze-symbols-pool {
    background: rgba(30, 35, 40, 0.8);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.maze-symbols-pool h4 {
    color: var(--accent-color);
    font-size: 1.3rem;
    margin-bottom: 15px;
    text-align: center;
}

.symbols-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 15px;
}

.maze-symbol-item {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: grab;
    transition: all 0.3s ease;
    user-select: none;
}

.maze-symbol-item .maze-symbol-img {
    background: white;
    border-radius: 4px;
    padding: 4px;
}

.maze-symbol-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
    border-color: rgba(255, 215, 0, 0.5);
}

.maze-symbol-item.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.maze-symbol-item:active {
    cursor: grabbing;
}

.maze-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.maze-actions .btn {
    min-width: 160px;
    font-size: 1rem;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.maze-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.maze-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.maze-actions .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

.maze-actions .btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(196, 30, 58, 0.4);
}

/* Styles pour l'interface alchimie drag & drop */
.alchemy-dragdrop-container {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    margin: var(--spacing-md) 0;
    border: 1px solid var(--border-color);
}

.alchemy-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--spacing-md);
}

.alchemy-header h3 {
    color: var(--accent-color);
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-xl);
}

.alchemy-subtitle {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin: 0;
}

.alchemy-main {
    display: flex;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
}

.ingredients-pool {
    flex: 1;
    background: rgba(47, 82, 51, 0.1);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    border: 1px solid var(--secondary-color);
}

.ingredients-pool h4 {
    color: var(--accent-color);
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-lg);
}

.ingredients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: var(--spacing-md);
}

.ingredient-item {
    background: var(--background-color);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-sm);
    text-align: center;
    cursor: grab;
    transition: var(--transition);
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ingredient-item:hover {
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.ingredient-item.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.ingredient-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-bottom: var(--spacing-xs);
    background: white;
    border-radius: 4px;
    padding: 4px;
}

.ingredient-name {
    font-size: var(--font-size-xs);
    color: var(--text-primary);
    font-weight: bold;
}

.potion-lines {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.potion-line {
    background: rgba(196, 30, 58, 0.1);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
}

.line-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--border-color);
}

.line-multiplier {
    font-weight: bold;
    color: var(--accent-color);
}

.multiplier-select {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: var(--font-size-sm);
}

.line-controls {
    display: flex;
    gap: var(--spacing-xs);
}

.add-slot-btn, .remove-slot-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: var(--font-size-sm);
    transition: var(--transition);
}

.add-slot-btn:hover, .remove-slot-btn:hover {
    background: var(--accent-color);
    color: var(--background-color);
}

.ingredient-slots {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.ingredient-slot {
    width: 80px;
    height: 80px;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-color);
    transition: var(--transition);
    position: relative;
}

.ingredient-slot:hover {
    border-color: var(--accent-color);
}

.ingredient-slot.drag-over {
    border-color: var(--accent-color);
    background: rgba(255, 215, 0, 0.1);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.ingredient-slot.error {
    border-color: var(--error-color);
    background: rgba(220, 53, 69, 0.1);
    animation: shake 0.5s ease-in-out;
}

.placed-ingredient {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.placed-ingredient:active {
    transform: scale(0.95);
}

.placed-ingredient .ingredient-img {
    width: 36px;
    height: 36px;
    margin-bottom: 2px;
}

.ingredient-label {
    font-size: 10px;
    color: var(--text-primary);
    text-align: center;
    font-weight: bold;
    line-height: 1;
}

.quantity-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--accent-color);
    color: var(--background-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.remove-btn {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: var(--error-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.remove-btn:active {
    transform: scale(0.9);
}

/* Modal de quantité mobile-friendly */
.quantity-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.quantity-modal {
    background: var(--surface-color);
    border-radius: 16px;
    padding: 24px;
    max-width: 320px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.quantity-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.modal-ingredient-img {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 8px;
    padding: 4px;
}

.quantity-modal-header h3 {
    color: var(--text-primary);
    margin: 0;
    font-size: 20px;
}

.quantity-selector {
    text-align: center;
    margin-bottom: 20px;
}

.quantity-display-large {
    font-size: 48px;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 16px;
}

.quantity-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 16px;
}

.qty-btn-large {
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.qty-btn-large:active {
    transform: scale(0.9);
    background: var(--accent-color);
}

.quantity-slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    outline: none;
    margin-bottom: 20px;
}

.quantity-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: var(--accent-color);
    cursor: pointer;
    border-radius: 50%;
}

.quantity-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: var(--accent-color);
    cursor: pointer;
    border-radius: 50%;
    border: none;
}

.quantity-presets {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}

.preset-btn {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.preset-btn:active {
    background: var(--accent-color);
    color: var(--background-color);
    transform: scale(0.95);
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-actions button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.btn-cancel {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-confirm {
    background: var(--accent-color);
    color: var(--background-color);
}

.modal-actions button:active {
    transform: scale(0.95);
}

.alchemy-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive design pour l'alchimie drag & drop */
@media (max-width: 768px) {
    .alchemy-main {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .ingredients-pool {
        order: 2;
    }
    
    .potion-lines {
        order: 1;
    }
    
    .ingredients-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }
    
    .ingredient-item {
        min-height: 70px;
        padding: 4px;
    }
    
    .ingredient-item .ingredient-img {
        width: 32px;
        height: 32px;
    }
    
    .ingredient-name {
        font-size: 9px;
    }
    
    .potion-line {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .line-header {
        padding-bottom: 8px;
        margin-bottom: 8px;
    }
    
    .multiplier-select {
        font-size: 14px;
        padding: 6px 10px;
    }
    
    .add-slot-btn, .remove-slot-btn {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
    
    .ingredient-slots {
        justify-content: flex-start;
        gap: 8px;
    }
    
    .ingredient-slot {
        width: 70px;
        height: 70px;
    }
    
    .alchemy-actions {
        position: sticky;
        bottom: 0;
        background: var(--surface-color);
        padding: 12px;
        margin: -12px -24px 0;
        border-top: 1px solid var(--border-color);
    }
}

/* Responsive design pour l'interface labyrinthe */
@media (max-width: 768px) {
    .maze-main {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .maze-symbol-sequence {
        gap: 8px;
        padding: 15px;
    }
    
    .maze-symbol-slot {
        width: 60px;
        height: 60px;
    }
    
    .maze-symbol-img {
        width: 40px;
        height: 40px;
    }
    
    .symbols-grid {
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
        gap: 10px;
    }
    
    .maze-symbol-item {
        width: 60px;
        height: 60px;
    }
    
    .maze-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .maze-actions .btn {
        min-width: 100%;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .maze-container {
        padding: 15px;
    }
    
    .maze-header h3 {
        font-size: 1.5rem;
    }
    
    .maze-symbol-sequence {
        gap: 10px;
    }
    
    .maze-symbol-slot {
        width: 70px;
        height: 70px;
    }
    
    .maze-symbol-img {
        width: 45px;
        height: 45px;
    }
    
    .symbols-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .maze-symbol-item {
        width: 70px;
        height: 70px;
    }
}

/* Styles pour l'interface navigation (Jour 14) */
.navigation-container {
    padding: var(--spacing-lg);
    max-width: 1200px;
    margin: 0 auto;
}

.navigation-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.navigation-header h3 {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: var(--spacing-sm);
}

.navigation-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Zone du puzzle de carte */
.map-puzzle-section {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    border: 1px solid var(--border-color);
    margin-bottom: var(--spacing-xl);
}

.map-puzzle-section h4 {
    color: var(--accent-color);
    margin-bottom: var(--spacing-sm);
    text-align: center;
    font-size: 1.3rem;
}

.map-instruction {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    font-size: 0.9rem;
    text-align: center;
}

.map-puzzle-container {
    display: flex;
    gap: var(--spacing-lg);
    align-items: flex-start;
}

/* Zone d'assemblage libre */
.map-assembly-area {
    background: linear-gradient(135deg, rgba(47, 82, 51, 0.1), rgba(196, 30, 58, 0.1));
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    width: 100%;
    height: 700px;
    position: relative;
    flex: 1;
    overflow: hidden;
    transition: var(--transition);
}

.map-assembly-area.dragover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 215, 0, 0.2));
    border-color: var(--accent-color);
    border-style: solid;
}

.assembly-instructions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text-secondary);
    pointer-events: none;
    opacity: 0.7;
}

.assembly-instructions p {
    margin: 0;
    font-size: 0.9rem;
}

.assembly-instructions p:first-child {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent-color);
}

/* Pièces placées dans la zone d'assemblage */
.placed-map-piece {
    border: none;
    border-radius: 0;
    box-shadow: none;
    transition: none;
    user-select: none;
}

.placed-map-piece:hover {
    cursor: move;
}

.placed-map-piece:active {
    cursor: grabbing;
}

.map-pieces-pool {
    flex-shrink: 0;
    width: 380px;
}

.map-pieces-pool h5 {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.pieces-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
}

.map-piece {
    cursor: grab;
    transition: var(--transition);
    border-radius: 0;
    overflow: hidden;
    border: none;
    background: transparent;
    width: 180px;
    height: 120px;
}

.map-piece:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.map-piece.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.map-piece[style*="display: none"] {
    opacity: 0;
    pointer-events: none;
}

.map-piece img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Zone de boussole */
.compass-section {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    border: 1px solid var(--border-color);
}

.compass-section h4 {
    color: var(--accent-color);
    margin-bottom: var(--spacing-sm);
    text-align: center;
}

.compass-instruction {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    font-size: 0.9rem;
    text-align: center;
}

.compass-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xl);
}

.compass-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto var(--spacing-md);
}

.compass-background {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.compass-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.compass-btn {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.9);
    border: 2px solid var(--accent-color);
    color: var(--background-color);
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.compass-btn:hover {
    background: var(--accent-color);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.compass-btn:active {
    transform: scale(0.95);
}

.direction-sequence {
    margin-top: var(--spacing-md);
    text-align: center;
}

.direction-sequence h5 {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.sequence-display {
    min-height: 40px;
    background: var(--background-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.direction-tag {
    background: var(--accent-color);
    color: var(--background-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

.navigation-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive pour l'interface navigation */
@media (max-width: 1024px) {
    .map-puzzle-container {
        flex-direction: column;
        align-items: center;
    }
    
    .map-assembly-area {
        width: 100%;
        max-width: 600px;
        height: 400px;
    }
    
    .pieces-container {
        grid-template-columns: repeat(4, 1fr);
        justify-items: center;
    }
    
    .compass-wrapper {
        flex-direction: column;
        gap: var(--spacing-md);
    }
}

@media (max-width: 768px) {
    .map-assembly-area {
        height: 300px;
    }
    
    .pieces-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .map-piece {
        width: 80px;
        height: 53px;
    }
    
    .compass-container {
        width: 250px;
        height: 250px;
    }
    
    .compass-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .navigation-container {
        padding: var(--spacing-md);
    }
    
    .map-assembly-area {
        height: 250px;
    }
    
    .pieces-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .map-piece {
        width: 100px;
        height: 67px;
    }
    
    .compass-container {
        width: 200px;
        height: 200px;
    }
    
    .compass-btn {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
    
    .navigation-actions {
        flex-direction: column;
    }
    
    .navigation-actions button {
        width: 100%;
    }
}

/* ==================== INTERFACE DE RECHERCHE VISUELLE (JOUR 15) ==================== */

.visual-search-container {
    background: var(--background-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow);
    max-width: 100%;
    margin: 0 auto;
}

.visual-search-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    color: var(--text-color);
}

.visual-search-header h3 {
    color: var(--accent-color);
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.visual-search-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.search-instructions {
    text-align: center;
    color: var(--text-color);
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.search-instructions p {
    margin-bottom: var(--spacing-sm);
    font-size: 1.1rem;
}

.search-tips {
    background: rgba(255, 215, 0, 0.1);
    border-radius: var(--border-radius);
    padding: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.search-tips p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.search-image-container {
    position: relative;
    display: flex;
    justify-content: center;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--background-color);
}

.search-image {
    max-width: 100%;
    height: auto;
    display: block;
}

.search-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: crosshair;
    background: transparent;
    z-index: 10;
}

.search-overlay:hover {
    background: rgba(255, 215, 0, 0.05);
}

.search-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.attempts-counter {
    color: var(--text-color);
    font-weight: 600;
}

.cooldown-timer {
    color: var(--error-color);
    font-weight: 600;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.visual-search-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--spacing-lg);
}

.visual-search-actions button {
    min-width: 120px;
}

/* Responsive design pour la recherche visuelle */
@media (max-width: 768px) {
    .visual-search-container {
        padding: var(--spacing-md);
    }
    
    .search-instructions {
        padding: var(--spacing-sm);
    }
    
    .search-instructions p {
        font-size: 1rem;
    }
    
    .search-tips p {
        font-size: 0.85rem;
    }
    
    .search-status {
        flex-direction: column;
        text-align: center;
    }
    
    .visual-search-actions {
        flex-direction: column;
    }
    
    .visual-search-actions button {
        width: 100%;
    }
}

/* ==================== INTERFACE FUSIBLE DRAG & DROP (JOUR 17) ==================== */

.fusible-container {
    background: var(--background-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow);
    max-width: 100%;
    margin: 0 auto;
}

.fusible-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    color: var(--text-color);
}

.fusible-header h3 {
    color: var(--accent-color);
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.fusible-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.fusible-board-container {
    display: flex;
    justify-content: center;
    margin-bottom: var(--spacing-lg);
}

.fusible-board {
    position: relative;
    max-width: 600px;
    width: 100%;
}

.board-background {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.fusible-slots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.fusible-slot {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px dashed transparent;
    background: rgba(255, 215, 0, 0.1);
    pointer-events: all;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    transform: translate(-50%, -50%);
}

.fusible-slot.dragover {
    border-color: var(--accent-color);
    background: rgba(255, 215, 0, 0.3);
    transform: translate(-50%, -50%) scale(1.1);
}

.placed-fusible {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.placed-fusible:hover {
    transform: scale(1.1);
}

.fusible-available {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.fusible-available h4 {
    color: var(--text-color);
    margin-bottom: var(--spacing-md);
}

.fusible-pool {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.fusible-item {
    cursor: grab;
    transition: var(--transition);
    border-radius: 50%;
    padding: var(--spacing-xs);
    background: var(--background-color);
    border: 2px solid var(--border-color);
}

.fusible-item:hover {
    transform: scale(1.05);
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.fusible-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
    transform: rotate(5deg);
}

.fusible-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: block;
    pointer-events: none;
}

.fusible-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.fusible-actions button {
    min-width: 120px;
}

/* Animation pour les fusibles placés */
@keyframes fusible-place {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.placed-fusible {
    animation: fusible-place 0.3s ease-out;
}

/* Responsive design pour les fusibles */
@media (max-width: 768px) {
    .fusible-container {
        padding: var(--spacing-md);
    }
    
    .fusible-slot {
        width: 75px;
        height: 75px;
    }
    
    .placed-fusible {
        width: 68px;
        height: 68px;
    }
    
    .fusible-image {
        width: 40px;
        height: 40px;
    }
    
    .fusible-actions {
        flex-direction: column;
    }
    
    .fusible-actions button {
        width: 100%;
    }
}

/* Interface Sélection Clans (Jour 7) - Mobile-friendly */
.clan-selection-container {
    background: var(--surface-color);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

/* Interface de sélection des symboles (Jour 12) */
.symbols-selection-container {
    background: var(--surface-color);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    max-width: 900px;
    margin: 0 auto;
}

.symbols-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.symbols-header h3 {
    color: var(--accent-color);
    font-size: 1.8rem;
    margin-bottom: var(--spacing-sm);
}

.symbols-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.symbols-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.symbols-available {
    background: var(--background-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    border: 1px solid var(--border-color);
}

.symbols-available h4 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.symbols-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: var(--spacing-md);
    justify-items: center;
}

.symbol-item {
    width: 70px;
    height: 70px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.symbol-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.symbol-item:hover:not(.used) {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-color);
}

.symbol-item.selected {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.3);
    background: rgba(255, 215, 0, 0.1);
}

.symbol-item.used {
    opacity: 0.3;
    cursor: not-allowed;
}

.symbols-sequence {
    background: var(--background-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    border: 1px solid var(--border-color);
}

.symbols-sequence h4 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.sequence-slots {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.symbol-slot {
    width: 80px;
    height: 80px;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
}

.symbol-slot.fixed {
    border: 2px solid var(--success-color);
    background: rgba(40, 167, 69, 0.1);
}

.symbol-slot.empty {
    cursor: pointer;
}

.symbol-slot.empty:hover,
.symbol-slot.ready-for-placement {
    border-color: var(--accent-color);
    background: rgba(255, 215, 0, 0.1);
}

.symbol-slot img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.symbol-slot .slot-label {
    font-size: 0.7rem;
    color: var(--success-color);
    margin-top: 4px;
    font-weight: bold;
}

.symbol-slot .slot-number {
    color: var(--text-secondary);
    font-size: 1.2rem;
    font-weight: bold;
}


.symbols-actions {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
    flex-wrap: wrap;
}

/* Interface de sélection d'alchimie (Jour 13) */
.alchemy-selection-container {
    background: var(--surface-color);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    max-width: 1000px;
    margin: 0 auto;
}

.alchemy-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.alchemy-header h3 {
    color: var(--accent-color);
    font-size: 1.8rem;
    margin-bottom: var(--spacing-sm);
}

.alchemy-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.alchemy-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.ingredients-available {
    background: var(--background-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    border: 1px solid var(--border-color);
}

.ingredients-available h4 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.ingredients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: var(--spacing-md);
    justify-items: center;
}

.ingredient-item {
    width: 90px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.ingredient-item img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    background: white;
    padding: 4px;
    border-radius: 4px;
}

.ingredient-item .ingredient-name {
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.ingredient-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-color);
}

.ingredient-item.selected {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.3);
    background: rgba(255, 215, 0, 0.1);
}

.ingredient-item.ready-to-place {
    border-color: var(--success-color);
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.3);
    background: rgba(40, 167, 69, 0.1);
    position: relative;
}

.ingredient-item.ready-to-place::after {
    content: "✓";
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: var(--success-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.potion-formula {
    background: var(--background-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    border: 1px solid var(--border-color);
}

.potion-formula h4 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.potion-steps {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.potion-step {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    border: 1px solid var(--border-color);
}

.step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.step-number {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.1rem;
}

.multiplier-select {
    background: var(--surface-color);
    color: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 4px 8px;
    font-size: 0.9rem;
}

.step-controls {
    display: flex;
    gap: 4px;
}

.add-slot-btn, .remove-slot-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.add-slot-btn:hover, .remove-slot-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

.ingredient-slots {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    min-height: 80px;
}

.ingredient-slot {
    width: 90px;
    min-height: 80px;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 4px;
}

.ingredient-slot:hover,
.ingredient-slot.ready-for-placement {
    border-color: var(--accent-color);
    background: rgba(255, 215, 0, 0.1);
}

.ingredient-slot img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-bottom: 2px;
    background: white;
    padding: 3px;
    border-radius: 4px;
}

.ingredient-slot .ingredient-name {
    font-size: 0.7rem;
    font-weight: bold;
    color: white;
    text-align: center;
    margin-bottom: 2px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.ingredient-slot .slot-number {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: bold;
}

.ingredient-display {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}

.ingredient-slot .ingredient-quantity {
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--accent-color);
    background: rgba(255, 215, 0, 0.2);
    border-radius: 3px;
    padding: 2px 4px;
    min-width: 20px;
    text-align: center;
}

/* Sélecteur de quantité */
.quantity-selector {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 2px solid var(--accent-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-sm);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
    min-width: 200px;
}

.quantity-header {
    text-align: center;
    margin-bottom: var(--spacing-sm);
    font-size: 0.9rem;
    font-weight: bold;
    color: #333;
}

.quantity-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.quantity-btn {
    width: 40px;
    height: 30px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: white;
    color: #333;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: var(--accent-color);
}

.quantity-btn.selected {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.alchemy-actions {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
    flex-wrap: wrap;
}

/* Interface de sélection de carte (Jour 14) */
.map-selection-container {
    background: var(--surface-color);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    max-width: 1200px;
    margin: 0 auto;
}

.map-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.map-header h3 {
    color: var(--accent-color);
    font-size: 1.8rem;
    margin-bottom: var(--spacing-sm);
}

.map-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.map-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.map-pieces-available {
    background: var(--background-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    border: 1px solid var(--border-color);
}

.map-pieces-available h4 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.map-pieces-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--spacing-md);
    justify-items: center;
}

.map-piece-item {
    width: 120px;
    height: 96px;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.map-piece-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.map-piece-item:hover:not(.used) {
    transform: translateY(-3px);
    opacity: 0.9;
}

.map-piece-item.selected {
    opacity: 0.8;
    transform: scale(1.05);
}

.map-piece-item.used {
    opacity: 0.3;
    cursor: not-allowed;
}

.map-assembly-section {
    background: var(--background-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    border: 1px solid var(--border-color);
}

.map-assembly-section h4 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.map-assembly-area {
    position: relative;
    width: 100%;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: crosshair;
    transition: all 0.3s ease;
}

.map-assembly-area.ready-for-piece {
    background: rgba(255, 255, 255, 0.05);
}

.assembly-hint {
    color: var(--text-secondary);
    font-size: 1.1rem;
    pointer-events: none;
}

.placed-piece {
    position: absolute;
    width: 100px;
    height: 80px;
    z-index: 10;
    cursor: grab;
    transition: box-shadow 0.3s ease;
}

.placed-piece:hover {
    opacity: 0.95;
}

.placed-piece:active {
    cursor: grabbing;
}

.placed-piece img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    border: none;
}


.compass-section {
    background: var(--background-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    border: 1px solid var(--border-color);
}

.compass-section h4 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.compass-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto var(--spacing-md);
}

.compass-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
}

.compass-directions {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.compass-btn {
    position: absolute;
    background: rgba(255, 215, 0, 0.8);
    color: #333;
    border: none;
    border-radius: 20px;
    padding: 6px 12px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.compass-btn:hover {
    background: var(--accent-color);
    transform: scale(1.1);
}

.compass-btn.selected {
    background: var(--success-color);
    color: white;
}

/* Positionnement des directions */
.compass-btn[data-direction="N"] { top: 10px; left: 50%; transform: translateX(-50%); }
.compass-btn[data-direction="NE"] { top: 50px; right: 50px; }
.compass-btn[data-direction="E"] { top: 50%; right: 10px; transform: translateY(-50%); }
.compass-btn[data-direction="SE"] { bottom: 50px; right: 50px; }
.compass-btn[data-direction="S"] { bottom: 10px; left: 50%; transform: translateX(-50%); }
.compass-btn[data-direction="SW"] { bottom: 50px; left: 50px; }
.compass-btn[data-direction="W"] { top: 50%; left: 10px; transform: translateY(-50%); }
.compass-btn[data-direction="NW"] { top: 50px; left: 50px; }

.direction-sequence {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    text-align: center;
    color: var(--text-primary);
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sequence-display {
    color: var(--accent-color);
    font-weight: bold;
    margin-left: var(--spacing-sm);
}

.map-actions {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
    flex-wrap: wrap;
}

.clan-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.clan-subtitle {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.selection-status {
    background: var(--background-color);
    padding: var(--spacing-sm);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.clan-table-visual {
    background: linear-gradient(135deg, #f8f8f8 0%, #e8e8e8 100%);
    border-radius: 12px;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.table-positions {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.position-row {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: var(--spacing-sm) 0;
}

.position-row.middle {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.left-positions, .right-positions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.table-center {
    background: linear-gradient(135deg, #8B4513 0%, #CD853F 100%);
    color: white;
    font-weight: bold;
    padding: 20px;
    border-radius: 50%;
    min-width: 80px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clan-position {
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    min-width: 60px;
    min-height: 60px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.clan-position:hover {
    border-color: var(--accent-color);
    background: rgba(201, 166, 70, 0.1);
}

.clan-position.occupied {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.position-number {
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 10px;
    font-weight: bold;
    color: var(--text-secondary);
    background: var(--background-color);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.position-content {
    width: 100%;
    text-align: center;
}

.placed-clan {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.placed-clan .clan-image-small {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.placed-clan .clan-name {
    font-size: 8px;
    font-weight: bold;
}

.available-clans {
    margin-bottom: var(--spacing-lg);
}

.clans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: var(--spacing-sm);
    max-height: 300px;
    overflow-y: auto;
}

.clan-item {
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: var(--spacing-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    text-align: center;
}

.clan-item:hover {
    border-color: var(--accent-color);
    background: rgba(201, 166, 70, 0.1);
}

.clan-item.selected {
    border-color: var(--accent-color);
    background: var(--accent-color);
    color: white;
}

.clan-item .clan-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.clan-item .clan-name {
    font-size: 12px;
    font-weight: 600;
}

.clan-actions {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
}

/* Interface Sélection Paniers (Jour 10) - Mobile-friendly */
.sweets-selection-container {
    background: var(--surface-color);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.sweets-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.sweets-subtitle {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.selected-baskets-area {
    background: var(--background-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.selected-slots {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.basket-slot {
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: var(--spacing-sm);
    min-width: 80px;
    min-height: 80px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
}

.basket-slot.occupied {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.slot-number {
    position: absolute;
    top: 4px;
    right: 6px;
    font-size: 10px;
    font-weight: bold;
    color: var(--text-secondary);
    background: var(--background-color);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slot-content {
    width: 100%;
    font-size: 12px;
}

.selected-basket {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.basket-image-small {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.basket-letter-small {
    font-size: 12px;
    font-weight: bold;
}

.available-baskets-area {
    margin-bottom: var(--spacing-lg);
}

.baskets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: var(--spacing-sm);
    max-height: 350px;
    overflow-y: auto;
}

.basket-item {
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: var(--spacing-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    text-align: center;
}

.basket-item:hover {
    border-color: var(--accent-color);
    background: rgba(201, 166, 70, 0.1);
}

.basket-item.selected {
    border-color: var(--accent-color);
    background: var(--accent-color);
    color: white;
}

.basket-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.basket-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.basket-letter {
    font-size: 18px;
    font-weight: bold;
}

.basket-details {
    display: flex;
    justify-content: space-around;
    font-size: 11px;
}

.basket-details span {
    display: flex;
    align-items: center;
    gap: 2px;
}

.sweets-actions {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
}

/* Interface Échecs (Jour 24) */
.chess-sequence-container {
    background: var(--surface-color);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

/* Styles pour les pièces d'échecs dans l'interface du jour 24 */
.chess-piece {
    background: linear-gradient(135deg, #8B7355 0%, #A0826D 50%, #8B7355 100%) !important;
    border: 2px solid #6B5D54 !important;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2) !important;
}

.chess-piece:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 166, 70, 0.5), inset 0 1px 3px rgba(0,0,0,0.2) !important;
    background: linear-gradient(135deg, #9B8365 0%, #B0927D 50%, #9B8365 100%) !important;
    border-color: var(--accent-color) !important;
}

.chess-piece.selected {
    background: linear-gradient(135deg, #AA9270 0%, #BFA380 50%, #AA9270 100%) !important;
    box-shadow: 0 0 15px rgba(201, 166, 70, 0.4), inset 0 2px 4px rgba(255,255,255,0.2) !important;
    border-color: var(--accent-color) !important;
}

.chess-piece img {
    filter: drop-shadow(2px 2px 3px rgba(0,0,0,0.4));
}

.chess-piece span {
    color: #FFFFFF !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5), 0 0 4px rgba(0,0,0,0.3) !important;
    font-weight: 600;
}

/* Styles pour la zone de séquence sélectionnée */
#selectedSequence {
    background: linear-gradient(135deg, #7A6547 0%, #8F7657 50%, #7A6547 100%) !important;
}

#selectedSequence > div {
    background: linear-gradient(135deg, #8B7355 0%, #A0826D 50%, #8B7355 100%) !important;
    border: 2px solid #6B5D54 !important;
    padding: 8px !important;
    border-radius: 6px !important;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2) !important;
}

#selectedSequence img {
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.4));
}

#selectedSequence span {
    color: #FFFFFF !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5) !important;
    font-weight: 600;
}

.chess-pieces-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.chess-piece-item {
    background: linear-gradient(135deg, #8B7355 0%, #A0826D 50%, #8B7355 100%);
    border: 2px solid #6B5D54;
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

.chess-piece-item:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 166, 70, 0.5), inset 0 1px 3px rgba(0,0,0,0.2);
    background: linear-gradient(135deg, #9B8365 0%, #B0927D 50%, #9B8365 100%);
}

.chess-piece-item.selected {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, #AA9270 0%, #BFA380 50%, #AA9270 100%);
    box-shadow: 0 0 15px rgba(201, 166, 70, 0.4), inset 0 2px 4px rgba(255,255,255,0.2);
}

.chess-piece-item.correct {
    border-color: var(--success-color);
    background: linear-gradient(135deg, #7A8B6F 0%, #8FA384 50%, #7A8B6F 100%);
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.4), inset 0 2px 4px rgba(255,255,255,0.2);
}

.chess-piece-item.error {
    border-color: var(--error-color);
    background: linear-gradient(135deg, #AA7575 0%, #BF8585 50%, #AA7575 100%);
    box-shadow: 0 0 15px rgba(220, 53, 69, 0.4), inset 0 2px 4px rgba(0,0,0,0.1);
    animation: shake 0.5s ease-in-out;
}

.chess-piece-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: var(--spacing-sm);
    filter: drop-shadow(2px 2px 3px rgba(0,0,0,0.4));
}

.piece-name {
    font-size: var(--font-size-sm);
    color: #FFFFFF;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5), 0 0 4px rgba(0,0,0,0.3);
}

.piece-status {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.chess-piece-item.selected .piece-status {
    background: var(--accent-color);
    color: white;
    opacity: 1;
}

.chess-piece-item.correct .piece-status {
    background: var(--success-color);
    color: white;
    opacity: 1;
}

.chess-piece-item.correct .piece-status::after {
    content: '✓';
}

.chess-piece-item.error .piece-status {
    background: var(--error-color);
    color: white;
    opacity: 1;
}

.chess-piece-item.error .piece-status::after {
    content: '✗';
}

.chess-controls {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    align-items: center;
}

.chess-controls .btn-primary {
    background: var(--accent-color);
    color: var(--text-on-primary);
}

.chess-controls .btn-primary:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

.chess-controls .btn-secondary {
    background: var(--surface-alt);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.sequence-hint {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
}

/* Responsive pour l'interface échecs */
@media (max-width: 768px) {
    .chess-pieces-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: var(--spacing-sm);
    }
    
    .chess-piece-item {
        min-height: 120px;
        padding: var(--spacing-sm);
    }
    
    .chess-piece-image {
        width: 50px;
        height: 50px;
    }
    
    .piece-name {
        font-size: var(--font-size-xs);
    }
}

@media (max-width: 480px) {
    .chess-sequence-container {
        padding: var(--spacing-md);
    }
    
    .chess-pieces-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .chess-piece-item {
        min-height: 100px;
    }
    
    .chess-piece-image {
        width: 40px;
        height: 40px;
    }
    
    .chess-controls {
        gap: var(--spacing-sm);
    }
}

/* Interface Alchimie Drag & Drop (Jour 13) */
.alchemy-interface {
    background: var(--surface-color);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.potion-lines {
    margin-bottom: var(--spacing-xl);
}

.potion-line {
    background: var(--surface-alt);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-md);
}

.line-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.line-number {
    font-weight: 600;
    color: var(--accent-color);
    min-width: 80px;
}

.multiplier-select {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-xs) var(--spacing-sm);
    color: var(--text-color);
    font-size: var(--font-size-sm);
}

.line-controls {
    display: flex;
    gap: var(--spacing-xs);
    margin-left: auto;
}

.slot-btn {
    background: var(--accent-color);
    color: var(--text-on-primary);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: var(--transition);
}

.slot-btn:hover {
    background: var(--accent-dark);
    transform: scale(1.1);
}

.ingredient-slots {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.ingredient-slot {
    width: 80px;
    height: 80px;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--surface-color);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.ingredient-slot:hover,
.ingredient-slot.drag-over {
    border-color: var(--accent-color);
    background: rgba(201, 166, 70, 0.1);
}

.ingredient-slot.filled {
    border-color: var(--success-color);
    border-style: solid;
    background: rgba(40, 167, 69, 0.1);
}

.slot-ingredient {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    justify-content: center;
}

.slot-ingredient img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    margin-bottom: 2px;
}

.slot-ingredient .name {
    font-size: 10px;
    color: var(--text-color);
    text-align: center;
    line-height: 1.1;
}

.slot-ingredient .quantity {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
}

.ingredients-pool {
    background: var(--surface-alt);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
}

.ingredients-pool h3 {
    margin: 0 0 var(--spacing-md) 0;
    color: var(--text-color);
    font-size: var(--font-size-lg);
}

.ingredients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: var(--spacing-sm);
}

.ingredient-item {
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-sm);
    text-align: center;
    cursor: grab;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100px;
    justify-content: center;
}

.ingredient-item:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 166, 70, 0.3);
}

.ingredient-item:active,
.ingredient-item.dragging {
    cursor: grabbing;
    opacity: 0.7;
    transform: rotate(5deg);
}

.ingredient-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-bottom: var(--spacing-xs);
}

.ingredient-item span {
    font-size: var(--font-size-xs);
    color: var(--text-color);
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

/* Responsive pour l'interface alchimie */
@media (max-width: 768px) {
    .alchemy-interface {
        padding: var(--spacing-md);
    }
    
    .line-header {
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }
    
    .ingredient-slots {
        justify-content: center;
    }
    
    .ingredient-slot {
        width: 70px;
        height: 70px;
    }
    
    .ingredients-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .ingredient-item {
        min-height: 80px;
        padding: var(--spacing-xs);
    }
    
    .ingredient-item img {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 480px) {
    .ingredient-slots {
        gap: var(--spacing-xs);
    }
    
    .ingredient-slot {
        width: 60px;
        height: 60px;
    }
    
    .slot-ingredient img {
        width: 25px;
        height: 25px;
    }
    
    .ingredients-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==================== */
/* Styles Jour 11 - Distribution des cadeaux */
/* ==================== */

.gifts-container {
    padding: 20px;
    width: 100%;
    margin: 0 auto;
}

.gifts-header {
    text-align: center;
    margin-bottom: 30px;
}

.gifts-header h3 {
    color: var(--text-dark);
    font-size: 24px;
    margin-bottom: 10px;
}

.gifts-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

.excel-table-container {
    overflow-x: auto;
    width: 100%;
    margin: 20px 0;
}

.excel-table {
    width: 100%;
    border-collapse: collapse;
    font-family: inherit;
    min-width: 100%;
}

.excel-cell {
    border: 1px solid #ddd;
    padding: 10px 8px;
    text-align: center;
    vertical-align: middle;
    background: #fff;
    min-height: 55px;
}

.header-cell {
    background: #f8f9fa;
    color: var(--text-dark);
    font-weight: bold;
    font-size: 12px;
    padding: 8px 6px;
    border: 1px solid #ddd;
}

.row-header {
    background: #f1f3f4;
    color: var(--text-dark);
    font-weight: bold;
    font-size: 9px;
    width: 40px;
    text-align: left;
    padding: 6px 2px;
    border: 1px solid #ddd;
}

.excel-dropdown {
    width: 100%;
    height: 42px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #fff;
    color: var(--text-dark);
    font-size: 14px;
    font-weight: normal;
    padding: 8px 10px;
    cursor: pointer;
}

.excel-dropdown:focus {
    outline: none;
    border-color: var(--primary-color);
}

.excel-dropdown option {
    padding: 6px;
    font-size: 13px;
    color: var(--text-dark);
    background: #fff;
}

.gifts-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gifts-container {
        padding: 15px;
    }
    
    .excel-cell {
        padding: 6px 4px;
        min-height: 45px;
    }
    
    .header-cell,
    .row-header {
        padding: 6px 3px;
        font-size: 9px;
    }
    
    .row-header {
        width: 35px;
        font-size: 8px;
    }
    
    .excel-dropdown {
        height: 40px;
        font-size: 13px;
        padding: 6px 8px;
    }
}

@media (max-width: 480px) {
    .gifts-container {
        padding: 10px;
    }
    
    .gifts-header h3 {
        font-size: 20px;
    }
    
    .gifts-header p {
        font-size: 14px;
    }
    
    .excel-cell {
        padding: 4px 3px;
        min-height: 40px;
    }
    
    .header-cell,
    .row-header {
        padding: 4px 2px;
        font-size: 8px;
    }
    
    .row-header {
        width: 30px;
        font-size: 7px;
    }
    
    .excel-dropdown {
        height: 36px;
        font-size: 12px;
        padding: 4px 6px;
    }
}


/* Styles pour le système de points et classement */
.ranking-section {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.points-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    margin: var(--spacing-md) 0;
}

.points-info h4 {
    color: var(--accent-color);
    margin-bottom: var(--spacing-sm);
}

.points-info ul {
    list-style: none;
    padding: 0;
}

.points-info li {
    padding: var(--spacing-xs) 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.points-positive {
    color: var(--success-color);
    font-weight: bold;
}

.points-negative {
    color: var(--error-color);
    font-weight: bold;
}

.leaderboard {
    margin-top: var(--spacing-lg);
}

.leaderboard h4 {
    color: var(--accent-color);
    margin-bottom: var(--spacing-md);
}

.leaderboard-list {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius);
    padding: var(--spacing-sm);
}

.leaderboard-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-sm) var(--spacing-md);
    margin: var(--spacing-xs) 0;
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.leaderboard-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.leaderboard-item.current-player {
    background: rgba(var(--accent-color-rgb, 255, 215, 0), 0.1);
    border: 1px solid var(--accent-color);
}

.leaderboard-item .rank {
    font-weight: bold;
    min-width: 30px;
}

.leaderboard-item .player-name {
    flex: 1;
    margin: 0 var(--spacing-sm);
}

.leaderboard-item .player-points {
    color: var(--accent-color);
    font-weight: bold;
    margin-right: calc(var(--spacing-sm) + 40px);
}

.leaderboard-item .player-progress {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.your-rank {
    text-align: center;
    margin-top: var(--spacing-md);
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
}

.your-rank p {
    font-size: var(--font-size-lg);
}

.your-rank span {
    color: var(--accent-color);
    font-weight: bold;
    font-size: var(--font-size-xl);
}


/* Styles pour la gestion des joueurs */
.player-selector {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.current-player {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.current-player label {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.player-dropdown {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: var(--font-size-md);
    min-width: 150px;
}

.player-dropdown:focus {
    outline: none;
    border-color: var(--accent-color);
}

.btn-small {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: var(--font-size-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--surface-color);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.btn-small:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-small.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-small.btn-primary:hover {
    background: rgba(196, 30, 58, 0.8);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    min-width: 300px;
    max-width: 500px;
}

.modal-content h3 {
    color: var(--accent-color);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.modal-content input {
    width: 100%;
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    padding: var(--spacing-sm);
    font-size: var(--font-size-md);
    margin-bottom: var(--spacing-md);
}

.modal-content input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.modal-buttons {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: flex-end;
}

.modal-buttons button {
    padding: var(--spacing-sm) var(--spacing-md);
}

@media (max-width: 768px) {
    .current-player {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .player-dropdown {
        width: 100%;
    }
    
    .modal-content {
        margin: var(--spacing-md);
        min-width: unset;
    }
}



/* Styles pour la gestion des amis dans le classement */
.leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.leaderboard-header h4 {
    margin: 0;
}

.friend-info {
    text-align: center;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin-top: var(--spacing-sm);
    font-style: italic;
}

.delete-friend-btn {
    background: var(--error-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    transition: var(--transition);
}

.delete-friend-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

.leaderboard-item {
    position: relative;
    padding-right: 30px;
}

.leaderboard-item .delete-friend-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
}

/* Styles pour le modal d'ajout d'ami */
.modal-content input[type="number"] {
    -moz-appearance: textfield;
}

.modal-content input[type="number"]::-webkit-outer-spin-button,
.modal-content input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

@media (max-width: 768px) {
    .leaderboard-header {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .leaderboard-header h4 {
        margin-bottom: var(--spacing-xs);
    }
}

/* Enhanced Mobile Improvements for Christmas Escape Book */
