/* ─── Projets — archive + fiche — Nature & Bois ─────────────────────────────
   Même échelle typo que les pages intérieures.
────────────────────────────────────────────────────────────────────────────── */

/* ── Navigation projet — invisible par défaut, JS déclenche ──────────────── */

.nb-float-retour,
.nb-side-arrow {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s;
}

/* ── Retour aux projets ───────────────────────────────────────────────────── */

.nb-float-retour {
    position: fixed;
    top: 20vh;
    left: 1.5rem;
    z-index: 400;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #666;
    text-decoration: none;
    white-space: nowrap;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: transparent;
    transition: opacity 0.35s, background 0.2s, color 0.2s, box-shadow 0.2s;
}

.nb-float-retour:hover {
    color: #2d6a2d;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.10);
}

/* ── Flèches prev / next ─────────────────────────────────────────────────── */

.nb-side-arrow {
    position: fixed;
    top: 28vh;
    z-index: 400;
    display: inline-flex;
    align-items: center;
    gap: 0;
    text-decoration: none;
    color: #666;
    white-space: nowrap;
    border-radius: 999px;
    padding: 0.45rem 0.75rem;
    background: transparent;
    transition: opacity 0.35s, background 0.2s, color 0.2s, box-shadow 0.2s, padding 0.25s ease;
    overflow: hidden;
}

.nb-arrow-icon {
    font-size: 1rem;
    flex-shrink: 0;
    line-height: 1;
}

.nb-arrow-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-width 0.25s ease, opacity 0.2s, margin 0.25s ease;
}

/* Hover : fond blanc arrondi + texte apparaît */
.nb-side-arrow:hover {
    color: #1a1a1a;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.10);
}

.nb-side-arrow:hover .nb-arrow-label {
    max-width: 130px;
    opacity: 1;
}

/* Prev — label à droite de la flèche, ancré à gauche */
.nb-side-arrow--prev              { left: max(1rem, calc(50% - 490px)); }
.nb-side-arrow--prev .nb-arrow-label { margin-left: 0.5rem; }

/* Next — label à gauche de la flèche, ancré à droite */
.nb-side-arrow--next              { right: max(1rem, calc(50% - 490px)); }
.nb-side-arrow--next .nb-arrow-label { margin-right: 0.5rem; }

/* Tablet : réduire écart des flèches */
@media (max-width: 1100px) {
    .nb-side-arrow--prev { left: 0.75rem; }
    .nb-side-arrow--next { right: 0.75rem; }
    .nb-arrow-label      { display: none; } /* pas de texte sur tablet */
}

/* Mobile : cacher tout le nav fixe */
@media (max-width: 768px) {
    .nb-float-retour { display: none; }
    .nb-side-arrow   { display: none; }
}

/* ── Navigation mobile inline (bas de page) ──────────────────────────────── */

.nb-mobile-nav {
    display: none; /* caché desktop */
}

@media (max-width: 768px) {
    .nb-mobile-nav {
        display: flex;
        align-items: stretch;
        justify-content: space-between;
        gap: 0.5rem;
        border-top: 1px solid #e8e8e4;
        padding-top: 2rem;
        margin-top: 2rem;
    }

    .nb-mobile-nav-arrow {
        flex: 1;
        font-size: 0.72rem;
        font-weight: 600;
        color: #444;
        text-decoration: none;
        line-height: 1.4;
        padding: 0.75rem 0;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .nb-mobile-nav-arrow--next {
        text-align: right;
        justify-content: flex-end;
    }

    .nb-mobile-nav-arrow--disabled {
        flex: 1;
    }

    .nb-mobile-nav-retour {
        font-size: 0.65rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: #2d6a2d;
        text-decoration: none;
        padding: 0.75rem 1rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        white-space: nowrap;
    }
}

/* ── Archive ─────────────────────────────────────────────────────────────── */

.nb-archive-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 1.5rem 6rem;
}

.nb-archive-header {
    margin-bottom: 3rem;
}

.nb-archive-header h1 {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.05;
    color: #1a1a1a;
    margin: 0 0 0.5rem;
}

