﻿/* =========================================================
   Club Canin Autunois - v1.26 Modern UI
   Complément visuel ; ne remplace pas site.css.
   ========================================================= */

:root {
    --cca-modern-radius: 16px;
    --cca-modern-shadow: 0 12px 34px rgba(21, 90, 156, 0.12);
    --cca-modern-shadow-hover: 0 18px 42px rgba(21, 90, 156, 0.18);
}

/* Bootstrap Icons */
.bi {
    line-height: 1;
}

.cca-btn .bi {
    margin-right: 5px;
    font-size: 0.95em;
}

/* ---------------------------------------------------------
   Swiper - accueil
   Taille volontairement compacte, conformément à la v1.25.2
   --------------------------------------------------------- */

.home-swiper {
    position: relative;
    width: min(100%, 600px);
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid rgba(21, 90, 156, 0.13);
    border-radius: 14px;
    background: #0e2236;
    box-shadow: var(--cca-modern-shadow);
}

.home-swiper:not(.swiper-initialized) .swiper-slide:not(:first-child) {
    display: none;
}

.home-swiper-slide {
    position: relative;
    margin: 0;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0e2236;
}

.home-swiper-media {
    display: block;
    width: 100%;
    height: 100%;
    color: inherit;
}

.home-swiper-media::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg,
            rgba(5, 18, 31, 0.02) 35%,
            rgba(5, 18, 31, 0.78) 100%);
}

.home-swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 900ms ease;
}

.home-swiper-slide:hover img {
    transform: scale(1.025);
}

.home-swiper-slide figcaption {
    position: absolute;
    z-index: 3;
    left: 18px;
    right: 18px;
    bottom: 27px;
    color: #fff;
    pointer-events: none;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}

.home-swiper-slide figcaption strong {
    display: block;
    margin-bottom: 2px;
    font-size: clamp(1.05rem, 2.2vw, 1.55rem);
    line-height: 1.1;
}

.home-swiper-slide figcaption span {
    display: block;
    max-width: 520px;
    font-size: 0.78rem;
    opacity: 0.92;
}

.home-swiper .swiper-button-prev,
.home-swiper .swiper-button-next {
    width: 36px;
    height: 36px;
    margin-top: -18px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 50%;
    color: #fff;
    background: rgba(5, 18, 31, 0.54);
    backdrop-filter: blur(5px);
    transition: transform 180ms ease, background 180ms ease;
}

.home-swiper .swiper-button-prev:hover,
.home-swiper .swiper-button-next:hover {
    transform: scale(1.06);
    background: rgba(21, 90, 156, 0.9);
}

.home-swiper .swiper-button-prev::after,
.home-swiper .swiper-button-next::after {
    font-size: 0.92rem;
    font-weight: 900;
}

.home-swiper .swiper-pagination {
    bottom: 8px !important;
}

.home-swiper .swiper-pagination-bullet {
    width: 7px;
    height: 7px;
    margin: 0 3px !important;
    background: rgba(255, 255, 255, 0.75);
    opacity: 0.6;
}

.home-swiper .swiper-pagination-bullet-active {
    width: 22px;
    border-radius: 99px;
    background: #fff;
    opacity: 1;
}

/* ---------------------------------------------------------
   Ruban activités
   --------------------------------------------------------- */

.home-activity-ribbon .bi {
    margin-right: 4px;
    color: var(--cca-primary);
}

/* ---------------------------------------------------------
   GLightbox
   --------------------------------------------------------- */

.glightbox-clean .gslide-title {
    color: #fff;
    font-weight: 800;
}

.glightbox-clean .gslide-desc {
    color: rgba(255, 255, 255, 0.88);
}

.glightbox-clean .gslide-description {
    background: rgba(8, 23, 38, 0.92);
}

/* ---------------------------------------------------------
   Cartes : micro-interactions discrètes
   --------------------------------------------------------- */

.content-card,
.album-card,
.person-card,
.admin-card {
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        border-color 180ms ease;
}

@media (hover: hover) {
    .content-card:hover,
    .album-card:hover,
    .person-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--cca-modern-shadow-hover);
    }
}

/* ---------------------------------------------------------
   Administration
   --------------------------------------------------------- */

.cca-admin-tile {
    display: grid !important;
    grid-template-columns: 46px minmax(0, 1fr);
    grid-template-areas:
        "icon title"
        "icon desc";
    column-gap: 12px;
    align-items: center;
    min-height: 88px;
    text-align: left;
}

