/* Polices hébergées sur le site (plus rapide, et aucune IP de visiteur envoyée à Google) */
@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 300 600;
    font-display: swap;
    src: url('../fonts/fraunces-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 300 600;
    font-display: swap;
    src: url('../fonts/fraunces-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Work Sans';
    font-style: normal;
    font-weight: 300 600;
    font-display: swap;
    src: url('../fonts/work-sans-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Work Sans';
    font-style: normal;
    font-weight: 300 600;
    font-display: swap;
    src: url('../fonts/work-sans-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    /* ---- Tokens : palette "chambre noire" ---- */
    --color-bg: #0c0c0e;
    --color-surface: #17171a;
    --color-surface-2: #202023;
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-strong: rgba(255, 255, 255, 0.16);

    --color-text: #f1efe9;
    --color-text-muted: #9c9a92;
    --color-text-faint: #6f6d67;

    --color-rust: #b1503a;       /* accent principal : lumière inactinique */
    --color-rust-hover: #c96348;
    --color-rust-soft: rgba(177, 80, 58, 0.16);

    --color-gold: #c9a04e;       /* accent secondaire : liens, notation, curation */
    --color-gold-soft: rgba(201, 160, 78, 0.14);

    /* ---- Alias conservés pour compatibilité avec les autres feuilles de style ---- */
    --primary-color: var(--color-surface);
    --secondary-color: var(--color-rust);
    --accent-color: var(--color-gold);
    --text-color: var(--color-text);
    --light-bg: var(--color-surface);
    --white: var(--color-text);

    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-soft: 0 4px 16px rgba(0, 0, 0, 0.22);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --spacing-unit: 1rem;

    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Work Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Thème clair — activé via l'attribut data-theme="light" sur <html>,
   posé par js/theme-toggle.js selon le choix du visiteur (mémorisé
   dans localStorage). Le thème sombre reste la valeur par défaut. */
[data-theme="light"] {
    --color-bg: #faf9f6;
    --color-surface: #ffffff;
    --color-surface-2: #f1efe8;
    --color-border: rgba(20, 18, 15, 0.09);
    --color-border-strong: rgba(20, 18, 15, 0.18);

    --color-text: #201e1a;
    --color-text-muted: #57534b;
    --color-text-faint: #8a857a;

    --color-rust: #a8492f;
    --color-rust-hover: #8f3c26;
    --color-rust-soft: rgba(168, 73, 47, 0.10);

    --color-gold: #97731f;
    --color-gold-soft: rgba(151, 115, 31, 0.12);
}

/* Transition douce lors du changement de thème */
body, .site-header, .site-footer, .photo-card, .style-card, .admin-section,
.stat-card, .contact-form-wrapper, .info-item, .password-protection,
.access-restricted, .auth-container, .legal-content, .newsletter-section,
.admin-header, .admin-sidebar, .admin-table, .message-item, .nav-link,
input, textarea, select {
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--color-bg);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 500;
    letter-spacing: -0.01em;
}

::selection {
    background: var(--color-gold-soft);
    color: var(--color-text);
}

img {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    user-drag: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-unit);
}

/* Header et Navigation */
.site-header {
    background: var(--primary-color);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--color-border);
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.navbar-brand .logo {
    display: flex;
    align-items: center;
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--white);
    text-decoration: none;
}

.logo-img {
    height: 34px;
    width: auto;
    display: block;
}

/* Par défaut (thème sombre) : logo clair visible, logo pour mode clair masqué */
.logo-dark-mode {
    display: block;
}

.logo-light-mode {
    display: none;
}

[data-theme="light"] .logo-dark-mode {
    display: none;
}

[data-theme="light"] .logo-light-mode {
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.25s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--color-gold);
}

.nav-menu a.btn-admin {
    color: var(--white);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-admin {
    background-color: var(--color-rust);
    border-color: var(--color-rust);
}

.btn-admin:hover {
    background-color: var(--color-rust-hover);
    border-color: var(--color-rust-hover);
}

.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--color-border-strong);
    border-radius: 999px;
    color: var(--color-text);
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.25s ease, transform 0.2s ease;
}

