* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body, html {
    min-height: 100%;
    width: 100%;
    background-color: #111814;
    font-family: 'Montserrat', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-wrapper {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.envelope-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #1c2620;
    transition: transform 0.5s ease;
}

.paper-texture {
    background-image: 
        radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.08) 0%, transparent 70%),
        radial-gradient(circle at 20% 80%, rgba(0, 0, 0, 0.2) 0%, transparent 60%),
        repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.015) 0px, rgba(0, 0, 0, 0.015) 1px, transparent 1px, transparent 3px),
        repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.015) 0px, rgba(255, 255, 255, 0.015) 1px, transparent 1px, transparent 3px);
    background-blend-mode: overlay, multiply, normal, normal;
}

.envelope-body {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: #3b5042;
    z-index: 1;
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.4);
}

.envelope-body::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(30deg, transparent 65%, rgba(0,0,0,0.15) 70%, transparent 75%);
    pointer-events: none;
}

.envelope-flap-wrapper {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 3;
    filter: drop-shadow(-15px 0px 15px rgba(0, 0, 0, 0.6));
    transition: transform 0.9s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.6s;
    transform-origin: right center;
}

.envelope-flap {
    width: 100%; height: 100%;
    background-color: #42594a;
    clip-path: polygon(85% 0, 100% 0, 100% 100%, 85% 100%, 30% 51%);
}

.envelope-flap::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    clip-path: polygon(85% 0, 30% 51%, 85% 100%, 85% 100.3%, 30% 51.3%, 85% 0.3%);
    background: linear-gradient(to right, rgba(255, 255, 255, 0.12), transparent);
}

.gold-seal-wrapper {
    position: absolute;
    top: 51%; left: 30%;
    transform: translate(-50%, -50%);
    z-index: 4;
    filter: drop-shadow(-8px 10px 12px rgba(0, 0, 0, 0.6));
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s;
}

.gold-seal {
    width: 116px; height: 112px;
    border-radius: 41% 64% 44% 59% / 58% 42% 63% 47%;
    background: conic-gradient(from 140deg, #b38926, #fcebac, #ca9d31, #805f13, #f5dfa2, #ad8322, #b38926);
    cursor: pointer;
    display: flex; justify-content: center; align-items: center;
    box-shadow: inset 3px 4px 5px rgba(255, 255, 255, 0.7), inset -3px -4px 6px rgba(0, 0, 0, 0.65), inset 10px -10px 20px rgba(0, 0, 0, 0.2);
    position: relative;
}

.gold-seal::before {
    content: '';
    position: absolute;
    top: 14%; left: 14%; right: 14%; bottom: 14%;
    border-radius: 44% 52% 47% 49% / 51% 46% 54% 48%;
    background: linear-gradient(135deg, #ad8322 0%, #d9ac38 50%, #f3dba0 100%);
    box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.5), 1px 2px 2px rgba(255, 255, 255, 0.4);
    opacity: 0.95; z-index: 4;
}

.seal-emblem {
    z-index: 5; font-family: 'Cinzel', serif; color: #402f08;
    font-weight: 700; font-size: 24px; letter-spacing: 2px;
    transform: rotate(-1deg);
    text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.6), -1px -1px 2px rgba(0, 0, 0, 0.8);
}

.wedding-card {
    position: absolute;
    top: 5%; left: 5%;
    width: 90%; height: 90%;
    background: #fffefe;
    border-radius: 3px;
    z-index: 2;
    opacity: 0;
    transform: scale(0.94) translateY(20px);
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s;
    display: flex; flex-direction: column;
    box-shadow: 0 20px 40px rgba(0,0,0,0.45);
    overflow: hidden;
    border: 1px solid rgba(181, 137, 24, 0.2);
    cursor: pointer;
}

.card-photo {
    width: 100%; height: 30%;
}
.card-photo img {
    width: 100%; height: 100%; object-fit: cover;
}

