@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Montserrat:wght@300;400;500&display=swap');

/* --- 1. CONFIGURATION GLOBALE --- */
*, *::before, *::after { box-sizing: border-box; }

:root {
    --cream: #f0ede6;
    --white: #fdfaf6;
    --gold: #e1d3c1;
    --sage: #bcc3b5;
    --dark: #2c3e38;
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Montserrat', sans-serif;
}

body {
    background-color: var(--cream);
    font-family: var(--font-body);
    color: var(--dark);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow: auto;
}

#main-site-content {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 40px 20px;
}

.container {
    text-align: center;
    background-color: #ffffff;
    border: 1px solid var(--gold);
    padding: 70px 80px;
    box-shadow: 0 2px 40px rgba(44,62,56,0.06);
    max-width: 700px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.container::before,
.container::after {
    content: '';
    position: absolute;
    width: 30px; height: 30px;
    border-color: var(--gold);
    border-style: solid;
}
.container::before { top: 12px; left: 12px; border-width: 1px 0 0 1px; }
.container::after  { bottom: 12px; right: 12px; border-width: 0 1px 1px 0; }

h1 {
    font-family: var(--font-body);
    color: var(--sage);
    text-transform: uppercase;
    letter-spacing: 6px;
    font-weight: 300;
    font-size: 0.7rem;
    margin-bottom: 20px;
}

.names {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-style: italic;
    font-weight: 300;
    color: var(--dark);
    margin: 10px 0 5px;
    line-height: 1.1;
}

.date {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--gold);
    margin-top: 20px;
    letter-spacing: 1px;
}

.location {
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--sage);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-top: 6px;
}

.message {
    margin-top: 30px;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-style: italic;
    color: var(--sage);
    font-weight: 300;
}

/* Compte à rebours */
#countdown {
    display: flex;
    justify-content: center;
    gap: 0;
    margin: 30px auto;
    max-width: 360px;
    width: 100%;
}

.time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    padding: 16px 8px;
    border: 1px solid var(--gold);
    margin: 0 -0.5px;
    background: var(--white);
}

.time-block span {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 300;
    color: var(--dark);
    line-height: 1;
}

.time-block small {
    text-transform: uppercase;
    font-size: 0.55rem;
    font-family: var(--font-body);
    letter-spacing: 2px;
    color: var(--sage);
    margin-top: 4px;
    font-weight: 400;
}

/* Formulaire RSVP */
#rsvp-section h2 {
    font-family: var(--font-display);
    color: var(--dark);
    font-size: 1.8rem;
    font-style: italic;
    font-weight: 300;
    margin-bottom: 25px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

input, select, textarea {
    padding: 13px 16px;
    border: 1px solid #ddd6c8;
    border-radius: 0;
    font-family: var(--font-body);
    font-size: 0.8rem;
    background-color: var(--white);
    color: var(--dark);
    transition: border-color 0.2s;
    -webkit-appearance: none;
    width: 100%;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--sage);
}

textarea { min-height: 80px; resize: vertical; }

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23bcc3b5' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

button[type="submit"] {
    background-color: var(--dark);
    color: white;
    padding: 16px;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 4px;
    transition: background 0.3s, letter-spacing 0.3s;
    width: 100%;
}

button[type="submit"]:hover {
    background-color: var(--sage);
    letter-spacing: 5px;
}

#add-guest {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 400;
    padding: 10px;
    cursor: pointer;
    text-transform: none;
    letter-spacing: 1px;
    transition: all 0.3s;
    background: none;
    color: var(--sage);
    border: 1px dashed var(--sage);
    border-radius: 0;
    margin-bottom: 10px;
    width: 100%;
}

#add-guest:hover {
    background-color: var(--cream) !important;
    color: var(--dark) !important;
}

.btn-secondary {
    display: inline-block;
    padding: 12px 24px;
    border: 1px solid var(--gold);
    color: var(--gold);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 3px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: var(--gold);
    color: white;
}

/* --- PAGE PROGRAMME (styles spécifiques) --- */
.day-section { margin-bottom: 10px; }

.day-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-style: italic;
    font-weight: 300;
    color: var(--dark);
    margin-bottom: 4px;
}

.day-subtitle {
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--sage);
    margin-bottom: 24px;
}

.timeline { margin-top: 20px; text-align: left; }

.event {
    margin-bottom: 24px;
    border-left: 1px solid var(--gold);
    padding-left: 24px;
    position: relative;
}

.event::before {
    content: '';
    width: 7px; height: 7px;
    background: var(--gold);
    border-radius: 50%;
    position: absolute;
    left: -4px;
    top: 6px;
}

.time {
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--sage);
    margin-bottom: 4px;
}

.details {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 300;
    color: var(--dark);
    line-height: 1.5;
}

.note {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--sage);
    font-style: italic;
    padding: 14px 18px;
    border-left: 2px solid var(--gold);
    background: var(--white);
    margin-top: 16px;
    text-align: left;
    line-height: 1.7;
}

.info-box {
    border: 1px solid var(--gold);
    padding: 28px 32px;
    margin-top: 32px;
    text-align: left;
    background: var(--white);
}

.info-box h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-style: italic;
    font-weight: 300;
    color: var(--dark);
    margin-bottom: 12px;
    margin-top: 0;
}

.info-box p {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.8;
    color: var(--dark);
    margin: 0 0 8px;
}

.btn-programme {
    display: inline-block;
    padding: 14px 28px;
    background: var(--dark);
    color: white;
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    transition: all 0.3s;
}

.btn-programme:hover { background: var(--sage); }

#lock-screen { text-align: center; padding: 40px 0; }

#lock-screen .message {
    font-family: var(--font-body);
    font-size: 0.82rem;
    color: var(--sage);
    margin-bottom: 24px;
    font-style: normal;
}

