/**
 * Warbirds Family - Custom Styles
 */

/* Raleway Font */
@font-face {
    font-family: 'Raleway';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/Raleway/raleway-v37-latin_latin-ext-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Raleway';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/Raleway/raleway-v37-latin_latin-ext-500.woff2') format('woff2');
}

@font-face {
    font-family: 'Raleway';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/Raleway/raleway-v37-latin_latin-ext-600.woff2') format('woff2');
}

@font-face {
    font-family: 'Raleway';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/Raleway/raleway-v37-latin_latin-ext-700.woff2') format('woff2');
}

/* Yellowtail Font (for logo) */
@font-face {
    font-family: 'Yellowtail';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/Yellowtail/Yellowtail_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: 'Yellowtail';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/Yellowtail/Yellowtail_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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Variables CSS */
:root {
    --wbf-primary: #2c3e50;
    --wbf-secondary: #34495e;
    --wbf-accent: #3498db;
    --wbf-success: #27ae60;
    --wbf-warning: #f39c12;
    --wbf-danger: #e74c3c;
    --wbf-light: #ecf0f1;
    --wbf-dark: #1a252f;
}

/* General */
body {
    font-family: 'Raleway', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 16px;
}

main {
    flex: 1;
}

/* Navigation */
.navbar {
    position: relative;
}

.container-navbar {
    width: 100%;
    max-width: 2500px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
}

.navbar-brand {
    font-weight: bold;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}
.navbar-nav.dropdown-menu {
    z-index: 999;
}

/* Center menu in navbar (desktop only) */
@media (min-width: 992px) {
    .navbar .navbar-collapse {
        flex: 1;
        display: flex !important;
        justify-content: center;
    }

    .navbar .navbar-center {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .navbar .navbar-nav:last-child {
        margin-left: auto;
    }
}

/* Search wrapper */
.search-wrapper {
    width: 280px;
}

/* Responsive adjustments for navbar */
@media (max-width: 991.98px) {
    .container-navbar {
        flex-wrap: wrap;
    }

    .navbar .navbar-collapse {
        flex-basis: 100%;
        order: 3;
    }

    .navbar .navbar-center {
        position: static;
        transform: none;
    }

    .navbar .navbar-nav:last-child {
        margin-left: 0;
    }

    .search-wrapper {
        width: 100%;
        margin: 0.5rem 0;
    }

    .navbar .navbar-nav {
        text-align: center;
    }

    .navbar-brand {
        flex-shrink: 1;
        min-width: 0;
    }

    /* Hamburger toujours à droite, sur la ligne du logo */
    .navbar-toggler {
        flex-shrink: 0;
        margin-left: auto;
    }

    /* Tailles du titre et du logo : voir après les règles du logo
       (déclarées ici, elles seraient écrasées par celles-ci) */
}

/* Active navigation links */
.navbar-nav .nav-link.active {
    color: #e67e22 !important;
    font-weight: 600;
    position: relative;
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background-color: #e67e22;
}

/* Footer links */
.footer-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-link.active {
    color: #e67e22;
    font-weight: 600;
}

.footer-link.active::before {
    content: '› ';
}

/* Logo WBF title */
.wbf-title {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.15rem;
    font-family: 'Yellowtail', cursive;
    font-size: 1.8rem;
    font-weight: 100;
    text-decoration: none;
    color: white;
    white-space: nowrap;
}
.Yellowtail {
    font-family: 'Yellowtail', cursive;
    display: inline-block;
}
.rougeWbf, span.obl {
    color: #cc2936;
}
.rougeWbf, span.obl {
    color: #cc2936;
}
.bgRougeWbf {
    background-color: #cc2936;
    color: #FFF !important;
}
li.bgRougeWbf:hover a,
li.bgRougeWbf:focus a{
    background-color: #c0392b !important;
}
h2:first-letter {
    font-size: 1.2em;
    line-height: 1em;
}
header div.wbf-title span:first-letter, h2:first-letter {
    font-size: 1.2em;
    color: #cc2936;
}
.wbf-title:hover {
    color: white;
    text-decoration: none;
}

.wbf-title > span {
    color: white;
    flex-shrink: 0;
}

.wbf-title > span::first-letter {
    font-size: 1.2em;
    color: #cc2936;
}

/* Logo container avec effet de roulage */
.logo-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* width: 55px; */
    width: 92px;
    height: 40px;
    flex-shrink: 0;
}

/* .logo-container .logo-principal,
.logo-container .logo-effet {
    position: absolute;
    height: 40px;
    width: auto;
    transform-origin: top center;
}
.logo-container .logo-effet {
    opacity: 0.3;
} */

h1, h2, h3 {
    font-weight: 400;
}

/* L'avion et son hélice bougent ensemble : figure jouée en JS (app.js)
   au survol du titre, menée jusqu'au bout même si la souris s'en va */
.logo-container .logo-plane {
    position: absolute;
    display: block;
    line-height: 0;
    transform-origin: 50% 56%;
}

.logo-container .logo-principal {
    height: 40px;
    width: auto;
}

/* Ombre au sol : elle ne tourne pas avec l'avion, elle se rétrécit et
   s'estompe quand il prend de l'altitude ou s'incline */
.logo-container .logo-effet {
    opacity: 0.3;
    position: absolute;
    height: auto;
    width: 100%;
    bottom: -13px;
}

/* Hélice : pales claires floutées (fond sombre de la barre de navigation),
   lancée au survol puis coupée en fondu */
.logo-container .logo-propeller {
    position: absolute;
    left: 50%;
    top: 55.7%;
    width: 31%;
    aspect-ratio: 1;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity .7s ease-out;
    -webkit-mask-image: radial-gradient(circle, transparent 0 26%, #000 36% 86%, transparent 100%);
    mask-image: radial-gradient(circle, transparent 0 26%, #000 36% 86%, transparent 100%);
}

.logo-container .logo-propeller::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(
        rgba(225, 232, 240, .6) 0deg, rgba(225, 232, 240, 0) 40deg,
        rgba(225, 232, 240, 0) 120deg, rgba(225, 232, 240, .6) 120deg, rgba(225, 232, 240, 0) 160deg,
        rgba(225, 232, 240, 0) 240deg, rgba(225, 232, 240, .6) 240deg, rgba(225, 232, 240, 0) 280deg,
        rgba(225, 232, 240, 0) 360deg
    );
    filter: blur(.8px);
    animation: logoPropSpin .14s linear infinite paused;
}

.logo-container.is-engine-on .logo-propeller {
    opacity: 1;
    transition-duration: .25s;
}

.logo-container.is-engine-on .logo-propeller::before,
.logo-container.is-engine-off .logo-propeller::before {
    animation-play-state: running;
}

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

/* Titre et logo réduits sur petit écran, pour que le hamburger tienne
   sur la même ligne (placé après les règles du logo pour les surcharger) */
@media (max-width: 991.98px) {
    .navbar-brand.wbf-title {
        font-size: 1.45rem;
        margin-right: .5rem;
    }

    .logo-container {
        width: 68px;
        height: 30px;
    }

    .logo-container .logo-principal {
        height: 30px;
    }

    .logo-container .logo-effet {
        bottom: -10px;
    }
}

@media (max-width: 380px) {
    .navbar-brand.wbf-title {
        font-size: 1.2rem;
    }

    .logo-container {
        width: 54px;
        height: 24px;
    }

    .logo-container .logo-principal {
        height: 24px;
    }

    .logo-container .logo-effet {
        bottom: -8px;
    }
}

/* Cards for fiches/creations */
.card-fiche {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card-fiche:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.card-fiche .card-img-top {
    object-fit: cover;
    /* height: 200px; */
    height: 260px;
}

/* Category badges */
.badge-air {
    background-color: #5db7de;
}

.badge-terre {
    background-color: #708d81;
}

.badge-mer {
    background-color: #16425b;
}

.badge-civil {
    background-color: #95a5a6;
}

/* Theme tags */
.theme-militaire {
    border-left: 4px solid #c0392b;
}

.theme-civil {
    border-left: 4px solid #27ae60;
}

/* Gallery grid - old style */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* ===== NEW FICHE GRID (like current site) ===== */
.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

/* Filter bar */
.filter-bar {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 1rem;
}

.filter-select {
    width: auto;
    min-width: 140px;
    font-size: 0.85rem;
}

/* Fiche grid - 4 columns */
.fiche-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

/* Fiche item */
.fiche-item {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 4px;
    background: #1a1a1a;
    box-shadow:
        0 2px 4px rgba(0,0,0,0.1),
        inset 0 0 0 3px rgba(255,255,255,0.1);
}

.fiche-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.fiche-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.3s ease;
}

.fiche-item:is(:hover, .is-hovered) img {
    transform: scale(1.08);
    filter: brightness(0.7);
}

/* Overlay info on hover */
.fiche-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
    color: white;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.fiche-item:is(:hover, .is-hovered) .fiche-overlay {
    transform: translateY(0);
}

.fiche-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fiche-category {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
    background: rgba(255,255,255,0.2);
    padding: 0.15rem 0.4rem;
    border-radius: 2px;
    margin-right: 0.5rem;
}

.fiche-author {
    display: block;
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 0.25rem;
}

/* No image placeholder */
.fiche-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: rgba(255,255,255,0.4);
    font-size: 0.85rem;
}

/* Frame effect on hover */
.fiche-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 3px solid transparent;
    border-radius: 4px;
    transition: border-color 0.3s ease;
    z-index: 2;
    pointer-events: none;
}

