:root {
    --navy: #1b2a4a;
    --navy-dark: #10192e;
    --navy-light: #3a4d76;
    --or: #b8985a;
    --fond: #f7f6f3;
    --texte: #232323;
    --blanc: #ffffff;
    --erreur: #a83232;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Georgia', 'Times New Roman', serif;
    background: var(--fond);
    color: var(--texte);
    line-height: 1.6;
}

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--or); }

/* Header */
.site-header {
    background: var(--navy);
    color: var(--blanc);
    padding: 1rem 1.5rem;
}
.site-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.logo {
    font-size: 1.4rem;
    color: var(--blanc);
    font-weight: bold;
    letter-spacing: .5px;
}
.logo:hover { color: var(--or); }
.nav-principale {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.nav-principale a {
    color: #d9dfec;
    font-size: .95rem;
}
.nav-principale a:hover { color: var(--or); }

/* Main */
.site-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: 60vh;
}

/* Diaporama */
.diaporama-wrapper {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto 2.5rem;
    aspect-ratio: 16 / 9;
    background: #000;
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
}
.diaporama-wrapper video,
.diaporama-wrapper iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.intro-mariage {
    text-align: center;
    margin-bottom: 2rem;
}
.intro-mariage h1 {
    color: var(--navy);
    font-size: 2rem;
    margin-bottom: .3rem;
}
.intro-mariage .date {
    color: var(--navy-light);
    font-style: italic;
}

/* Grille de sous-galeries sur l'accueil */
.grille-galeries {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}
.carte-galerie {
    display: block;
    background: var(--blanc);
    border: 1px solid #e2e0da;
    overflow: hidden;
    text-align: center;
    transition: box-shadow .2s ease, transform .2s ease;
}
.carte-galerie:hover {
    box-shadow: 0 6px 18px rgba(27,42,74,.12);
    transform: translateY(-2px);
}
.carte-galerie-photo {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}
.carte-galerie-vide {
    background: linear-gradient(135deg, var(--navy-light), var(--navy));
}
.carte-galerie-titre {
    display: block;
    padding: .9rem .5rem;
    color: var(--navy);
    font-size: 1.1rem;
    font-weight: bold;
}

/* Galerie photo */
.grille-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: .6rem;
}
.grille-photos figure {
    margin: 0;
    position: relative;
    overflow: hidden;
    background: #eee;
    aspect-ratio: 1 / 1;
}
.grille-photos img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
    display: block;
    transition: transform .3s ease;
}
.grille-photos img:hover { transform: scale(1.04); }

.lien-telechargement {
    position: absolute;
    bottom: 6px;
    right: 6px;
    display: flex;
    align-items: center;
    gap: .4rem;
    background: rgba(27,42,74,.6);
    color: #fff;
    border-radius: 999px;
    padding: .3rem;
    max-width: 24px;
    overflow: hidden;
    white-space: nowrap;
    text-decoration: none;
    transition: max-width .25s ease, background .2s ease, padding .25s ease;
}
.lien-telechargement:hover {
    max-width: 150px;
    padding: .3rem .6rem .3rem .3rem;
    background: var(--or);
}
.icone-telecharger {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.info-telecharger {
    font-size: .75rem;
}

/* Lightbox */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10,15,28,.92);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.lightbox-overlay.actif { display: flex; }
.lightbox-overlay img {
    max-width: 90vw;
    max-height: 85vh;
    box-shadow: 0 0 40px rgba(0,0,0,.5);
}
.lightbox-fermer, .lightbox-precedent, .lightbox-suivant {
    position: absolute;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    padding: .5rem 1rem;
}
.lightbox-fermer { top: 1rem; right: 1.5rem; }
.lightbox-precedent { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-suivant { right: 1rem; top: 50%; transform: translateY(-50%); }

/* Login */
.login-box {
    max-width: 420px;
    margin: 3rem auto;
    background: var(--blanc);
    border: 1px solid #e2e0da;
    padding: 2rem;
    text-align: center;
}
.form-login { display: flex; flex-direction: column; gap: .8rem; margin-top: 1rem; }
.form-login label { text-align: left; font-size: .9rem; color: var(--navy-light); }
.form-login input[type="password"],
.form-login input[type="text"]:not(.honeypot) {
    padding: .6rem;
    border: 1px solid #ccc;
    font-size: 1rem;
}
.form-login button,
.form-commentaire button,
.bouton {
    background: var(--navy);
    color: #fff;
    border: none;
    padding: .7rem 1.2rem;
    font-size: 1rem;
    cursor: pointer;
    font-family: inherit;
}
.form-login button:hover,
.form-commentaire button:hover,
.bouton:hover { background: var(--or); }
.erreur { color: var(--erreur); font-weight: bold; }
.honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; }

/* Livre d'or */
.section-livre-or {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e0da;
}
.form-commentaire {
    display: flex;
    flex-direction: column;
    gap: .8rem;
    max-width: 500px;
    margin-bottom: 2.5rem;
    background: var(--blanc);
    padding: 1.5rem;
    border: 1px solid #e2e0da;
}
.form-commentaire input[type="text"]:not(.honeypot),
.form-commentaire textarea {
    padding: .6rem;
    border: 1px solid #ccc;
    font-family: inherit;
    font-size: 1rem;
    width: 100%;
}
.liste-commentaires { display: flex; flex-direction: column; gap: 1rem; }
.commentaire {
    background: var(--blanc);
    border-left: 3px solid var(--or);
    padding: 1rem 1.2rem;
}
.commentaire .nom { font-weight: bold; color: var(--navy); }
.commentaire .date { font-size: .8rem; color: #888; margin-left: .5rem; }
.commentaire .message { margin-top: .3rem; }

/* Footer */
.site-footer {
    background: var(--navy-dark);
    color: #b7bfd2;
    text-align: center;
    padding: 1.2rem;
    font-size: .9rem;
}
.site-footer a { color: var(--or); }

@media (max-width: 600px) {
    .intro-mariage h1 { font-size: 1.5rem; }
}
