/* ═══════════════════════════════════════════
   Aux Arcades Reels — Styles
═══════════════════════════════════════════ */

/* Wrapper en pleine largeur (sort du container parent) */
.aa-reels-wrap {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    position: relative;
}

/* Badge mode démo (visible admin uniquement) */
.aa-reels-demo-badge {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: #E8745B;
    color: #fff;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    z-index: 5;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Grid edge-to-edge */
.aa-reels-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0;
    width: 100%;
}

/* Chaque reel = un bouton */
.aa-reel {
    position: relative;
    aspect-ratio: 9 / 16;
    border: none;
    background: #f5f5f5;
    cursor: pointer;
    overflow: hidden;
    padding: 0;
    display: block;
    margin: 0;
    font: inherit;
    color: inherit;
}

.aa-reel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.aa-reel__placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ddd 25%, #eee 50%, #ddd 75%);
}

/* Overlay orange — caché par défaut */
.aa-reel__overlay {
    position: absolute;
    inset: 0;
    background: rgba(232, 116, 91, 0.55);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

/* Bouton play — caché par défaut */
.aa-reel__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 54px;
    height: 54px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
}

.aa-reel__play svg {
    margin-left: 3px; /* petit décalage optique pour centrer le triangle */
}

/* État hover/focus : affiche overlay + play */
.aa-reel:hover .aa-reel__overlay,
.aa-reel:focus-visible .aa-reel__overlay {
    opacity: 1;
}

.aa-reel:hover .aa-reel__play,
.aa-reel:focus-visible .aa-reel__play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05);
}

.aa-reel:focus { outline: none; }
.aa-reel:focus-visible {
    outline: 2px solid #E8745B;
    outline-offset: -2px;
}

/* ═══ Lightbox ═══ */
.aa-reels-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.aa-reels-lightbox.is-open {
    display: flex;
    animation: aaReelsFadeIn 0.25s ease;
}

@keyframes aaReelsFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.aa-reels-lightbox__content {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 9 / 16;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.aa-reels-lightbox__content iframe,
.aa-reels-lightbox__content video {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.aa-reels-lightbox__demo-message {
    color: #fff;
    text-align: center;
    padding: 40px 20px;
    font-size: 14px;
    line-height: 1.6;
}

.aa-reels-lightbox__close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    opacity: 0.9;
    transition: opacity 0.2s;
    z-index: 2;
}
.aa-reels-lightbox__close:hover { opacity: 1; }

/* ═══ Empty state (admin) ═══ */
.aa-reels-empty {
    padding: 40px;
    text-align: center;
    background: #f8f8f8;
    border: 1px dashed #ccc;
    margin: 24px 0;
}

/* ═══ Responsive ═══ */
@media (max-width: 1200px) {
    .aa-reels-grid { grid-template-columns: repeat(5, 1fr); }
    .aa-reel:nth-child(n+6) { display: none; }
}

@media (max-width: 992px) {
    .aa-reels-grid { grid-template-columns: repeat(4, 1fr); }
    .aa-reel:nth-child(n+5) { display: none; }
}

@media (max-width: 768px) {
    .aa-reels-grid { grid-template-columns: repeat(3, 1fr); }
    .aa-reel:nth-child(n+4) { display: none; }
    /* Sur mobile (tactile), pas de hover : on affiche en permanence un play discret */
    .aa-reel__play {
        opacity: 1;
        width: 42px;
        height: 42px;
        border-width: 1.5px;
        background: rgba(0,0,0,0.15);
    }
    .aa-reel:hover .aa-reel__overlay { opacity: 0; }
}

@media (max-width: 480px) {
    .aa-reels-grid { grid-template-columns: repeat(2, 1fr); }
    .aa-reel:nth-child(n+3) { display: none; }
}
