/* Porte double : premier écran de la home (Skin à gauche, Bones à droite) */

.sb-doors {
    position: relative;
    overflow: hidden;
    background: var(--sb-encre);
    color: var(--sb-os);
    font-family: var(--sb-font-text);
    border-bottom: 2px solid #000;
}

/* Grain d'affiche par-dessus les photos */
.sb-doors::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    opacity: .22;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.sb-doors-row {
    display: flex;
    height: clamp(520px, calc(100svh - var(--sb-nav-height)), 820px);
}

.sb-door {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: flex-end;
    padding: 2.5rem;
    overflow: hidden;
    transition: flex .5s ease;
}

.sb-door img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sb-door-skin img {
    filter: grayscale(1) contrast(1.2) brightness(.55) sepia(1) hue-rotate(-30deg) saturate(3);
}

.sb-door-bones {
    background: var(--sb-encre);
}

.sb-door-content {
    position: relative;
    max-width: 34ch;
}

.sb-door-word {
    margin: 0;
    font-family: var(--sb-font-poster);
    font-weight: 400;
    font-size: clamp(4rem, 9vw, 8rem);
    line-height: .9;
    text-shadow: 3px 3px 0 #000;
    filter: url(#sb-worn);
}

.sb-door-skin .sb-door-word { color: var(--sb-sang); }
.sb-door-bones .sb-door-word { color: var(--sb-os); }

.sb-door-content p {
    margin: .75rem 0 1.25rem;
    font-size: 1.2rem;
    line-height: 1.45;
}

.sb-doors-banner {
    position: absolute;
    top: 1.5rem;
    left: 1rem;
    right: 1rem;
    z-index: 4;
    margin: 0;
    text-align: center;
    font-weight: 800;
    font-size: 1.25rem;
}

.sb-doors-banner span {
    display: inline-block;
    padding: .35rem .9rem;
    background: var(--sb-encre);
    border: 2px solid var(--sb-os);
}

.sb-doors-amp {
    position: absolute;
    left: 50%;
    top: 46%;
    z-index: 4;
    transform: translate(-50%, -50%);
    font-family: var(--sb-font-script);
    font-size: 9.5rem;
    line-height: 1;
    color: var(--sb-os);
    filter: drop-shadow(3px 3px 0 #000) drop-shadow(0 0 18px #000);
    pointer-events: none;
}

/* Boutons, nommés pour être réutilisés par les prochaines sections */
.sb-btn {
    display: inline-block;
    padding: .75rem 1.25rem;
    font-family: var(--sb-font-text);
    font-weight: 800;
    font-size: 1.05rem;
    text-decoration: none;
    border: 2px solid currentColor;
}


.sb-btn:focus-visible {
    outline: 3px solid var(--sb-os);
    outline-offset: 3px;
}

/* Double classe : doit l'emporter sur les liens dorés de `.sb-home a` (app.css) */
.sb-btn.sb-btn-blood { background: var(--sb-sang); border-color: var(--sb-sang); color: var(--sb-os); }
.sb-btn.sb-btn-blood:hover { background: #b81d14; border-color: #b81d14; color: var(--sb-os); text-decoration: none; }
.sb-btn.sb-btn-bone { background: var(--sb-os); border-color: var(--sb-os); color: var(--sb-encre); }
.sb-btn.sb-btn-bone:hover { background: #fff; border-color: #fff; color: var(--sb-encre); text-decoration: none; }

/* La porte s'ouvre au survol ou quand on y arrive au clavier */
@media (hover: hover) and (min-width: 801px) {
    .sb-door:hover,
    .sb-door:focus-within {
        flex: 1.5;
    }
}

/* Ouverture au chargement : les deux portes se décalent depuis le centre */
@keyframes sb-door-open-left { from { transform: translateX(6%); } }
@keyframes sb-door-open-right { from { transform: translateX(-6%); } }
@keyframes sb-amp-in { from { opacity: 0; transform: translate(-50%, -50%) scale(.6); } }

.sb-door-skin .sb-door-content { animation: sb-door-open-left .8s ease-out both; }
.sb-door-bones .sb-door-content { animation: sb-door-open-right .8s ease-out both; }
.sb-doors-amp { animation: sb-amp-in .6s .3s ease-out both; }

@media (max-width: 800px) {
    .sb-doors-row {
        flex-direction: column;
        height: auto;
    }

    /* Hauteur fixe : l'esperluette (top: 50%) tombe pile sur la jonction des deux portes */
    .sb-door {
        height: 30rem;
        padding: 3rem 1rem 2rem;
    }

    /* Place pour le bandeau en haut et pour l'esperluette en bas */
    .sb-door-skin {
        padding-top: 7rem;
        padding-bottom: 4.5rem;
    }

    .sb-doors-banner {
        top: 1rem;
        font-size: 1rem;
    }

    /* Décalée à droite pour ne pas toucher les boutons, alignés à gauche */
    .sb-doors-amp {
        top: calc(50% + 1.5rem);
        left: 78%;
        font-size: 7rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sb-door { transition: none; }
    .sb-door-content,
    .sb-doors-amp { animation: none; }
}
