/* ==========================================================================
   ONACIG / SilyPay — Site public : hero photographique, mosaïque, galerie
   ========================================================================== */

/* ---------- HERO ---------- */
.site-hero { position: relative; min-height: clamp(520px, 78vh, 760px); background: var(--onacig-primary-dark); color: #fff; overflow: hidden; isolation: isolate; }
.site-slide-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity 1.2s ease, transform 7s linear; z-index: -3; }
.site-slide-img.is-active { opacity: 1; transform: scale(1); }
.site-hero::before { content: ""; position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(90deg, rgba(8,26,28,.92) 0%, rgba(11,34,36,.72) 42%, rgba(11,34,36,.18) 100%),
              linear-gradient(0deg, rgba(8,26,28,.75) 0%, rgba(8,26,28,0) 38%); }
.site-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; z-index: 2;
  background: linear-gradient(90deg, var(--guinee-red) 0 33.3%, var(--onacig-gold) 33.3% 66.6%, var(--guinee-green) 66.6%); }
.site-hero__inner { min-height: inherit; display: flex; flex-direction: column; justify-content: center; padding: 4.5rem 0 9.5rem; }
.site-badge { display: inline-flex; align-items: center; gap: .5rem; align-self: flex-start; padding: .38rem .9rem; border-radius: 999px; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  background: rgba(252,209,22,.14); border: 1px solid rgba(252,209,22,.45); color: var(--onacig-gold); }
.site-texts { display: grid; margin-top: 1.2rem; max-width: 760px; }
.site-text { grid-area: 1 / 1; opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; pointer-events: none; }
.site-text.is-active { opacity: 1; transform: none; pointer-events: auto; }
.site-text h1 { font-weight: 800; font-size: clamp(2rem, 4.8vw, 3.5rem); line-height: 1.08; letter-spacing: -.02em; color: #fff; margin: 0 0 .9rem; text-wrap: balance; }
.site-text h1::after { content: ""; display: block; width: 64px; height: 4px; border-radius: 3px; background: var(--onacig-gold); margin-top: 1rem; }
.site-text p { font-size: clamp(1rem, 1.6vw, 1.2rem); color: rgba(255,255,255,.88); max-width: 620px; margin: 0; }
.site-hero__desc { max-width: 600px; margin-top: 1.3rem; color: rgba(255,255,255,.72); font-size: .98rem; }
.site-hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.btn-ghost-light { border: 1.5px solid rgba(255,255,255,.55); color: #fff; background: rgba(255,255,255,.06); border-radius: 999px; padding: .8rem 1.5rem; font-weight: 700; backdrop-filter: blur(4px); transition: all .2s var(--ease); text-decoration: none; display: inline-flex; align-items: center; gap: .5rem; }
.btn-ghost-light:hover { background: #fff; color: var(--onacig-primary); }
.site-controls { position: absolute; left: 0; right: 0; bottom: 4.9rem; z-index: 3; }
.site-controls .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-dots { display: flex; gap: .5rem; align-items: center; }
.site-dot { width: 34px; height: 4px; border: 0; padding: 0; border-radius: 3px; background: rgba(255,255,255,.35); cursor: pointer; position: relative; overflow: hidden; }
.site-dot.is-active { background: rgba(255,255,255,.35); }
.site-dot.is-active::after { content: ""; position: absolute; inset: 0; background: var(--onacig-gold); transform-origin: left; animation: siteDot var(--slide-ms, 6500ms) linear forwards; }
.site-hero.is-paused .site-dot.is-active::after { animation-play-state: paused; }
@keyframes siteDot { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.site-credit { font-size: .74rem; color: rgba(255,255,255,.7); letter-spacing: .03em; }
.site-credit i { color: var(--onacig-gold); }
.site-arrows { display: flex; gap: .4rem; }
.site-arrow { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.08); color: #fff; display: grid; place-items: center; cursor: pointer; transition: all .2s; }
.site-arrow:hover { background: var(--onacig-gold); color: var(--onacig-primary-dark); border-color: var(--onacig-gold); }
@media (prefers-reduced-motion: reduce) { .site-slide-img, .site-text { transition: opacity .2s; transform: none !important; } .site-dot.is-active::after { animation: none; transform: none; } }

/* ---------- Chiffres clés ---------- */
.site-stats { position: relative; z-index: 4; margin-top: -3.2rem; }
.site-stats__card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); display: grid; grid-template-columns: repeat(4, 1fr); overflow: hidden; border: 1px solid var(--line); }
.site-stat { padding: 1.5rem 1.4rem; text-align: center; position: relative; }
.site-stat + .site-stat::before { content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 1px; background: var(--line-strong); }
.site-stat strong { display: block; font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; color: var(--onacig-primary); line-height: 1.1; }
.site-stat span { font-size: .86rem; color: var(--muted); }
@media (max-width: 767px) { .site-stats__card { grid-template-columns: repeat(2, 1fr); } .site-stat:nth-child(3)::before { display: none; } .site-stat:nth-child(n+3) { border-top: 1px solid var(--line); } }

/* ---------- Mosaïque ---------- */
.mosaic { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 190px; grid-auto-flow: dense; gap: .8rem; }
.mosaic .tile:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.mosaic .tile:nth-child(4) { grid-row: span 2; }
.mosaic .tile:nth-child(9) { grid-column: 1 / -1; }
.mosaic .tile:nth-child(9) img { object-position: center 24%; }
@media (max-width: 991px) { .mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; } }
.tile, .gal-item { position: relative; border-radius: var(--radius); overflow: hidden; cursor: zoom-in; background: var(--surface-soft); border: 0; padding: 0; display: block; width: 100%; text-align: left; box-shadow: var(--shadow-sm); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); display: block; }
.tile:hover img, .gal-item:hover img { transform: scale(1.05); }
.tile figcaption, .gal-item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 2.4rem 1rem .85rem; color: #fff; font-size: .85rem; font-weight: 700; line-height: 1.25;
  background: linear-gradient(0deg, rgba(8,26,28,.85), transparent); transform: translateY(35%); opacity: 0; transition: all .35s var(--ease); }
