/* =====================================================================
   BRIGADE BAGUETTE — Feuille de styles principale
   Charte graphique officielle + animations + responsive
   ===================================================================== */

/* ---------- Polices personnalisées (woff2 dans /fonts/) ---------- */
@font-face {
    font-family: 'NeueHaasRoman';
    src: url('../fonts/NeueHaasGroteskTextPro-55Roman.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'NeueHaasBold';
    src: url('../fonts/NeueHaasGroteskTextPro-75Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ---------- Variables de la charte ---------- */
:root {
    --font-title: "rocky-condensed", serif;
    --font-body: 'NeueHaasRoman', 'Helvetica Neue', Arial, sans-serif;
    --font-body-bold: 'NeueHaasBold', 'Helvetica Neue', Arial, sans-serif;

    --color-orange: #F0631E;
    --color-orange-dark: #D4551A;
    --color-beige: #FBEDD3;
    --color-beige-dark: #F0DFC0;
    --color-marron: #6B2E17;
    --color-marron-light: #8B4226;

    --color-white: #FFFFFF;
    --color-black: #1A0F08;

    --transition-fast: 200ms ease;
    --transition-mid: 400ms ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-marron);
    background-color: var(--color-beige);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    /* Animation : zoom-out léger au chargement (effet Ken Burns inversé) */
    transform: scale(1.15);
    animation: heroZoom 9s ease-out forwards;
}

@keyframes heroZoom {
    from { transform: scale(1.15); }
    to   { transform: scale(1.0); }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(107, 46, 23, 0.55) 0%,
        rgba(139, 66, 38, 0.35) 60%,
        rgba(240, 99, 30, 0.25) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--color-beige);
    padding: 0 24px;
    max-width: 900px;
}

.hero-title {
    font-family: var(--font-title);
    font-weight: 300;
    font-style: italic;
    font-size: clamp(2rem, 7vw, 8rem);
    line-height: 0.95;
    letter-spacing: 0.01em;
    color: var(--color-beige);
    text-shadow: 0 6px 30px rgba(0, 0, 0, 0.45);
    white-space: nowrap;   
    display: block;
    max-width: 100%;
    transform: translateX(120%);
    animation: slideInRight 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}

.hero-title .line1,
.hero-title .line2 {
    display: inline;
}

@media (max-width: 768px) {
    .hero-title {
        white-space: normal;   
        font-size: clamp(4rem, 13vw, 5rem);
    }

    .hero-title .line1,
    .hero-title .line2 {
        display: block;   
    }
}

@keyframes slideInRight {
    from { transform: translateX(120%); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: clamp(1.05rem, 2.2vw, 1.5rem);
    margin-top: 1.25rem;
    font-weight: 400;
    color: var(--color-beige-dark);
    opacity: 0;
    animation: fadeUp 1s ease 1.1s forwards;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    z-index: 5;
}

.scroll-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.6);
    animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-arrow {
    display: block;
}

.scroll-text {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.85;
}

@keyframes scrollBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(8px);
    }
}

/* ============================================================
   GALERIE
   ============================================================ */
.galerie {
    padding: 96px 0 64px;
    background: var(--color-beige);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.pagination-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--color-beige, #ccc);
    background: transparent;
    color: inherit;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.2s, color 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--color-beige, #ccc);
    color: #000;
}

.pagination-btn.actif {
    background: var(--color-beige, #ccc);
    color: #000;
    font-weight: bold;
}

.pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.section-title {
    font-family: var(--font-title);
    font-weight: 300;
    font-style: italic;
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    color: var(--color-marron);
    text-align: center;
    margin-bottom: 12px;
    line-height: 1;
}

.section-subtitle {
    text-align: center;
    color: var(--color-marron-light);
    max-width: 640px;
    margin: 0 auto 40px;
    font-size: 1.05rem;
}

/* Filtres */
.filtres {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 28px;
}

.filtre-btn {
    padding: 10px 22px;
    border-radius: 999px;
    font-family: var(--font-body-bold);
    font-size: 0.95rem;
    color: var(--color-marron);
    background: var(--color-beige-dark);
    transition: all var(--transition-fast);
    border: 2px solid transparent;
}

.filtre-btn:hover {
    background: var(--color-beige);
    color: var(--color-orange-dark);
}

.filtre-btn.actif {
    background: var(--color-orange);
    color: var(--color-white);
    border-color: var(--color-orange-dark);
}

/* Bouton ZIP */
.actions {
    display: flex;
    justify-content: center;
    margin-bottom: 48px;
}

.btn-zip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--color-marron);
    color: var(--color-beige);
    border-radius: 999px;
    font-family: var(--font-body-bold);
    font-size: 1rem;
    transition: all var(--transition-fast);
    box-shadow: 0 6px 18px rgba(107, 46, 23, 0.25);
}