.fiche-item:is(:hover, .is-hovered)::before {
    border-color: rgba(52, 152, 219, 0.6);
}

/* Responsive : 4 colonnes jusqu'à la tablette, 3 puis 2 sur téléphone */
@media (max-width: 768px) {
    .fiche-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    .filter-bar-main {
        flex-wrap: wrap;
    }

    .filter-select {
        min-width: 120px;
    }
}

@media (max-width: 576px) {
    .fiche-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {

    .gallery-container {
        padding: 0.5rem 1rem;
    }
}

/* Hangar section */
.hangar-header {
    background: linear-gradient(135deg, var(--wbf-primary), var(--wbf-secondary));
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

/* Shooting stars effect on headers */
.members-header,
.member-header,
.hangar-header,
.model-shows-header {
    position: relative;
    overflow: hidden;
}

.shooting-star {
    position: absolute;
    height: 2px;
    border-radius: 0 2px 2px 0;
    background: linear-gradient(to right, transparent 0%, rgba(255,255,255,0.1) 20%, rgba(255,255,255,0.6) 60%, rgba(255,255,255,0.95) 100%);
    filter: drop-shadow(0 0 3px rgba(255,255,255,0.4));
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    animation: shootingStar var(--star-duration, 0.8s) ease-out forwards;
    transform: rotate(var(--star-angle, 140deg));
}

.shooting-star::after {
    content: '';
    position: absolute;
    right: -2px;
    top: -2px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 0 6px 2px rgba(255,255,255,0.5);
}

@keyframes shootingStar {
    0% {
        opacity: 0;
        transform: rotate(var(--star-angle, 140deg)) translateX(0);
    }
    8% {
        opacity: 1;
    }
    70% {
        opacity: 0.8;
    }
    100% {
        opacity: 0;
        transform: rotate(var(--star-angle, 140deg)) translateX(var(--star-distance, 250px));
    }
}

/* Image gallery */
.fiche-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.5rem;
}

.fiche-gallery img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.fiche-gallery img:hover {
    opacity: 0.8;
}

/* Filters sidebar */
.filters-sidebar {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

.filters-sidebar .form-label {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #6c757d;
}

/* Pagination */
.pagination {
    justify-content: center;
}

@media (min-width: 1400px) {
    .container-medium  {
        max-width: 1000px;
    }
}

/* Footer */
footer {
    border-top: 2px solid #e67e22;
}
footer a {
    text-decoration: none;
}
footer .container {
    max-width: 1800px;
}

footer a:hover {
    text-decoration: underline;
}

/* Hero Slider */
#heroCarousel {
    /* max-height: 400px; */
    max-height: 500px;
    overflow: hidden;
    box-shadow: 0px 2px 10px rgba(33,33,33,0.75) ;
}

#heroCarousel .carousel-item {
    /* height: 400px; */
    height: 500px;
}

/* Effet « Ken Burns » : très léger zoom progressif sur le slide actif */
#heroCarousel .carousel-item img {
    transform: scale(1);
    transform-origin: center center;
    will-change: transform;
}

#heroCarousel .carousel-item.active img {
    animation: heroKenBurns 6s ease-out forwards;
}

@keyframes heroKenBurns {
    from { transform: scale(1); }
    to   { transform: scale(1.06); }
}

@media (prefers-reduced-motion: reduce) {
    #heroCarousel .carousel-item.active img {
        animation: none;
    }
}

.slider-image-wrapper {
    position: relative;
    height: 100%;
}

.slider-image-wrapper img {
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.slider-overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.3) 0%, transparent 30%);
    pointer-events: auto; /* Capture les événements pour empêcher le drag */
    cursor: default;
    user-select: none;
    -webkit-user-drag: none;
}

.slider-image-wrapper img {
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none; /* Empêche le drag direct sur l'image */
}

#heroCarousel .carousel-control-prev,
#heroCarousel .carousel-control-next {
    width: 60px;
    opacity: 0.5;
    transition: opacity 0.2s;
}

#heroCarousel .carousel-control-prev:hover,
#heroCarousel .carousel-control-next:hover {
    opacity: 0.9;
}

#heroCarousel .carousel-indicators {
    margin-bottom: 1rem;
}

#heroCarousel .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 4px;
    opacity: 0.5;
}

#heroCarousel .carousel-indicators button.active {
    opacity: 1;
}

/* Hero Section with slider */
.hero-section {
    position: relative;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 10;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.hero-content p {
    font-size: 1.25rem;
}

/* Nation chevrons on fiche hover */
.link-chevrons {
    position: absolute;
    bottom: 8px;
    right: 8px;
    display: flex;
    gap: 2px;
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 5;
    pointer-events: none;
}

.fiche-item:is(:hover, .is-hovered) .link-chevrons {
    opacity: 1;
    transform: translateX(0);
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.4));
}

.link-chevrons .chevron {
    width: 8px;
    height: 24px;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
    transform: scale(0.5);
    opacity: 0.3;
}

.fiche-item:is(:hover, .is-hovered) .link-chevrons .chevron {
    animation: chevron-wave 1.6s ease-in-out infinite;
}

.fiche-item:is(:hover, .is-hovered) .link-chevrons .chevron:nth-child(1) { animation-delay: 0s; }
.fiche-item:is(:hover, .is-hovered) .link-chevrons .chevron:nth-child(2) { animation-delay: 0.2s; }
.fiche-item:is(:hover, .is-hovered) .link-chevrons .chevron:nth-child(3) { animation-delay: 0.4s; }

@keyframes chevron-wave {
    0%, 100% { transform: scale(0.5); opacity: 0.3; }
    20% { transform: scale(1.2); opacity: 1; }
    40% { transform: scale(0.5); opacity: 0.3; }
}

/* Chevrons pour les cartes Bootstrap (.card-fiche) - configuration additionnelle */
.card-fiche .card-img-wrapper {
    position: relative;
    display: block;
    /* contient le zoom de l'image tout en gardant les coins arrondis du haut */
    overflow: hidden;
    border-top-left-radius: var(--bs-card-inner-border-radius, 0.375rem);
    border-top-right-radius: var(--bs-card-inner-border-radius, 0.375rem);
}

/* Léger effet de zoom sur les images de la galerie au survol */
.card-fiche .card-img-top {
    transition: transform 0.4s ease;
}

