/* ═══════════════════════════════════════
   VARIABLES & RESET
═══════════════════════════════════════ */
:root {
    --color-bg: #faf8f5;
    --color-bg-warm: #f5f0e8;
    --color-text: #3d3a36;
    --color-text-light: #6b6560;
    --color-accent: #c4a77d;
    --color-accent-soft: #e8dcc8;
    --color-white: #ffffff;
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Quicksand', 'Segoe UI', sans-serif;
    --shadow-soft: 0 4px 20px rgba(61, 58, 54, 0.08);
    --shadow-medium: 0 8px 40px rgba(61, 58, 54, 0.12);
    --radius: 8px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    min-height: 100vh;
}

/* ═══════════════════════════════════════
   HERO SECTION
═══════════════════════════════════════ */
.hero {
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem 2rem;
    background: linear-gradient(165deg, var(--color-bg) 0%, var(--color-bg-warm) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(ellipse, var(--color-accent-soft) 0%, transparent 70%);
    opacity: 0.4;
    pointer-events: none;
}

.hero-content {
    max-width: 1000px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-image-container {
    position: relative;
    animation: fadeInUp 1s ease-out;
}

.hero-image {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow-medium);
}

.hero-image-frame {
    position: absolute;
    top: -12px;
    left: -12px;
    right: 12px;
    bottom: 12px;
    border: 2px solid var(--color-accent);
    border-radius: var(--radius);
    pointer-events: none;
}

.hero-text {
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.hero-title span {
    display: block;
    font-style: italic;
    color: var(--color-accent);
    font-size: 0.6em;
    margin-top: 0.5rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--color-text-light);
    max-width: 400px;
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-light);
    font-size: 0.85rem;
    animation: bounce 2s infinite;
    text-decoration: none;
    margin-top: auto;
    padding-top: 2rem;
    cursor: pointer;
}

.scroll-indicator svg {
    width: 24px;
    height: 24px;
    stroke: var(--color-accent);
}

/* ═══════════════════════════════════════
   GALLERY SECTION
═══════════════════════════════════════ */
.gallery-section {
    padding: 6rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--color-text-light);
    font-size: 1rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: transform var(--transition), box-shadow var(--transition);
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

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

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(61, 58, 54, 0.7) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-title {
    color: var(--color-white);
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-style: italic;
}

.gallery-item .video-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.85);
    color: #3d3a36;
    font-size: 0.8rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    box-shadow: var(--shadow-soft);
}

/* ═══════════════════════════════════════
   TAG FILTERS
═══════════════════════════════════════ */
.tag-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
}

.tag-btn {
    padding: 0.4rem 1.1rem;
    border: 1.5px solid var(--color-accent-soft);
    border-radius: 50px;
    background: var(--color-white);
    color: var(--color-text-light);
    font-family: var(--font-body);
    font-size: 0.88rem;
    cursor: pointer;
    transition:
        background var(--transition),
        color var(--transition),
        border-color var(--transition),
        transform var(--transition);
}

.tag-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-text);
    transform: translateY(-1px);
}

.tag-btn.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-white);
}

/* Animation de filtrage */
.gallery-item {
    transition:
        transform var(--transition),
        box-shadow var(--transition),
        opacity 0.35s ease;
}

.gallery-item.hidden {
    display: none;
}

/* ═══════════════════════════════════════
   MODAL / LIGHTBOX
═══════════════════════════════════════ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(232, 220, 200, 0.10), transparent 60%),
        rgba(61, 58, 54, 0.82);
}

.modal-content {
    position: relative;
    max-width: 1100px;
    width: 100%;
    max-height: 90vh;
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-medium);
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    overflow: hidden;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.4s ease;
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-image-container {
    background: var(--color-bg-warm);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    display: block;
}

.modal-text {
    padding: 3rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.modal-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.modal-description {
    font-size: 1.05rem;
    color: var(--color-text-light);
    white-space: pre-line;
    flex-grow: 1;
}

.modal-description em {
    font-family: var(--font-display);
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--color-text);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    border: none;
    background: var(--color-white);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
    transition: transform var(--transition), background var(--transition);
    z-index: 10;
}

.modal-close:hover {
    transform: rotate(90deg);
    background: var(--color-bg-warm);
}

.modal-close svg {
    width: 20px;
    height: 20px;
    stroke: var(--color-text);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    background: var(--color-white);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
    transition: transform var(--transition), background var(--transition);
    z-index: 10;
}

.modal-nav:hover {
    background: var(--color-bg-warm);
}

.modal-nav.prev {
    left: 1rem;
}

.modal-nav.prev:hover {
    transform: translateY(-50%) translateX(-3px);
}

.modal-nav.next {
    right: 1rem;
}

.modal-nav.next:hover {
    transform: translateY(-50%) translateX(3px);
}

.modal-nav svg {
    width: 20px;
    height: 20px;
    stroke: var(--color-text);
}

/* ═══════════════════════════════════════
   COMMENTS (in modal)
═══════════════════════════════════════ */
.comments-section {
    margin-top: auto;
    padding-top: 1rem;
}