.tile figcaption small, .gal-item figcaption small { display: block; font-weight: 500; opacity: .8; font-size: .72rem; margin-top: .15rem; }
.tile:hover figcaption, .tile:focus-visible figcaption, .gal-item:hover figcaption, .gal-item:focus-visible figcaption { transform: none; opacity: 1; }
@media (hover: none) { .tile figcaption, .gal-item figcaption { transform: none; opacity: 1; } }

/* ---------- Page galerie ---------- */
.gal-masonry { column-count: 3; column-gap: 1rem; }
.gal-item { margin: 0 0 1rem; break-inside: avoid; }
.gal-item img { width: 100%; height: auto; display: block; transition: transform .6s var(--ease); }
@media (max-width: 991px) { .gal-masonry { column-count: 2; } }
@media (max-width: 575px) { .gal-masonry { column-count: 1; } }
.gal-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 600; font-size: .86rem; text-decoration: none; transition: all .2s; }
.gal-chip em { font-style: normal; font-size: .72rem; color: var(--muted); }
.gal-chip:hover { border-color: var(--onacig-primary); color: var(--onacig-primary); }
.gal-chip.is-active { background: var(--onacig-primary); border-color: var(--onacig-primary); color: #fff; }
.gal-chip.is-active em { color: rgba(255,255,255,.7); }
.gal-hero { background: linear-gradient(120deg, var(--onacig-primary-dark), var(--onacig-primary-light)); color: #fff; padding: 3.2rem 0 2.6rem; position: relative; }
.gal-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, var(--guinee-red) 0 33.3%, var(--onacig-gold) 33.3% 66.6%, var(--guinee-green) 66.6%); }
.gal-hero h1 { color: #fff; font-weight: 800; }
.gal-hero p { color: rgba(255,255,255,.8); max-width: 640px; }

/* ---------- Institution / CTA ---------- */
.about-photo { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4 / 5; background: var(--surface-soft); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-photo::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); pointer-events: none; }
.photo-credit { position: absolute; left: .8rem; bottom: .7rem; font-size: .7rem; color: #fff; background: rgba(8,26,28,.6); padding: .2rem .55rem; border-radius: 6px; backdrop-filter: blur(3px); }
.site-cta { position: relative; color: #fff; overflow: hidden; border-radius: var(--radius-lg); isolation: isolate; background: var(--onacig-primary-dark); }
.site-cta__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.site-cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(8,26,28,.93), rgba(11,34,36,.62)); }
.site-cta h3 { color: #fff; font-weight: 800; }
.site-cta p { color: rgba(255,255,255,.82); }

/* ---------- Visionneuse ---------- */
.lb { position: fixed; inset: 0; z-index: 2000; background: rgba(5,16,17,.94); display: none; align-items: center; justify-content: center; padding: 1.2rem; }
.lb.is-open { display: flex; animation: lbIn .25s ease; }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
.lb figure { margin: 0; max-width: min(1100px, 100%); text-align: center; }
.lb img { max-width: 100%; max-height: 78vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lb figcaption { color: #fff; margin-top: .9rem; font-weight: 700; }
.lb figcaption small { display: block; color: rgba(255,255,255,.7); font-weight: 500; margin-top: .2rem; }
.lb button { position: absolute; border: 0; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 1.3rem; cursor: pointer; display: grid; place-items: center; }
.lb button:hover { background: var(--onacig-gold); color: var(--onacig-primary-dark); }
.lb .lb-x { top: 1rem; right: 1rem; } .lb .lb-prev { left: 1rem; top: 50%; } .lb .lb-next { right: 1rem; top: 50%; }
