@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #f6f8f2;
    --card: #ffffff;

    --sage: #a9c79f;
    --sage-light: #dcebd7;
    --sage-dark: #5f7f5b;
    --moss: #405f3d;
    --forest: #182619;

    --soft: #edf4eb;
    --cream: #fbf8ef;
    --leaf: #789b6f;

    --gold: #b99a5b;
    --gold-light: #f2dc95;

    --text: #243128;
    --muted: #6f7b70;
    --line: #dfe8dc;

    --shadow: 0 18px 55px rgba(64, 95, 61, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: 'Inter', Arial, sans-serif;
    background:
        radial-gradient(circle at 8% 8%, rgba(169, 199, 159, 0.55), transparent 30%),
        radial-gradient(circle at 92% 4%, rgba(242, 220, 149, 0.38), transparent 28%),
        radial-gradient(circle at 50% 100%, rgba(220, 235, 215, 0.55), transparent 38%),
        linear-gradient(180deg, #fff 0%, var(--cream) 34%, var(--bg) 72%, #fff 100%);
    color: var(--text);
}


body::before,
body::after {
    content: '';
    position: fixed;
    pointer-events: none;
    z-index: -1;
}

body::before {
    inset: 96px 0 auto 0;
    height: 330px;
    background:
        linear-gradient(rgba(255,255,255,0.60), rgba(255,255,255,0.96)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1500' height='340' viewBox='0 0 1500 340'%3E%3Cg opacity='.42' fill='none' stroke='%235f7f5b' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M70 250 C130 120 230 120 260 48'/%3E%3Cpath d='M115 180 C75 160 55 125 50 92'/%3E%3Cpath d='M150 146 C190 120 205 86 208 56'/%3E%3Cpath d='M1270 255 C1340 170 1385 110 1420 30'/%3E%3Cpath d='M1330 170 C1290 150 1270 120 1262 86'/%3E%3Cpath d='M1370 122 C1410 98 1430 70 1438 40'/%3E%3C/g%3E%3Cg opacity='.35' fill='%23a9c79f'%3E%3Cellipse cx='55' cy='96' rx='20' ry='9' transform='rotate(-35 55 96)'/%3E%3Cellipse cx='205' cy='58' rx='21' ry='9' transform='rotate(-28 205 58)'/%3E%3Cellipse cx='1260' cy='85' rx='22' ry='9' transform='rotate(35 1260 85)'/%3E%3Cellipse cx='1438' cy='42' rx='20' ry='9' transform='rotate(-30 1438 42)'/%3E%3C/g%3E%3C/svg%3E");
    background-size: cover;
}

body::after {
    inset: auto 0 0 0;
    height: 260px;
    background:
        radial-gradient(circle at 12% 80%, rgba(169,199,159,.28), transparent 26%),
        radial-gradient(circle at 88% 78%, rgba(95,127,91,.18), transparent 28%);
}


a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    min-height: 98px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 28px;
    padding: 16px 34px;
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 25px rgba(0,0,0,0.04);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-icon {
    width: 54px;
    height: 54px;
    border: 2px solid var(--sage);
    color: var(--sage);
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-size: 34px;
    line-height: 1;
}

.brand-copy small {
    display: block;
    font-size: 13px;
    color: var(--muted);
}

.brand-copy strong {
    display: block;
    font-family: 'Great Vibes', cursive;
    font-size: 36px;
    line-height: 1;
    font-weight: 400;
}

.nav {
    display: flex;
    gap: 8px;
}

.nav a {
    padding: 14px 18px;
    border-radius: 16px;
    color: var(--muted);
    font-weight: 700;
}

.nav a.active,
.nav a:hover {
    background: var(--soft);
    color: var(--sage-dark);
}

.top-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    align-items: center;
}

.primary-action,
.secondary-action {
    padding: 15px 20px;
    border-radius: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.primary-action {
    background: linear-gradient(135deg, var(--sage), var(--sage-dark));
    color: white;
    box-shadow: 0 12px 24px rgba(136, 168, 131, 0.25);
}

.secondary-action {
    border: 1px solid var(--line);
    background: white;
    color: var(--muted);
}

main {
    width: min(1430px, 93vw);
    margin: 0 auto;
}

.hero {
    text-align: center;
    padding: 62px 20px 28px;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 12px;
    color: var(--gold);
    font-weight: 800;
    margin-bottom: 12px;
}

.hero h1 {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(58px, 8vw, 96px);
    font-weight: 400;
    line-height: 0.95;
}

.hero-divider {
    margin: 18px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--gold);
}

.hero-divider span {
    width: 56px;
    height: 1px;
    background: var(--gold);
    opacity: 0.7;
}

.hero p {
    color: var(--muted);
    font-size: 18px;
}

.upload-panel,
.gallery-shell,
.about-card {
    background: rgba(255,255,255,0.88);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.upload-panel {
    padding: 24px;
    margin-bottom: 28px;
}

.drop-message {
    display: grid;
    place-items: center;
    gap: 8px;
    padding: 44px 20px;
    border: 2px dashed rgba(136, 168, 131, 0.58);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255,244,242,0.85), rgba(255,255,255,0.72));
    cursor: pointer;
    text-align: center;
    transition: 0.25s ease;
}