.cca-admin-tile .admin-tile-icon {
    grid-area: icon;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    color: var(--cca-primary);
    background: rgba(21, 90, 156, 0.09);
    font-size: 1.35rem;
}

.cca-admin-tile strong {
    grid-area: title;
    align-self: end;
}

.cca-admin-tile small {
    grid-area: desc;
    align-self: start;
    color: var(--cca-muted);
}

.cca-swal-popup {
    border-radius: 17px !important;
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (max-width: 760px) {
    .home-swiper {
        width: min(100%, 560px);
    }

    .home-swiper-slide figcaption {
        left: 14px;
        right: 14px;
        bottom: 25px;
    }
}

@media (max-width: 480px) {
    .home-swiper-slide figcaption span {
        display: none;
    }

    .home-swiper .swiper-button-prev,
    .home-swiper .swiper-button-next {
        width: 32px;
        height: 32px;
    }

    .cca-admin-tile {
        min-height: 82px;
    }
}

/* Respect du réglage d'accessibilité de l'utilisateur. */
@media (prefers-reduced-motion: reduce) {
    .home-swiper-slide img,
    .content-card,
    .album-card,
    .person-card,
    .admin-card {
        transition: none !important;
    }
}


/* =========================================================
   v1.27 - UTILISATION EFFECTIVE DES BIBLIOTHEQUES
   ========================================================= */

/* Bootstrap Icons dans la navigation */
.cca-navbar .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cca-navbar .nav-link .bi {
    font-size: 0.93rem;
    opacity: 0.78;
    transition: transform 180ms ease, opacity 180ms ease;
}

.cca-navbar .nav-link:hover .bi,
.cca-navbar .nav-link:focus .bi,
.cca-navbar .nav-link.active .bi {
    transform: translateY(-1px);
    opacity: 1;
}

.coordinate-label .bi,
.footer-contact .bi {
    margin-right: 4px;
    color: var(--cca-primary);
}

/* Les icônes Agenda / Météo héritent du style des cartes */
.home-live-icon .bi,
.home-weather-icon .bi,
.important-alert-icon .bi {
    font-size: 1.05em;
}

.next-course-location .bi,
.weather-refresh .bi,
.weather-links .bi {
    margin-right: 4px;
}

/* Bouton retour en haut */
.cca-back-to-top {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9000;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    color: #fff;
    background: rgba(21, 90, 156, 0.92);
    box-shadow: 0 9px 24px rgba(15, 57, 98, 0.28);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition:
        opacity 180ms ease,
        transform 180ms ease,
        visibility 180ms ease,
        background 180ms ease;
}

.cca-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cca-back-to-top:hover,
.cca-back-to-top:focus {
    background: var(--cca-primary-dark);
}

.cca-back-to-top .bi {
    font-size: 1.15rem;
}

/* GLightbox : boutons historiques du site deviennent plus explicites */
.photo-thumb,
.person-photo-button,
.installation-photo-button {
    position: relative;
    overflow: hidden;
}

.photo-thumb::after,
.person-photo-button::after,
.installation-photo-button::after {
    content: "\f52a";
    position: absolute;
    right: 8px;
    bottom: 8px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.44);
    border-radius: 50%;
    color: #fff;
    background: rgba(7, 25, 43, 0.60);
    font-family: "bootstrap-icons";
    font-size: 0.92rem;
    opacity: 0;
    transform: scale(0.86);
    transition: opacity 170ms ease, transform 170ms ease;
    pointer-events: none;
}

.photo-thumb:hover::after,
.photo-thumb:focus::after,
.person-photo-button:hover::after,
.person-photo-button:focus::after,
.installation-photo-button:hover::after,
.installation-photo-button:focus::after {
    opacity: 1;
    transform: scale(1);
}

/* GLightbox cohérent avec l'identité graphique */
.glightbox-container .gbtn {
    background: rgba(21, 90, 156, 0.80) !important;
}

.glightbox-container .gslide-title {
    font-weight: 800 !important;
}

/* AOS ne doit jamais masquer le contenu lorsque JS est absent. */
html:not(.aos-enabled) [data-aos] {
    opacity: 1;
    transform: none;
}

@media (max-width: 991px) {
    .cca-navbar .nav-link {
        width: 100%;
        padding-left: 12px;
    }
}

@media (max-width: 480px) {
    .cca-back-to-top {
        right: 12px;
        bottom: 12px;
        width: 38px;
        height: 38px;
    }
}
