/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none !important; /* Supprimer les contours par défaut */
    border: none; /* Supprimer les bordures par défaut */
    -webkit-tap-highlight-color: transparent;
    -webkit-focus-ring-color: transparent;
}

*:focus {
    outline: none !important; /* Supprimer les contours au focus */
}

*:focus-visible {
    outline: none !important; /* Supprimer les contours focus-visible */
}

*:active {
    outline: none !important;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Georgia', 'Times New Roman', serif;
    background: #2a1f0f;
    color: #3d2e1a;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Augmenter la résolution globale */
    image-rendering: -webkit-optimize-contrast;
    text-rendering: optimizeLegibility;
    outline: none; /* Supprimer les contours par défaut */
}

/* Supprimer tous les contours par défaut du navigateur */
a, button, input, select, textarea, div, span, img, p, h1, h2, h3, h4, h5, h6, nav, ul, li {
    outline: none !important;
    -webkit-tap-highlight-color: transparent; /* Supprimer le highlight sur mobile */
    -webkit-focus-ring-color: transparent;
    border: none !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

a:focus, button:focus, input:focus, select:focus, textarea:focus,
div:focus, span:focus, img:focus, p:focus, h1:focus, h2:focus, h3:focus, h4:focus, h5:focus, h6:focus,
nav:focus, ul:focus, li:focus {
    outline: none !important;
    -webkit-focus-ring-color: transparent;
    border: none !important;
    box-shadow: none !important;
}

a:active, button:active, img:active, p:active, nav:active, ul:active, li:active {
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
    border: none !important;
    box-shadow: none !important;
}

a:visited, a:link {
    outline: none !important;
    border: none !important;
}

/* Supprimer les contours spécifiques pour les images */
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

/* Container principal */
.bunker-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
    perspective: 2000px;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    outline: none !important;
    border: none !important;
    -webkit-tap-highlight-color: transparent;
    -webkit-focus-ring-color: transparent;
}

.bunker-container.dragging {
    cursor: grabbing;
}

/* Bouton menu mobile (caché sur desktop) */
.menu-toggle {
    display: none;
    position: fixed;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(42, 31, 15, 0.8);
    border: 2px solid #8b7355;
    border-radius: 4px;
    cursor: pointer;
    z-index: 1500; /* En dessous des enveloppes (2000) pour ne pas les bloquer */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 8px;
    transition: background 0.3s ease;
    outline: none !important; /* Supprimer les contours */
    /* Réduire la zone de clic pour ne pas bloquer les enveloppes */
    touch-action: manipulation;
    pointer-events: auto;
    /* Limiter strictement la zone de clic au bouton uniquement */
    overflow: visible;
    box-sizing: border-box;
    /* S'assurer que seul le bouton capture les clics - pas de clip-path qui pourrait bloquer */
}

.menu-toggle:hover {
    background: rgba(42, 31, 15, 0.95);
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #8b7355;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Overlay sombre pour le menu mobile */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1500;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none !important; /* Ne pas bloquer les clics quand inactif */
}

.menu-overlay.active {
    opacity: 1;
    pointer-events: auto !important; /* Activer les clics seulement quand actif */
}

/* Menu discret */
.menu {
    position: fixed;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    z-index: 1000;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    outline: none !important;
    border: none !important;
    -webkit-tap-highlight-color: transparent;
    -webkit-focus-ring-color: transparent;
    /* Ne pas bloquer les clics sur les enveloppes */
    pointer-events: auto;
}

