@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    --primary: #d4af37; /* Gold */
    --secondary: #8e44ad; /* Purple */
    --bg-dark: #0a0a0c;
    --text-light: #f5f5f7;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent-red: #e74c3c;
    --transition-smooth: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

body {
    background: var(--bg-dark);
    color: var(--text-light);
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
}

#app-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #0a0a0c 0%, #1a1a2e 100%);
}

#app-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('dali_hero_background.webp') no-repeat center center;
    background-size: cover;
    opacity: 0.3;
    filter: blur(5px) saturate(0.8);
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Glassmorphism Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.82);
    margin-bottom: 2rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

/* Typography */
h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    letter-spacing: -0.02rem;
    line-height: 1.1;
}

h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

p {
    line-height: 1.6;
    color: rgba(245, 245, 247, 0.8);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.quote {
    font-style: italic;
    border-left: 3px solid var(--primary);
    padding-left: 1.5rem;
    margin: 2rem 0;
    color: var(--text-light);
    font-size: 1.2rem;
}

/* Inputs & Buttons */
.input-group {
    margin: 2rem 0;
}

input[type="text"], input[type="number"] {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    transition: var(--transition-smooth);
}

input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

button {
    width: 100%;
    background: var(--primary);
    color: #000;
    border: none;
    padding: 1.2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition-smooth);
    letter-spacing: 0.1rem;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.4);
    filter: brightness(1.1);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar-track {
    flex-grow: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.step-count {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
}

/* Screen Transitions */
.screen {
    display: none;
    animation: fadeIn 0.6s ease-out;
}

.screen.active {
    display: block;
}

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

/* Animations/Icons */
.moustache {
    display: block;
    width: 140px;
    margin: 0 auto 2.5rem;
    filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.4));
    animation: float 6s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-10px) rotate(2deg); }
}

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

.badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.2), rgba(142, 68, 173, 0.2));
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 1rem;
    letter-spacing: 0.05rem;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.anecdote-box {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--secondary);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

.anecdote-box h4 {
    font-size: 0.9rem;
    color: var(--secondary);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.hint-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 0.5rem;
}

.fact-box-wrapper {
    cursor: pointer;
    margin-bottom: 2rem;
}

.fact-box {
    background: rgba(212, 175, 55, 0.08);
    border: 1px dashed rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    padding: 1.2rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    position: relative;
    transition: var(--transition-smooth);
    overflow: hidden;
}

.fact-content {
    max-height: 3.2em; /* Roughly 2 lines */
    overflow: hidden;
    position: relative;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fact-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1.5em;
    background: linear-gradient(transparent, rgba(14, 14, 18, 0.9));
    transition: opacity 0.3s;
}

.fact-box-wrapper.expanded .fact-content {
    max-height: 1000px; /* Allow expansion */
}

.fact-box-wrapper.expanded .fact-content::after {
    opacity: 0;
}

.fact-expand-hint {
    text-align: center;
    font-size: 0.75rem;
    color: var(--primary);
    margin-top: 0.8rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.05rem;
}

.fact-expand-hint::before {
    content: '↓ Lire la suite';
}

.fact-box-wrapper.expanded .fact-expand-hint::before {
    content: '↑ Réduire';
}

.fact-box strong {
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05rem;
    display: block;
    margin-bottom: 0.6rem;
}

.error-msg {
    color: var(--accent-red);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
}

.step-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.nav-icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-light);
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.nav-icon-btn:hover:not(:disabled) {
    background: var(--primary);
    color: black;
    transform: scale(1.1);
}

.nav-icon-btn:disabled {
    opacity: 0.2;
    cursor: default;
}

.step-media {
    position: relative;
    margin-bottom: 2rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.destination-banner {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(142, 68, 173, 0.15) 100%);
    border: 1px solid var(--primary);
    border-radius: 16px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.destination-banner:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.25) 0%, rgba(142, 68, 173, 0.25) 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.2);
}

.dest-info {
    display: flex;
    flex-direction: column;
}

.dest-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 0.1rem;
    margin-bottom: 0.2rem;
}

.dest-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-light);
}

.dest-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 5px var(--primary));
}

.step-image {
    width: 100%;
    display: block;
    aspect-ratio: 16/9;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.step-media:hover .step-image {
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 480px) {
    .glass-card {
        padding: 1.5rem;
        border-radius: 16px;
    }
    h1 { font-size: 2rem; }
}
