/* =========================================================
   LES CHRONIQUES DU POULPE
   Galerie des portes
   ========================================================= */


/* ---------------------------------------------------------
   Section générale
   --------------------------------------------------------- */

.portes {
    position: relative;
    overflow: hidden;
    padding: clamp(5rem, 8vw, 8rem) clamp(1.25rem, 4vw, 4rem);
    background:
        radial-gradient(
            circle at 50% 10%,
            rgba(255, 255, 255, 0.7),
            transparent 34%
        ),
        linear-gradient(
            180deg,
            #f3ecdf 0%,
            #e9dfcf 100%
        );
}


/* légère texture du mur */

.portes::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.28;
    background-image:
        repeating-linear-gradient(
            0deg,
            rgba(76, 55, 38, 0.025) 0,
            rgba(76, 55, 38, 0.025) 1px,
            transparent 1px,
            transparent 5px
        );
}


/* ligne de sol */

.portes::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: rgba(75, 53, 37, 0.24);
}


/* ---------------------------------------------------------
   Introduction
   --------------------------------------------------------- */

.portes__intro {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto clamp(3.5rem, 6vw, 5.5rem);
    text-align: center;
}


.portes__eyebrow {
    margin: 0 0 0.75rem;
    font-family: "Source Sans 3", sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: #8a654f;
}


.portes__title {
    margin: 0;
    font-family: "Fraunces", serif;
    font-size: clamp(2.4rem, 5vw, 4.8rem);
    font-weight: 400;
    line-height: 0.98;
    color: #3f3129;
}


.portes__subtitle {
    max-width: 590px;
    margin: 1.5rem auto 0;
    font-family: "Source Sans 3", sans-serif;
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    line-height: 1.7;
    color: #6e5d52;
}


/* ---------------------------------------------------------
   Galerie
   --------------------------------------------------------- */

.portes__gallery {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(1rem, 2vw, 2rem);
    width: min(100%, 1500px);
    margin: 0 auto;
    align-items: end;
}


/* ---------------------------------------------------------
   Emplacement complet d’une porte
   --------------------------------------------------------- */

.doorway {
    position: relative;
    min-width: 0;
    padding-top: 2.5rem;
    perspective: 1200px;
}


.doorway__room-number {
    position: absolute;
    top: 0;
    left: 50%;
    z-index: 4;
    display: grid;
    place-items: center;
    min-width: 2.7rem;
    min-height: 2.7rem;
    padding: 0.4rem;
    transform: translateX(-50%);
    border: 1px solid rgba(89, 62, 44, 0.32);
    border-radius: 50%;
    background: #eee4d4;
    box-shadow:
        0 5px 12px rgba(61, 40, 27, 0.09),
        inset 0 0 0 4px rgba(255, 255, 255, 0.22);
    font-family: "Source Sans 3", sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: #75543e;
}


/* ---------------------------------------------------------
   Porte cliquable
   --------------------------------------------------------- */

.door {
    position: relative;
    display: flex;
    min-height: clamp(430px, 48vw, 620px);
    overflow: visible;
    text-decoration: none;
    color: inherit;
    isolation: isolate;
}


/* ombre au sol */

.door::after {
    content: "";
    position: absolute;
    right: 7%;
    bottom: -14px;
    left: 7%;
    z-index: -2;
    height: 28px;
    border-radius: 50%;
    background: rgba(42, 29, 21, 0.2);
    filter: blur(14px);
}


/* ---------------------------------------------------------
   Chambranle
   --------------------------------------------------------- */

.door__frame {
    position: absolute;
    inset: 0;
    z-index: 0;
    border: 8px solid #6c4a37;
    background: #4f3427;
    box-shadow:
        0 18px 34px rgba(55, 36, 24, 0.2),
        inset 0 0 0 2px rgba(255, 255, 255, 0.08),
        inset 0 0 0 10px rgba(38, 24, 17, 0.18);
}


/* linteau supérieur */

.door__frame::before {
    content: "";
    position: absolute;
    top: -15px;
    right: -14px;
    left: -14px;
    height: 14px;
    border-radius: 2px 2px 0 0;
    background: #795541;
    box-shadow:
        0 -3px 0 rgba(255, 255, 255, 0.08) inset,
        0 5px 8px rgba(46, 28, 18, 0.12);
}


/* seuil */

