/* =================================================================
   CANVAS.CSS (Interne à l'iframe)
   ================================================================= */

html {
    height: 100%;
    overflow: hidden;
}

body {
    margin: 0; 
    padding: 0; 
    background-color: #fff;
    font-size: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* On cache la scrollbar pour un effet application */
::-webkit-scrollbar { display: none; }
body { -ms-overflow-style: none; scrollbar-width: none; }

img { 
    display: block; 
    width: 100%; 
    height: auto; 
    pointer-events: none; 
}

/* Wrapper Carrousel */
.carousel-wrapper {
    position: relative; 
    width: 100%;
    background: #fff;
}

/* Scroll Horizontal */
.carousel-container {
    display: flex;
    flex-direction: row;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    cursor: grab; 
}

.carousel-container img {
    width: 100vw;
    height: auto;
    flex-shrink: 0;
    scroll-snap-align: center;
}

/* Dots Overlay */
.dots-overlay {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 8px;
    background-color: rgba(0, 0, 0, 0.4); 
    padding: 8px 12px; 
    border-radius: 20px;
    z-index: 10;
    pointer-events: none;
}

.dot {
    width: 6px; 
    height: 6px; 
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    transition: background-color 0.3s, transform 0.3s;
    pointer-events: auto;
    cursor: pointer; 
}

.dot.active {
    background-color: #fff; 
    transform: scale(1.2);
}

/* --- TOOLBAR INSTRUCTIONS (Style Pilule identique à DxO) --- */
.viewer-toolbar {
    width: 100%;
    display: flex;
    justify-content: center; /* Centre horizontalement */
    align-items: center;
    margin: 40px 0 30px 0;
    padding: 0 15px;
    box-sizing: border-box;
}

.control-group-pill {
    background: #f4f4f4;
    padding: 9px 22px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.pill-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    border-right: 1px solid #ddd;
    padding-right: 15px;
    user-select: none;
}

.instruction-content {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    font-weight: 500;
    color: #666;
}

.instruction-content i {
    font-size: 12px;
    color: #aaa;
}

.instruction-content .divider {
    color: #ddd;
}

/* --- DARK MODE REPAINT --- */
html.dark-theme .control-group-pill { 
    background: #1e1e1e; 
}
html.dark-theme .pill-label { 
    border-color: #333; 
    color: #555; 
}
html.dark-theme .instruction-content { 
    color: #aaa; 
}
html.dark-theme .instruction-content i { 
    color: #555; 
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 900px) {
    .viewer-toolbar {
        margin-top: 20px;
    }
    
    .pill-label {
        display: none; /* Gain de place sur mobile */
    }

    /* On cache le clavier et le shift scroll sur mobile (non pertinent) */
    .instruction-content .divider,
    .instruction-content span:last-child,
    .instruction-content i:last-of-type {
        display: none;
    }
    
    .instruction-content {
        font-size: 12px;
    }
}