/* =========================================================
   LES PHOTOS DE LAURENT — style.css
   Design épuré, inspiré d'Apple : beaucoup de blanc, typographie
   nette, une seule touche de couleur (la bande du haut).
   ========================================================= */

:root {
    --bg: #fafafa;
    --surface: #ffffff;
    --ink: #1d1d1f;
    --ink-soft: #6e6e73;
    --hairline: #e5e5e5;
    --hairline-soft: #f0f0f0;
    --focus: #0071e3;
    --radius-s: 6px;
    --radius-m: 12px;
    --max-w: 1180px;
    --header-bg: #0a1a3c;
    --header-text: #ffffff;
    --header-text-soft: rgba(255, 255, 255, 0.72);
    --header-border: rgba(255, 255, 255, 0.14);
    font-size: 16px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; display: block; }

/* ---------- en-tête ---------- */
.site-header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
    color: var(--header-text);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
    font-size: 0.95rem;
    color: var(--header-text-soft);
}

.main-nav a { transition: color .2s ease; }
.main-nav a:hover,
.main-nav a.active { color: var(--header-text); }

.main-nav a.active { font-weight: 500; }

.instagram-link {
    display: flex;
    align-items: center;
    color: var(--header-text-soft);
}
.instagram-link:hover { color: var(--header-text); }

.lang-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--header-text-soft);
}
.lang-switch a { transition: color .2s ease; }
.lang-switch a:hover { color: var(--header-text); }
.lang-switch a.active { color: var(--header-text); font-weight: 600; }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 34px;
    height: 34px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--header-text);
    border-radius: 2px;
}

/* ---------- pied de page ---------- */
.site-footer {
    border-top: 1px solid var(--hairline);
    margin-top: 80px;
}
.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 28px 24px 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    justify-content: space-between;
    color: var(--ink-soft);
    font-size: 0.85rem;
}
.footer-inner a:hover { color: var(--ink); }

/* ---------- galerie ---------- */

.gallery {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 44px 24px 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius-m);
    background: var(--hairline-soft);
    cursor: zoom-in;
    display: block;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.gallery-item:hover img { transform: scale(1.045); }

.gallery-item:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
}

.gallery-empty {
    max-width: var(--max-w);
    margin: 80px auto 40px;
    padding: 60px 24px;
    text-align: center;
    color: var(--ink-soft);
}

/* ---------- pagination ---------- */
.pagination {
    max-width: var(--max-w);
    margin: 12px auto 90px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}
.pagination a,
.pagination span {
    min-width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--ink-soft);
}
.pagination a { transition: background .15s ease, color .15s ease; }
.pagination a:hover { background: var(--hairline-soft); color: var(--ink); }
.pagination .current {
    background: var(--ink);
    color: #fff;
    font-weight: 500;
}
.pagination .arrow { font-size: 1.1rem; }
.pagination .disabled { opacity: 0.3; pointer-events: none; }

/* ---------- lightbox ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 24px;
}
.lightbox.open { display: flex; }

.lightbox figure {
    margin: 0;
    max-width: min(92vw, 1400px);
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.lightbox img {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox figcaption {
    color: rgba(255,255,255,0.75);
    font-size: 0.9rem;
    text-align: center;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255,255,255,0.08);
    border: none;
    color: #fff;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s ease;
    font-size: 1.3rem;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255,255,255,0.18); }

.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* ---------- pages de contenu (contact) ---------- */
.page-content {
    max-width: var(--max-w);
    margin: 56px auto 100px;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 64px;
}

.page-content h1 {
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0 0 20px;
}

.page-text p {
    color: var(--ink-soft);
    font-size: 1.02rem;
    margin: 0 0 18px;
}

.page-text .signature {
    color: var(--ink);
    font-weight: 500;
    margin-top: 28px;
}

/* ---------- formulaire de contact ---------- */
.contact-form {
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-m);
    padding: 32px;
}

.form-row { margin-bottom: 20px; }
.form-row label {
    display: block;
    font-size: 0.88rem;
    color: var(--ink-soft);
    margin-bottom: 6px;
}
.form-row input,
.form-row textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-s);
    font-size: 0.98rem;
    font-family: inherit;
    color: var(--ink);
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form-row input:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--focus);
    box-shadow: 0 0 0 3px rgba(0,113,227,0.15);
}
.form-row textarea { resize: vertical; min-height: 130px; }

.captcha-row {
    display: flex;
    align-items: center;
    gap: 14px;
}
.captcha-question {
    background: var(--hairline-soft);
    border-radius: var(--radius-s);
    padding: 10px 16px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.captcha-row input { flex: 1; }

/* honeypot - champ invisible pour piéger les robots */
.hp-field { position: absolute; left: -9999px; top: -9999px; }

.submit-btn {
    background: var(--ink);
    color: #fff;
    border: none;
    padding: 13px 28px;
    border-radius: 999px;
    font-size: 0.98rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity .15s ease;
}
.submit-btn:hover { opacity: 0.85; }

.form-message {
    padding: 14px 16px;
    border-radius: var(--radius-s);
    margin-bottom: 20px;
    font-size: 0.92rem;
}
.form-message.success { background: #eafaf0; color: #1c6b39; }
.form-message.error { background: #fdecec; color: #b3261e; }

/* ---------- admin ---------- */
.admin-body { background: #f5f5f7; }
.admin-shell {
    max-width: 1080px;
    margin: 0 auto;
    padding: 40px 24px 100px;
}
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}
.admin-header h1 { font-size: 1.5rem; margin: 0; font-weight: 600; }
.admin-header .admin-actions { display: flex; gap: 12px; align-items: center; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: opacity .15s ease, background .15s ease;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { opacity: 0.85; }
.btn-secondary { background: #fff; border-color: var(--hairline); color: var(--ink); }
.btn-secondary:hover { background: var(--hairline-soft); }
.btn-danger { background: #fff; border-color: #f3c8c6; color: #b3261e; }
.btn-danger:hover { background: #fdecec; }
.btn-small { padding: 7px 14px; font-size: 0.82rem; }

.admin-card {
    background: #fff;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-m);
    padding: 28px;
    margin-bottom: 24px;
}

.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f7;
}
.login-card {
    width: 100%;
    max-width: 380px;
    background: #fff;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-m);
    padding: 40px 32px;
}
.login-card h1 {
    font-size: 1.3rem;
    margin: 0 0 24px;
    text-align: center;
    font-weight: 600;
}

.photo-table { width: 100%; border-collapse: collapse; }
.photo-table th, .photo-table td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid var(--hairline-soft);
    font-size: 0.9rem;
    vertical-align: middle;
}
.photo-table th { color: var(--ink-soft); font-weight: 500; }
.photo-table img.thumb-preview {
    width: 72px; height: 54px; object-fit: cover; border-radius: 6px;
}
.row-actions { display: flex; gap: 8px; }

.field-hint { color: var(--ink-soft); font-size: 0.82rem; margin-top: 6px; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
    .gallery { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .page-content { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 640px) {
    .nav-toggle { display: flex; }
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--header-bg);
        border-bottom: 1px solid var(--header-border);
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 24px 24px;
        gap: 16px;
        display: none;
    }
    .main-nav.open { display: flex; }
    .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .lightbox-prev, .lightbox-next { width: 40px; height: 40px; font-size: 1.1rem; }
}

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

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}