.door__frame::after {
    content: "";
    position: absolute;
    right: -13px;
    bottom: -10px;
    left: -13px;
    height: 10px;
    background: #5a3c2d;
    box-shadow: 0 5px 8px rgba(44, 29, 20, 0.2);
}


/* ---------------------------------------------------------
   Surface de la porte
   --------------------------------------------------------- */

.door__surface {
    position: absolute;
    inset: 12px;
    z-index: 1;
    overflow: hidden;
    transform-origin: left center;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    background:
        linear-gradient(
            100deg,
            rgba(255, 255, 255, 0.08),
            transparent 22%,
            transparent 74%,
            rgba(0, 0, 0, 0.12)
        ),
        #704a36;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.08),
        inset -18px 0 25px rgba(37, 21, 13, 0.16);
}


/* grain discret */

.door__surface::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.13;
    background-image:
        repeating-linear-gradient(
            90deg,
            transparent 0,
            transparent 10px,
            rgba(255, 255, 255, 0.16) 11px,
            transparent 12px,
            transparent 25px
        );
}


/* panneau intérieur général */

.door__surface::after {
    content: "";
    position: absolute;
    inset: 7%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow:
        0 0 0 5px rgba(49, 26, 16, 0.12),
        inset 0 0 0 1px rgba(31, 17, 11, 0.22);
}


/* ---------------------------------------------------------
   Panneaux moulurés
   --------------------------------------------------------- */

.door__panel {
    position: absolute;
    right: 12%;
    left: 12%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow:
        0 0 0 5px rgba(43, 24, 15, 0.12),
        inset 0 0 0 1px rgba(32, 18, 11, 0.24);
}


.door__panel--top {
    top: 10%;
    height: 28%;
}


.door__panel--bottom {
    bottom: 9%;
    height: 32%;
}


/* ---------------------------------------------------------
   Poignée
   --------------------------------------------------------- */

.door__handle {
    position: absolute;
    top: 54%;
    right: 8%;
    z-index: 3;
    width: 15px;
    height: 15px;
    transform: translateY(-50%);
    border: 2px solid rgba(74, 47, 21, 0.82);
    border-radius: 50%;
    background:
        radial-gradient(
            circle at 35% 30%,
            #f6d995 0,
            #c69544 32%,
            #765020 70%,
            #3d2811 100%
        );
    box-shadow:
        0 2px 5px rgba(23, 13, 7, 0.38),
        0 0 0 3px rgba(84, 52, 20, 0.2);
}


/* ---------------------------------------------------------
   Trou de serrure du Cabinet
   --------------------------------------------------------- */

.door__keyhole {
    position: absolute;
    top: calc(54% + 22px);
    right: calc(8% + 4px);
    z-index: 3;
    width: 7px;
    height: 13px;
    border-radius: 50% 50% 30% 30%;
    background: rgba(25, 14, 9, 0.82);
}


.door__keyhole::after {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 50%;
    width: 3px;
    height: 7px;
    transform: translateX(-50%);
    background: rgba(25, 14, 9, 0.82);
}


/* ---------------------------------------------------------
   Contenu placé sur la porte
   --------------------------------------------------------- */

.door__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: flex-end;
    min-width: 0;
    padding:
        clamp(2rem, 3vw, 3rem)
        clamp(1.35rem, 2.2vw, 2.2rem)
        clamp(2rem, 3vw, 3rem);
    color: #f7efe4;
    text-shadow: 0 2px 12px rgba(31, 18, 11, 0.28);
    transform-origin: left center;
transform-style: preserve-3d;
backface-visibility: hidden;
}


.door__label {
    margin-bottom: 0.8rem;
    font-family: "Source Sans 3", sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    opacity: 0.76;
}


.door__title {
    max-width: 100%;
    font-family: "Fraunces", serif;
    font-size: clamp(1.75rem, 2.5vw, 2.7rem);
    font-weight: 400;
    line-height: 0.98;
    overflow-wrap: anywhere;
}


.door__description {
    margin-top: 1.1rem;
    font-family: "Source Sans 3", sans-serif;
    font-size: clamp(0.88rem, 1vw, 1rem);
    line-height: 1.55;
    opacity: 0.86;
}


.door__action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.7rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    font-family: "Source Sans 3", sans-serif;
    font-size: 0.79rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}