.card-fiche:hover .card-img-top {
    transform: scale(1.06);
}

/* Étoile « vedette » discrète sur les fiches isFeatured */
.fiche-featured-star {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    color: #f1c40f;
    font-size: 0.8rem;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    z-index: 4;
    /* pointer-events réactivé pour permettre le survol (infobulle) */
    pointer-events: auto;
    cursor: help;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.fiche-featured-star:hover {
    transform: scale(1.12);
    background: rgba(0, 0, 0, 0.6);
    color: #ffd633;
}

/* Infobulle expliquant l'étoile (texte repris de l'aria-label) */
.fiche-featured-star::after {
    content: attr(aria-label);
    position: absolute;
    top: 50%;
    left: calc(100% + 8px);
    transform: translateY(-50%) translateX(-4px);
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 6;
}

.fiche-featured-star:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.card-fiche .link-chevrons {
    position: absolute;
    bottom: 8px;
    right: 8px;
    display: flex;
    gap: 2px;
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 5;
    pointer-events: none;
}

.card-fiche:hover .link-chevrons {
    opacity: 1;
    transform: translateX(0);
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.4));
}

.card-fiche .link-chevrons .chevron {
    width: 8px;
    height: 24px;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
    transform: scale(0.5);
    opacity: 0.3;
}

.card-fiche:hover .link-chevrons .chevron {
    animation: chevron-wave 1.6s ease-in-out infinite;
}

.card-fiche:hover .link-chevrons .chevron:nth-child(1) { animation-delay: 0s; }
.card-fiche:hover .link-chevrons .chevron:nth-child(2) { animation-delay: 0.2s; }
.card-fiche:hover .link-chevrons .chevron:nth-child(3) { animation-delay: 0.4s; }

/* ==========================================================================
   COULEURS DES CHEVRONS PAR NATION
   Utilise :is() pour éviter la duplication entre .fiche-item, .card-fiche et .honor-card
   ========================================================================== */

/* France - Bleu, Blanc, Rouge */
:is(.fiche-item, .card-fiche, .honor-card).nation-france .chevron.first { background-color: var(--nation-france-1); }
:is(.fiche-item, .card-fiche, .honor-card).nation-france .chevron.second { background-color: var(--nation-france-2); }
:is(.fiche-item, .card-fiche, .honor-card).nation-france .chevron.third { background-color: var(--nation-france-3); }

/* Angleterre - Rouge, Blanc, Bleu */
:is(.fiche-item, .card-fiche, .honor-card).nation-angleterre .chevron.first { background-color: var(--nation-angleterre-1); }
:is(.fiche-item, .card-fiche, .honor-card).nation-angleterre .chevron.second { background-color: var(--nation-angleterre-2); }
:is(.fiche-item, .card-fiche, .honor-card).nation-angleterre .chevron.third { background-color: var(--nation-angleterre-3); }

/* Allemagne - Noir, Rouge, Or */
:is(.fiche-item, .card-fiche, .honor-card).nation-allemagne .chevron.first { background-color: var(--nation-allemagne-1); }
:is(.fiche-item, .card-fiche, .honor-card).nation-allemagne .chevron.second { background-color: var(--nation-allemagne-2); }
:is(.fiche-item, .card-fiche, .honor-card).nation-allemagne .chevron.third { background-color: var(--nation-allemagne-3); }

/* Italie - Vert, Blanc, Rouge */
:is(.fiche-item, .card-fiche, .honor-card).nation-italie .chevron.first { background-color: var(--nation-italie-1); }
:is(.fiche-item, .card-fiche, .honor-card).nation-italie .chevron.second { background-color: var(--nation-italie-2); }
:is(.fiche-item, .card-fiche, .honor-card).nation-italie .chevron.third { background-color: var(--nation-italie-3); }

/* Russie - Blanc, Bleu, Rouge */
:is(.fiche-item, .card-fiche, .honor-card).nation-russie .chevron.first { background-color: var(--nation-russie-1); }
:is(.fiche-item, .card-fiche, .honor-card).nation-russie .chevron.second { background-color: var(--nation-russie-2); }
:is(.fiche-item, .card-fiche, .honor-card).nation-russie .chevron.third { background-color: var(--nation-russie-3); }

/* États-Unis - Rouge, Blanc, Bleu */
:is(.fiche-item, .card-fiche, .honor-card).nation-etats-unis .chevron.first { background-color: var(--nation-etats-unis-1); }
:is(.fiche-item, .card-fiche, .honor-card).nation-etats-unis .chevron.second { background-color: var(--nation-etats-unis-2); }
:is(.fiche-item, .card-fiche, .honor-card).nation-etats-unis .chevron.third { background-color: var(--nation-etats-unis-3); }

/* Japon - Blanc, Rouge, Blanc */
:is(.fiche-item, .card-fiche, .honor-card).nation-japon .chevron.first { background-color: var(--nation-japon-1); }
:is(.fiche-item, .card-fiche, .honor-card).nation-japon .chevron.second { background-color: var(--nation-japon-2); }
:is(.fiche-item, .card-fiche, .honor-card).nation-japon .chevron.third { background-color: var(--nation-japon-3); }

/* Finlande - Blanc, Bleu, Blanc */
:is(.fiche-item, .card-fiche, .honor-card).nation-finlande .chevron.first { background-color: var(--nation-finlande-1); }
:is(.fiche-item, .card-fiche, .honor-card).nation-finlande .chevron.second { background-color: var(--nation-finlande-2); }
:is(.fiche-item, .card-fiche, .honor-card).nation-finlande .chevron.third { background-color: var(--nation-finlande-3); }

/* Espagne - Rouge, Jaune, Rouge */
:is(.fiche-item, .card-fiche, .honor-card).nation-espagne .chevron.first { background-color: var(--nation-espagne-1); }
:is(.fiche-item, .card-fiche, .honor-card).nation-espagne .chevron.second { background-color: var(--nation-espagne-2); }
:is(.fiche-item, .card-fiche, .honor-card).nation-espagne .chevron.third { background-color: var(--nation-espagne-3); }

/* Canada - Rouge, Blanc, Rouge */
:is(.fiche-item, .card-fiche, .honor-card).nation-canada .chevron.first { background-color: var(--nation-canada-1); }
:is(.fiche-item, .card-fiche, .honor-card).nation-canada .chevron.second { background-color: var(--nation-canada-2); }
:is(.fiche-item, .card-fiche, .honor-card).nation-canada .chevron.third { background-color: var(--nation-canada-3); }

/* Pologne - Blanc, Rouge, Blanc */
:is(.fiche-item, .card-fiche, .honor-card).nation-pologne .chevron.first { background-color: var(--nation-pologne-1); }
:is(.fiche-item, .card-fiche, .honor-card).nation-pologne .chevron.second { background-color: var(--nation-pologne-2); }
:is(.fiche-item, .card-fiche, .honor-card).nation-pologne .chevron.third { background-color: var(--nation-pologne-3); }

/* Australie - Bleu, Blanc, Rouge */
:is(.fiche-item, .card-fiche, .honor-card).nation-australie .chevron.first { background-color: var(--nation-australie-1); }
:is(.fiche-item, .card-fiche, .honor-card).nation-australie .chevron.second { background-color: var(--nation-australie-2); }
:is(.fiche-item, .card-fiche, .honor-card).nation-australie .chevron.third { background-color: var(--nation-australie-3); }

/* Autriche - Rouge, Blanc, Rouge */
:is(.fiche-item, .card-fiche, .honor-card).nation-autriche .chevron.first { background-color: var(--nation-autriche-1); }
:is(.fiche-item, .card-fiche, .honor-card).nation-autriche .chevron.second { background-color: var(--nation-autriche-2); }
:is(.fiche-item, .card-fiche, .honor-card).nation-autriche .chevron.third { background-color: var(--nation-autriche-3); }