.drag-drop-zone.dragover .drop-message {
    background: #edf6ea;
    border-color: var(--sage);
    transform: scale(0.995);
}

.upload-icon {
    width: 58px;
    height: 58px;
    border-radius: 20px;
    background: white;
    color: var(--sage);
    display: grid;
    place-items: center;
    font-size: 34px;
    box-shadow: 0 10px 25px rgba(200,111,125,0.14);
}

.drop-message strong {
    font-size: 19px;
}

.drop-message small,
.drop-message em {
    color: var(--muted);
    font-style: normal;
}

#file-input {
    display: none;
}

.selected-files {
    margin-top: 14px;
    color: var(--muted);
    text-align: center;
    font-weight: 700;
}

.upload-button {
    width: 100%;
    margin-top: 18px;
    border: 0;
    border-radius: 18px;
    padding: 17px 24px;
    background: linear-gradient(135deg, var(--sage), var(--sage-dark));
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(200,111,125,0.23);
}

.gallery-shell {
    padding: 18px;
}

.gallery-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
}

.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    padding: 14px 18px;
    border-radius: 15px;
    font-weight: 800;
    cursor: pointer;
}

.filter-btn span {
    margin-left: 6px;
    color: var(--gold);
}

.filter-btn.active,
.filter-btn:hover {
    color: var(--sage-dark);
    border-color: rgba(136, 168, 131, 0.35);
    background: var(--soft);
}

.counter {
    background: #f8f3f0;
    border-radius: 999px;
    padding: 10px 18px;
}

.counter span {
    color: var(--muted);
}

.masonry-grid {
    columns: 5 230px;
    column-gap: 16px;
}

.masonry-item {
    break-inside: avoid;
    margin: 0 0 16px;
}

.media-card {
    position: relative;
    display: block;
    width: 100%;
    border: 0;
    padding: 0;
    border-radius: 18px;
    overflow: hidden;
    background: #eee;
    cursor: zoom-in;
    box-shadow: 0 10px 24px rgba(46, 31, 28, 0.12);
}

.media-card img,
.media-card video {
    width: 100%;
    display: block;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.media-card:hover img,
.media-card:hover video {
    transform: scale(1.035);
    filter: brightness(0.95);
}

.media-label {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.9);
    color: var(--text);
    font-size: 12px;
    font-weight: 900;
}

.play-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.94);
    color: var(--sage-dark);
    font-weight: 900;
}

.empty-state {
    text-align: center;
    padding: 70px 20px;
    color: var(--muted);
}

.empty-state h2 {
    color: var(--text);
    margin-bottom: 8px;
}

.about-card {
    margin-top: 28px;
    padding: 28px;
}

.about-card h2 {
    margin-bottom: 8px;
}

.about-card p {
    color: var(--muted);
    line-height: 1.7;
}

code {
    background: #f5ece8;
    border-radius: 8px;
    padding: 2px 6px;
}

footer {
    text-align: center;
    color: var(--muted);
    padding: 34px 20px 48px;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(27, 22, 22, 0.88);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 24px;
}

.lightbox.open {
    display: flex;
}

.lightbox-content {
    width: min(1100px, 96vw);
    max-height: 90vh;
    display: grid;
    place-items: center;
}

.lightbox-content img,
.lightbox-content video {
    max-width: 100%;
    max-height: 88vh;
    border-radius: 22px;
    box-shadow: 0 25px 80px rgba(0,0,0,0.45);
}

.lightbox-close {
    position: absolute;
    top: 22px;
    right: 28px;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: white;
    color: var(--text);
    font-size: 34px;
    cursor: pointer;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
}