.nb-archive-header p {
    font-size: 1rem;
    color: #666;
    margin: 0;
}

/* ── Filtres — familles permanentes + panel avancé dépliable ─────────────── */

.nb-filtres-wrap { margin-bottom: 3rem; }

/* Barre familles — toujours visible */
.nb-filtres-familles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

/* Bouton "Filtres avancés" toggle */
.nb-filtres-avances-wrap { margin-bottom: 0.5rem; }

.nb-filtres-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 1.1rem;
    border: 1.5px solid #ccc;
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #555;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.nb-filtres-toggle[aria-expanded="true"],
.nb-filtres-toggle:hover {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #fff;
}

.nb-filtres-toggle-arrow {
    font-size: 0.85rem;
    transition: transform 0.2s;
}

/* Panel avancé — groupes milieu / technique / contrainte */
.nb-filtres-panel {
    padding: 1.25rem 0 0.75rem;
    border-top: 1px solid #eee;
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nb-filtres-panel[hidden] { display: none; }

.nb-filtres-groupe {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.nb-filtres-groupe-label {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #aaa;
    white-space: nowrap;
    padding-top: 0.45rem;
    min-width: 80px;
}

.nb-filtres-groupe-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

/* Tous les boutons filtre — même style */
.nb-filtre-btn {
    padding: 0.4rem 1rem;
    border: 1.5px solid #ccc;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #555;
    background: #fff;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    user-select: none;
    white-space: nowrap;
}

.nb-filtre-btn:hover,
.nb-filtre-btn.selected {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

/* Filtre actif — titre affiché au-dessus de la grille */
.nb-filtre-actif {
    font-size: clamp(1rem, 2.5vw, 1.9rem);
    font-weight: 800;
    color: #1a1a1a;
    margin-top: 1.5rem;
    min-height: 1.2em;
    letter-spacing: -0.01em;
    line-height: 1.1;
}

/* ── Grille cards ────────────────────────────────────────────────────────── */

.nb-grille {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

/* ── Card ────────────────────────────────────────────────────────────────── */

.nb-card {
    background: #fff;
    border: 1px solid #e8e8e4;
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.nb-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.nb-card.nb-hidden { display: none; }

.nb-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Image card */
.nb-card-image {
    position: relative;
    overflow: hidden;
}

.nb-card-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.nb-card:hover .nb-card-image img { transform: scale(1.04); }

/* Placeholder */
.nb-card-image--placeholder {
    height: 220px;
    background: linear-gradient(135deg, #c8d8c8 0%, #a8c4a8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nb-card-image--placeholder::after {
    content: 'IMAGE À VENIR';
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: rgba(255,255,255,0.7);
}

/* Corps card */
.nb-card-body {
    padding: 1.25rem 1.4rem 1.6rem;
}

.nb-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.6rem;
}

/* Double sélecteur pour battre le reset heading */
.nb-card-body .nb-card-titre {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: #1a1a1a;
    margin: 0 0 0.4rem;
}

.nb-card-body .nb-card-lieu {
    font-size: 0.8rem;
    color: #888;
    margin: 0 0 0.5rem;
    font-weight: 500;
}

.nb-card-body .nb-card-resume {
    font-size: 0.88rem;
    color: #555;
    margin: 0;
    line-height: 1.6;
}

/* Tags */
.nb-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #2d6a2d;
    background: rgba(45,106,45,0.08);
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    text-decoration: none;
}

.nb-tag--small { font-size: 0.65rem; padding: 0.15rem 0.5rem; }

/* ── Points forts ─────────────────────────────────────────────────────────── */

.nb-points-forts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.nb-pf-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #2d6a2d;
    background: rgba(45, 106, 45, 0.08);
    border: 1px solid rgba(45, 106, 45, 0.2);
    border-radius: 999px;
    padding: 0.3rem 0.9rem;
}

/* ── Contexte projet (milieux / techniques / contraintes) ─────────────────── */

.nb-projet-contexte {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2.5rem 0 3rem;
    padding: 2rem 0;
    border-top: 1px solid #e8e8e4;
    border-bottom: 1px solid #e8e8e4;
}

.nb-contexte-col {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.nb-contexte-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #aaa;
}

.nb-contexte-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.nb-ctx-pill {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    color: #333;
    background: transparent;
    border: 1px solid #ccc;
    border-radius: 999px;
    padding: 0.3rem 0.85rem;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    letter-spacing: 0.01em;
}

.nb-ctx-pill:hover {
    border-color: #2d6a2d;
    color: #2d6a2d;
    background: rgba(45, 106, 45, 0.05);
}

@media (max-width: 768px) {
    .nb-projet-contexte { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
}
@media (max-width: 480px) {
    .nb-projet-contexte { grid-template-columns: 1fr; gap: 1rem; }
}

/* ── Fiche projet ─────────────────────────────────────────────────────────── */

.nb-projet-hero {
    width: 100%;
    overflow: hidden;
}

.nb-projet-hero img {
    width: 100%;
    height: clamp(220px, 45vw, 520px);
    object-fit: cover;
    display: block;
}

.nb-projet-wrapper {
    max-width: 860px;
    margin: 0 auto;
    padding: 4rem 1.5rem 6rem;
}

.nb-projet-header {
    margin-bottom: 2.5rem;
}

.nb-projet-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.nb-projet-titre {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #1a1a1a;
    margin: 0 0 1rem;
}

.nb-projet-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.nb-meta-lieu {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

.nb-meta-acces {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fff;
    background: #2d6a2d;
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
}

.nb-projet-resume {
    border-left: 3px solid #2d6a2d;
    padding: 0.25rem 0 0.25rem 1.5rem;
    margin-bottom: 2.5rem;
}

.nb-projet-resume p {
    font-size: 1.1rem;
    color: #333;
    line-height: 1.75;
    margin: 0;
    font-style: italic;
}

.nb-projet-contenu {
    font-size: 1rem;
    color: #444;
    line-height: 1.8;
    margin-bottom: 3rem;
}

/* Galerie */
.nb-galerie {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
}

.nb-galerie-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    border-radius: 3px;
    transition: opacity 0.2s;
}

.nb-galerie-item { position: relative; display: block; }
.nb-galerie-item:hover img { opacity: 0.9; }

/* Badge "+X photos" sur la 6e image */
.nb-galerie-more {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.45);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    border-radius: 3px;
    pointer-events: none;
}

/* Footer fiche */
.nb-projet-footer {
    border-top: 1px solid #e8e8e4;
    padding-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.nb-projet-milieux,
.nb-projet-techniques {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.nb-meta-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #999;
}

.nb-retour {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #2d6a2d;
    text-decoration: none;
    border-bottom: 1px solid #2d6a2d;
    padding: 0.5rem 0 2px;
    align-self: flex-start;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

/* ── Ressources projet (vidéo + PDF) ─────────────────────────────────────── */

.nb-projet-ressources {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e5e5;
}

.nb-ressources-titre {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 1.5rem;
}

.nb-ressource-sous-titre {
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #2d6a2d;
    margin: 0 0 0.75rem;
}

.nb-video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 6px;
    background: #000;
    margin-bottom: 2rem;
}

.nb-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.nb-ressource-pdf { margin-top: 1.5rem; }

.nb-pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.7rem 1.2rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
    transition: background 0.15s;
}

.nb-pdf-btn:hover { background: #e8e8e8; }

.nb-pdf-filename {
    font-weight: 400;
    color: #666;
    font-size: 0.8rem;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .nb-projet-wrapper { padding: 2rem 1.25rem 3rem; }
    .nb-galerie-item img { height: 160px; }
}

@media (max-width: 640px) {
    .nb-grille              { grid-template-columns: 1fr; }
    .nb-galerie             { grid-template-columns: 1fr 1fr; }
    .nb-archive-wrapper     { padding: 2rem 1.25rem 4rem; }
    .nb-projet-wrapper      { padding: 1.5rem 1.25rem 3rem; }
    .nb-filtres             { gap: 0.4rem; }
    .nb-filtre-btn          { font-size: 0.72rem; padding: 0.4rem 0.9rem; }
    .nb-galerie-item img    { height: 130px; }
}