/* Sur mobile, le menu est positionné en dehors de l'écran par défaut */
@media (max-width: 768px) {
    .menu {
        /* Style de base pour le menu mobile */
        background: rgba(245, 234, 216, 0.98);
        padding: 40px 60px;
        border-radius: 8px;
        border: 2px solid #8b7355;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    }
    
    .menu:not(.mobile-open) {
        /* Menu visible mais en dehors de l'écran à droite */
        position: fixed;
        top: 50%;
        right: -400px; /* En dehors de l'écran (assez loin pour être invisible) */
        transform: translateY(-50%);
        opacity: 1;
        pointer-events: none !important; /* Désactiver les clics quand caché */
        z-index: 1300;
        visibility: visible;
        transition: right 0.3s ease;
    }
}

.menu:hover {
    opacity: 1;
}

.menu ul {
    list-style: none;
    display: flex;
    gap: 20px;
    flex-direction: column;
    align-items: flex-end;
}

.menu li {
    list-style: none;
}

.menu a {
    color: #8b7355;
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 300;
    transition: color 0.3s ease;
    cursor: pointer;
    text-align: right;
    display: block;
}

.menu a:hover {
    color: #b89d7a;
}

/* Supprimer spécifiquement les contours du menu */
.menu,
.menu *,
.menu *:hover,
.menu *:focus,
.menu *:active,
.menu *:visited,
.menu *:focus-visible {
    outline: 0 !important;
    outline: none !important;
    outline-offset: 0 !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-focus-ring-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
    /* Firefox spécifique */
    -moz-outline: none !important;
    -moz-outline-radius: 0 !important;
    -moz-outline-offset: 0 !important;
    /* Empêcher la sélection */
    -moz-user-select: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Règle supplémentaire pour Firefox */
@-moz-document url-prefix() {
    .menu,
    .menu *,
    .logo-image {
        outline: 0 !important;
        outline: none !important;
        -moz-outline: none !important;
        -moz-outline-radius: 0 !important;
        -moz-outline-offset: 0 !important;
    }
}

/* Scène cartographique */
.map-scene {
    width: 300%;
    height: 300%;
    position: absolute;
    top: -100%;
    left: -100%;
    transform-style: preserve-3d;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    /* Permet aux éléments de dépasser */
    overflow: visible;
}

/* Grille 3×3 */
.map-grid {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    position: relative;
    overflow: visible;
}

/* Zones de la carte */
.map-zone {
    position: relative;
    overflow: hidden;
    background: #3d2e1a;
    border: 1px solid rgba(139, 115, 85, 0.1);
    transform-style: preserve-3d;
    transition: opacity 0.3s ease;
}

/* Zone centrale : overflow visible pour les enveloppes */
.map-zone.zone-center {
    overflow: visible;
}

.map-zone.loading {
    opacity: 0.3;
}

.map-zone.loaded {
    opacity: 1;
}

/* Zone centrale active au départ */
.map-zone.zone-center {
    z-index: 10;
}

.map-zone.zone-center .central-paper {
    z-index: 12;
}

/* Contenu des zones */
.zone-content {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
}

/* Zone centrale : contenu peut dépasser */
.map-zone.zone-center .zone-content {
    overflow: visible;
}

/* Fond de table (bois) */
.table-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at center, #4a3723 0%, #2a1f0f 100%),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(139, 115, 85, 0.03) 2px,
            rgba(139, 115, 85, 0.03) 4px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(139, 115, 85, 0.02) 2px,
            rgba(139, 115, 85, 0.02) 4px
        );
    background-size: 100% 100%, 20px 20px, 20px 20px;
    z-index: -1;
    transform: translateZ(-100px) scale(1.1);
    filter: blur(0.5px);
    opacity: 0.9;
}

/* Feuille centrale */
.central-paper {
    width: 80%;
    height: 80%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateZ(20px);
    background: 
        linear-gradient(135deg, #f5f0e8 0%, #e8ddd4 100%),
        repeating-linear-gradient(
            transparent,
            transparent 2px,
            rgba(139, 115, 85, 0.05) 2px,
            rgba(139, 115, 85, 0.05) 4px
        );
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.3),
        inset 0 0 100px rgba(139, 115, 85, 0.1),
        inset 0 0 200px rgba(139, 115, 85, 0.05);
    border-radius: 2px;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: 1px solid rgba(139, 115, 85, 0.2);
}

.central-paper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            transparent,
            transparent 2px,
            rgba(139, 115, 85, 0.05) 2px,
            rgba(139, 115, 85, 0.05) 4px
        );
    pointer-events: none;
}

.paper-content {
    position: relative;
    z-index: 1;
}