/* ---------------------------------------------------------
   Personnalité des quatre portes
   --------------------------------------------------------- */

.doorway--cinema .door__surface {
    background:
        linear-gradient(
            100deg,
            rgba(255, 255, 255, 0.1),
            transparent 24%,
            transparent 72%,
            rgba(0, 0, 0, 0.22)
        ),
        #7B1E1E;
}


.doorway--litterature .door__surface {
    background:
        linear-gradient(
            100deg,
            rgba(255, 255, 255, 0.05),
            transparent 24%,
            transparent 72%,
            rgba(0, 0, 0, 0.24)
        ),
        #9E5A2A;
}


.doorway--cabinet .door__surface {
    background:
        linear-gradient(
            100deg,
            rgba(255, 255, 255, 0.05),
            transparent 24%,
            transparent 72%,
            rgba(0, 0, 0, 0.27)
        ),
        #325b4f;
}


.doorway--carnets .door__surface {
    background:
        linear-gradient(
            100deg,
            rgba(255, 255, 255, 0.05),
            transparent 24%,
            transparent 72%,
            rgba(0, 0, 0, 0.25)
        ),
        #366848;
}


/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (max-width: 1180px) {

    .portes__gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4rem clamp(1.4rem, 4vw, 3rem);
        width: min(100%, 820px);
    }

    .door {
        min-height: 560px;
    }
}


@media (max-width: 680px) {

    .portes {
        padding-right: 1rem;
        padding-left: 1rem;
    }

    .portes__gallery {
        grid-template-columns: 1fr;
        gap: 4rem;
        width: min(100%, 390px);
    }

    .door {
        min-height: 540px;
    }

    .door__content {
        padding-right: 2rem;
        padding-left: 2rem;
    }

    .door__title {
        font-size: clamp(2rem, 10vw, 2.8rem);
    }
}

/* =========================================================
   INTERACTIONS DES PORTES
   ========================================================= */


/* ---------------------------------------------------------
   Transitions générales
   --------------------------------------------------------- */

.door,
.door__surface,
.door__content,
.door__handle,
.door__action,
.door__action span,
.doorway__room-number {
    transition:
        transform 500ms ease,
        opacity 400ms ease,
        filter 400ms ease,
        box-shadow 500ms ease,
        background-color 400ms ease,
        border-color 400ms ease;
}


/* ---------------------------------------------------------
   Mise en avant de la porte survolée
   --------------------------------------------------------- */

.doorway:hover {
    z-index: 5;
}


.doorway:hover .door {
    transform: translateY(-10px);
}


.doorway:hover .doorway__room-number {
    transform: translateX(-50%) translateY(-4px) scale(1.06);
    box-shadow:
        0 9px 18px rgba(61, 40, 27, 0.15),
        inset 0 0 0 4px rgba(255, 255, 255, 0.28);
}


/* ---------------------------------------------------------
   Ouverture légère de la porte
   --------------------------------------------------------- */

.doorway:hover .door__surface {
    transform:
        perspective(1200px)
        rotateY(-10deg);

    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.1),
        inset -28px 0 34px rgba(37, 21, 13, 0.22),
        16px 8px 28px rgba(33, 20, 13, 0.24);
}

/* filet de lumière dans l’entrebâillement */

.door::before {
    content: "";
    position: absolute;
    top: 15px;
    right: 11px;
    bottom: 15px;
    z-index: 0;

    width: 8px;
    opacity: 0;
    pointer-events: none;

    background:
        linear-gradient(
            270deg,
            rgba(255, 231, 172, 0.98) 0%,
            rgba(255, 204, 112, 0.72) 34%,
            rgba(255, 204, 112, 0.14) 72%,
            transparent 100%
        );

    box-shadow:
        0 0 18px rgba(255, 203, 105, 0.42),
        0 0 34px rgba(255, 203, 105, 0.18);

    transform: scaleY(0.97);

    transition:
        width 500ms ease,
        opacity 450ms ease,
        box-shadow 500ms ease;
}


.doorway:hover .door::before {
    width: 24px;
    opacity: 1;

    box-shadow:
        0 0 24px rgba(255, 203, 105, 0.58),
        0 0 48px rgba(255, 203, 105, 0.24);
}


/* ---------------------------------------------------------
   Contenu
   --------------------------------------------------------- */