.login-card {
    width: min(430px, 92vw);
    background: white;
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 34px;
    text-align: center;
    box-shadow: var(--shadow);
}

.login-card h1 {
    font-family: 'Great Vibes', cursive;
    font-size: 58px;
    font-weight: 400;
}

.login-card p {
    color: var(--muted);
    margin: 12px 0 24px;
}

.login-card input {
    width: 100%;
    border: 1px solid var(--line);
    padding: 16px;
    border-radius: 14px;
    margin-bottom: 14px;
}

.login-card button {
    width: 100%;
    border: 0;
    border-radius: 14px;
    padding: 16px;
    background: var(--sage);
    color: white;
    font-weight: 800;
}

.brand-heart {
    margin: 0 auto 12px;
    width: 58px;
    height: 58px;
    border: 2px solid var(--sage);
    color: var(--sage);
    border-radius: 20px;
    display: grid;
    place-items: center;
    font-size: 34px;
}

.alert-error {
    background: #fff0f0;
    border: 1px solid #ffd1d1;
    color: #a73535;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 16px;
}

@media (max-width: 980px) {
    .topbar {
        grid-template-columns: 1fr;
        height: auto;
        padding: 18px;
    }

    .nav,
    .top-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .brand {
        justify-content: center;
    }

    .gallery-toolbar {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    main {
        width: 94vw;
    }

    .hero {
        padding-top: 38px;
    }

    .brand-copy strong {
        font-size: 30px;
    }

    .topbar {
        position: relative;
    }

    .primary-action,
    .secondary-action {
        width: 100%;
        text-align: center;
    }
}


.upload-hero {
    padding-bottom: 22px;
}

.upload-page-panel {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

.upload-progress {
    display: none;
    margin-top: 18px;
    padding: 18px;
    border: 1px solid rgba(136, 168, 131, 0.25);
    border-radius: 18px;
    background: #f2f8ef;
}

.upload-progress.visible {
    display: block;
}

.upload-progress-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 12px;
}

.upload-progress-info strong {
    color: var(--sage-dark);
}

.upload-progress-track {
    height: 14px;
    background: #dbead6;
    border-radius: 999px;
    overflow: hidden;
}

.upload-progress-bar {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--sage), var(--sage-dark));
    transition: width 0.2s ease;
}

.upload-button:disabled {
    opacity: 0.68;
    cursor: wait;
    transform: none;
}

@media (max-width: 560px) {
    .upload-progress-info {
        flex-direction: column;
        align-items: flex-start;
    }
}


.page-dove {
    position: fixed;
    top: 22%;
    left: -90px;
    z-index: 9999;
    font-size: 46px;
    pointer-events: none;
    filter: drop-shadow(0 8px 12px rgba(64, 95, 61, 0.18));
    animation: doveFly 1.75s cubic-bezier(.4,.05,.2,1) both;
}

body.page-leaving .page-dove {
    animation: doveFlyOut 0.85s cubic-bezier(.4,.05,.2,1) both;
}

@keyframes doveFly {
    0% {
        transform: translateX(-120px) translateY(20px) rotate(-8deg) scale(0.85);
        opacity: 0;
    }
    18% {
        opacity: 1;
    }
    55% {
        transform: translateX(48vw) translateY(-18px) rotate(5deg) scale(1.05);
        opacity: 1;
    }
    100% {
        transform: translateX(110vw) translateY(-56px) rotate(11deg) scale(0.9);
        opacity: 0;
    }
}

@keyframes doveFlyOut {
    0% {
        transform: translateX(-120px) translateY(12px) rotate(-8deg) scale(0.85);
        opacity: 0;
    }
    25% {
        opacity: 1;
    }
    100% {
        transform: translateX(110vw) translateY(-45px) rotate(10deg) scale(0.95);
        opacity: 0;
    }
}

}

to {
        background-position: -120% 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .page-dove,
    body.page-leaving .page-dove,
    .masonry-item,
    .media-card::before {
        animation: none;
    }

    .lazy-media,
    .lazy-media.loaded {
        transition: none;
        filter: none;
        transform: none;
        opacity: 1;
    }
}


