/* Model Shows Page Styles */

/* Header similar to members page */
.model-shows-header {
    /* background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%); */
    background: linear-gradient(135deg, #1f2c38 0%, #34495e 100%);
    color: white;
    padding: 2.5rem 0;
    margin-bottom: 0;
    position: relative;
}

.model-shows-header h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

.model-shows-header p {
    font-size: 1rem;
}

/* Introduction section */
.events-parallax-wrapper .introduction {
    background: linear-gradient(135deg, #eef2f7 0%, #e8edf3 100%);
    border-left: 4px solid #e67e22;
    border-radius: 0 8px 8px 0;
    padding: 1rem 1.5rem;
}

.events-parallax-wrapper h2 {
    color: #2c3e50;
    border-bottom: 3px solid #e67e22;
    padding-bottom: 0.5rem;
    display: inline-block;
}

.region-filter .nav-pills {
    gap: 0.5rem;
}

.region-filter .nav-link {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.region-filter .nav-link:hover:not(.disabled) {
    background-color: #e9ecef;
}

.region-filter .nav-link.active {
    background-color: #0d6efd;
}

.region-filter .nav-link.disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.region-filter .badge {
    font-size: 0.75rem;
}

/* Event cards */
.event-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 10px;
    overflow: hidden;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.event-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.event-item .card-header {
    border-bottom: none;
    padding: 0.85rem 1.2rem;
    background: linear-gradient(135deg, #34495e 0%, #4a6785 100%);
    color: white;
}

.event-item .card-header h3 {
    color: white;
}

.event-item .card-header h3 .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

.event-item .card-body {
    border-left: 4px solid #3498db;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.event-item.featured {
    border: 2px solid #e67e22;
    box-shadow: 0 3px 12px rgba(230, 126, 34, 0.2);
}

.event-item.featured .card-header {
    background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%);
    color: #212529;
}

.event-item.featured .card-header h3 {
    color: #212529;
}

.event-item.featured .card-header h3 .text-muted {
    color: rgba(0, 0, 0, 0.5) !important;
}

.event-item.featured .card-body {
    border-left-color: #e67e22;
}

.event-item .event-dates {
    background: #f0f4f8;
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
}

.region-image {
    border-radius: 8px;
    background-color: #f8f9fa;
    padding: 5px;
    height: 100%;
    min-height: 150px;
    object-fit: contain;
}

.event-description {
    font-size: 0.95rem;
    line-height: 1.6;
}

.event-description p:last-child {
    margin-bottom: 0;
}

/* Parallax background for events section */
.events-parallax-wrapper {
    position: relative;
    overflow: hidden;
}

/* Calque lointain : grands avions estompés, défilement très lent. Il porte le
   voile blanc (86 %) qui éclaircit tout l'arrière-plan de la section. */
.events-parallax-bg-far {
    position: absolute;
    top: -30%;
    left: 0;
    width: 100%;
    height: 160%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.86)),
        url('../images/patterns/bg_avions-lointains.svg');
    background-position: center;
    background-repeat: repeat;
    z-index: 0;
    pointer-events: none;
    will-change: transform;
}

/* Calque proche : petits avions. L'opacité de 14 % reproduit exactement l'ancien
   rendu (avions sous un voile blanc à 86 %), le voile étant désormais porté par
   le calque lointain. */
.events-parallax-bg {
    position: absolute;
    top: -30%;
    left: 0;
    width: 100%;
    height: 160%;
    opacity: 0.14;
    background-image:
        /* url('../images/patterns/bg_lot-planes-parallax_07.png'); */
        url('../images/patterns/bg_lot-planes-parallax_04-vertical.png');
    /* background-size: cover; */
    background-position: center;
    /* background-repeat: no-repeat; */
    background-repeat: repeat;
    z-index: 0;
    pointer-events: none;
    will-change: transform;
}

.events-parallax-wrapper > *:not(.events-parallax-bg):not(.events-parallax-bg-far) {
    position: relative;
    z-index: 1;
}

/* Calendar */
.calendar-section {
    /* background-color: #f0f2f5; */
    /* background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%); */
    background: 
        linear-gradient(135deg, rgba(44, 62, 80, 0.85) 0%, rgba(52, 73, 94, 0.85) 100%),
        /* url('/assets/images/patterns/wbf-fond-alveoles-hachures-fines.png') repeat 0 0; */
        url('/assets/images/patterns/wbf-fond-saint-chamond-arrondi-bleus-petites-taches.png') repeat 0 0;
        /* url('/assets/images/patterns/wbf-fond-saint-chamond-arrondi-bleus-clairs-petites-taches.png') repeat 0 0; */
}

.calendar-section .card {
    border: 3px solid #e67e22;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.calendar-section .card-header h3 {
    font-size: 1.2rem;
}

#calendar {
    min-height: 400px;
}