.theme-toggle-btn:hover {
    border-color: var(--color-gold);
    transform: scale(1.06);
}

.theme-icon-sun {
    display: none;
}

[data-theme="light"] .theme-icon-moon {
    display: none;
}

[data-theme="light"] .theme-icon-sun {
    display: inline;
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.btn-primary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--color-rust-hover);
    border-color: var(--color-rust-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--color-border-strong);
    color: var(--color-text);
}

.btn-secondary:hover {
    border-color: var(--color-gold);
    color: var(--color-gold);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Section Hero — compacte et sobre */
.hero {
    background:
        radial-gradient(ellipse at top, var(--color-rust-soft), transparent 60%),
        var(--color-bg);
    color: var(--white);
    padding: 3rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
}

.hero-content h1 {
    font-size: 2.25rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}

.hero-content p {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    max-width: 42ch;
    margin: 0 auto 1.5rem;
}

/* Diaporama plein écran (page d'accueil) */
.hero-slideshow {
    position: relative;
    height: 100vh;
    height: 100dvh;
    min-height: 480px;
    overflow: hidden;
    background: var(--color-bg);
}

.slide {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--color-bg);
    opacity: 0;
    transition: opacity 1.4s ease;
}

.slide.slide-portrait {
    background-size: contain;
}

.slide.active {
    opacity: 1;
}

/* Assombrit uniquement la bande basse (pour la lisibilité du texte),
   plutôt que toute la diapositive — les bandes de lettrboxing des photos
   portrait restent ainsi de la couleur de fond du thème (blanc en clair,
   noir en sombre) au lieu de virer au gris. */
.slide-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 45%;
    background: linear-gradient(180deg, rgba(12, 12, 14, 0) 0%, rgba(12, 12, 14, 0.85) 100%);
}

/* Le texte du diaporama repose toujours sur une photo assombrie, jamais
   sur le fond de la page : sa couleur reste donc fixe, indépendamment du
   thème clair/sombre choisi par le visiteur. */
.slide-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 6.5rem;
    padding: 0 2rem;
    text-align: center;
    color: #f5f3ee;
    z-index: 2;
}

.slide-tag {
    display: inline-block;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #d9b054;
    margin-bottom: 0.5rem;
}

.slide-caption h1 {
    font-size: 2.5rem;
    font-weight: 500;
}

/* Mode « catégorie seule » : plus grand que l'étiquette, plus petit que le titre */
.slide-category {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #d9b054;
    margin-bottom: 0.75rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.slide-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, var(--color-rust-soft), transparent 60%), var(--color-bg);
}

.slide-empty .slide-caption {
    position: static;
    color: var(--color-text);
}

.slide-empty .slide-tag {
    color: var(--color-gold);
}

.slide-empty p {
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}

.scroll-down {
    position: absolute;
    left: 50%;
    bottom: 5rem;
    transform: translateX(-50%);
    color: #f5f3ee;
    opacity: 0.85;
    z-index: 2;
    animation: bounce-down 2s infinite;
}

.scroll-down:hover {
    color: #d9b054;
    opacity: 1;
}

@keyframes bounce-down {
    0%, 100% {
        transform: translate(-50%, 0);
    }
    50% {
        transform: translate(-50%, 8px);
    }
}

/* Sections */
.styles-section,
.recent-photos {
    padding: 3.5rem 0;
}

.styles-section h2,
.recent-photos h2,
.newsletter-section h2,
.section-title {
    font-size: 1.75rem;
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    position: relative;
}

.styles-section h2::after,
.recent-photos h2::after,
.newsletter-section h2::after,
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--color-gold);
}

/* Grille de styles / catégories */
.styles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.75rem;
    margin-bottom: 2rem;
}

.style-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--color-text);
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.style-card:hover {
    border-color: var(--color-gold);
    transform: translateY(-4px);
}