.doorway:hover .door__content {
    transform:
        perspective(1200px)
        rotateY(-10deg);
}


.doorway:hover .door__title {
    text-shadow:
        0 2px 12px rgba(31, 18, 11, 0.28),
        0 0 24px rgba(255, 236, 198, 0.1);
}


.doorway:hover .door__description {
    opacity: 0.96;
}


/* ---------------------------------------------------------
   Poignée
   --------------------------------------------------------- */

.doorway:hover .door__handle {
    transform: translateY(-50%) scale(1.08);

    box-shadow:
        0 3px 7px rgba(23, 13, 7, 0.42),
        0 0 0 2px rgba(84, 52, 20, 0.18),
        0 0 9px rgba(242, 193, 97, 0.22);
}


/* reflet mobile sur la poignée */

.door__handle::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 3px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 250, 220, 0.82);
    opacity: 0.55;
    transition:
        opacity 400ms ease,
        transform 500ms ease;
}


.doorway:hover .door__handle::after {
    opacity: 1;
    transform: translate(2px, -1px);
}


/* ---------------------------------------------------------
   Appel à l’action
   --------------------------------------------------------- */

.doorway:hover .door__action {
    border-color: rgba(255, 255, 255, 0.38);
}


.doorway:hover .door__action span {
    transform: translateX(6px);
}


/* ---------------------------------------------------------
   Assombrissement des autres portes
   --------------------------------------------------------- */


.doorway {
    transition:
        opacity 400ms ease,
        filter 400ms ease,
        transform 400ms ease;
}


/* ---------------------------------------------------------
   Focus clavier
   --------------------------------------------------------- */

.door:focus-visible {
    outline: 3px solid rgba(139, 100, 65, 0.72);
    outline-offset: 8px;
}


.door:focus-visible .door__surface,
.door:focus-visible .door__content {
    transform:
        perspective(1200px)
        rotateY(-10deg);
}


/* ---------------------------------------------------------
   Réduction des animations
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

    .door,
    .door__surface,
    .door__content,
    .door__handle,
    .door__action,
    .door__action span,
    .doorway,
    .doorway__room-number,
    .door::before {
        transition-duration: 0.01ms !important;
    }

    .doorway:hover .door,
    .doorway:hover .door__surface,
    .doorway:hover .door__content,
    .doorway:hover .doorway__room-number,
    .portes__gallery:has(.doorway:hover) .doorway:not(:hover) {
        transform: none;
    }
}


/* ---------------------------------------------------------
   Appareils tactiles
   --------------------------------------------------------- */

@media (hover: none) {

    .doorway:hover .door,
    .doorway:hover .door__surface,
    .doorway:hover .door__content,
    .doorway:hover .doorway__room-number {
        transform: none;
    }

    .portes__gallery:has(.doorway:hover) .doorway:not(:hover) {
        opacity: 1;
        filter: none;
        transform: none;
    }

    .doorway:hover .door::before {
        opacity: 0;
    }
}

/* =========================================================
   AJUSTEMENT SIMPLE DE LA LUMIÈRE DERRIÈRE LES PORTES
   ========================================================= */


/* Fond lumineux caché derrière le battant */

.door__frame {
    background:
        radial-gradient(
            ellipse at 78% 50%,
            rgba(255, 224, 161, 0.72) 0%,
            rgba(210, 151, 71, 0.34) 20%,
            rgba(79, 52, 39, 0.96) 58%
        ),
        #4f3427;
}


/* Rai visible sur le côté droit lors de l’ouverture */

.door::before {
    top: 14px;
    right: 10px;
    bottom: 14px;
    z-index: 1;

    width: 0;
    opacity: 0;

    background:
        linear-gradient(
            270deg,
            rgba(255, 247, 210, 1) 0%,
            rgba(255, 210, 119, 0.92) 22%,
            rgba(255, 183, 78, 0.52) 58%,
            transparent 100%
        );

    box-shadow:
        0 0 12px rgba(255, 205, 108, 0.85),
        0 0 28px rgba(255, 185, 74, 0.48);

    transition:
        width 500ms ease,
        opacity 350ms ease,
        box-shadow 500ms ease;
}


.doorway:hover .door::before {
    width: 28px;
    opacity: 1;
}


/* Ouverture très légèrement renforcée */