/* Logo double bagues entrelacées, version stylisée */
.rings-logo {
    background: linear-gradient(145deg, #f9f4df, #edf5ea);
    box-shadow:
        inset 0 0 0 1px rgba(185, 154, 91, 0.22),
        0 10px 24px rgba(64, 95, 61, 0.16);
}

.rings-logo svg {
    width: 72px;
    height: 48px;
    overflow: visible;
}

.rings-logo .ring {
    fill: none;
    stroke: url(#ringGold);
    stroke-width: 7;
    filter: drop-shadow(0 2px 1px rgba(126, 100, 47, 0.18));
}

.rings-logo .ring-left {
    transform-origin: 48px 44px;
    transform: rotate(-8deg);
}

.rings-logo .ring-right {
    transform-origin: 72px 44px;
    transform: rotate(8deg);
    stroke: url(#ringGreen);
}

.rings-logo .ring-shine {
    fill: none;
    stroke: rgba(255,255,255,0.88);
    stroke-width: 3;
    stroke-linecap: round;
}

.rings-logo .diamond-band {
    fill: none;
    stroke: url(#ringGold);
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rings-logo .diamond {
    fill: rgba(255,255,255,0.72);
    stroke: #b99a5b;
    stroke-width: 2;
    stroke-linejoin: round;
}

.rings-logo .gem {
    fill: #f7e7a4;
    stroke: #7e642f;
    stroke-width: 1.5;
}

/* Login logo adjustment */
.brand-heart-rings {
    width: 86px;
    height: 70px;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-heart-rings .brand-icon {
    width: 86px;
    height: 70px;
}

/* Animations galerie : visibles même si JavaScript charge lentement */
.masonry-item {
    opacity: 0;
    transform: translateY(24px) scale(0.985);
    transition:
        opacity 0.65s ease,
        transform 0.65s cubic-bezier(.2,.8,.2,1);
}

.masonry-item.is-visible,
.masonry-item.media-loaded {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.media-thumb {
    opacity: 1;
    filter: none;
    transform: scale(1);
}

.reveal-media {
    opacity: 0;
    filter: blur(10px);
    transform: scale(1.02);
    transition:
        opacity 0.75s ease,
        filter 0.75s ease,
        transform 0.75s cubic-bezier(.2,.8,.2,1);
}

.reveal-media.loaded,
.media-loaded .reveal-media {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
}

.media-card {
    min-height: 120px;
    background: linear-gradient(120deg, #edf4eb, #ffffff, #e3efdf);
}

.media-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(110deg, rgba(237,244,235,0.45), rgba(255,255,255,0.78), rgba(237,244,235,0.45));
    background-size: 240% 100%;
    animation: shimmer 1.4s linear infinite;
    pointer-events: none;
}

.media-loaded .media-card::before {
    opacity: 0;
    animation: none;
    transition: opacity 0.35s ease;
}

.media-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(46, 74, 44, 0.18);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.media-label,
.play-badge {
    z-index: 3;
}

@keyframes shimmer {
    from {
        background-position: 120% 0;
    }
    to {
        background-position: -120% 0;
    }
}

/* Colombe plus visible */
.page-dove {
    text-shadow: 0 4px 16px rgba(64, 95, 61, 0.22);
}

/* Sécurité : si JS est désactivé, les médias restent visibles */
.no-js .masonry-item,
.no-js .reveal-media {
    opacity: 1;
    filter: none;
    transform: none;
}


.gallery-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.slideshow-start {
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    background: linear-gradient(135deg, var(--sage), var(--sage-dark));
    color: white;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(95, 127, 91, 0.22);
}

.slideshow-start:hover {
    transform: translateY(-2px);
}

.lightbox-content.fade-transition {
    opacity: 0;
    transition: opacity 0.42s ease;
}

.lightbox-content.fade-transition.is-visible {
    opacity: 1;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 105;
    width: 58px;
    height: 58px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.92);
    color: var(--moss);
    font-size: 46px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,0,0,0.18);
}

.lightbox-prev {
    left: 28px;
}

.lightbox-next {
    right: 28px;
}

.lightbox-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.06);
}

.slideshow-controls {
    position: absolute;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 105;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.92);
    color: var(--moss);
    box-shadow: 0 10px 25px rgba(0,0,0,0.18);
    font-weight: 800;
}

.slideshow-controls button {
    border: 0;
    border-radius: 999px;
    padding: 9px 13px;
    background: var(--soft);
    color: var(--moss);
    font-weight: 900;
    cursor: pointer;
}

#slideshow-counter {
    min-width: 58px;
    text-align: center;
}

@media (max-width: 760px) {
    .lightbox-nav {
        width: 46px;
        height: 46px;
        font-size: 36px;
    }

    .lightbox-prev {
        left: 12px;
    }

    .lightbox-next {
        right: 12px;
    }

    .slideshow-controls {
        bottom: 14px;
        font-size: 13px;
    }

    .gallery-actions {
        justify-content: flex-start;
    }
}


/* Thème forêt romantique */
.topbar {
    background: rgba(255, 255, 255, 0.90);
    border-bottom-color: rgba(95, 127, 91, 0.18);
}

.nav a.active,
.nav a:hover {
    background: linear-gradient(135deg, rgba(237,244,235,.95), rgba(251,248,239,.95));
    color: var(--moss);
}

.primary-action,
.upload-button,
.slideshow-start {
    background: linear-gradient(135deg, var(--moss), var(--sage-dark) 58%, var(--sage));
    color: white;
    box-shadow: 0 14px 30px rgba(64, 95, 61, 0.23);
}

.secondary-action {
    border-color: rgba(95, 127, 91, 0.22);
    background: rgba(255,255,255,0.82);
    color: var(--moss);
}

.hero {
    position: relative;
}

.hero::before,
.hero::after {
    content: '❧';
    position: absolute;
    top: 42px;
    color: rgba(95, 127, 91, 0.22);
    font-size: 78px;
    line-height: 1;
}

.hero::before {
    left: max(0px, 6vw);
    transform: rotate(-18deg);
}

.hero::after {
    right: max(0px, 6vw);
    transform: rotate(18deg) scaleX(-1);
}

.hero h1 {
    color: var(--moss);
    text-shadow: 0 6px 24px rgba(95, 127, 91, 0.12);
}

.hero-divider {
    color: var(--sage-dark);
}

.hero-divider span {
    background: linear-gradient(90deg, transparent, var(--sage-dark), transparent);
}

.eyebrow {
    color: var(--leaf);
}

.upload-panel,
.gallery-shell,
.about-card,
.login-card {
    background:
        linear-gradient(180deg, rgba(255,255,255,.92), rgba(251,248,239,.86)),
        radial-gradient(circle at top left, rgba(237,244,235,.65), transparent 35%);
    border-color: rgba(95, 127, 91, 0.18);
}

.drop-message {
    border-color: rgba(95, 127, 91, 0.42);
    background:
        linear-gradient(180deg, rgba(237,244,235,0.88), rgba(255,255,255,0.78)),
        radial-gradient(circle at 18% 20%, rgba(169,199,159,.24), transparent 28%);
}

.drag-drop-zone.dragover .drop-message {
    border-color: var(--moss);
    background: #f1f7ee;
}

.upload-icon {
    color: var(--moss);
    background: linear-gradient(145deg, white, var(--soft));
}

.filter-btn.active,
.filter-btn:hover {
    color: var(--moss);
    border-color: rgba(95, 127, 91, 0.28);
    background: var(--soft);
}

.counter,
.upload-progress,
.slideshow-controls,
.lightbox-nav {
    background: rgba(237,244,235,0.94);
    color: var(--moss);
}

.lightbox {
    background:
        radial-gradient(circle at 50% 20%, rgba(95,127,91,.22), transparent 28%),
        rgba(20, 30, 20, 0.92);
}

.lightbox-close {
    background: var(--cream);
    color: var(--moss);
}

.media-card {
    box-shadow: 0 10px 24px rgba(46, 74, 44, 0.13);
}

.media-card:hover {
    box-shadow: 0 18px 38px rgba(46, 74, 44, 0.22);
}

.media-label {
    color: var(--moss);
    background: rgba(251,248,239,0.92);
}

.play-badge {
    color: var(--moss);
    background: rgba(251,248,239,0.94);
}

/* Feuilles flottantes décoratives */
.floating-leaves {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: -1;
}

.floating-leaves span {
    position: absolute;
    color: rgba(95, 127, 91, 0.20);
    font-size: 22px;
    animation: leafFloat 13s ease-in-out infinite;
}

.floating-leaves span:nth-child(1) {
    left: 8%;
    top: 24%;
    animation-delay: -2s;
}

.floating-leaves span:nth-child(2) {
    left: 84%;
    top: 28%;
    animation-delay: -6s;
    font-size: 28px;
}

.floating-leaves span:nth-child(3) {
    left: 18%;
    top: 78%;
    animation-delay: -9s;
    font-size: 18px;
}

.floating-leaves span:nth-child(4) {
    left: 72%;
    top: 74%;
    animation-delay: -4s;
    font-size: 24px;
}

@keyframes leafFloat {
    0%, 100% {
        transform: translateY(0) rotate(-8deg);
        opacity: .10;
    }
    45% {
        transform: translateY(-24px) rotate(12deg);
        opacity: .28;
    }
}

/* Colombe blanc cassé avec ombre verte douce */
.page-dove {
    color: #fffdf5;
    text-shadow:
        0 2px 0 rgba(255,255,255,.7),
        0 12px 28px rgba(64, 95, 61, 0.30);
}

/* Logo bagues harmonisé forêt/champagne */
.rings-logo {
    background:
        radial-gradient(circle at 35% 18%, rgba(242, 220, 149, .55), transparent 36%),
        linear-gradient(145deg, var(--cream), var(--soft));
    border-color: rgba(185, 154, 91, .40);
}

.rings-logo .ring-left {
    stroke: url(#ringGold);
}

.rings-logo .ring-right {
    stroke: url(#ringGreen);
}

.rings-logo .gem {
    fill: var(--gold-light);
}

/* Petits accents floraux */
.gallery-toolbar::before {
    content: '🌿';
    font-size: 22px;
    opacity: .55;
}

.about-card h2::before {
    content: '🌿 ';
}

footer::before {
    content: '❧';
    display: block;
    color: rgba(95, 127, 91, .35);
    font-size: 28px;
    margin-bottom: 6px;
}

@media (max-width: 760px) {
    .hero::before,
    .hero::after {
        display: none;
    }

    .gallery-toolbar::before {
        display: none;
    }
}


/* Page caméra */
.camera-shell,
.qr-shell {
    width: min(1100px, 96%);
    margin: 0 auto 34px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.92), rgba(251,248,239,.88)),
        radial-gradient(circle at top left, rgba(237,244,235,.65), transparent 35%);
    border: 1px solid rgba(95, 127, 91, 0.18);
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: 24px;
}

.camera-stage {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: var(--forest);
    aspect-ratio: 4 / 3;
    display: grid;
    place-items: center;
}

#camera-video,
#camera-canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: filter .25s ease;
}

