/* Galerie éditoriale des annonces SGL-TECH. */
.announcements-page .gallery-section {
    max-width: 1240px;
    padding: 20px 24px 84px;
    margin: 28px auto 0;
}
.announcements-page .gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin: 0 0 24px;
    text-align: left;
}
.gallery-heading-copy { max-width: 700px; }
.gallery-header .about-kicker {
    margin: 0 0 10px;
    color: #087b78;
    font-size: .7rem;
    font-weight: 850;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.gallery-header h2 {
    margin: 0;
    color: #173747;
    font-size: clamp(1.85rem, 4vw, 3.2rem);
    line-height: 1.08;
    letter-spacing: -.045em;
}
.gallery-header .gallery-heading-copy > p:last-child {
    max-width: 600px;
    margin: 13px 0 0;
    color: #58717b;
    font-size: .94rem;
    line-height: 1.7;
}
.gallery-total {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 11px;
    padding: 10px 15px;
    border: 1px solid #dce8e8;
    border-radius: 15px;
    background: rgba(255,255,255,.8);
}
.gallery-total strong { color: #087b78; font-size: 1.45rem; line-height: 1; }
.gallery-total small { color: #647a81; font-size: .67rem; font-weight: 700; }
.gallery-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 17px;
}
.gallery-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.gallery-filters[hidden] { display: none !important; }
.gallery-filter {
    min-height: 39px;
    padding: 8px 14px;
    border: 1px solid #dce8e8;
    border-radius: 999px;
    background: rgba(255,255,255,.78);
    color: #516b74;
    font: inherit;
    font-size: .73rem;
    font-weight: 720;
    cursor: pointer;
    transition: color .18s, background .18s, border-color .18s, transform .18s;
}
.gallery-filter:hover { transform: translateY(-1px); border-color: #9bc9bd; background: #eff8f5; color: #155f59; }
.gallery-filter.is-active { border-color: #0c7773; background: #0c7773; color: #fff; box-shadow: 0 5px 13px rgba(12,119,115,.16); }
.gallery-keyboard-hint { color: #71858a; font-size: .67rem; white-space: nowrap; }
.gallery-keyboard-hint span { color: #087b78; font-size: .9rem; }
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: clamp(150px, 17vw, 220px);
    grid-auto-flow: dense;
    gap: 15px;
}
.gallery-item {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
    margin: 0;
    border: 1px solid rgba(217,231,228,.9);
    border-radius: 19px;
    background: #e1eeeb;
    box-shadow: 0 9px 27px rgba(16,46,67,.07);
    transition: transform .28s, box-shadow .28s, border-color .28s;
}
.gallery-item[hidden] { display: none !important; }
.gallery-item-featured { grid-row: span 2; }
.gallery-item-wide { grid-column: span 2; }
.gallery-trigger {
    position: relative;
    display: block;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    overflow: hidden;
    padding: 0;
    border: 0;
    background: linear-gradient(145deg,#153e50,#087b78);
    color: white;
    text-align: left;
    cursor: zoom-in;
}
.gallery-trigger::after {
    position: absolute;
    inset: 22% 0 0;
    background: linear-gradient(180deg, transparent, rgba(6,28,38,.25));
    content: "";
    pointer-events: none;
}
.gallery-trigger img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .65s cubic-bezier(.2,.7,.2,1), filter .3s;
}
.gallery-item-featured .gallery-trigger img { object-position: center 43%; }
.gallery-item.is-fallback .gallery-trigger { background: radial-gradient(ellipse at 72% 27%,#a4e3d14d,transparent 34%),linear-gradient(135deg,#15394a,#146c69 68%,#398d7b); }
.gallery-item.is-fallback .gallery-trigger::before {
    position: absolute;
    inset: 12% 17%;
    border: 1px solid rgba(230,255,245,.35);
    border-radius: 45% 55% 50% 50%;
    box-shadow: 0 0 0 20px rgba(230,255,245,.04),0 0 0 43px rgba(230,255,245,.025);
    content: "SGL-TECH";
    display: grid;
    place-items: center;
    color: rgba(255,255,255,.82);
    font-size: clamp(.8rem,2vw,1.5rem);
    font-weight: 850;
    letter-spacing: .2em;
}
.gallery-item.is-fallback .gallery-trigger img { visibility: hidden; }
.gallery-visual-tag {
    position: absolute;
    z-index: 1;
    top: 13px;
    left: 14px;
    padding: 7px 10px;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 999px;
    background: rgba(14,43,51,.38);
    color: #f4fffa;
    font-size: .55rem;
    font-weight: 850;
    letter-spacing: .1em;
    backdrop-filter: blur(9px);
}
.gallery-visual-tag i { padding: 0 4px; color: #bde7d7; font-style: normal; }
.gallery-open-icon {
    position: absolute;
    z-index: 2;
    right: 13px;
    bottom: 13px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 50%;
    background: rgba(12,42,48,.28);
    color: #fff;
    font-size: 1rem;
    backdrop-filter: blur(8px);
    transition: transform .2s, background .2s;
}
.gallery-item figcaption { position: relative; inset: auto; padding: 13px 15px 14px; background: #fff; color: inherit; text-align: left; }
.gallery-caption-type { display: block; margin-bottom: 4px; color: #0b8179; font-size: .56rem; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.gallery-item figcaption h3 { margin: 0; color: #183c4a; font-size: .93rem; line-height: 1.35; letter-spacing: -.02em; }
.gallery-item figcaption p { margin: 5px 0 0; color: #687e84; font-size: .7rem; line-height: 1.5; }
.gallery-item-featured figcaption h3,.gallery-item-wide figcaption h3 { font-size: 1.05rem; }
.gallery-status { margin: 13px 2px 0; color: #71858a; font-size: .68rem; }
.gallery-empty { margin-top: 12px; padding: 28px; border: 1px dashed #bdcfcc; border-radius: 16px; background: #fff; color: #526c74; text-align: center; }
.gallery-empty strong { color: #173747; }
.gallery-empty p { margin: 7px 0 0; font-size: .82rem; }
.gallery-lightbox {
    position: fixed;
    width: min(100% - 32px, 1040px);
    max-width: 1040px;
    max-height: min(92vh, 940px);
    padding: 16px;
    overflow: auto;
    border: 1px solid rgba(255,255,255,.17);
    border-radius: 23px;
    background: #102b37;
    color: white;
    box-shadow: 0 30px 110px rgba(3,20,29,.55);
}
.gallery-lightbox[open] { animation: gallery-lightbox-in .22s ease-out both; }
.gallery-lightbox::backdrop { background: rgba(5,20,29,.78); backdrop-filter: blur(8px); }
.lightbox-toolbar { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; min-height: 40px; margin-bottom: 9px; }
.lightbox-counter { color: #b9d7d5; font-size: .67rem; font-weight: 800; letter-spacing: .13em; }
.lightbox-close { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid #ffffff35; border-radius: 50%; background: #ffffff12; color: white; font-size: 1.55rem; cursor: pointer; transition: background .18s, transform .18s; }
.lightbox-close:hover { transform: rotate(90deg); background: #ffffff25; }
.lightbox-figure { margin: 0; }
.lightbox-image-frame { position: relative; display: grid; min-height: 240px; max-height: 66vh; place-items: center; overflow: hidden; border-radius: 15px; background: radial-gradient(ellipse at 70% 25%,#a5e8d22c,transparent 36%),linear-gradient(135deg,#183d4d,#087b78); }
.lightbox-image-frame::after { position: absolute; inset: 60% 0 0; background: linear-gradient(transparent,rgba(6,24,33,.3)); content: ""; pointer-events: none; }
.lightbox-image-frame img { display: block; width: 100%; max-height: 66vh; object-fit: contain; transition: opacity .2s; }
.lightbox-image-frame img.is-unavailable { display: none; }
.lightbox-image-fallback { position: absolute; color: #effcf6; font-size: 1.2rem; font-weight: 800; letter-spacing: .12em; }
.lightbox-figure figcaption { padding: 17px 9px 8px; }
.lightbox-figure figcaption > span { color: #94d8c5; font-size: .61rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.lightbox-figure h2 { margin: 5px 0 4px; color: white; font-size: clamp(1.2rem,3vw,1.7rem); letter-spacing: -.035em; }
.lightbox-figure p { margin: 0; color: #c2d6d6; font-size: .82rem; line-height: 1.6; }
.lightbox-arrow { position: absolute; z-index: 3; top: 48%; display: grid; width: 43px; height: 43px; place-items: center; border: 1px solid #ffffff64; border-radius: 50%; background: #0a2836a8; color: white; font-size: 1.25rem; cursor: pointer; transition: transform .17s,background .17s; backdrop-filter: blur(8px); }
.lightbox-arrow:hover { transform: scale(1.07); background: #0b7774; }
.lightbox-previous { left: 26px; }
.lightbox-next { right: 26px; }
.lightbox-shortcuts { margin: 7px 0 0; color: #99b6b8; font-size: .61rem; text-align: center; }
.lightbox-shortcuts span { padding: 0 3px; color: #e2f4ef; font-weight: 800; }
@keyframes gallery-lightbox-in { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (hover: hover) and (pointer: fine) {
    .gallery-item:hover { transform: translateY(-4px); border-color: #b9d7cf; box-shadow: 0 18px 42px rgba(16,46,67,.15); }
    .gallery-item:hover img { transform: scale(1.055); filter: saturate(1.06); }
    .gallery-item:hover .gallery-open-icon { transform: translate(1px,-1px); background: rgba(8,123,120,.75); }
}
@media (max-width: 900px) {
    .announcements-page .gallery-section { padding-inline: 20px; }
    .gallery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); grid-auto-rows: clamp(165px,28vw,240px); }
    .gallery-item-wide { grid-column: span 2; }
    .gallery-header h2 { font-size: clamp(1.75rem,5vw,2.6rem); }
}
@media (max-width: 620px) {
    .announcements-page .gallery-section { margin-top: 20px; padding: 0 16px 60px; }
    .announcements-page .gallery-header { align-items: flex-start; gap: 12px; margin-bottom: 17px; }
    .gallery-header .about-kicker { margin-bottom: 7px; font-size: .62rem; }
    .gallery-header h2 { font-size: clamp(1.55rem,7vw,2.1rem); }
    .gallery-header .gallery-heading-copy > p:last-child { margin-top: 8px; font-size: .81rem; }
    .gallery-total { gap: 7px; padding: 8px 9px; border-radius: 12px; }
    .gallery-total strong { font-size: 1.1rem; }
    .gallery-total small { max-width: 7ch; font-size: .56rem; line-height: 1.3; }
    .gallery-toolbar { align-items: flex-start; flex-direction: column; gap: 7px; margin-bottom: 12px; }
    .gallery-filters { width: 100%; flex-wrap: nowrap; padding: 2px 1px 6px; overflow-x: auto; scrollbar-width: thin; overscroll-behavior-inline: contain; }
    .gallery-filter { min-height: 36px; padding: 8px 12px; font-size: .67rem; white-space: nowrap; }
    .gallery-keyboard-hint { font-size: .61rem; }
    .gallery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); grid-auto-rows: clamp(145px,43vw,205px); gap: 10px; }
    .gallery-item-featured { grid-column: span 2; grid-row: span 1; }
    .gallery-item-wide { grid-column: span 2; }
    .gallery-item { border-radius: 15px; }
    .gallery-item figcaption { padding: 10px 11px 11px; }
    .gallery-item figcaption h3 { font-size: .8rem; }
    .gallery-item figcaption p { font-size: .64rem; }
    .gallery-item-featured figcaption h3,.gallery-item-wide figcaption h3 { font-size: .91rem; }
    .gallery-caption-type { font-size: .51rem; }
    .gallery-visual-tag { top: 9px; left: 9px; padding: 6px 8px; font-size: .49rem; }
    .gallery-open-icon { right: 9px; bottom: 9px; width: 30px; height: 30px; }
    .gallery-lightbox { width: calc(100% - 18px); max-height: 94vh; padding: 10px; border-radius: 18px; }
    .lightbox-image-frame { min-height: 190px; max-height: 58vh; border-radius: 12px; }
    .lightbox-image-frame img { max-height: 58vh; }
    .lightbox-previous { left: 16px; }
    .lightbox-next { right: 16px; }
    .lightbox-arrow { top: 43%; width: 38px; height: 38px; }
    .lightbox-shortcuts { display: none; }
}
@media (max-width: 380px) {
    .announcements-page .gallery-section { padding-inline: 12px; }
    .gallery-grid { grid-template-columns: minmax(0,1fr); grid-auto-rows: 220px; }
    .gallery-item-featured,.gallery-item-wide { grid-column: auto; grid-row: auto; }
    .gallery-header { flex-direction: column; }
    .gallery-total { align-self: flex-start; }
    .gallery-item figcaption h3,.gallery-item-featured figcaption h3,.gallery-item-wide figcaption h3 { font-size: .92rem; }
    .lightbox-figure figcaption { padding: 13px 4px 5px; }
}
@media (prefers-color-scheme: dark) {
    .announcements-page .gallery-section { color: #eaf2f2; }
    .gallery-header h2 { color: #edf4f5; }
    .gallery-header .gallery-heading-copy > p:last-child,.gallery-keyboard-hint,.gallery-total small,.gallery-status { color: #b4c4cc; }
    .gallery-total,.gallery-filter { border-color: #354953; background: #17262e; color: #c2d1d3; }
    .gallery-filter:hover { border-color: #426661; background: #20383a; color: #d6f3eb; }
    .gallery-filter.is-active { border-color: #087b78; background: #087b78; color: white; }
    .gallery-item { border-color: #354953; background: #17262e; }
    .gallery-item figcaption { background: #17262e; }
    .gallery-item figcaption h3 { color: #e1eeee; }
    .gallery-item figcaption p { color: #b4c4cc; }
    .gallery-caption-type { color: #78d6ca; }
    .gallery-empty { border-color: #405760; background: #17262e; color: #b4c4cc; }
    .gallery-empty strong { color: #eaf2f2; }
}
@media (prefers-reduced-motion: reduce) {
    .gallery-lightbox[open] { animation: none; }
    .gallery-item,.gallery-item img,.gallery-open-icon,.gallery-filter,.lightbox-close,.lightbox-arrow { transition: none !important; }
}
@media print {
    .gallery-toolbar,.gallery-status,.gallery-open-icon,.gallery-lightbox { display: none !important; }
    .gallery-grid { grid-auto-rows: 180px; }
    .gallery-item[hidden] { display: flex !important; }
    .gallery-item { break-inside: avoid; box-shadow: none; }
}