/* Nouvelle-Zélande - Bleu, Blanc, Rouge */
:is(.fiche-item, .card-fiche, .honor-card).nation-nouvelle-zelande .chevron.first { background-color: var(--nation-nouvelle-zelande-1); }
:is(.fiche-item, .card-fiche, .honor-card).nation-nouvelle-zelande .chevron.second { background-color: var(--nation-nouvelle-zelande-2); }
:is(.fiche-item, .card-fiche, .honor-card).nation-nouvelle-zelande .chevron.third { background-color: var(--nation-nouvelle-zelande-3); }

/* Chine - Rouge, Jaune, Rouge */
:is(.fiche-item, .card-fiche, .honor-card).nation-chine .chevron.first { background-color: var(--nation-chine-1); }
:is(.fiche-item, .card-fiche, .honor-card).nation-chine .chevron.second { background-color: var(--nation-chine-2); }
:is(.fiche-item, .card-fiche, .honor-card).nation-chine .chevron.third { background-color: var(--nation-chine-3); }

/* Tchécoslovaquie - Bleu, Blanc, Rouge */
:is(.fiche-item, .card-fiche, .honor-card).nation-tchecoslovaquie .chevron.first { background-color: var(--nation-tchecoslovaquie-1); }
:is(.fiche-item, .card-fiche, .honor-card).nation-tchecoslovaquie .chevron.second { background-color: var(--nation-tchecoslovaquie-2); }
:is(.fiche-item, .card-fiche, .honor-card).nation-tchecoslovaquie .chevron.third { background-color: var(--nation-tchecoslovaquie-3); }

/* Israël - Bleu, Blanc, Bleu */
:is(.fiche-item, .card-fiche, .honor-card).nation-israel .chevron.first { background-color: var(--nation-israel-1); }
:is(.fiche-item, .card-fiche, .honor-card).nation-israel .chevron.second { background-color: var(--nation-israel-2); }
:is(.fiche-item, .card-fiche, .honor-card).nation-israel .chevron.third { background-color: var(--nation-israel-3); }

/* Hongrie - Rouge, Blanc, Vert */
:is(.fiche-item, .card-fiche, .honor-card).nation-hongrie .chevron.first { background-color: var(--nation-hongrie-1); }
:is(.fiche-item, .card-fiche, .honor-card).nation-hongrie .chevron.second { background-color: var(--nation-hongrie-2); }
:is(.fiche-item, .card-fiche, .honor-card).nation-hongrie .chevron.third { background-color: var(--nation-hongrie-3); }

/* Password toggle button */
.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 0.25rem;
    z-index: 5;
}

.password-toggle:hover {
    color: #495057;
}

.password-field-wrapper {
    position: relative;
}

.password-field-wrapper input {
    padding-right: 40px;
}

