/* ***********************************************************************************************************|
                                                 PAGE GALERIE PHOTOS                                            |
   Version 1 du site : couleurs --primary-color (orange #fd6f02) et --second-color (bleu #022659).            |
   Titre, chiffres, filtres par domaine, mosaïque, vignettes.                                                 |
   Bannière, visionneuse (.gal-vue), CTA : interne.css         Responsive : responsive-galerie.css           |
**************************************************************************************************************/


/* ***********************************************************************************************************|
                                                   utilitaires                                                |
**************************************************************************************************************/
.texte-masque {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.bi-titre .title-color1 {
    color: var(--primary-color);
}


/* ***********************************************************************************************************|
                                                   corps de page                                              |
**************************************************************************************************************/
.wrapper-galerie {
    position: relative;
    padding: 60px 0 90px;
    overflow: hidden;
}

.wrapper-galerie .container {
    position: relative;
    z-index: 1;
    padding: 0 15px;
}

.wrapper-galerie .section-title.center {
    margin-bottom: 30px;
}

.wrapper-galerie .title-texte {
    max-width: 66ch;
    margin: 14px auto 0;
    font-family: var(--primary-font);
    font-size: 16px;
    line-height: 1.7;
    color: var(--texte-doux);
}

/* ---------- formes décoratives ---------- */
.shape-form {
    position: absolute;
    z-index: 0;
    pointer-events: none;
}

.shape-form.shape-1 {
    border: 1px solid #e5e5e5;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    top: -133px;
    left: -133px;
}

.shape-form.shape-2 {
    border: 1px solid #e5e5e5;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    right: -133px;
    bottom: -133px;
}

.actualites-shape-1,
.actualites-shape-2 {
    position: absolute;
    width: auto;
    z-index: 0;
    pointer-events: none;
}

.actualites-shape-2 {
    right: 0;
    top: -170px;
}

.actualites-shape-1 {
    bottom: -46px;
}


/* ***********************************************************************************************************|
                                                   bascule photos / vidéos                                    |
**************************************************************************************************************/
.galerie-bascule {
    display: flex;
    width: fit-content;
    margin: 0 auto 26px;
    padding: 5px;
    border-radius: 40px;
    background: #f1f3f7;
}

.galerie-bascule a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 30px;
    font-family: var(--primary-font);
    font-size: 15px;
    font-weight: 700;
    color: var(--second-color);
    transition: all .3s;
}

.galerie-bascule a:hover {
    color: var(--primary-color);
}

.galerie-bascule a.actif {
    background: var(--primary-color);
    color: var(--white-color);
}

.galerie-bascule a:focus-visible {
    outline: 3px solid var(--second-color);
    outline-offset: 3px;
}


/* ***********************************************************************************************************|
                                                   chiffres                                                   |
**************************************************************************************************************/
.galerie-chiffres {
    display: flex;
    justify-content: center;
    width: fit-content;
    margin: 0 auto 36px;
    border-radius: 60px;
    background: var(--second-color);
    box-shadow: 0 18px 36px -20px rgba(2, 38, 89, .6);
}

.galerie-chiffres li {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 14px 30px;
}

.galerie-chiffres li + li {
    border-left: 1px solid rgba(255, 255, 255, .2);
}

.galerie-chiffres strong {
    font-family: var(--primary-font);
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    color: var(--primary-color);
}

.galerie-chiffres span {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, .85);
}


/* ***********************************************************************************************************|
                                                   filtres                                                    |
**************************************************************************************************************/
.galerie-filtres {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.galerie-filtre {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px 10px 20px;
    border: 1px solid #e1e5ec;
    border-radius: 30px;
    background: var(--white-color);
    font-family: var(--primary-font);
    font-size: 15px;
    font-weight: 700;
    color: var(--second-color);
    white-space: nowrap;
    transition: all .3s;
}

.galerie-filtre span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 24px;
    padding: 0 8px;
    border-radius: 20px;
    background: #f1f3f7;
    font-size: 12.5px;
    color: var(--texte-doux);
    transition: all .3s;
}

.galerie-filtre:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.galerie-filtre.actif {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: var(--white-color);
    box-shadow: 0 10px 22px -12px rgba(253, 111, 2, .8);
}

.galerie-filtre.actif span {
    background: var(--white-color);
    color: var(--primary-color);
}

.galerie-filtre:focus-visible {
    outline: 3px solid var(--second-color);
    outline-offset: 2px;
}

.galerie-statut {
    min-height: 22px;
    margin: 14px 0 26px;
    text-align: center;
    font-size: 14px;
    color: var(--texte-doux);
}


/* ***********************************************************************************************************|
                                                   mosaïque                                                   |
   Rythme sur 7 vignettes : 1 grande (2 × 2), 1 large (2 × 1), les autres simples.                           |
   Les classes --grand et --large sont recalculées par galerie.js après chaque filtre.                       |
**************************************************************************************************************/
.galerie-grille {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 230px;
    grid-auto-flow: dense;
    gap: 16px;
}

.galerie-item {
    position: relative;
    min-width: 0;
}

.galerie-item[hidden] {
    display: none;
}

.galerie-item--grand {
    grid-column: span 2;
    grid-row: span 2;
}

.galerie-item--large {
    grid-column: span 2;
}

.galerie-vignette {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: var(--rayon);
    background: #e8ebf2;
    overflow: hidden;
    cursor: zoom-in;
    font: inherit;
    text-align: left;
}

.galerie-vignette img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}

.galerie-vignette::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 14%, rgb(1 26 63) 100%);
    opacity: .75;
    transition: opacity .3s;
}

.galerie-vignette:hover img,
.galerie-vignette:focus-visible img {
    transform: scale(1.06);
}

.galerie-vignette:hover::after,
.galerie-vignette:focus-visible::after {
    opacity: 1;
}

.galerie-vignette:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
}

.galerie-loupe {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary-color);
    font-size: 15px;
    color: var(--white-color);
    opacity: 0;
    transform: scale(.7);
    transition: opacity .3s, transform .3s;
}

.galerie-vignette:hover .galerie-loupe,
.galerie-vignette:focus-visible .galerie-loupe {
    opacity: 1;
    transform: scale(1);
}

.galerie-legende {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 16px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 3px;
    color: var(--white-color);
}

.galerie-legende small {
    width: fit-content;
    margin-bottom: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--primary-color);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
}

.galerie-legende strong {
    font-family: var(--primary-font);
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.35;
}

.galerie-item--grand .galerie-legende strong {
    font-size: 20px;
}

.galerie-legende em {
    font-size: 13px;
    font-style: normal;
    color: rgba(255, 255, 255, .78);
}

/* Lien « Voir le projet » : visible au survol, ou au clavier */
.galerie-projet {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 3;
    padding: 6px 14px;
    border-radius: 20px;
    background: var(--white-color);
    font-size: 12.5px;
    font-weight: 700;
    color: var(--second-color);
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .3s, transform .3s, color .3s;
}

.galerie-item:hover .galerie-projet,
.galerie-projet:focus-visible {
    opacity: 1;
    transform: translateY(0);
}

.galerie-projet:hover {
    color: var(--primary-color);
}

.galerie-projet:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}


/* ***********************************************************************************************************|
                                                   mouvements réduits                                         |
**************************************************************************************************************/
@media (prefers-reduced-motion: reduce) {

    .galerie-vignette img,
    .galerie-loupe,
    .galerie-projet {
        transition: none !important;
    }

    .galerie-vignette:hover img,
    .galerie-vignette:focus-visible img {
        transform: none;
    }

}