.logo-image {
    max-width: 300px;
    width: 100%;
    height: auto;
    margin: 0 auto 30px auto;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    outline: none !important;
    outline: 0 !important;
    outline-offset: 0 !important;
    border: none !important;
    -webkit-tap-highlight-color: transparent;
    -webkit-focus-ring-color: transparent;
    -webkit-user-drag: none;
    user-drag: none;
    /* Firefox spécifique */
    -moz-outline: none !important;
    -moz-outline-radius: 0 !important;
    /* Empêcher la sélection */
    -moz-user-select: none;
    -webkit-user-select: none;
    user-select: none;
    pointer-events: auto;
    /* Supprimer tous les contours et bordures */
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    /* Supprimer les contours de sélection */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.logo-image:focus,
.logo-image:active,
.logo-image:hover,
.logo-image:visited,
.logo-image:link {
    outline: none !important;
    outline: 0 !important;
    outline-offset: 0 !important;
    border: none !important;
    -moz-outline: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
}

/* Supprimer les contours du conteneur du logo */
.paper-content,
.central-paper {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.paper-content:focus,
.central-paper:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.welcome-text {
    font-size: 1.3rem;
    color: #2a1f0f;
    letter-spacing: 2px;
    font-weight: 300;
    line-height: 1.6;
    text-align: center;
    margin-top: 20px;
    min-height: 1.6em; /* Éviter le saut de hauteur pendant l'animation */
    outline: none !important;
    border: none !important;
    -webkit-tap-highlight-color: transparent;
    -webkit-focus-ring-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.welcome-text.typing::after {
    content: '|';
    color: #8b7355;
    animation: blink 1s infinite;
    outline: none !important;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Enveloppes */
.envelope {
    position: absolute;
    width: 200px;
    height: 150px;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.3s ease, opacity 0.4s ease;
    z-index: 2000 !important; /* Très élevé pour passer au-dessus du menu (1000) et du menu-toggle (2000) */
    pointer-events: auto !important; /* Forcer les événements tactiles */
    /* S'assurer que les enveloppes ne sont pas coupées */
    will-change: transform;
    outline: none !important; /* Supprimer les contours */
    border: none; /* Supprimer les bordures par défaut */
    touch-action: manipulation; /* Améliorer la réactivité tactile */
}

/* S'assurer que les enveloppes passent au-dessus du menu-toggle */
.envelope-top-right,
.envelope-bottom-right {
    z-index: 2001 !important; /* Au-dessus du menu-toggle (1500) */
    pointer-events: auto !important; /* Forcer les événements tactiles */
}

.envelope-top-left {
    /* Position au coin haut-gauche de la zone, bien au-delà de la feuille */
    top: 5%;
    left: 5%;
    transform: rotate(-15deg) translateZ(30px);
    z-index: 15;
}

.envelope-top-right {
    /* Position au coin haut-droite de la zone, bien au-delà de la feuille */
    top: 5%;
    right: 5%;
    transform: rotate(15deg) translateZ(30px);
    z-index: 15;
}

.envelope-bottom-left {
    /* Position au coin bas-gauche de la zone, bien au-delà de la feuille */
    bottom: 5%;
    left: 5%;
    transform: rotate(15deg) translateZ(30px);
    z-index: 15;
}

.envelope-bottom-right {
    /* Position au coin bas-droite de la zone, bien au-delà de la feuille */
    bottom: 5%;
    right: 5%;
    transform: rotate(-15deg) translateZ(30px);
    z-index: 15;
}

.envelope-top-left:hover {
    transform: rotate(-15deg) translateZ(35px) scale(1.05);
}

.envelope-top-right:hover {
    transform: rotate(15deg) translateZ(35px) scale(1.05);
}

.envelope-bottom-left:hover {
    transform: rotate(15deg) translateZ(35px) scale(1.05);
}

.envelope-bottom-right:hover {
    transform: rotate(-15deg) translateZ(35px) scale(1.05);
}

.envelope-top-left.opening {
    transform: rotate(-15deg) translateZ(30px) scale(1.05);
}

.envelope-top-right.opening {
    transform: rotate(15deg) translateZ(30px) scale(1.05);
}

.envelope-bottom-left.opening {
    transform: rotate(15deg) translateZ(30px) scale(1.05);
}

.envelope-bottom-right.opening {
    transform: rotate(-15deg) translateZ(30px) scale(1.05);
}

.envelope.opening .envelope-flap {
    transform: rotateX(-180deg);
    transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Lettre apparaît et sort par le haut lors de l'ouverture */
.envelope.opening .letter {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) translateY(-100px) translateZ(20px);
    transition: opacity 0.4s ease 0.6s, transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.6s, visibility 0s 0.6s;
    /* La lettre passe au-dessus du rectangle quand elle sort */
    z-index: 6;
}

/* Lettre retourne dans l'enveloppe lors de la fermeture */
.envelope.closing .letter {
    transform: translate(-50%, -50%) translateZ(2px);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.4s ease 0.2s;
    z-index: 1;
}

/* Corps de l'enveloppe */
.envelope-body {
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(135deg, #f5f0e8 0%, #e8ddd4 100%);
    border: 2px solid rgba(139, 115, 85, 0.6); /* Réduit de 3px à 2px et opacité réduite */
    border-radius: 4px;
    position: relative;
    box-shadow: 
        0 5px 20px rgba(0, 0, 0, 0.2),
        inset 0 0 20px rgba(139, 115, 85, 0.1),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);
    transform-style: preserve-3d;
}

/* Rabat de l'enveloppe - Forme triangulaire */
.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60%;
    /* Forme triangulaire avec la base en haut (arête la plus grande = axe de rotation) */
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    background: linear-gradient(135deg, #e8ddd4 0%, #d4c4b0 100%);
    /* L'axe de rotation est sur la base (en haut) */
    transform-origin: top center;
    transform: rotateX(0deg) translateZ(3px);
    transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 
        0 -5px 15px rgba(0, 0, 0, 0.15),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
    z-index: 4;
    /* S'assurer que le triangle est visible au-dessus du rectangle */
}

/* Bordure supérieure (base du triangle - axe de rotation) - réduite */
.envelope-flap::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px; /* Réduit de 4px à 2px */
    background: rgba(139, 115, 85, 0.7); /* Opacité réduite */
    z-index: 4;
    box-shadow: 0 1px 2px rgba(139, 115, 85, 0.5); /* Ombre réduite */
}

/* Bordures latérales du triangle - réduites */
.flap-border-left {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    border-left: 2px solid rgba(139, 115, 85, 0.7); /* Réduit de 4px à 2px et opacité réduite */
    clip-path: polygon(0 0, 100% 0, 0 100%);
    z-index: 4;
    pointer-events: none;
    box-shadow: -1px 0 2px rgba(139, 115, 85, 0.5); /* Ombre réduite */
}

.flap-border-right {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    border-right: 2px solid rgba(139, 115, 85, 0.7); /* Réduit de 4px à 2px et opacité réduite */
    clip-path: polygon(100% 0, 100% 0, 50% 100%);
    z-index: 4;
    pointer-events: none;
    box-shadow: 1px 0 2px rgba(139, 115, 85, 0.5); /* Ombre réduite */
}

/* Face avant de l'enveloppe - cache la lettre au départ */
.envelope-front-face {
    position: absolute;
    top: 15%;
    left: 0;
    width: 100%;
    height: 85%;
    background: linear-gradient(135deg, #f5f0e8 0%, #e8ddd4 100%);
    border: none;
    border-radius: 0 0 4px 4px;
    z-index: 3;
    transform-style: preserve-3d;
    transform: translateZ(2px);
    transition: opacity 0.4s ease 0.4s, transform 0.4s ease 0.4s;
    pointer-events: none;
    box-shadow: 
        inset 0 0 20px rgba(139, 115, 85, 0.1),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 15px;
    /* Le rectangle cache la lettre mais laisse voir le triangle au-dessus */
}

/* Label sur la face avant de l'enveloppe */
.envelope-label {
    color: #8b7355;
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-align: center;
    padding: 0 10px;
    line-height: 1.3;
    transform: translateZ(2px);
    font-family: 'Georgia', 'Times New Roman', serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Face avant disparaît quand l'enveloppe s'ouvre */
.envelope.opening .envelope-front-face {
    opacity: 0;
    transform: translateZ(-10px) scale(0.95);
}

/* Face avant réapparaît quand l'enveloppe se ferme */
.envelope.closing .envelope-front-face {
    opacity: 1;
    transform: translateZ(2px);
    transition: opacity 0.4s ease 0.2s, transform 0.4s ease 0.2s;
}

/* Rabat se referme lors de la fermeture */
.envelope.closing .envelope-flap {
    transform: rotateX(0deg);
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.2s;
}

/* Lettre - cachée au départ, apparaît lors de l'ouverture */
.letter {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateZ(2px);
    width: 85%;
    height: 70%;
    background: #ffffff;
    border: 1px solid #d4c4b0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease 0.6s, transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.6s, visibility 0s 0.6s;
    z-index: 1;
    /* S'assurer que la lettre passe derrière le rectangle au départ */
    overflow: hidden;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Contenu de la lettre */
.letter-content {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-sizing: border-box;
}

.letter-title {
    font-size: 0.4rem;
    font-weight: 600;
    color: #2a1f0f;
    margin-bottom: 3px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-align: center;
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.1;
}

.letter-text {
    font-size: 0.32rem;
    color: #3d2e1a;
    line-height: 1.15;
    text-align: justify;
    margin: 0;
    font-family: 'Georgia', 'Times New Roman', serif;
    flex: 1;
}

.letter::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: #8b7355;
    opacity: 0.3;
}

/* Overlay pour le contenu des enveloppes */
.envelope-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(42, 31, 15, 0.95);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.envelope-overlay.active {
    display: flex;
    opacity: 1;
}

.overlay-content {
    width: 80%;
    max-width: 900px;
    background: #f5f0e8;
    padding: 60px;
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    transform: scale(0.9);
    transition: transform 0.4s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.envelope-overlay.active .overlay-content {
    transform: scale(1);
}

.close-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #8b7355;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    outline: none !important; /* Supprimer les contours */
}

.close-overlay:hover {
    color: #2a1f0f;
}

.overlay-body {
    color: #2a1f0f;
    line-height: 1.8;
    font-size: 1.1rem;
}

.overlay-body #map {
    width: 100%;
    height: 400px;
    margin-top: 30px;
    border: 2px solid #8b7355;
    border-radius: 4px;
    overflow: hidden;
}

.overlay-body #map iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Effets de parallax */
.map-zone[data-zone="center"] .zone-content {
    transform: translateZ(0px);
}

.map-zone[data-zone="top-left"] .zone-content,
.map-zone[data-zone="top-right"] .zone-content,
.map-zone[data-zone="bottom-left"] .zone-content,
.map-zone[data-zone="bottom-right"] .zone-content {
    transform: translateZ(-20px);
}

/* Responsive */
@media (max-width: 768px) {
    .logo-image {
        max-width: 200px;
    }
    
    .welcome-text {
        font-size: 1rem;
        letter-spacing: 1px;
    }
    
    .envelope {
        width: 150px;
        height: 110px;
        pointer-events: auto !important; /* Forcer les événements tactiles sur mobile */
        touch-action: manipulation; /* Améliorer la réactivité tactile */
        -webkit-tap-highlight-color: transparent;
    }
    
    .envelope-top-left {
        top: 3%;
        left: 3%;
        transform: rotate(-15deg) translateZ(30px);
    }
    
    .envelope-top-right {
        top: 3%;
        right: 3%;
        transform: rotate(15deg) translateZ(30px);
    }
    
    .envelope-bottom-left {
        bottom: 3%;
        left: 3%;
        transform: rotate(15deg) translateZ(30px);
    }
    
    .envelope-bottom-right {
        bottom: 3%;
        right: 3%;
        transform: rotate(-15deg) translateZ(30px);
    }
    
    /* Bouton menu visible sur mobile */
    .menu-toggle {
        display: flex;
        z-index: 1500; /* En dessous des enveloppes (2000) */
    }
    
    /* Overlay visible sur mobile mais ne bloque pas les clics quand inactif */
    .menu-overlay {
        display: block;
        z-index: 1400; /* En dessous des enveloppes (2000) */
        pointer-events: none !important; /* Ne pas bloquer les clics quand inactif */
    }
    
    .menu-overlay.active {
        pointer-events: auto !important; /* Activer seulement quand actif */
    }
    
    /* Menu caché par défaut sur mobile - complètement retiré du flux */
    /* Cette règle est déjà gérée par la règle générale au-dessus */
    
    /* Menu ouvert sur mobile - translation depuis la droite */
    .menu.mobile-open {
        position: fixed;
        top: 50%;
        right: 30px; /* Apparaît à droite */
        transform: translateY(-50%);
        opacity: 1;
        pointer-events: auto !important; /* Activer les clics quand ouvert */
        visibility: visible !important;
        z-index: 1600 !important; /* Au-dessus de tout quand ouvert */
        transition: right 0.3s ease, opacity 0.3s ease;
        /* Style du menu ouvert */
        background: rgba(245, 234, 216, 0.98);
        padding: 40px 60px;
        border-radius: 8px;
        border: 2px solid #8b7355;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    }
    
    .menu ul {
        gap: 20px;
        align-items: flex-end; /* Aligner à droite comme sur desktop */
    }
    
    .menu a {
        font-size: 20px; /* Agrandi pour mobile */
        letter-spacing: 3px;
        text-align: right; /* Aligner à droite comme sur desktop */
        padding: 10px 0;
    }
    
    .envelope-label {
        font-size: 0.9rem; /* Réduit pour mobile */
        letter-spacing: 1px;
    }
}