.card-tabs {
    display: flex;
    width: 100%;
    border-bottom: 1px solid rgba(181, 137, 24, 0.15);
    background: #FAF8F5;
}

.tab-btn {
    flex: 1;
    padding: 12px 5px;
    background: transparent;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #7a7164;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.tab-btn.active {
    color: #b58918;
    background: #fffefe;
    font-weight: 700;
    box-shadow: inset 0 -2px 0 #b58918;
}

.card-content {
    flex: 1; display: flex; flex-direction: column;
    justify-content: flex-start; align-items: center;
    padding: 25px 20px; position: relative;
}

.card-header h3 {
    font-size: 12px; letter-spacing: 4px; color: #b58918;
    text-transform: uppercase; margin-bottom: 12px; text-align: center;
    font-weight: 500;
}

.card-header h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 38px;
    color: #232b25; 
    text-align: center;
    font-weight: 400;
    word-spacing: 2px;
}

.gold-line {
    width: 50px; height: 1px;
    background: linear-gradient(to right, transparent, #c99e32, transparent);
}

.big-spacer {
    margin: 30px 0 25px 0;
}

.celebration-pane {
    display: none; flex-direction: column; align-items: center; width: 100%;
    animation: fadeInPane 0.4s ease forwards;
}

.celebration-pane.active {
    display: flex;
}

@keyframes fadeInPane {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.celebration-section {
    display: flex; flex-direction: column; align-items: center; width: 100%;
    margin: 5px 0;
}

.celebration-title {
    font-size: 10px; text-transform: uppercase; letter-spacing: 2.5px;
    color: #b58918; font-weight: 600; margin-bottom: 8px;
}

.date {
    font-family: 'Montserrat', sans-serif; 
    font-size: 14px;
    letter-spacing: 1.5px; 
    color: #232b25; 
    font-weight: 700;
    margin-bottom: 6px;
}

.time-separator {
    color: #b58918;
    font-weight: 400;
    margin: 0 4px;
}

.venue {
    font-size: 8.5px; text-transform: uppercase; letter-spacing: 1px;
    color: #7a7164; text-align: center;
    line-height: 1.4;
}

.section-divider {
    height: 35px; 
    width: 100%;
}

.tap-hint {
    position: absolute;
    bottom: 25px; width: 100%; text-align: center;
    color: rgba(255, 255, 255, 0.4); font-size: 10px;
    letter-spacing: 3px; text-transform: uppercase; z-index: 5;
    pointer-events: none;
    transition: opacity 0.3s;
}

.envelope-container.is-open .envelope-flap-wrapper {
    transform: translateX(115%); opacity: 0;
}

.envelope-container.is-open .gold-seal-wrapper {
    transform: translate(-50%, -50%) scale(0); opacity: 0; pointer-events: none;
}

.envelope-container.is-open .wedding-card {
    opacity: 1; transform: scale(1) translateY(0); z-index: 10;
}

.envelope-container.is-open .tap-hint {
    opacity: 0;
}

.couple-names {
    font-family: 'Cormorant Garamond', serif;
    font-size: 38px; 
    font-weight: 600;
    color: #232b25; 
    text-align: center;
    letter-spacing: 1.5px; 
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px; 
    margin: 35px 0; 
    text-shadow: none;
}

.ampersand {
    font-family: 'Cormorant Garamond', serif;
    font-size: 32px; 
    font-weight: 400;
    font-style: italic; 
    color: #b58918; 
    line-height: 1;
    transform: translateY(2px); 
}
.envelope-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: auto; /* Permet de scroller si le contenu est trop grand */
    background: #1c2620;
    transition: transform 0.5s ease;
}
/* --- RESPONSIVITE MOBILE --- */
@media (max-height: 650px) {
    .card-header h2 { font-size: 28px !important; }
    .couple-names { font-size: 24px !important; margin: 15px 0 !important; }
    .gold-seal { transform: scale(0.85); }
}
}