#camera-canvas[hidden],
#camera-video[hidden] {
    display: none;
}

.camera-frame {
    position: absolute;
    inset: 18px;
    pointer-events: none;
    border-radius: 22px;
}

.frame-label,
.frame-heart {
    display: none;
}

.frame-rings {
    border: 3px solid rgba(185,154,91,.75);
    box-shadow: inset 0 0 0 6px rgba(251,248,239,.2);
}

.frame-rings::before {
    content: '♡';
    position: absolute;
    right: 24px;
    top: 18px;
    color: var(--gold-light);
    font-size: 62px;
    text-shadow: 0 8px 18px rgba(0,0,0,.18);
}

.frame-forest {
    border: 2px solid rgba(169,199,159,.65);
}

.frame-forest::before,
.frame-forest::after {
    position: absolute;
    font-size: 48px;
    opacity: .9;
}

.frame-forest::before {
    content: '🌿';
    left: 18px;
    top: 14px;
}

.frame-forest::after {
    content: '🍃';
    right: 20px;
    bottom: 14px;
}

.frame-love {
    border: 3px solid rgba(251,248,239,.72);
}

.frame-love .frame-label,
.frame-love .frame-heart {
    display: block;
    position: absolute;
    color: var(--cream);
    text-shadow: 0 6px 18px rgba(0,0,0,.32);
}