.btn-zip:hover {
    background: var(--color-orange-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(212, 85, 26, 0.35);
}

.btn-zip:disabled {
    opacity: 0.7;
    cursor: progress;
}

.btn-zip .btn-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(251, 237, 211, 0.4);
    border-top-color: var(--color-beige);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn-zip.is-loading .btn-spinner {
    display: inline-block;
}

.btn-zip.is-loading .icon-download,
.btn-zip.is-loading .btn-label {
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Grille masonry */
.grille {
    column-count: 4;
    column-gap: 18px;
}

.carte-photo {
    position: relative;
    margin: 0 0 18px;
    break-inside: avoid;
    border-radius: 12px;
    overflow: hidden;
    cursor: zoom-in;
    background: var(--color-marron);
    box-shadow: 0 4px 18px rgba(107, 46, 23, 0.15);
    /* Apparition au scroll (déclenchée par IntersectionObserver) */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.carte-photo.visible {
    opacity: 1;
    transform: translateY(0);
}

.carte-photo img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform var(--transition-mid);
}

.carte-photo:hover img {
    transform: scale(1.05);
}

/* Overlay marron semi-transparent au hover */
.carte-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(107, 46, 23, 0);
    transition: background var(--transition-fast);
    pointer-events: none;
}

.carte-photo:hover::after {
    background: rgba(107, 46, 23, 0.55);
}

/* Icône loupe centrée au hover */
.carte-photo .icone-zoom {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.6);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(251, 237, 211, 0.95);
    color: var(--color-marron);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    z-index: 2;
    pointer-events: none;
}

.carte-photo:hover .icone-zoom {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Bouton téléchargement individuel visible au hover */
.carte-photo .btn-dl {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--color-orange);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity var(--transition-fast), transform var(--transition-fast), background var(--transition-fast);
    z-index: 3;
}

.carte-photo:hover .btn-dl {
    opacity: 1;
    transform: translateY(0);
}

.carte-photo .btn-dl:hover {
    background: var(--color-orange-dark);
}

.carte-photo .categorie-tag {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: var(--color-beige);
    color: var(--color-marron);
    font-family: var(--font-body-bold);
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 999px;
    z-index: 2;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    pointer-events: none;
}

.carte-photo:hover .categorie-tag {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(26, 15, 8, 0.94);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 80px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox[hidden] {
    display: none;
}

.lightbox.is-open {
    opacity: 1;
}

.lb-figure {
    max-width: 100%;
    max-height: 100%;
    text-align: center;
    /* Animation scale 0.85 -> 1 */
    transform: scale(0.85);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}

.lightbox.is-open .lb-figure {
    transform: scale(1);
    opacity: 1;
}

.lb-image {
    max-width: 100%;
    max-height: calc(100vh - 160px);
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.lb-caption {
    color: var(--color-beige-dark);
    margin-top: 12px;
    font-family: var(--font-body-bold);
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Boutons lightbox */
.lb-close, .lb-prev, .lb-next {
    position: absolute;
    color: var(--color-beige);
    background: rgba(251, 237, 211, 0.08);
    border: 1px solid rgba(251, 237, 211, 0.18);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.8rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 1001;
}

.lb-close:hover, .lb-prev:hover, .lb-next:hover {
    background: var(--color-orange);
    color: var(--color-white);
    transform: scale(1.08);
}

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

.lb-prev:hover, .lb-next:hover {
    transform: translateY(-50%) scale(1.08);
}

.lb-download {
    position: absolute;
    bottom: 24px;
    right: 24px;
    background: var(--color-orange);
    color: var(--color-white);
    padding: 12px 20px;
    border-radius: 999px;
    font-family: var(--font-body-bold);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background var(--transition-fast), transform var(--transition-fast);
    z-index: 1001;
}

.lb-download:hover {
    background: var(--color-orange-dark);
    transform: translateY(-2px);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--color-marron);
    color: var(--color-beige);
    padding: 32px 0;
    text-align: center;
    font-size: 0.9rem;
}

.site-footer em {
    color: var(--color-orange);
    font-style: italic;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablette */
@media (max-width: 900px) {
    .grille {
        column-count: 3;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .hero {
        min-height: 520px;
    }

    .grille {
        column-count: 2;
        column-gap: 10px;
    }

    .carte-photo {
        margin-bottom: 10px;
    }

    .lightbox {
        padding: 24px 16px;
    }

    .lb-close, .lb-prev, .lb-next {
        width: 42px;
        height: 42px;
        font-size: 1.4rem;
    }

    .lb-close { top: 12px; right: 12px; }
    .lb-prev  { left: 8px; top: 50%; transform: translateY(-50%); }
    .lb-next  { right: 8px; top: 50%; transform: translateY(-50%); }
    .lb-prev:hover, .lb-next:hover { transform: translateY(-50%) scale(1.08); }

    .lb-download {
        bottom: 12px;
        right: 12px;
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .lb-image {
        max-height: calc(100vh - 140px);
    }

    .filtres {
        gap: 6px;
    }

    .filtre-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    .btn-zip {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .galerie {
        padding: 64px 0 48px;
    }
}

/* Très petit mobile */
@media (max-width: 400px) {
    .grille {
        column-count: 1;
    }
}
.partenaires {
    padding: 0px 0 0 0;
    text-align: center;
    background-color: #FBEDD3;
    width: 100%;
}

.logos-partenaires {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 30px;
    width: 60%;
    margin: 0 auto 30px auto;
}

.logo-partenaire {
    max-height: 130px;
    max-width: 190px;
    width: auto;
    height: auto;
    object-fit: contain;
    flex: 0 1 auto;
    transition: transform 0.3s ease;
}

.logo-partenaire:hover {
    transform: scale(1.08);
}

.mention-soutien {
    font-size: 0.95rem;
    color: #333;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.5;
    padding-bottom: 60px;
}

@media (max-width: 768px) {
    .logos-partenaires {
        width: 90%;
        flex-wrap: wrap;
        gap: 20px;
    }
    .logo-partenaire {
        max-height: 100px;
        max-width: 150px;
    }
}