/* --- SECTION INFOS PRATIQUES --- */
#infos-pratiques {
    text-align: center;
    margin: 10px 0 20px;
}

#infos-pratiques h2 {
    /* Même style que le titre RSVP : Italique, Garamond, fin */
    font-family: var(--font-display);
    color: var(--dark);
    font-size: 1.8rem;
    font-style: italic;
    font-weight: 300;
    margin-bottom: 35px;
    text-transform: none;
    letter-spacing: normal;
}

.info-item {
    margin-bottom: 28px;
}

.info-item h3 {
    /* Même style que les petits sous-titres : Montserrat, majuscule, espacé */
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--sage);
    margin-bottom: 10px;
}

.info-item p {
    /* Même style que les textes de la page programme */
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.8;
    color: var(--dark);
    margin: 0;
}

/* --- BOUTONS DE CONTACT (SMS / WHATSAPP) --- */
.btn-contact {
    display: inline-block;
    padding: 10px 18px;
    background-color: transparent;
    border: 1px solid var(--sage);
    color: var(--sage);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.btn-contact:hover {
    background-color: var(--sage);
    color: var(--white);
}

/* --- BOUTONS D'AJOUT AU CALENDRIER --- */
.btn-calendar {
    display: inline-block;
    padding: 8px 16px;
    background-color: transparent;
    border: 1px solid var(--gold);
    color: var(--sage);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-calendar:hover {
    background-color: var(--gold);
    color: var(--white);
}
/* --- MOBILE --- */
@media (max-width: 600px) {
    body { padding: 0; align-items: flex-start; }

    #main-site-content { padding: 0; }

    .container {
        padding: 48px 28px 56px;
        border-left: none;
        border-right: none;
        max-width: 100%;
        min-height: 100vh;
    }

    .container::before,
    .container::after { display: none; }

    .names { font-size: 2.8rem; }
    .date  { font-size: 1.1rem; }

    #countdown { gap: 0; max-width: 100%; }
    .time-block { padding: 12px 4px; }
    .time-block span { font-size: 1.7rem; }
    .time-block small { font-size: 0.48rem; letter-spacing: 1px; }

    #wax-seal { width: 90px; height: 90px; }
    #wax-seal::before { width: 72px; height: 72px; }
    .seal-initials { font-size: 1.8rem; }
    .bottom-text { font-size: 0.6rem; letter-spacing: 3px; }

    .info-box { padding: 20px; }
    h1 { letter-spacing: 4px; }
    
    button[type="submit"] { letter-spacing: 2px; font-size: 0.65rem; }
    .btn-secondary { letter-spacing: 2px; }
}

/* --- GALERIE PHOTOS --- */
.gallery-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    width: 100%;
}

.gallery-item {
    flex: 1;
    aspect-ratio: 3 / 4; /* Force un joli format portrait équilibré */
    overflow: hidden;
    border: 1px solid var(--gold);
    cursor: pointer;
    background-color: var(--cream);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recadre proprement l'image dans sa case */
    transition: transform 0.5s ease;
}

/* Petit effet de zoom très chic au survol */
.gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(44,62,56,0.08);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* --- LIGHTBOX (AFFICHAGE PLEIN ÉCRAN) --- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(44, 62, 56, 0.95); /* Fond sombre reprenant votre couleur foncée */
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.lightbox img {
    max-width: 90%;
    max-height: 85%;
    border: 1px solid var(--gold);
    box-shadow: 0 0 30px rgba(0,0,0,0.3);
}

.lightbox-close {
    position: absolute;
    top: 20px; right: 30px;
    color: var(--cream);
    font-size: 2.5rem;
    font-weight: 200;
    cursor: pointer;
}

/* Adaptation pour les téléphones */
@media (max-width: 600px) {
    .gallery-container {
        flex-direction: column; /* Aligne les photos les unes sous les autres sur mobile */
        gap: 20px;
    }
    .gallery-item {
        aspect-ratio: 4 / 5; /* Légèrement plus large sur mobile pour ne pas prendre tout l'écran en hauteur */
    }
}

/* --- ANIMATIONS D'APPARITION FLUIDES --- */
.reveal {
    opacity: 0;
    transform: translateY(30px); /* Position de départ : 30px plus bas */
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Classe active déclenchée par le JavaScript */
.reveal.active {
    opacity: 1;
    transform: translateY(0); /* Reprend sa place d'origine */
}

/* --- BOUTON RETOUR EN HAUT (CORRIGÉ) --- */
#scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: #ffffff; /* Blanc pur */
    border: 1px solid #e1d3c1; /* Couleur dorée */
    color: #bcc3b5; /* Couleur sauge */
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999 !important; /* Passe absolument au-dessus de toutes les sections */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); /* Ombre légère pour le détacher du fond */
}

/* Classe d'affichage */
#scroll-top-btn.show {
    opacity: 1;
    visibility: visible;
}

#scroll-top-btn:hover {
    background-color: #2c3e38; /* Couleur foncée au survol */
    color: #ffffff;
    border-color: #2c3e38;
}

/* Ajustement mobile */
@media (max-width: 600px) {
    #scroll-top-btn {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}

/* --- DRESS CODE PALETTE --- */
.dress-code-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.color-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    font-size: 0.7rem;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.3;
    color: var(--sage);
}

.color-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-bottom: 8px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* --- BOUTONS DE CONTACT ÉPURÉS --- */
.btn-contact {
    display: inline-block;
    padding: 8px 20px;
    background-color: transparent;
    border: 1px solid var(--gold);
    color: var(--dark);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.btn-contact:hover {
    background-color: var(--dark);
    color: var(--white);
    border-color: var(--dark);
}