.frame-love .frame-label {
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    font-family: 'Great Vibes', cursive;
    font-size: clamp(38px, 6vw, 72px);
    white-space: nowrap;
}

.frame-love .frame-heart {
    right: 28px;
    top: 20px;
    font-size: 52px;
}

.camera-controls {
    margin-top: 22px;
    display: grid;
    gap: 20px;
}

.control-group strong {
    display: block;
    margin-bottom: 10px;
    color: var(--moss);
}

.filter-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.camera-filter,
.camera-theme {
    border: 1px solid rgba(95, 127, 91, 0.25);
    background: var(--soft);
    color: var(--moss);
    border-radius: 999px;
    padding: 11px 15px;
    font-weight: 800;
    cursor: pointer;
}

.camera-filter.active,
.camera-theme.active,
.camera-filter:hover,
.camera-theme:hover {
    background: linear-gradient(135deg, var(--moss), var(--sage-dark));
    color: white;
}

.camera-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.camera-actions .primary-action,
.camera-actions .secondary-action {
    border: 0;
    cursor: pointer;
}

.camera-status {
    color: var(--muted);
    font-weight: 700;
}

/* Page QR Code */
.qr-shell {
    display: grid;
    place-items: center;
}

.qr-card {
    width: min(520px, 100%);
    text-align: center;
    background: white;
    border-radius: 28px;
    border: 1px solid rgba(95, 127, 91, 0.18);
    box-shadow: 0 16px 40px rgba(64, 95, 61, 0.10);
    padding: 30px;
}