.doorway:hover .door__surface,
.doorway:hover .door__content {
    transform:
        perspective(1200px)
        rotateY(-12deg);
}


/* Ombre portée du battant ouvert */

.doorway:hover .door__surface {
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.1),
        inset -30px 0 36px rgba(37, 21, 13, 0.24),
        20px 9px 30px rgba(33, 20, 13, 0.28);
}

/* =========================================================
   ÉPAISSEUR VISUELLE DU BATTANT
   ========================================================= */


/* Le battant peut afficher une tranche */

.door__surface {
    overflow: visible;
}


/* Tranche droite de la porte */

.door__surface::before {
    content: "";
    position: absolute;
    top: 0;
    right: -8px;
    bottom: 0;
    width: 8px;

    opacity: 0;

    background:
        linear-gradient(
            90deg,
            rgba(39, 22, 14, 0.72),
            rgba(105, 65, 40, 0.96)
        );

    transform-origin: left center;
    transform: rotateY(90deg);

    box-shadow:
        3px 0 8px rgba(25, 14, 8, 0.24);

    transition:
        opacity 350ms ease;
}


/* La tranche apparaît quand la porte s’ouvre */

.doorway:hover .door__surface::before {
    opacity: 1;
}

/* =========================================================
   CHANT DE LA PORTE
   ========================================================= */

.door__edge {
    display: none;
}


.doorway:hover .door__edge {
    opacity: 1;
}

/* =========================================================
   NOUVELLE DISPOSITION DES INSCRIPTIONS
   ========================================================= */


/* Le contenu couvre toute la surface du battant */

.door__content {
    position: absolute;
    inset: 12px;
    z-index: 2;

    display: block;
    padding: 0;

    transform-origin: left center;
    transform-style: preserve-3d;
    backface-visibility: hidden;

    pointer-events: none;
}


/* ---------------------------------------------------------
   Verbe placé sous le numéro de porte
   --------------------------------------------------------- */

.door__label {
    position: absolute;
    top: 4.5%;
    left: 50%;

    width: max-content;
    max-width: 80%;

    margin: 0;
    transform: translateX(-50%);

    font-size: 0.68rem;
    line-height: 1;
    letter-spacing: 0.24em;
    text-align: center;
    text-transform: uppercase;

    opacity: 0.78;
}


/* ---------------------------------------------------------
   Titre placé dans le panneau supérieur
   --------------------------------------------------------- */

.door__title {
    position: absolute;
    top: 13%;
    right: 10%;
    left: 10%;

    display: flex;
    align-items: center;
    justify-content: center;

    height: 24%;

    padding: 0;

    font-family: "Fraunces", serif;
    font-size: clamp(1.9rem, 2.6vw, 3rem);
    font-weight: 400;
    line-height: 1.05;

    text-align: center;
    text-wrap: balance;
}


/* Titre plus long du Cabinet */

.doorway--cabinet .door__title {
    font-size: clamp(1.55rem, 2.1vw, 2.45rem);
}


/* ---------------------------------------------------------
   Description placée dans le panneau inférieur
   --------------------------------------------------------- */

.door__description {
    position: absolute;
    right: 12%;
    bottom: 9%;
    left: 12%;

    display: flex;
    align-items: center;
    justify-content: center;

    height: 32%;
    margin: 0;
    padding: clamp(1rem, 1.5vw, 1.5rem);

    font-size: clamp(0.82rem, 0.9vw, 0.96rem);
    line-height: 1.55;
    text-align: center;

    opacity: 0.88;
}


/* ---------------------------------------------------------
   Action placée sous le panneau inférieur
   --------------------------------------------------------- */

.door__action {
    position: absolute;
    right: 12%;
    bottom: 2.3%;
    left: 12%;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;

    margin: 0;
    padding: 0.65rem 0 0;

    border-top: 1px solid rgba(255, 255, 255, 0.22);

    font-size: clamp(0.63rem, 0.72vw, 0.76rem);
    line-height: 1.2;
    letter-spacing: 0.06em;
}


/* ---------------------------------------------------------
   Animation cohérente avec le battant
   --------------------------------------------------------- */

.doorway:hover .door__content {
    transform:
        perspective(1200px)
        rotateY(-12deg);
}

/* =========================================================
   ÉPAISSEUR SOBRE ET NATURELLE DU BATTANT
   ========================================================= */