/* Rate limiter countdown */
.rate-limit-countdown {
    text-align: center;
    padding: 1rem;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.rate-limit-countdown .countdown-number {
    font-size: 2rem;
    font-weight: bold;
    color: #856404;
}

/* Captcha styles */
.captcha-container {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.captcha-question {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #495057;
}

.captcha-icons {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.captcha-icon {
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.captcha-icon:hover {
    background-color: #e9ecef;
    transform: scale(1.1);
}

.captcha-icon.selected {
    border-color: #0d6efd;
    background-color: #e7f1ff;
}

/* Select2 custom styles */
.select2-container--bootstrap-5 .select2-selection {
    font-size: 0.85rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

    .card-fiche .card-img-top {
        height: 180px;
    }

    #heroCarousel,
    #heroCarousel .carousel-item {
        height: 250px;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 1rem;
    }
}

/* ==========================================================================
   COULEURS DES NATIONS
   Classes basées sur le slug des nations pour les effets visuels sur les fiches
   ========================================================================== */

/* Variables de couleurs par nation (couleurs des drapeaux) */
:root {
    /* France - Bleu, Blanc, Rouge */
    --nation-france-1: rgb(12, 28, 140);
    --nation-france-2: #FFFFFF;
    --nation-france-3: rgb(239, 43, 45);

    /* Angleterre - Rouge, Blanc, Bleu (Union Jack) */
    --nation-angleterre-1: rgb(208, 12, 39);
    --nation-angleterre-2: #FFFFFF;
    --nation-angleterre-3: rgb(0, 31, 126);

    /* Allemagne - Noir, Rouge, Or */
    --nation-allemagne-1: #000000;
    --nation-allemagne-2: rgb(220, 0, 0);
    --nation-allemagne-3: rgb(254, 206, 0);

    /* Italie - Vert, Blanc, Rouge */
    --nation-italie-1: rgb(0, 146, 70);
    --nation-italie-2: #FFFFFF;
    --nation-italie-3: rgb(206, 43, 55);

    /* Russie - Blanc, Bleu, Rouge */
    --nation-russie-1: #FFFFFF;
    --nation-russie-2: rgb(0, 55, 167);
    --nation-russie-3: rgb(214, 39, 24);

    /* États-Unis - Rouge, Blanc, Bleu */
    --nation-etats-unis-1: rgb(208, 12, 39);
    --nation-etats-unis-2: #FFFFFF;
    --nation-etats-unis-3: rgb(0, 31, 126);

    /* Japon - Blanc, Rouge, Blanc */
    --nation-japon-1: #FFFFFF;
    --nation-japon-2: rgb(188, 0, 45);
    --nation-japon-3: #FFFFFF;

    /* Finlande - Blanc, Bleu, Blanc */
    --nation-finlande-1: #FFFFFF;
    --nation-finlande-2: rgb(0, 53, 128);
    --nation-finlande-3: #FFFFFF;

    /* Espagne - Rouge, Jaune, Rouge */
    --nation-espagne-1: rgb(171, 26, 28);
    --nation-espagne-2: rgb(253, 213, 51);
    --nation-espagne-3: rgb(171, 26, 28);

    /* Canada - Rouge, Blanc, Rouge */
    --nation-canada-1: rgb(255, 0, 0);
    --nation-canada-2: #FFFFFF;
    --nation-canada-3: rgb(255, 0, 0);

    /* Pologne - Blanc, Rouge, Blanc */
    --nation-pologne-1: #FFFFFF;
    --nation-pologne-2: rgb(220, 20, 60);
    --nation-pologne-3: #FFFFFF;

    /* Australie - Bleu, Blanc, Rouge */
    --nation-australie-1: rgb(0, 0, 139);
    --nation-australie-2: #FFFFFF;
    --nation-australie-3: rgb(255, 0, 0);

    /* Autriche - Rouge, Blanc, Rouge */
    --nation-autriche-1: rgb(237, 41, 57);
    --nation-autriche-2: #FFFFFF;
    --nation-autriche-3: rgb(237, 41, 57);

    /* Nouvelle-Zélande - Bleu, Blanc, Rouge */
    --nation-nouvelle-zelande-1: rgb(0, 36, 125);
    --nation-nouvelle-zelande-2: #FFFFFF;
    --nation-nouvelle-zelande-3: rgb(200, 16, 46);

    /* Chine - Rouge, Jaune, Rouge */
    --nation-chine-1: rgb(222, 41, 16);
    --nation-chine-2: rgb(255, 222, 0);
    --nation-chine-3: rgb(222, 41, 16);

    /* Tchécoslovaquie - Bleu, Blanc, Rouge */
    --nation-tchecoslovaquie-1: rgb(17, 69, 126);
    --nation-tchecoslovaquie-2: #FFFFFF;
    --nation-tchecoslovaquie-3: rgb(215, 20, 26);

    /* Israël - Bleu, Blanc, Bleu */
    --nation-israel-1: rgb(0, 56, 184);
    --nation-israel-2: #FFFFFF;
    --nation-israel-3: rgb(0, 56, 184);

    /* Hongrie - Rouge, Blanc, Vert */
    --nation-hongrie-1: rgb(205, 42, 62);
    --nation-hongrie-2: #FFFFFF;
    --nation-hongrie-3: rgb(67, 111, 77);
}

/* Bordure colorée au survol des cartes de fiches par nation */
.card-fiche {
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.4s ease;
    /* border: 2px solid transparent; */
    border: 1px solid transparent;
}

.card-fiche.nation-france:hover {
    border-color: var(--nation-france-1);
    box-shadow: 0 4px 15px rgba(12, 28, 140, 0.3);
}

.card-fiche.nation-angleterre:hover {
    border-color: var(--nation-angleterre-3);
    box-shadow: 0 4px 15px rgba(0, 31, 126, 0.3);
}

.card-fiche.nation-allemagne:hover {
    border-color: var(--nation-allemagne-2);
    box-shadow: 0 4px 15px rgba(220, 0, 0, 0.3);
}

.card-fiche.nation-italie:hover {
    border-color: var(--nation-italie-1);
    box-shadow: 0 4px 15px rgba(0, 146, 70, 0.3);
}

.card-fiche.nation-russie:hover {
    border-color: var(--nation-russie-2);
    box-shadow: 0 4px 15px rgba(0, 55, 167, 0.3);
}

.card-fiche.nation-etats-unis:hover {
    border-color: var(--nation-etats-unis-3);
    box-shadow: 0 4px 15px rgba(0, 31, 126, 0.3);
}

.card-fiche.nation-japon:hover {
    border-color: var(--nation-japon-2);
    box-shadow: 0 4px 15px rgba(188, 0, 45, 0.3);
}

.card-fiche.nation-finlande:hover {
    border-color: var(--nation-finlande-2);
    box-shadow: 0 4px 15px rgba(0, 53, 128, 0.3);
}

.card-fiche.nation-espagne:hover {
    border-color: var(--nation-espagne-2);
    box-shadow: 0 4px 15px rgba(253, 213, 51, 0.4);
}

.card-fiche.nation-canada:hover {
    border-color: var(--nation-canada-1);
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

.card-fiche.nation-pologne:hover {
    border-color: var(--nation-pologne-2);
    box-shadow: 0 4px 15px rgba(220, 20, 60, 0.3);
}

.card-fiche.nation-australie:hover {
    border-color: var(--nation-australie-1);
    box-shadow: 0 4px 15px rgba(0, 0, 139, 0.3);
}

.card-fiche.nation-autriche:hover {
    border-color: var(--nation-autriche-1);
    box-shadow: 0 4px 15px rgba(237, 41, 57, 0.3);
}

.card-fiche.nation-nouvelle-zelande:hover {
    border-color: var(--nation-nouvelle-zelande-1);
    box-shadow: 0 4px 15px rgba(0, 36, 125, 0.3);
}

.card-fiche.nation-chine:hover {
    border-color: var(--nation-chine-1);
    box-shadow: 0 4px 15px rgba(222, 41, 16, 0.3);
}

.card-fiche.nation-tchecoslovaquie:hover {
    border-color: var(--nation-tchecoslovaquie-1);
    box-shadow: 0 4px 15px rgba(17, 69, 126, 0.3);
}

.card-fiche.nation-israel:hover {
    border-color: var(--nation-israel-1);
    box-shadow: 0 4px 15px rgba(0, 56, 184, 0.3);
}

.card-fiche.nation-hongrie:hover {
    border-color: var(--nation-hongrie-1);
    box-shadow: 0 4px 15px rgba(205, 42, 62, 0.3);
}

/* ==========================================================================
   BOUTONS PERSONNALISÉS WARBIRDS FAMILY
   ========================================================================== */

/* Couleurs principales */
:root {
    --wbf-btn-primary: rgba(4, 67, 137, 1);
    --wbf-btn-primary-dark: #011a33;
    --wbf-btn-primary-hover: #032d5a;
}

/* Bouton Primary avec gradient et hélice animée */
.btn-primary {
    position: relative;
    background: linear-gradient(135deg, var(--wbf-btn-primary) 0%, var(--wbf-btn-primary-dark) 100%);
    border: none;
    border-radius: 6px;
    overflow: visible;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(4, 67, 137, 0.3);
    padding-left: 2.2rem;
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, var(--wbf-btn-primary-hover) 0%, var(--wbf-btn-primary-dark) 100%);
    box-shadow: 0 4px 15px rgba(4, 67, 137, 0.5);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 1px 4px rgba(4, 67, 137, 0.3);
}

/* Icône hélice 3 pales - toujours visible, centrée verticalement */
.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 8px;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='10' fill='%23fff'/%3E%3Cellipse cx='50' cy='20' rx='12' ry='28' fill='%23fff'/%3E%3Cellipse cx='76' cy='65' rx='12' ry='28' transform='rotate(120 76 65)' fill='%23fff'/%3E%3Cellipse cx='24' cy='65' rx='12' ry='28' transform='rotate(-120 24 65)' fill='%23fff'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.9;
    transform-origin: center center;
    /* Animation de décélération au mouseleave */
    animation: propeller-decelerate 0.85s ease-out forwards;
}

/* Animation au survol - accélération puis rotation continue */
.btn-primary:hover::before,
.btn-primary:focus::before {
    opacity: 1;
    animation:
        propeller-accelerate 1s ease-in forwards,
        propeller-spin 0.15s linear 1s infinite;
}

/* Animation à l'active (explosion/dislocation) */
.btn-primary:active::before {
    animation: propeller-explode 0.4s ease-out forwards !important;
}

/* Accélération progressive de l'hélice (phase de démarrage) */
@keyframes propeller-accelerate {
    0% {
        transform: translateY(-50%) rotate(0deg);
    }
    20% {
        transform: translateY(-50%) rotate(45deg);
    }
    40% {
        transform: translateY(-50%) rotate(150deg);
    }
    60% {
        transform: translateY(-50%) rotate(320deg);
    }
    80% {
        transform: translateY(-50%) rotate(580deg);
    }
    100% {
        transform: translateY(-50%) rotate(900deg);
    }
}

/* Rotation continue à vitesse maximale */
@keyframes propeller-spin {
    from { transform: translateY(-50%) rotate(0deg); }
    to { transform: translateY(-50%) rotate(360deg); }
}

/* Décélération progressive au mouseleave */
@keyframes propeller-decelerate {
    0% {
        transform: translateY(-50%) rotate(0deg);
    }
    20% {
        transform: translateY(-50%) rotate(200deg);
    }
    40% {
        transform: translateY(-50%) rotate(340deg);
    }
    60% {
        transform: translateY(-50%) rotate(430deg);
    }
    80% {
        transform: translateY(-50%) rotate(485deg);
    }
    100% {
        transform: translateY(-50%) rotate(510deg);
    }
}

/* Explosion / Dislocation de l'hélice au clic */
@keyframes propeller-explode {
    0% {
        transform: translateY(-50%) rotate(0deg) scale(1);
        opacity: 1;
        filter: blur(0);
    }
    15% {
        transform: translateY(-50%) rotate(90deg) scale(1.3);
        opacity: 1;
        filter: blur(0);
    }
    30% {
        transform: translateY(-50%) rotate(180deg) scale(1.6);
        opacity: 0.9;
        filter: blur(1px);
    }
    50% {
        transform: translateY(-50%) rotate(360deg) scale(2.2);
        opacity: 0.7;
        filter: blur(2px);
    }
    70% {
        transform: translateY(-50%) rotate(540deg) scale(2.8) skewX(15deg);
        opacity: 0.4;
        filter: blur(4px);
    }
    85% {
        transform: translateY(-50%) rotate(720deg) scale(3.5) skewX(-20deg) skewY(10deg);
        opacity: 0.2;
        filter: blur(6px);
    }
    100% {
        transform: translateY(-50%) rotate(900deg) scale(0) skewX(45deg) skewY(-45deg);
        opacity: 0;
        filter: blur(10px);
    }
}

/* Variantes de taille */
.btn-primary.btn-sm {
    padding-left: 1.8rem;
}

.btn-primary.btn-sm::before {
    width: 12px;
    height: 12px;
    top: 50%;
    left: 6px;
    transform: translateY(-50%);
}

.btn-primary.btn-lg {
    padding-left: 2.8rem;
}

.btn-primary.btn-lg::before {
    width: 20px;
    height: 20px;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
}

/* Bouton outline-primary assorti */
.btn-outline-primary {
    color: var(--wbf-btn-primary);
    border-color: var(--wbf-btn-primary);
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: var(--wbf-btn-primary);
    border-color: var(--wbf-btn-primary);
    color: white;
}

/* ==========================================================================
   EFFET SHIMMER / REFLET SUR LES FICHE-ITEM
   ========================================================================== */

/* Effet shimmer au survol */
.fiche-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.25),
        transparent
    );
    z-index: 3;
    pointer-events: none;
}