.comments-divider {
    width: 40px;
    height: 2px;
    background: var(--color-accent-soft);
    margin-bottom: 1.2rem;
}

.comments-heading {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 1rem;
}

.comments-list {
    margin-bottom: 1.2rem;
    max-height: 240px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--color-accent-soft) transparent;
}

.comments-empty {
    font-size: 0.9rem;
    color: var(--color-text-light);
    font-style: italic;
    padding: 0.5rem 0;
}

.comment-item {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--color-bg-warm);
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-header {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin-bottom: 0.3rem;
}

.comment-author {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-text);
}

.comment-date {
    font-size: 0.78rem;
    color: var(--color-text-light);
}

.comment-body {
    font-size: 0.92rem;
    color: var(--color-text-light);
    line-height: 1.5;
    white-space: pre-line;
    word-break: break-word;
}

/* Comment form */
.comment-form {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.comment-form-group input,
.comment-form-group textarea {
    width: 100%;
    padding: 0.55rem 0.8rem;
    border: 1.5px solid var(--color-accent-soft);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--color-text);
    background: var(--color-bg);
    transition: border-color var(--transition);
    resize: vertical;
}

.comment-form-group input:focus,
.comment-form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    background: var(--color-white);
}

.comment-form-group input::placeholder,
.comment-form-group textarea::placeholder {
    color: var(--color-text-light);
    opacity: 0.6;
}

.comment-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.comment-form-hint {
    font-size: 0.78rem;
    color: var(--color-text-light);
    font-style: italic;
}

.comment-submit-btn {
    padding: 0.45rem 1.2rem;
    border: none;
    border-radius: 50px;
    background: var(--color-accent);
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
    white-space: nowrap;
}

.comment-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

.comment-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.comment-status {
    font-size: 0.82rem;
    padding: 0.4rem 0.7rem;
    border-radius: var(--radius);
    margin-top: 0.25rem;
}

.comment-status.success {
    color: #27ae60;
    background: #e8f5e9;
}

.comment-status.error {
    color: #c0392b;
    background: #f8e8e6;
}

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
.footer {
    padding: 4rem 2rem;
    text-align: center;
    background: var(--color-bg-warm);
    border-top: 1px solid var(--color-accent-soft);
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-text {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-style: italic;
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}

.footer-contact {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: var(--color-white);
    color: var(--color-text);
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.95rem;
    box-shadow: var(--shadow-soft);
    transition: transform var(--transition), box-shadow var(--transition);
}

.footer-contact:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.footer-contact svg {
    width: 18px;
    height: 18px;
    stroke: var(--color-accent);
}

.footer-copy {
    margin-top: 2rem;
    font-size: 0.85rem;
    color: var(--color-text-light);
}

/* ═══════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-image-container {
        max-width: 350px;
        margin: 0 auto;
    }

    .hero-description {
        margin: 0 auto;
    }

    .modal-content {
        grid-template-columns: 1fr;
        max-height: 95vh;
    }

    .modal-image-container {
        max-height: 50vh;
    }

    .modal-text {
        padding: 2rem;
    }

    .modal-nav {
        display: none;
    }

    .comments-list {
        max-height: 180px;
    }

    .comment-form-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .comment-form-hint {
        text-align: center;
    }
}

@media (max-width: 600px) {
    .hero {
        min-height: 80vh;
        padding: 3rem 1.5rem;
    }

    .gallery-section {
        padding: 4rem 1rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .gallery-item-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(61, 58, 54, 0.6) 0%, transparent 40%);
    }

    .modal {
        padding: 0;
    }

    .modal-content {
        border-radius: 0;
        height: 100vh;
        max-height: 100vh;
    }

    .modal-close {
        top: 0.5rem;
        right: 0.5rem;
    }
}