.door__surface {
    border-right: 3px solid rgba(45, 25, 15, 0.72);

    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.08),
        inset -14px 0 22px rgba(35, 19, 12, 0.16);
}

.doorway:hover .door__surface {
    border-right-width: 7px;

    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.1),
        inset -22px 0 30px rgba(35, 19, 12, 0.24),
        18px 8px 28px rgba(30, 18, 11, 0.28);
}

.doorway:hover .door__surface {
    border-right-color: rgba(103, 63, 36, 0.92);
}

/* =========================================================
   FINITION PLUS ORNÉE DES PORTES
   ========================================================= */


/* ---------------------------------------------------------
   Bois plus profond et plus texturé
   --------------------------------------------------------- */

.door__surface {
    background-blend-mode: soft-light, normal;

    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.06),
        inset 0 0 0 6px rgba(28, 15, 10, 0.1),
        inset -18px 0 28px rgba(24, 13, 8, 0.2);
}


.door__surface::before {
    opacity: 0.18;

    background-image:
        repeating-linear-gradient(
            90deg,
            transparent 0,
            transparent 8px,
            rgba(255, 255, 255, 0.08) 9px,
            transparent 10px,
            transparent 23px
        ),
        repeating-linear-gradient(
            0deg,
            transparent 0,
            transparent 18px,
            rgba(0, 0, 0, 0.05) 19px,
            transparent 20px,
            transparent 38px
        );
}


/* ---------------------------------------------------------
   Chambranles plus travaillés
   --------------------------------------------------------- */

.door__frame {
    border-width: 9px;

    box-shadow:
        0 18px 34px rgba(55, 36, 24, 0.22),
        inset 0 0 0 2px rgba(255, 255, 255, 0.06),
        inset 0 0 0 7px rgba(38, 24, 17, 0.2),
        0 0 0 2px rgba(74, 48, 31, 0.35);
}


.door__frame::before {
    top: -18px;
    right: -16px;
    left: -16px;
    height: 17px;

    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.08),
            transparent 38%
        ),
        #6d4935;

    box-shadow:
        0 -2px 0 rgba(255, 255, 255, 0.08) inset,
        0 4px 0 rgba(49, 29, 18, 0.5),
        0 7px 10px rgba(46, 28, 18, 0.14);
}


/* ---------------------------------------------------------
   Médaillons numérotés
   --------------------------------------------------------- */

.doorway__room-number {
    min-width: 3.4rem;
    min-height: 3.4rem;

    border: 2px solid #9a6b32;
    border-radius: 50%;

    background:
        radial-gradient(
            circle at 35% 30%,
            #5e4935 0%,
            #34261c 55%,
            #1d1510 100%
        );

    box-shadow:
        0 6px 14px rgba(43, 26, 16, 0.25),
        0 0 0 4px #c89b54,
        0 0 0 6px rgba(57, 36, 22, 0.85),
        inset 0 0 0 2px rgba(255, 232, 176, 0.18);

    font-family: "Fraunces", serif;
    font-size: 1.12rem;
    font-weight: 600;
    letter-spacing: 0.04em;

    color: #f2d18f;
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.5);
}


/* ---------------------------------------------------------
   Verbes plus présents
   --------------------------------------------------------- */

.door__label {
    top: 3.2%;

    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.28em;

    color: #f0d79f;
    opacity: 1;

    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.08),
        0 2px 5px rgba(24, 14, 9, 0.42);
}


/* petit motif décoratif sous le verbe */

.door__label::after {
    content: "◆";
    display: block;
    margin-top: 0.55rem;

    font-size: 0.46rem;
    letter-spacing: 0;

    color: rgba(232, 199, 132, 0.9);
}


/* ---------------------------------------------------------
   Titres plus dorés
   --------------------------------------------------------- */

.door__title {
    color: #f3dfb3;

    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.12),
        0 3px 8px rgba(26, 14, 8, 0.42);
}


/* ---------------------------------------------------------
   Textes et actions
   --------------------------------------------------------- */

.door__description {
    color: #f5ead6;
    opacity: 0.94;
}


.door__action {
    color: #f0d79f;
    border-top-color: rgba(229, 197, 134, 0.38);
}

/* =========================================================
   MUR ET TAPISSERIE CARTOGRAPHIQUE
   ========================================================= */