.fiche-item:is(:hover, .is-hovered)::after {
    animation: shimmer-slide 0.6s ease-in-out forwards;
}

/* Effet shimmer aléatoire (déclenché par JS) */
.fiche-item.shimmer-random::after {
    animation: shimmer-slide 0.8s ease-in-out forwards;
}

@keyframes shimmer-slide {
    0% { left: -100%; }
    100% { left: 200%; }
}

/* ==========================================================================
   LIENS ACTIFS DANS LE FOOTER
   ========================================================================== */

/* Les styles .footer-link.active existent déjà (lignes 161-168) */
/* On ajoute une variante pour les liens du footer correspondant à la route actuelle */

footer .footer-link {
    position: relative;
    display: inline-block;
}

footer .footer-link.active {
    color: #e67e22;
    font-weight: 600;
}

footer .footer-link.active::before {
    content: '> ';
    color: #e67e22;
}

footer .footer-link.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    right: 0;
    height: 1.5px;
    background-color: #e67e22;
}

/* ==========================================================================
   HOME BOXES - Blocs de la page d'accueil
   ========================================================================== */

.home-box {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 2px solid transparent;
}

.home-box:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    z-index: 999;
    border-color: black;
}

/* Effet shimmer sur les home-boxes au survol */
.home-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.15),
        transparent
    );
    z-index: 2;
    pointer-events: none;
}

.home-box:hover::after {
    left: 200%;
    transition: left 0.5s ease-in-out;
}

#homeBoxesContainer .home-boxes {
    display: grid; 
    grid-template-columns: 
    repeat(3, 1fr); 
    /* gap: 1rem; */
    gap: .5rem;
}

/* Home recent creations grid */
.home-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
}

/* Responsive home-boxes + home-grid */
@media (max-width: 1200px) {
    .home-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .home-boxes {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .home-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .home-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .home-boxes {
        grid-template-columns: 1fr !important;
    }
    .home-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

body {
    overflow-x: hidden;
}

body {
    /* Couche semi-transparente blanche par-dessus le pattern pour améliorer la lisibilité */
    background:
        linear-gradient(rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.35)),
        /* url('/assets/images/patterns/seamless-abstract-squares-1042-hachures-douces.png') repeat 0 0; */
        /* url('/assets/images/patterns/wbf-fond-alveoles.png') repeat 0 0; */
        url('/assets/images/patterns/wbf-fond-alveoles-hachures-fines.png') repeat 0 0;
        /* url('/assets/images/patterns/wbf-fond-saint-chamond-arrondi-moyen.png') repeat 0 0; */
        /* url('/assets/images/patterns/wbf-fond-saint-chamond-arrondi-moyen-petites-taches.png') repeat 0 0; */
        /* url('/assets/images/patterns/wbf-fond-saint-chamond-arrondi-soutenu.png') repeat 0 0; */
        /* url('/assets/images/patterns/wbf-fond-camouflage-numerique.png') repeat 0 0; */
}
#lastCreations {
    /* background: url('/assets/images/patterns/wbf-fond-alveoles-hachures-fines.png') repeat 0 0; */
    background: 
        linear-gradient(rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.35)),
        url('/assets/images/patterns/wbf-fond-saint-chamond-arrondi-moyen-petites-taches.png') repeat 0 0;
}
#homeBoxesContainer {
    background: linear-gradient(180deg, #1a252f 0%, #2c3e50 50%, #1a252f 100%);
}
/* Liseré du menu principal : orange sur le site public, autre couleur dans
   les zones protégées (classe posée par base.html.twig selon access_control) */
#mainNav {
    --main-nav-accent: #e67e22;
    border-bottom: 2px solid var(--main-nav-accent);
}

#mainNav.main-nav--member {
    --main-nav-accent: #6f93b5; /* bleu horizon (favicon) : espace membre */
}

/* Légère ombre portée sous le menu (formulaires de fiche) */
#mainNav.main-nav--shadow {
    position: relative;
    z-index: 1020;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
}

#mainNav.main-nav--admin {
    --main-nav-accent: #b8324a; /* bordeaux (favicon admin), éclairci pour ressortir sur le noir */
}

.navbar.navbar-expand-lg.navbar-dark.bg-dark {
    background: 
        linear-gradient(rgba(33,33,33,0.35),rgba(33,33,33,0.85)),
        url('/assets/images/patterns/wbf-fond-camouflage-sombre.jpg') repeat 0 0;
}


/* ==========================================================================
   HOME BOTTOM CONTAINER - Statistiques + Tableau d'honneur
   ========================================================================== */

#homeBottomContainer {
    background: linear-gradient(180deg, #1a252f 0%, #2c3e50 50%, #1a252f 100%);
    position: relative;
    overflow: hidden;
    color: #fff;
}

/* Motif de fond animé */
#homeBottomContainer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(52, 152, 219, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(230, 126, 34, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.02) 0%, transparent 60%);
    pointer-events: none;
    animation: bg-pulse 8s ease-in-out infinite alternate;
}

@keyframes bg-pulse {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

.hasBoxShadow {
    box-shadow: 2px 2px 16px 2px rgba(0,0,0,0.15);
}

/* Titres de section */
.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: #fff;
}

.title-decoration {
    display: inline-block;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #e67e22, transparent);
}

.section-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* ==========================================================================
   STATISTIQUES ANIMÉES
   ========================================================================== */

.stats-section {
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 3rem;
}