.qr-card img {
    width: min(360px, 100%);
    height: auto;
    border-radius: 24px;
    border: 12px solid var(--soft);
    background: white;
    margin-bottom: 20px;
}

.qr-card h2 {
    color: var(--moss);
    margin-bottom: 8px;
}

.qr-card p {
    color: var(--muted);
    word-break: break-all;
    margin-bottom: 22px;
}

@media (max-width: 680px) {
    .camera-stage {
        aspect-ratio: 3 / 4;
    }

    .camera-actions .primary-action,
    .camera-actions .secondary-action {
        width: 100%;
        text-align: center;
    }
}


/* Tags médias */
.tag-selector {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border-radius: 18px;
    background: rgba(237,244,235,0.72);
    border: 1px solid rgba(95, 127, 91, 0.18);
}

.tag-selector strong {
    width: 100%;
    text-align: center;
    color: var(--moss);
}

.tag-selector label {
    cursor: pointer;
}

.tag-selector input {
    display: none;
}

.tag-selector span {
    display: inline-flex;
    padding: 11px 15px;
    border-radius: 999px;
    border: 1px solid rgba(95, 127, 91, 0.24);
    background: white;
    color: var(--moss);
    font-weight: 800;
}

.tag-selector input:checked + span {
    background: linear-gradient(135deg, var(--moss), var(--sage-dark));
    color: white;
}

.tag-badge {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 3;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(237,244,235,0.94);
    color: var(--moss);
    font-size: 12px;
    font-weight: 900;
}

.media-label {
    bottom: 48px;
}

/* Thèmes capture type réseaux sociaux */
.frame-manga {
    border: 4px solid rgba(20,20,20,.86);
    box-shadow: inset 0 0 0 8px rgba(255,255,255,.25);
}

.frame-manga::before {
    content: 'OUI !';
    position: absolute;
    left: 22px;
    top: 20px;
    padding: 12px 18px;
    border: 3px solid #111;
    border-radius: 50%;
    background: white;
    color: #111;
    font-weight: 900;
    font-size: 28px;
    transform: rotate(-8deg);
}

.frame-polaroid {
    border: 18px solid rgba(255,255,255,.85);
    border-bottom-width: 58px;
    box-shadow: inset 0 0 0 2px rgba(64,95,61,.18);
}

.frame-polaroid::after {
    content: 'Souvenir du mariage';
    position: absolute;
    left: 50%;
    bottom: -44px;
    transform: translateX(-50%) rotate(-2deg);
    font-family: 'Great Vibes', cursive;
    font-size: 34px;
    color: var(--moss);
}

.frame-glitter::before,
.frame-hearts::before,
.frame-cinema::before {
    position: absolute;
    display: block;
    pointer-events: none;
}

.frame-glitter::before {
    content: '✦  ✧    ✦     ✧  ✦    ✧     ✦';
    inset: 0;
    color: rgba(242,220,149,.95);
    font-size: 48px;
    letter-spacing: 22px;
    padding: 24px;
    text-shadow: 0 0 12px rgba(242,220,149,.65);
}

.frame-hearts::before {
    content: '♡  ♥  ♡  ♥  ♡';
    inset: 0;
    color: rgba(251,248,239,.95);
    font-size: 42px;
    padding: 24px;
    text-shadow: 0 8px 18px rgba(0,0,0,.20);
}

.frame-cinema {
    box-shadow:
        inset 0 72px 0 rgba(0,0,0,.72),
        inset 0 -72px 0 rgba(0,0,0,.72);
}

.frame-cinema::before {
    content: 'REC  ●';
    color: white;
    top: 24px;
    left: 24px;
    font-family: monospace;
    font-size: 24px;
}

.camera-tag-selector {
    justify-content: flex-start;
}