/* Vignette de couverture (nouvelle vue catégories de gallery.php) */
.style-thumbnail {
    position: relative;
    aspect-ratio: 4 / 3;
    margin: -1.5rem -1.5rem 1.25rem;
    overflow: hidden;
    background: var(--color-surface-2);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.style-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.style-thumbnail-portrait {
    background: var(--color-bg);
}

.style-thumbnail-portrait img {
    object-fit: contain;
}

/* Galerie privée client */
.client-gallery-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 0 0 2rem;
    padding: 1rem 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.client-gallery-toolbar span {
    color: var(--color-text-muted);
}

.client-gallery-toolbar strong {
    color: var(--color-gold);
    font-size: 1.1rem;
}

.admin-pick-badge {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    background: rgba(12, 12, 14, 0.8);
    backdrop-filter: blur(4px);
    color: #f5f3ee;
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--color-gold);
}

.flag-toggle-btn {
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.6rem;
    background: transparent;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.flag-toggle-btn:hover {
    border-color: var(--color-gold);
    color: var(--color-text);
}

.flag-toggle-btn.flagged {
    background: var(--color-gold-soft);
    border-color: var(--color-gold);
    color: var(--color-gold);
    font-weight: 600;
}

.lightbox-trigger {
    cursor: zoom-in;
}

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    background: rgba(8, 8, 9, 0.96);
    align-items: center;
    justify-content: center;
}

.lightbox.open {
    display: flex;
}

.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 78vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
}

.lightbox-caption {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: #f5f3ee;
}

.lightbox-caption span {
    font-family: var(--font-display);
    font-size: 1.1rem;
}

.lightbox-caption .flag-toggle-btn {
    width: auto;
    margin-top: 0;
    padding: 0.5rem 1.25rem;
    color: #f5f3ee;
    border-color: rgba(245, 243, 238, 0.3);
}

.lightbox-caption .flag-toggle-btn:hover {
    border-color: var(--color-gold);
    color: var(--color-gold);
}

.lightbox-caption .btn {
    color: #f5f3ee;
    border-color: rgba(245, 243, 238, 0.3);
    background: transparent;
}

.lightbox-caption .btn:hover {
    border-color: var(--color-gold);
    color: var(--color-gold);
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid rgba(245, 243, 238, 0.3);
    border-radius: 50%;
    color: #f5f3ee;
    font-size: 1.2rem;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.lightbox-close:hover {
    border-color: var(--color-gold);
    color: var(--color-gold);
    transform: scale(1.05);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    /* Centrage identique pour les <button> (galerie) et les liens <a> (page photo) */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    text-decoration: none;
    background: transparent;
    border: 1px solid rgba(245, 243, 238, 0.3);
    border-radius: 50%;
    color: #f5f3ee;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.lightbox-nav:hover {
    border-color: var(--color-gold);
    color: var(--color-gold);
}

.lightbox-prev {
    left: 1.5rem;
}

.lightbox-next {
    right: 1.5rem;
}

@media (max-width: 768px) {
    .lightbox-nav {
        width: 44px;
        height: 44px;
        font-size: 1.4rem;
    }

    .lightbox-prev {
        left: 0.5rem;
    }

    .lightbox-next {
        right: 0.5rem;
    }

    .lightbox-close {
        top: 0.75rem;
        right: 0.75rem;
    }

    .lightbox-caption {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

.style-card:hover .style-thumbnail img {
    transform: scale(1.05);
}

.style-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-surface-2), var(--color-surface));
}

.style-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(12, 12, 14, 0.75);
    backdrop-filter: blur(4px);
    border: 1px solid var(--color-border-strong);
    color: var(--color-text);
    font-size: 0.75rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.style-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.style-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.4rem;
}

.style-card p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.photo-count,
.style-count {
    color: var(--color-gold);
    font-weight: 500;
    font-size: 0.85rem;
    margin-top: auto;
    letter-spacing: 0.02em;
}