.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-nav .btn {
    padding: 0.25rem 0.75rem;
}

.calendar-month-title {
    font-size: 1.25rem;
    font-weight: 600;
    text-transform: capitalize;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    background-color: #dee2e6;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
}

.calendar-header {
    background-color: #495057;
    color: white;
    text-align: center;
    padding: 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
}

.calendar-day {
    background-color: white;
    min-height: 80px;
    padding: 0.25rem;
    position: relative;
}

.calendar-day.other-month {
    background-color: #f8f9fa;
    color: #adb5bd;
}

.calendar-day.today {
    background-color: #fff3cd;
}

.calendar-day-number {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.calendar-event {
    font-size: 0.7rem;
    padding: 2px 4px;
    margin-bottom: 2px;
    border-radius: 3px;
    background-color: #0d6efd;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: background-color 0.2s;
}

.calendar-event:hover {
    background-color: #0b5ed7;
}

.calendar-event.event-featured {
    background-color: #ffc107;
    color: #212529;
}

.calendar-event.event-featured:hover {
    background-color: #e0a800;
}

.calendar-event.event-past {
    background-color: #6c757d;
}

.calendar-event.event-past:hover {
    background-color: #5a6268;
}

.calendar-event.event-past.event-featured {
    background-color: #997a00;
    color: white;
}

.calendar-event.event-past.event-featured:hover {
    background-color: #806600;
}

/* Invitation section */
.invitation-section {
    border-top: 3px solid #34495e;
    border-bottom: 3px solid #34495e;
}

/* Avion de l'invitation, vu de face : chaque niveau imbriqué porte un
   mouvement de période différente, d'où un vol qui ne se répète jamais
   tout à fait. Les figures (salut des ailes, tonneau, arrivée) sont
   jouées en JS sur .flight-stunt et .invitation-flight. */
.invitation-visual {
    position: relative;
    padding: 1.5rem 0 2rem;
}

/* Halo de ciel et nuages qui « foncent » vers le spectateur */
.invitation-sky {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    background: radial-gradient(ellipse 60% 55% at 50% 52%, rgba(168, 198, 225, .45), rgba(168, 198, 225, 0) 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 55%, transparent 100%);
    mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 55%, transparent 100%);
}

