/* ============================================
   Sébastien Jauquet - Portfolio Photo
   Style Lightroom / Dark Theme
   ============================================ */

:root {
    --bg-dark: #1a1a1a;
    --bg-panel: #2d2d2d;
    --bg-card: #333333;
    --bg-hover: #3d3d3d;
    --text-primary: #e0e0e0;
    --text-secondary: #999999;
    --text-muted: #666666;
    --accent: #b8a472;
    --accent-hover: #d4bf8a;
    --border: #404040;
    --shadow: rgba(0, 0, 0, 0.4);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
}

/* ---- HEADER / NAV ---- */

.site-header {
    background-color: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.site-logo {
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    white-space: nowrap;
}

.site-logo strong {
    font-weight: 600;
}

.main-nav {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.main-nav a {
    color: var(--text-secondary);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    transition: color 0.2s, background-color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--text-primary);
    background-color: var(--bg-hover);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
}

/* ---- MAIN CONTENT ---- */

.main-content {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* ---- HOME PAGE ---- */

.hero {
    text-align: center;
    padding: 2rem 0;
}

.hero-image {
    max-width: 500px;
    margin: 0 auto 2rem;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 300;
}

.hero-quote {
    font-style: italic;
    color: var(--accent);
    margin-top: 1rem;
    font-size: 0.95rem;
}

.age-notice {
    text-align: center;
    padding: 0.75rem 1.5rem;
    margin-bottom: 1.5rem;
    background-color: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.section-card {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    background-color: var(--bg-card);
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: flex-end;
    transition: transform 0.3s, box-shadow 0.3s;
}

.section-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow);
}

.section-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: opacity 0.3s, transform 0.5s;
}

.section-card:hover img {
    opacity: 0.85;
    transform: scale(1.03);
}

.section-card svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.section-card-info {
    position: relative;
    z-index: 1;
    padding: 1.5rem;
    width: 100%;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
}

.section-card-info h2 {
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: #fff;
}

.section-card-info p {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
    margin-top: 0.25rem;
}

/* ---- GALLERY (ALBUM LIST) ---- */

.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 0.04em;
}

.page-header .breadcrumb {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.page-header .breadcrumb a {
    color: var(--text-muted);
}

.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.album-card {
    background-color: var(--bg-card);
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.album-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px var(--shadow);
}

.album-card-thumb {
    aspect-ratio: 1;
    overflow: hidden;
    background-color: var(--bg-dark);
}

.album-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.album-card:hover .album-card-thumb img {
    transform: scale(1.05);
}

.album-card-info {
    padding: 0.75rem;
}

.album-card-info h3 {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.3;
}

.album-card-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ---- ALBUM (PHOTO GRID) ---- */

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}

.photo-thumb {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    background-color: var(--bg-card);
    transition: transform 0.3s, box-shadow 0.3s;
}

.photo-thumb:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 16px var(--shadow);
}

.photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s;
}

.photo-thumb:hover img {
    opacity: 0.9;
}

.album-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.album-nav a {
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: all 0.2s;
}

.album-nav a:hover {
    color: var(--text-primary);
    border-color: var(--accent);
}

/* ---- LIGHTBOX ---- */

.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 2rem;
    cursor: pointer;
    z-index: 1010;
    transition: color 0.2s;
    line-height: 1;
}

.lightbox-close:hover {
    color: #fff;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 2px;
}

.lightbox-caption {
    margin-top: 1rem;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    font-weight: 300;
    text-align: center;
    letter-spacing: 0.02em;
}

.lightbox-counter {
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
    z-index: 1010;
}

.lightbox-nav {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(255,255,255,0.4);
    font-size: 2.5rem;
    transition: color 0.2s, background 0.2s;
    z-index: 1005;
    user-select: none;
}

.lightbox-nav:hover {
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.05);
}

.lightbox-prev {
    left: 0;
    border-radius: 0 4px 4px 0;
}

.lightbox-next {
    right: 0;
    border-radius: 4px 0 0 4px;
}

/* ---- GUESTBOOK ---- */

.guestbook-entries {
    max-width: 800px;
}

.gb-entry {
    background-color: var(--bg-panel);
    border-radius: 6px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    border-left: 3px solid var(--border);
}

.gb-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.75rem;
}

.gb-entry-name {
    font-weight: 500;
    color: var(--accent);
    font-size: 0.95rem;
}

.gb-entry-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.gb-entry-message {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-primary);
}

.gb-entry-links {
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

.gb-entry-links a {
    color: var(--text-muted);
    margin-right: 1rem;
}

.gb-form {
    max-width: 600px;
    margin-bottom: 3rem;
}

.gb-form h2 {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
    letter-spacing: 0.03em;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    background-color: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

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

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background-color: var(--accent);
    color: var(--bg-dark);
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: var(--accent-hover);
}

.form-message {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.form-message.success {
    background-color: rgba(76, 175, 80, 0.15);
    color: #81c784;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.form-message.error {
    background-color: rgba(244, 67, 54, 0.15);
    color: #e57373;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

/* Honeypot */
.hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
}

/* ---- ABOUT PAGE ---- */

.about-content {
    max-width: 700px;
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.about-content p {
    margin-bottom: 1rem;
}

.about-signature {
    margin-top: 2rem;
    color: var(--accent);
    font-weight: 500;
}

/* ---- FOOTER ---- */

.site-footer {
    background-color: var(--bg-panel);
    border-top: 1px solid var(--border);
    padding: 1.5rem 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: auto;
}

/* ---- NO RESULTS ---- */

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state p {
    font-size: 1rem;
}

/* ---- RESPONSIVE ---- */

@media (max-width: 768px) {
    .site-header {
        padding: 0 1rem;
    }

    .header-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 0.75rem 0;
    }

    .nav-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        padding: 0.5rem 0;
        gap: 0;
    }

    .main-nav.open {
        display: flex;
    }

    .main-nav a {
        padding: 0.6rem 0;
        width: 100%;
    }

    .main-content {
        padding: 1rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .section-grid {
        grid-template-columns: 1fr;
    }

    .album-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.5rem;
    }

    .lightbox-nav {
        width: 50px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .album-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .photo-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.35rem;
    }
}