.stats-grid {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Couleurs par type */
.stat-card.stat-total { border-color: rgba(230, 126, 34, 0.5); }
.stat-card.stat-total:hover { border-color: #e67e22; box-shadow: 0 10px 30px rgba(230, 126, 34, 0.2); }

.stat-card.stat-air { border-color: rgba(52, 152, 219, 0.5); }
.stat-card.stat-air:hover { border-color: #3498db; box-shadow: 0 10px 30px rgba(52, 152, 219, 0.2); }

.stat-card.stat-terre { border-color: rgba(112, 141, 129, 0.5); }
.stat-card.stat-terre:hover { border-color: #708d81; box-shadow: 0 10px 30px rgba(112, 141, 129, 0.2); }

.stat-card.stat-mer { border-color: rgba(22, 66, 91, 0.8); }
.stat-card.stat-mer:hover { border-color: #5db7de; box-shadow: 0 10px 30px rgba(22, 66, 91, 0.3); }

.stat-card.stat-figurines { border-color: rgba(155, 89, 182, 0.5); }
.stat-card.stat-figurines:hover { border-color: #9b59b6; box-shadow: 0 10px 30px rgba(155, 89, 182, 0.2); }

.stat-card.stat-members { border-color: rgba(46, 204, 113, 0.5); }
.stat-card.stat-members:hover { border-color: #2ecc71; box-shadow: 0 10px 30px rgba(46, 204, 113, 0.2); }

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.stat-icon svg {
    width: 40px;
    height: 40px;
    stroke: currentColor;
}

.stat-card.stat-total .stat-icon { color: #e67e22; }
.stat-card.stat-air .stat-icon { color: #3498db; }
.stat-card.stat-terre .stat-icon { color: #708d81; }
.stat-card.stat-mer .stat-icon { color: #5db7de; }
.stat-card.stat-figurines .stat-icon { color: #9b59b6; }
.stat-card.stat-members .stat-icon { color: #2ecc71; }

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
    margin-bottom: 0.75rem;
}

/* Barre de progression */
.stat-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.stat-bar span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: width 1.5s ease-out;
}

.stat-card.stat-total .stat-bar span { background: linear-gradient(90deg, #e67e22, #f39c12); }
.stat-card.stat-air .stat-bar span { background: linear-gradient(90deg, #2980b9, #3498db); }
.stat-card.stat-terre .stat-bar span { background: linear-gradient(90deg, #556b2f, #708d81); }
.stat-card.stat-mer .stat-bar span { background: linear-gradient(90deg, #16425b, #5db7de); }
.stat-card.stat-figurines .stat-bar span { background: linear-gradient(90deg, #8e44ad, #9b59b6); }
.stat-card.stat-members .stat-bar span { background: linear-gradient(90deg, #27ae60, #2ecc71); }

/* Animation au scroll */
.stat-card.animated .stat-bar span {
    width: var(--target-width);
}

/* ==========================================================================
   TABLEAU D'HONNEUR
   ========================================================================== */

.honor-section {
    padding-top: 1rem;
}

.honor-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.honor-card {
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.4s ease;
}

.honor-card:hover {
    transform: translateY(-8px) scale(1.02);
}

.honor-card-inner {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 12px;
    background: #34495e;
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.honor-card-inner img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.3s ease;
}

.honor-card:hover .honor-card-inner img {
    transform: scale(1.1);
    filter: brightness(0.75);
}

/* Badge étoile */
.honor-rank {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 5;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.rank-icon {
    font-size: 1.2rem;
    animation: star-pulse 2s ease-in-out infinite;
}

@keyframes star-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

/* Overlay info : déborde de 2px sous la vignette (masqués par l'overflow)
   pour qu'aucun liseré d'image n'apparaisse au survol, quand la carte agrandie
   tombe sur un demi-pixel */
.honor-overlay {
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    padding: 1.5rem 1rem calc(1rem + 2px);
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 60%, transparent 100%);
    color: white;
    transform: translateY(30%);
    transition: transform 0.4s ease;
}

.honor-card:hover .honor-overlay {
    transform: translateY(0);
}

.honor-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.honor-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.8rem;
    opacity: 0.8;
}

.honor-category {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.honor-author {
    font-style: italic;
}

/* Chevrons nationaux */
.honor-chevrons {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 3px;
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 5;
}

.honor-card:hover .honor-chevrons {
    opacity: 1;
    transform: translateX(0);
}

.honor-chevrons .chevron {
    width: 8px;
    height: 24px;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.honor-chevrons .chevron:nth-child(1) { animation-delay: 0s; }
.honor-chevrons .chevron:nth-child(2) { animation-delay: 0.05s; }
.honor-chevrons .chevron:nth-child(3) { animation-delay: 0.1s; }

.honor-card:hover .honor-chevrons .chevron {
    animation: chevron-pulse 0.8s ease-in-out infinite;
}

/* Effet brillance */
.honor-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    pointer-events: none;
}

.honor-card:hover .honor-shine {
    left: 200%;
    transition: left 0.6s ease-in-out;
}

.honor-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #34495e, #2c3e50);
    color: rgba(255, 255, 255, 0.3);
    font-size: 2rem;
}

/* CTA */
.honor-cta {
    text-align: center;
    padding-top: 1rem;
}

.honor-cta .btn {
    padding: 0.875rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .honor-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .honor-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto 2rem;
    }
    .section-title {
        font-size: 1.4rem;
    }
    .title-decoration {
        width: 30px;
    }
    .stat-value {
        font-size: 2rem;
    }
}

/* Animation d'entrée */
.stat-card {
    opacity: 0;
    transform: translateY(20px);
    animation: stat-appear 0.5s ease forwards;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }
.stat-card:nth-child(5) { animation-delay: 0.5s; }

@keyframes stat-appear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.honor-card {
    opacity: 0;
    transform: translateY(30px);
    animation: honor-appear 0.6s ease forwards;
}

.honor-card:nth-child(1) { animation-delay: 0.2s; }
.honor-card:nth-child(2) { animation-delay: 0.3s; }
.honor-card:nth-child(3) { animation-delay: 0.4s; }
.honor-card:nth-child(4) { animation-delay: 0.5s; }

@keyframes honor-appear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#homeWelcomeSection {
    /* fond rayé pleine largeur de la fenêtre */
    background:
        repeating-linear-gradient(
            135deg,
            transparent,
            transparent 4px,
            rgba(102, 126, 234, 0.25) 4px,
            rgba(102, 126, 234, 0.25) 5px
        ),
        rgba(255, 255, 255, 0.4);
    border-bottom: 2px solid #333;
}

/* ==========================================================================
   PARALLAX SECTIONS - True parallax with multiple layers
   ========================================================================== */

.parallax-section {
    position: relative;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #2c3e50 100%);
}

/* Parallax layers - animated via JS on scroll */
.parallax-layer {
    position: absolute;
    top: -50%;
    left: -10%;
    right: -10%;
    bottom: -50%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    will-change: transform;
    pointer-events: none;
}

.parallax-layer-back {
    opacity: 0.3;
    filter: brightness(0.7);
}

.parallax-layer-front {
    opacity: 0.8;
}

/* Overlay sombre pour la lisibilite du texte */
.parallax-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(44, 62, 80, 0.7) 0%,
        rgba(52, 73, 94, 0.55) 50%,
        rgba(44, 62, 80, 0.7) 100%
    );
    z-index: 2;
}

.parallax-section .parallax-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: #fff;
    padding: 3rem 1rem;
    max-width: 900px;
}

.parallax-section .parallax-content h2 {
    font-family: 'Yellowtail', cursive;
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.parallax-section .parallax-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

.parallax-section .parallax-content .btn {
    margin-top: 0.5rem;
}

/* Variantes d'images de parallax */
.parallax-img-02 { background-image: url('/assets/images/patterns/bg_lot-planes-parallax_02.png'); }
.parallax-img-03 { background-image: url('/assets/images/patterns/bg_lot-planes-parallax_03.png'); }
.parallax-img-04 { background-image: url('/assets/images/patterns/bg_lot-planes-parallax_04.png'); }
.parallax-img-05 { background-image: url('/assets/images/patterns/bg_lot-planes-parallax_05.png'); }
.parallax-img-06 { background-image: url('/assets/images/patterns/bg_lot-planes-parallax_06.png'); }
.parallax-img-07 { background-image: url('/assets/images/patterns/bg_lot-planes-parallax_07.png'); }
.parallax-img-o60 { background-image: url('/assets/images/patterns/bg_lot-planes-parallax_o60.png'); }

/* Desactiver le parallax sur mobile (performance) */
@media (max-width: 768px) {
    .parallax-section {
        min-height: 200px;
    }

    .parallax-layer {
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        transform: none !important;
    }

    .parallax-section .parallax-content h2 {
        font-size: 2rem;
    }

    .parallax-section .parallax-content p {
        font-size: 1rem;
    }
}

/* ===========================================
   Gallery Mode Toggle (Pagination / Infinite Scroll)
   =========================================== */

.gallery-mode-toggle {
    display: inline-flex;
    background: #f0f0f0;
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
}

.gallery-mode-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 6px;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.1rem;
}

.gallery-mode-btn:hover {
    color: #333;
    background: rgba(255, 255, 255, 0.5);
}

.gallery-mode-btn.active {
    background: #fff;
    color: #1a1a2e;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* Sentinel (invisible trigger for IntersectionObserver) */
.gallery-sentinel {
    height: 1px;
    width: 100%;
}

/* Loading spinner + text */
.gallery-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    padding: 1.5rem 0;
}

.gallery-loading-text {
    color: #8c939a;
    font-size: 0.8rem;
    font-style: italic;
}

/* End message */
.gallery-end-message {
    text-align: center;
    padding: 1.5rem 0;
    color: #6c757d;
    font-size: 0.9rem;
    font-style: italic;
}

/* Scroll-to-top button (rocket) */
.gallery-scroll-top {
    position: fixed;
    bottom: 7.5rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.2s ease, bottom 0.3s ease;
    pointer-events: none;
}

.gallery-scroll-top.visible {
    display: flex !important;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.gallery-scroll-top:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    transform: translateY(-3px);
}

.gallery-scroll-top svg {
    width: 30px;
    height: 30px;
    transition: opacity 0.15s ease;
}

/* Pendant le vol, l'avion a quitté le bouton */
.gallery-scroll-top.is-flying svg {
    opacity: 0;
}

/* Avion en vol après un clic sur le bouton (animé par app.js) */
.scroll-top-flight {
    position: fixed;
    z-index: 1001;
    width: 40px;
    height: 40px;
    color: #764ba2;
    pointer-events: none;
    filter: drop-shadow(0 6px 4px rgba(0, 0, 0, 0.25));
}

.scroll-top-flight svg {
    width: 100%;
    height: 100%;
}

/* Floating counter (bottom-left) */
.gallery-counter {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    border-radius: 1rem;
    z-index: 1000;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, bottom 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.gallery-counter.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: visible;
}

.gallery-counter-current,
.gallery-counter-total {
    font-weight: 600;
}

/* Pastille du nombre de fiches accessibles par valeur de filtre (faceting) */
.facet-badge {
    display: inline-block;
    min-width: 1.4em;
    padding: 0 0.4em;
    margin-left: 0.35em;
    font-size: 0.75em;
    line-height: 1.5;
    text-align: center;
    color: #555;
    background: #e9ecef;
    border-radius: 10px;
    vertical-align: middle;
}
.facet-badge-zero {
    opacity: 0.45;
}

/* Drapeau pays dans les options de sélection (Nation) - Select2 */
.select2-flag {
    width: 1.33em;
    height: 1em;
    object-fit: cover;
    vertical-align: -0.1em;
    margin-right: 0.35em;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 2px;
}


/* ==========================================================================
   GIF animés dans les galeries : vignette fixe + badge, animation au survol
   (script dans app.js). La page de la fiche affiche directement l'animation.
   ========================================================================== */
:has(> .gif-badge) {
    position: relative;
}

.gif-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 6;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font: 700 0.68rem/1.4 'Raleway', sans-serif;
    letter-spacing: 0.06em;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* Pendant la lecture, le badge s'efface */
:has(> img.is-gif-playing) > .gif-badge {
    opacity: 0;
}

/* ==========================================================================
   Titres en plaque bleu nuit rivetée (components/_plaque_heading.html.twig) :
   accueil « Les dernières créations », galerie et sous-galeries. Lisibles sur
   les fonds à motifs, filets orangés comme le Tableau d'honneur.
   --plaque-accent : couleur du liseré (couleur de la catégorie, sinon orange)
   ========================================================================== */
.plaque-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.4rem;
}

.plaque-heading__title {
    position: relative;
    margin: 0;
    padding: 0.5rem 1.6rem 0.45rem;
    font-size: 1.6rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.02em;
    border-radius: 6px;
    border-bottom: 3px solid var(--plaque-accent, #e67e22);
    /* rivets aux quatre coins, sur un dégradé bleu nuit */
    background:
        radial-gradient(circle at 9px 9px, rgba(255, 255, 255, 0.45) 0 2px, transparent 2.5px),
        radial-gradient(circle at calc(100% - 9px) 9px, rgba(255, 255, 255, 0.45) 0 2px, transparent 2.5px),
        radial-gradient(circle at 9px calc(100% - 9px), rgba(255, 255, 255, 0.45) 0 2px, transparent 2.5px),
        radial-gradient(circle at calc(100% - 9px) calc(100% - 9px), rgba(255, 255, 255, 0.45) 0 2px, transparent 2.5px),
        linear-gradient(180deg, #3d566e 0%, #2c3e50 100%);
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.plaque-heading__title .bi {
    display: inline-block;
    margin-right: 0.45rem;
    font-size: 0.8em;
    color: #e67e22;
}

.plaque-heading__title .plaque-heading__plane {
    transform: rotate(45deg) translateY(-2px);
}

/* Filets : un trait qui s'estompe vers l'extérieur, terminé par un losange */
.plaque-heading__line {
    position: relative;
    width: 90px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #e67e22);
}

.plaque-heading__line::after {
    content: "";
    position: absolute;
    right: -4px;
    top: 50%;
    width: 8px;
    height: 8px;
    background: #e67e22;
    transform: translateY(-50%) rotate(45deg);
}

.plaque-heading__line--end {
    background: linear-gradient(90deg, #e67e22, transparent);
}

.plaque-heading__line--end::after {
    right: auto;
    left: -4px;
}

.plaque-heading__subtitle {
    width: fit-content;
    margin: 0 auto 1.5rem;
    padding: 0.15rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    color: #34495e;
    font-size: 0.9rem;
    font-style: italic;
}

@media (max-width: 575.98px) {
    .plaque-heading__title { font-size: 1.25rem; padding: 0.45rem 1.1rem; }
    .plaque-heading__line { width: 28px; }
}

/* ==========================================================================
   Pages de galerie : zone haute (titre + filtres) et zone basse (pagination).
   Hachures fines bleutées sur un léger dégradé : plus de contraste pour les
   filtres sans détacher le bloc du fond de page. Ombre intérieure en haut pour
   « glisser » la zone sous le slider.
   ========================================================================== */
#zone-haute,
.zone-haute {
    background:
        repeating-linear-gradient(135deg, transparent 0 4px, rgba(102, 126, 234, 0.22) 4px 5px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.22), rgba(255, 255, 255, 0.3));
    box-shadow: inset 0 10px 14px -10px rgba(0, 0, 0, 0.45);
    border-bottom: 1px solid rgba(44, 62, 80, 0.15);
}

#zone-basse,
.zone-basse {
    padding: 8px;
    background:
        repeating-linear-gradient(135deg, transparent 0 4px, rgba(102, 126, 234, 0.22) 4px 5px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.3), rgba(0, 0, 0, 0.22));
    border-top: 1px solid rgba(44, 62, 80, 0.15);
}

/* Fil d'Ariane et barre de filtres lisibles sur les hachures */
:is(#zone-haute, .zone-haute) .breadcrumb {
    display: inline-flex;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
}

:is(#zone-haute, .zone-haute) .filter-bar {
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(44, 62, 80, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 4px 14px rgba(44, 62, 80, 0.12);
}

:is(#zone-haute, .zone-haute) .plaque-heading__subtitle {
    margin-bottom: 1.25rem;
}

/* Icônes de catégories / sous-catégories (sprite assets/images/icons/categories.svg) */
.wbf-icon {
    display: inline-block;
    width: 1.15em;
    height: 1.15em;
    vertical-align: -0.2em;
    fill: currentColor;
    flex-shrink: 0;
}

.select2-icon {
    margin-right: 0.4rem;
    color: #4a6f8f;
}

.select2-results__option--highlighted .select2-icon {
    color: #2c3e50;
}

.select2-results__option--selected .select2-icon,
.select2-results__option[aria-selected="true"]:not(.select2-results__option--highlighted) .select2-icon {
    color: inherit;
}

/* Dans une plaque de titre, l'icône reprend l'orange des filets */
.plaque-heading__title .wbf-icon {
    width: 1em;
    height: 1em;
    margin-right: 0.45rem;
    color: #e67e22;
    vertical-align: -0.12em;
}