.sky-cloud {
    position: absolute;
    left: 50%;
    top: 52%;
    width: 110px;
    height: 44px;
    opacity: 0;
    background:
        radial-gradient(circle at 30% 65%, #fff 0 34%, transparent 36%),
        radial-gradient(circle at 52% 42%, #fff 0 40%, transparent 42%),
        radial-gradient(circle at 74% 64%, #fff 0 30%, transparent 32%);
    filter: blur(2px) drop-shadow(0 3px 4px rgba(90, 120, 150, .25));
    animation: cloudRush 7s cubic-bezier(.55, 0, .9, .55) infinite;
}

.sky-cloud:nth-child(1) { --dx: -260px; --dy: -70px; animation-delay: 0s; }
.sky-cloud:nth-child(2) { --dx: 250px;  --dy: 60px;  animation-delay: -1.8s; }
.sky-cloud:nth-child(3) { --dx: -220px; --dy: 90px;  animation-delay: -3.6s; }
.sky-cloud:nth-child(4) { --dx: 270px;  --dy: -80px; animation-delay: -5.3s; }

@keyframes cloudRush {
    0%   { transform: translate(-50%, -50%) scale(.15); opacity: 0; }
    20%  { opacity: .9; }
    100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.9); opacity: 0; }
}

.invitation-flight {
    position: relative;
    z-index: 1;
    display: inline-block;
    max-width: 100%;
}

.invitation-plane {
    display: block;
    max-height: 200px;
    margin: 0 auto;
}

/* Dérive latérale et roulis couplés (même période) : l'avion s'incline
   du côté où il glisse, comme en virage, puis se rétablit */
.flight-drift { animation: flightDrift 9s ease-in-out infinite; }
.flight-bank  { animation: flightBank 9s ease-in-out infinite; transform-origin: 50% 56%; }
/* Flottement vertical, période sans rapport simple avec la dérive */
.flight-bob   { animation: flightBob 3.4s ease-in-out infinite alternate; }

@keyframes flightDrift {
    0%, 100% { transform: translateX(-14px); }
    50%      { transform: translateX(14px); }
}

/* Inclinaison maximale quand la glissade est la plus rapide (25 % vers
   la droite, 75 % vers la gauche), à plat aux points de rebroussement */
@keyframes flightBank {
    0%, 50%, 100% { transform: rotate(0deg); }
    25%           { transform: rotate(5deg); }
    75%           { transform: rotate(-5deg); }
}

@keyframes flightBob {
    from { transform: translateY(-9px); }
    to   { transform: translateY(7px); }
}

.flight-stunt {
    position: relative;
    cursor: pointer;
    transform-origin: 50% 56%;
}

/* Disque d'hélice : pales floutées qui tournent devant le capot, centre
   laissé transparent pour garder le cône visible */
.flight-propeller {
    position: absolute;
    left: 50%;
    top: 55.7%;
    width: 31%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    pointer-events: none;
    -webkit-mask-image: radial-gradient(circle, transparent 0 24%, #000 34% 88%, transparent 100%);
    mask-image: radial-gradient(circle, transparent 0 24%, #000 34% 88%, transparent 100%);
    background: radial-gradient(circle, rgba(30, 40, 55, .07), rgba(30, 40, 55, .1));
}

.flight-propeller::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(
        rgba(25, 32, 45, .38) 0deg, rgba(25, 32, 45, 0) 34deg,
        rgba(25, 32, 45, 0) 120deg, rgba(25, 32, 45, .38) 120deg, rgba(25, 32, 45, 0) 154deg,
        rgba(25, 32, 45, 0) 240deg, rgba(25, 32, 45, .38) 240deg, rgba(25, 32, 45, 0) 274deg,
        rgba(25, 32, 45, 0) 360deg
    );
    filter: blur(1.5px);
    animation: propSpin .16s linear infinite;
}

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

/* Ombre portée qui s'élargit quand l'avion descend (synchronisée avec flightBob) */
.flight-shadow {
    position: absolute;
    left: 50%;
    bottom: -26px;
    width: 60%;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(20, 30, 45, .22), rgba(20, 30, 45, 0) 70%);
    animation: shadowBreath 3.4s ease-in-out infinite alternate;
}

@keyframes shadowBreath {
    from { transform: translateX(-50%) scale(.82); opacity: .6; }
    to   { transform: translateX(-50%) scale(1); opacity: 1; }
}

/* Section hors écran : on fige tout (inutile de faire travailler le GPU) */
.invitation-visual.is-offscreen *,
.invitation-visual.is-offscreen *::before {
    animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
    .invitation-visual *,
    .invitation-visual *::before {
        animation: none !important;
    }
    .sky-cloud { display: none; }
    .flight-shadow { transform: translateX(-50%); }
}

/* Past events accordion */
.past-events-section .accordion-button {
    padding: 0.75rem 1rem;
}

.past-events-section .accordion-button:not(.collapsed) {
    background-color: #e7f1ff;
    color: #0c63e4;
}

.past-events-section .accordion-body {
    background-color: #fafafa;
}

/* Year headings in past events */
.year-heading {
    color: #34495e;
    font-weight: 600;
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
    border-bottom: 2px solid #e9ecef;
}

.past-year-group:first-child .year-heading {
    margin-top: 0;
}

/* Event thumbnails & modal */
.event-thumbnail {
    max-height: 150px;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.event-thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.event-attachments {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-start;
}

#imageModal .modal-body img {
    max-height: 80vh;
    object-fit: contain;
}

/* Year view */
.year-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.year-month-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    background: white;
}

.year-month-card:hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.year-month-card.has-events {
    border-color: #3498db;
    background: linear-gradient(180deg, #f0f7ff 0%, #fff 100%);
}

.year-month-card.current-month {
    border-color: #e67e22;
    box-shadow: 0 0 0 2px rgba(230, 126, 34, 0.3);
}

.year-month-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #34495e;
    margin-bottom: 0.5rem;
}

.year-month-count {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.year-month-count.has-events {
    color: #2980b9;
}

.year-month-count.no-events {
    color: #ccc;
}

.year-month-label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.year-month-featured {
    display: inline-block;
    margin-top: 0.4rem;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    background: #ffc107;
    color: #212529;
    font-weight: 600;
}

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

@media (min-width: 577px) and (max-width: 768px) {
    .year-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .region-filter .nav-pills {
        gap: 0.3rem;
    }

    .region-filter .nav-link {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }

    .calendar-day {
        min-height: 60px;
    }

    .calendar-header {
        font-size: 0.7rem;
        padding: 0.3rem;
    }

    .calendar-event {
        font-size: 0.65rem;
    }
}
