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

:root {
    --color-bg: #0f1410;
    --color-surface: #1a1f1b;
    --color-gold: #d4af37;
    --color-gold-light: #f4d03f;
    --color-text: #ffffff;
    --color-text-muted: #888888;
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Fullscreen container */
.artanec-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height */
    background: linear-gradient(135deg, var(--color-bg) 0%, #1a2520 100%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--color-text);
}

/* Header */
.app-header {
    text-align: center;
    padding: 40px 20px 20px;
    flex-shrink: 0;
}

.app-title {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    color: var(--color-gold);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.app-subtitle {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    letter-spacing: 0.05em;
}

/* Main content */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
}

/* Input section */
.input-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-wrapper {
    position: relative;
}

.artwork-input {
    width: 100%;
    padding: 20px 60px 20px 25px;
    font-size: 1.3rem;
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text);
    text-align: center;
    letter-spacing: 0.1em;
    transition: var(--transition);
    outline: none;
}

.artwork-input:focus {
    border-color: var(--color-gold);
    background: rgba(212, 175, 55, 0.05);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

.artwork-input::placeholder {
    color: var(--color-text-muted);
    letter-spacing: 0.02em;
    font-size: 0.95rem;
}

.clear-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.2s;
}

.artwork-input:not(:placeholder-shown) + .clear-btn {
    opacity: 1;
}

.clear-btn:hover {
    color: var(--color-gold);
}

/* Access button */
.access-button {
    padding: 20px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    border: none;
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-light) 100%);
    color: var(--color-bg);
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.access-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(212, 175, 55, 0.5);
}

.access-button:active {
    transform: translateY(0);
}

.access-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Footer */
.app-footer {
    display: flex;
    gap: 15px;
    padding: 30px 20px;
    justify-content: center;
    flex-shrink: 0;
}

.footer-btn {
    flex: 1;
    max-width: 150px;
    padding: 15px 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.footer-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--color-gold);
    transform: translateY(-2px);
}

/* Messages */
.message-container {
    width: 100%;
    padding: 15px 20px;
    border-radius: var(--border-radius);
    text-align: center;
    font-size: 0.95rem;
    animation: slideIn 0.3s ease;
    margin-top: 15px;
}

.message-container.error {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid rgba(231, 76, 60, 0.5);
    color: #e74c3c;
}

.message-container.success {
    background: rgba(46, 204, 113, 0.2);
    border: 1px solid rgba(46, 204, 113, 0.5);
    color: #2ecc71;
}

/* Orientation overlay */
.orientation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 20, 16, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.orientation-content {
    text-align: center;
    padding: 40px;
    max-width: 400px;
}

.rotate-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    color: var(--color-gold);
    animation: rotate 2s ease-in-out infinite;
}

.orientation-content p {
    font-size: 1.2rem;
    color: var(--color-text);
    line-height: 1.5;
}

/* Video container */
.video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.close-video-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 2001;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-video-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

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

.video-wrapper iframe,
.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rotate {
    0%, 100% {
        transform: rotate(-15deg);
    }
    50% {
        transform: rotate(15deg);
    }
}

/* Responsive */
@media (max-width: 480px) {
    .app-title {
        font-size: 2rem;
    }
    
    .artwork-input {
        font-size: 1.1rem;
        padding: 18px 50px 18px 20px;
    }
    
    .access-button {
        padding: 18px 30px;
        font-size: 1rem;
    }
}

/* Landscape orientation */
@media (orientation: landscape) and (max-height: 600px) {
    .app-header {
        padding: 20px;
    }
    
    .app-title {
        font-size: 2rem;
    }
    
    .app-footer {
        padding: 15px;
    }
}

/* Loader */
.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--color-gold);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#main-header{
display : none !important;
}


/* Loader amélioré */
.access-button .loader {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(15, 20, 16, 0.3);
    border-radius: 50%;
    border-top-color: var(--color-bg);
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

.access-button .loader-text {
    vertical-align: middle;
    font-size: 0.95em;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* État désactivé du bouton */
.access-button:disabled {
    opacity: 0.8;
    cursor: wait;
    transform: none !important;
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.2);
}

/* Animation de pulsation pendant le chargement */
.access-button[aria-busy="true"] {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

/* Accessibilité : focus visible */
.access-button:focus-visible,
.artwork-input:focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
}