.style-card .btn {
    margin-top: 1rem;
    align-self: flex-start;
}

/* Grille de photos */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.photo-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.photo-card:hover {
    border-color: var(--color-gold);
    transform: translateY(-4px);
}

.photo-card img,
.photo-thumbnail img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.photo-card:hover .photo-thumbnail img {
    transform: scale(1.05);
}

.photo-thumbnail {
    display: block;
    position: relative;
    overflow: hidden;
}

.photo-info {
    padding: 1.1rem;
}

.photo-info h4 {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.style-tag {
    font-size: 0.85rem;
    color: var(--color-gold);
    margin-bottom: 0.5rem;
}

.rating {
    font-size: 0.9rem;
    color: #f39c12;
}

.stars {
    font-weight: bold;
}

/* En-tête de la page galerie (catégorie sélectionnée ou liste des catégories) */
.gallery-header {
    margin: 2.5rem 0;
    text-align: center;
}

.gallery-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.gallery-header p {
    color: var(--color-text-muted);
    max-width: 60ch;
    margin: 0 auto;
}

.gallery-header p:first-child {
    margin-bottom: 1rem;
}

.gallery-header p:first-child a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.gallery-header p:first-child a:hover {
    color: var(--color-gold);
}

.gallery-header .gallery-access-note {
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

.gallery-access-note a {
    color: var(--color-gold);
}

/* Accès protégé / réservé aux membres */
.password-protection,
.access-restricted {
    max-width: 480px;
    margin: 3rem auto;
    padding: 2.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-align: center;
}

.password-protection h1,
.access-restricted h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.password-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.password-form input {
    padding: 0.75rem 1rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 0.95rem;
}

.password-form input::placeholder {
    color: var(--color-text-faint);
}

.error-message {
    background: var(--color-rust-soft);
    border: 1px solid var(--color-rust);
    color: #f3c9bd;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

/* Newsletter */
.newsletter-section {
    background: var(--light-bg);
    border-top: 1px solid var(--color-border);
    padding: 2.25rem 0;
}

.newsletter-section h2 {
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.newsletter-form input {
    min-width: 300px;
    padding: 0.75rem 1rem;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1rem;
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    min-width: 0;
    pointer-events: none;
}

.newsletter-form input::placeholder {
    color: var(--color-text-faint);
}

#newsletter-message {
    text-align: center;
    margin-top: 1rem;
    font-weight: 500;
    color: var(--color-gold);
}

/* Photo Detail */
.photo-detail {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin: 2rem 0;
}

.photo-main {
    display: flex;
    align-items: center;
}

.full-image-wrapper {
    position: relative;
}

.full-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

.fullscreen-toggle-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 48px;
    height: 48px;
    background: rgba(12, 12, 14, 0.7);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    color: #f5f3ee;
    font-size: 1.4rem;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.fullscreen-toggle-btn:hover {
    border-color: var(--color-gold);
    color: var(--color-gold);
    transform: scale(1.06);
}

.photo-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.photo-sidebar h1 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.photo-meta,
.photo-description,
.photo-exif,
.rating-section {
    padding: 1.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.rating-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
}

.rating-stars {
    font-size: 1.4rem;
    font-weight: bold;
    color: #f39c12;
}

.stars-input {
    display: flex;
    gap: 0.4rem;
    margin: 1rem 0;
}

.star-btn {
    font-size: 1.9rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-faint);
    transition: color 0.2s ease, transform 0.2s ease;
}

.star-btn:hover,
.star-btn.active {
    color: #f39c12;
    transform: scale(1.1);
}

.login-hint {
    font-size: 0.85rem;
    color: var(--color-gold);
    margin-top: 0.5rem;
}

.photo-navigation {
    display: flex;
    gap: 1rem;
}

.photo-navigation .btn {
    flex: 1;
    text-align: center;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2.5rem 0;
}

.page-info {
    padding: 0.5rem 1rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* Footer */
.site-footer {
    background: var(--primary-color);
    color: var(--white);
    margin-top: 0;
    padding: 1.75rem 0 1.25rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-section h4 {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.25s ease;
}

.footer-section a:hover {
    color: var(--color-gold);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-faint);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        padding: 2.5rem 1.25rem;
    }

    .hero-content h1 {
        font-size: 1.75rem;
    }

    .hero-content p {
        font-size: 0.95rem;
    }

    .slide-caption {
        bottom: 4.5rem;
        padding: 0 1.25rem;
    }

    .slide-caption h1 {
        font-size: 1.6rem;
    }

    .slide-category {
        font-size: 1.15rem;
    }

    .scroll-down {
        bottom: 3.5rem;
    }

    .photo-detail {
        grid-template-columns: 1fr;
    }

    .nav-menu {
        flex-direction: column;
        gap: 1rem;
    }

    .newsletter-form input {
        min-width: auto;
        width: 100%;
    }

    .styles-grid,
    .photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .photo-navigation {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
/* Retour après une notation (js/rating.js) */
.rating-feedback {
    min-height: 1.2em;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Mise en page « mosaïque » de la galerie : chaque photo garde son format
   (portrait ou paysage) au lieu d'être recadrée en carré */
.photos-grid.masonry {
    display: block;
    columns: 3 280px;
    column-gap: 1.5rem;
}

.photos-grid.masonry .photo-card {
    display: block;
    width: 100%;
    margin-bottom: 1.5rem;
    break-inside: avoid;
}

.photos-grid.masonry .photo-thumbnail img {
    height: auto;
}

.photos-grid.masonry .photo-card:hover {
    transform: none;
}

@media (max-width: 768px) {
    .photos-grid.masonry {
        columns: 2 160px;
        column-gap: 1rem;
    }

    .photos-grid.masonry .photo-card {
        margin-bottom: 1rem;
    }
}

/* Infos de prise de vue (EXIF) sur la page photo */
.exif-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.4rem 1rem;
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

.exif-list dt {
    color: var(--color-text-muted);
}

.exif-list dd {
    margin: 0;
}

/* Galerie client : téléchargement et commentaires */
.client-download-links {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.client-download-links [aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
}

.client-comment {
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

.client-comment summary {
    cursor: pointer;
    color: var(--color-text-muted);
}

.client-comment textarea {
    width: 100%;
    margin: 0.5rem 0;
    padding: 0.5rem;
    font: inherit;
    color: var(--color-text);
    background: var(--color-surface-2);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    resize: vertical;
}

.comment-status {
    margin-left: 0.5rem;
    color: var(--color-text-muted);
}

/* Menu repliable sur mobile (bouton « hamburger », js/nav-toggle.js) */
.nav-toggle {
    display: none;
}

@media (max-width: 900px) {
    .navbar .container {
        flex-wrap: wrap;
        gap: 0;
    }

    .nav-toggle {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 44px;
        height: 44px;
        padding: 0 10px;
        background: transparent;
        border: 1px solid var(--color-border-strong);
        border-radius: var(--radius-md, 6px);
        cursor: pointer;
    }

    .nav-toggle span {
        display: block;
        height: 2px;
        background: var(--color-text-muted);
        border-radius: 2px;
        transition: transform 0.25s ease, opacity 0.25s ease;
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .nav-menu {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding-top: 0.75rem;
    }

    .js .nav-menu {
        display: none;
    }

    .js .nav-menu.open {
        display: flex;
    }

    .nav-menu > li {
        width: 100%;
        padding: 0.6rem 0;
        border-top: 1px solid var(--color-border);
    }

    .nav-menu a {
        font-size: 1.05rem;
    }

    .user-menu {
        flex-wrap: wrap;
    }
}

/* Liens dans le texte de la page photo (n'avaient pas de couleur : bleu par défaut du navigateur) */
.photo-meta a,
.login-hint a {
    color: var(--color-gold);
}