.hall__wall {
    position: absolute;
    inset: 0;
    z-index: 0;

    background-image:
        url("../img/hall/mappa-mundi-octopus.webp");

    background-repeat: no-repeat;
    background-position: center center;
    background-size: 100% 100%;

    background-color: #dfc8a5;
    background-blend-mode: normal, multiply;

    pointer-events: none;
}

/* Léger vieillissement de la tapisserie */

.hall__wall::after {
    content: "";
    position: absolute;
    inset: 0;

    background:
        radial-gradient(
            ellipse at 50% 12%,
            rgba(255, 247, 220, 0.42) 0%,
            transparent 58%
        ),
        linear-gradient(
            90deg,
            rgba(73, 45, 27, 0.08) 0%,
            transparent 13%,
            transparent 87%,
            rgba(73, 45, 27, 0.08) 100%
        );

    pointer-events: none;
}





/* =========================================================
   ÉCLAIRAGE DU HALL
   ========================================================= */

.hall__light {
    position: absolute;
    inset: 0;

    background:
        radial-gradient(
            ellipse 48% 54% at 50% 0%,
            rgba(255, 251, 225, 0.92) 0%,
            rgba(255, 230, 175, 0.34) 34%,
            rgba(255, 220, 150, 0.1) 56%,
            transparent 76%
        );

    pointer-events: none;
}

/* =========================================================
   CORRECTION DE L’AFFICHAGE DU HALL
   ========================================================= */

.hall {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    isolation: isolate;
    background: #eadfce;
}


/* Les différentes couches du décor */

.hall__wall {
    z-index: 0;
}

.hall__wainscot {
    z-index: 1;
}

.hall__floor {
    z-index: 2;
}

.hall__light {
    z-index: 3;
}


/* Les portes passent devant tout le décor */

.hall .portes {
    position: relative;
    z-index: 4;

    /* indispensable : supprime l’ancien fond opaque */
    background: transparent;
}


/* Désactive l’ancienne texture et l’ancienne ligne de sol */

.hall .portes::before,
.hall .portes::after {
    display: none;
}

/* =========================================================
   POSITIONNEMENT DES PORTES SUR LE PARQUET
   ========================================================= */

.portes {
    position: relative;
    z-index: 3;
    min-height: 100vh;
}

.portes__gallery {
    position: absolute;
    right: 0;
    bottom: 86px;
    left: 0;

    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: end;

    width: min(1320px, calc(100% - 40px));
    margin-inline: auto;
}

/* Empêche le titre Littérature de se couper */
.doorway:nth-child(2) .door__title {
    font-size: clamp(2rem, 2.8vw, 3.25rem);
    white-space: nowrap;
}

/* =========================================================
   PORTES — ANCRAGE DÉFINITIF AU PARQUET
   ========================================================= */

.doorway,
.doorway:hover,
.doorway:focus-within {
    transform: none !important;
}

.door,
.door:hover,
.door:focus-visible {
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
}

.door__surface,
.door__content {
    transform-origin: left center;
    transition:
        transform 700ms cubic-bezier(0.2, 0.72, 0.2, 1),
        box-shadow 700ms ease;
}

.door:hover .door__surface,
.door:focus-visible .door__surface,
.door:hover .door__content,
.door:focus-visible .door__content {
    transform: perspective(1400px) rotateY(-12deg);
}

.door:hover .door__surface,
.door:focus-visible .door__surface {
    box-shadow:
        inset -18px 0 24px rgba(0, 0, 0, 0.16),
        12px 2px 18px rgba(31, 17, 9, 0.18);
}

/* Hall : adaptation tablette et téléphone */

@media (max-width: 1050px) {
    .hall .portes {
        min-height: auto;
        padding: 4rem 1.25rem;
    }

    .portes__gallery {
        position: relative;
        inset: auto;

        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4rem 1.5rem;

        width: min(100%, 820px);
        margin: 4rem auto 0;
    }

    .hall__wall {
        background-size: cover;
        background-position: center top;
    }
}

@media (max-width: 680px) {
    .portes__gallery {
        grid-template-columns: minmax(0, 1fr);
        width: min(100%, 340px);
    }

    .doorway {
        min-width: 0;
    }

    .doorway:nth-child(2) .door__title {
        font-size: clamp(1.8rem, 8vw, 2.6rem);
        white-space: normal;
    }
}