@media (max-width: 680px) {
    .tag-selector label,
    .tag-selector span {
        width: 100%;
        justify-content: center;
    }

    .tag-badge {
        max-width: calc(100% - 24px);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}


/* Studio IA */
.ai-shell {
    width: min(1120px, 96%);
    margin: 0 auto 34px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.92), rgba(251,248,239,.88)),
        radial-gradient(circle at top left, rgba(237,244,235,.65), transparent 35%);
    border: 1px solid rgba(95, 127, 91, 0.18);
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: 24px;
}

.ai-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-bottom: 22px;
}

.ai-upload-card,
.ai-preview-card {
    min-height: 320px;
    border-radius: 24px;
    border: 2px dashed rgba(95, 127, 91, 0.35);
    background: rgba(237,244,235,0.62);
    display: grid;
    place-items: center;
    text-align: center;
    padding: 24px;
}

.ai-upload-card {
    cursor: pointer;
}

.ai-upload-card input {
    display: none;
}

.ai-preview-card img,
.ai-result img {
    width: 100%;
    max-height: 520px;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: 0 16px 38px rgba(64,95,61,.14);
}

#ai-empty-preview {
    color: var(--muted);
    font-weight: 800;
}

.ai-presets {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ai-presets button {
    border: 1px solid rgba(95,127,91,.24);
    background: var(--soft);
    color: var(--moss);
    border-radius: 999px;
    padding: 11px 15px;
    font-weight: 900;
    cursor: pointer;
}

.ai-presets button:hover {
    background: linear-gradient(135deg, var(--moss), var(--sage-dark));
    color: white;
}

.ai-prompt-label {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.ai-prompt-label strong {
    color: var(--moss);
}

.ai-prompt-label textarea,
#camera-ai-prompt {
    width: 100%;
    border: 1px solid rgba(95, 127, 91, 0.22);
    border-radius: 18px;
    padding: 16px;
    font: inherit;
    color: var(--text);
    background: white;
    resize: vertical;
}

.ai-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.ai-progress {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid rgba(95, 127, 91, 0.25);
    border-radius: 18px;
    background: #f2f8ef;
}

.ai-indeterminate {
    width: 36%;
    animation: aiProgressMove 1.1s ease-in-out infinite alternate;
}

@keyframes aiProgressMove {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(180%);
    }
}

.ai-result {
    margin-top: 24px;
    text-align: center;
}

.ai-result h2 {
    color: var(--moss);
    margin-bottom: 14px;
}

.ai-camera-panel {
    padding: 18px;
    border-radius: 22px;
    background: rgba(237,244,235,0.62);
    border: 1px solid rgba(95,127,91,.18);
}

.ai-presets.compact {
    margin-bottom: 12px;
}

@media (max-width: 820px) {
    .ai-grid {
        grid-template-columns: 1fr;
    }
}

/* v11 admin */
.tag-badge{display:none!important}.media-label{bottom:12px}
.admin-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:16px;margin-bottom:28px}
.admin-stat,.admin-panel{background:rgba(255,255,255,.90);border:1px solid rgba(95,127,91,.18);border-radius:24px;box-shadow:var(--shadow)}
.admin-stat{padding:22px;text-align:center}.admin-stat strong{display:block;color:var(--moss);font-size:30px;margin-bottom:6px}.admin-stat span{color:var(--muted);font-weight:800}
.admin-panel{padding:24px;margin-bottom:28px}.admin-panel h2{color:var(--moss);margin-bottom:18px}.admin-panel-head{display:flex;justify-content:space-between;gap:14px;align-items:center;flex-wrap:wrap}
.admin-table-wrap{overflow-x:auto}.admin-table{width:100%;border-collapse:collapse;min-width:780px}.admin-table th,.admin-table td{padding:13px 12px;border-bottom:1px solid rgba(95,127,91,.16);text-align:left;vertical-align:middle}.admin-table th{color:var(--moss);background:var(--soft)}
.admin-thumb{width:74px;height:74px;object-fit:cover;border-radius:14px}.status-pill{display:inline-flex;padding:7px 10px;border-radius:999px;font-weight:900;background:var(--soft);color:var(--moss)}.status-done{background:#dff2d9}.status-failed{background:#ffe1e1;color:#933}.status-processing{background:#fff3cd}
.danger-button{border:0;border-radius:12px;padding:10px 13px;background:#9b3333;color:white;font-weight:900;cursor:pointer}
@media(max-width:1100px){.admin-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:620px){.admin-grid{grid-template-columns:1fr}}
