:root {
    --bg: #0f1115;
    --text: #f4f6fb;
    --muted: #b5bfd2;
    --line: rgba(255, 255, 255, .08);
    --accent: #884892;
    --accent2: #beb3f0;
    --shadow: 0 22px 50px rgba(0, 0, 0, .28);
    --radius: 24px;
    --max: 1220px
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    font-family: Inter, system-ui, Segoe UI, Roboto, Arial, sans-serif;
    background: radial-gradient(circle at top, #1d2434 0%, var(--bg) 36%);
    color: var(--text);
    line-height: 1.6
}

a {
    color: inherit;
    text-decoration: none
}

.container {
    width: min(100% - 32px, var(--max));
    margin: 0 auto
}

.header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(12px);
    background: rgba(15, 17, 21, .74);
    border-bottom: 1px solid var(--line)
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 76px
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, var(--accent), #232d89);
    color: #101216;
    font-weight: 900;
    box-shadow: var(--shadow)
}

.brand-stack {
    display: flex;
    flex-direction: column;
    line-height: 1.05
}

.brand-stack small {
    color: var(--muted);
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase
}

.nav-links {
    display: flex;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap
}

.nav-links a {
    color: var(--muted)
}

.nav-links a[aria-current="page"],
.nav-links a:hover {
    color: var(--text)
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 700
}

.btn-primary {
    background: linear-gradient(145deg, var(--accent), #232d89);
    color: #151515
}

.btn-secondary {
    background: rgba(255, 255, 255, .04);
    border-color: var(--line)
}

.hero {
    padding: 92px 0 40px
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 32px;
    align-items: center
}

.kicker {
    color: var(--accent2);
    text-transform: uppercase;
    letter-spacing: .18em;
    font-size: .82rem
}

.hero h1 {
    font-size: clamp(2.4rem, 4.4vw, 4.8rem);
    line-height: 1.05;
    margin: 12px 0 18px
}

.hero p,
.section-head p,
.card p,
.list,
.small {
    color: var(--muted)
}

.hero-actions,
.socials,
.filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap
}

.hero-card,
.card {
    background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .03));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow)
}

.hero-card {
    padding: 18px
}

.mosaic {
    display: grid;
    gap: 12px;
    grid-template-columns: 1.05fr .95fr;
    min-height: 500px
}

.mosaic-col {
    display: grid;
    gap: 12px
}

.fake-photo,
.gallery-thumb {
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .55) 100%), linear-gradient(135deg, #232d89 0%, #22293a 55%, #0f1115 100%);
    border: 1px solid var(--line)
}

.fake-photo {
    min-height: 170px
}

.fake-photo::after,
.gallery-thumb {
    margin: 0;
}

.gallery-thumb::after {
    position: absolute;
    left: 14px;
    bottom: 14px;
    color: #fff;
    font-weight: 700
}

.fake-photo::after {
    content: attr(data-label)
}

.section {
    padding: 44px 0
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px
}

.section-head h1,
.section-head h2 {
    font-size: clamp(1.65rem, 2.8vw, 2.5rem);
    margin: 0
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px
}

.card-body {
    padding: 20px
}

.tag {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(213, 177, 123, .12);
    color: var(--accent2);
    font-size: .86rem;
    margin-bottom: 12px
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px
}

.stat {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--line)
}

.stat strong {
    display: block;
    font-size: 1.55rem
}

.filter-btn {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .04);
    color: var(--text);
    padding: 10px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600
}

.filter-btn.active,
.filter-btn:hover {
    background: rgba(213, 177, 123, .16);
    border-color: rgba(213, 177, 123, .35)
}

.gallery {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 1100px) {
    .gallery {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .gallery {
        grid-template-columns: minmax(0, 1fr);
    }
}

.gallery-item {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #0d1016
}

.gallery-thumb {
  aspect-ratio: 4 / 3;     /* ✅ ratio photo naturel */
  overflow: hidden;
  background: linear-gradient(
      180deg,
      transparent 0%,
      rgba(0, 0, 0, .55) 100%
    ),
    linear-gradient(
      135deg,
      #232d89 0%,
      #22293a 55%,
      #0f1115 100%
    );
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;     /* ✅ aucune déformation */
  display: block;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* ou cover */
}

.gallery-thumb img {
    object-fit: cover;
}

.gallery-thumb {
    aspect-ratio: 3 / 2;
}

.gallery-thumb.is-portrait {
    aspect-ratio: 2 / 3;
}

.gallery-thumb.is-square {
    aspect-ratio: 1 / 1;
}

.gallery-thumb::after {
    content: attr(data-title)
}

.gallery-meta {
    padding: 14px
}

.upload-progress,
.download-progress {
    width: 100%;
    height: 12px;
    accent-color: var(--accent);
}

button:disabled,
a[aria-disabled="true"] {
    opacity: .65;
    cursor: wait;
}

a[aria-disabled="true"] {
    pointer-events: none;
}

.cta-panel {
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    gap: 18px;
    align-items: stretch;
    background: linear-gradient(135deg, rgba(213, 177, 123, .10), rgba(255, 255, 255, .04));
    border: 1px solid var(--line);
    padding: 24px;
    border-radius: 28px;
    box-shadow: var(--shadow)
}

.list {
    padding-left: 18px
}

.fake-photo {
  background-size: 110% auto;   /* ✅ zoom doux */
  background-position: center;
  background-repeat: no-repeat;
  transition:
    background-image 1s ease,
    background-size 1.5s ease;
}

.fake-photo {
  background-size: contain;     /* ✅ aucune coupe */
  background-position: center;
  background-repeat: no-repeat;
  background-color: #0f1115;    /* fond élégant */
}

.fake-photo {
  background-size: 115% auto;
  cursor: pointer;
}

.fake-photo:hover {
  background-size: 105% auto;
}

.fake-photo:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.footer {
    border-top: 1px solid var(--line);
    margin-top: 52px;
    padding: 26px 0 50px;
    color: var(--muted)
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.1fr .8fr .8fr;
    gap: 18px
}

.input,
.textarea,
.select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    color: var(--text);
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--line)
}

.textarea {
    min-height: 160px;
    resize: vertical
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px
}

.breadcrumb {
    color: var(--muted);
    font-size: .95rem;
    margin-bottom: 12px
}

.note {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(147, 212, 179, .08);
    border: 1px solid rgba(147, 212, 179, .18);
    color: #dff7ea
}

.note-danger {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(240, 179, 179, .08);
    border: 1px solid rgba(240, 179, 179, .18);
    color: #ffd9d9
}

.cv-layout {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 18px
}

.cv-side,
.cv-main {
    display: grid;
    gap: 18px
}

.cv-list {
    display: grid;
    gap: 12px
}

.cv-item {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--line)
}

.cv-item strong {
    display: block;
    margin-bottom: 4px
}

code {
    background: rgba(255, 255, 255, .06);
    padding: 2px 6px;
    border-radius: 8px
}

/* ================= LIGHTBOX ================= */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5000;
}

.lightbox[aria-hidden="false"] {
  display: flex;
}
 

.lightbox-inner {
  pointer-events: auto;
}

.lightbox {
  pointer-events: auto;
}



.lightbox-inner img {
  max-width: min(90vw, 1200px); /* jamais plus large que l'écran */
  max-height: 80vh;             /* jamais plus haut que l’écran */
  width: auto;
  height: auto;

  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  color: #fff;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.lightbox-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: calc(100vw - 144px);
  max-height: 80vh;
}

.lightbox-inner img {
  max-width: min(82vw, 1200px);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  background: rgba(20, 24, 32, .72);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  z-index: 2;
}

.lightbox-nav:hover,
.lightbox-close:hover {
  background: rgba(213, 177, 123, .85);
  color: #111;
}

.lightbox-prev {
  left: 24px;
}

.lightbox-next {
  right: 24px;
}

@media (max-width:980px) {

    .hero-grid,
    .cta-panel,
    .footer-grid,
    .grid-3,
    .grid-2,
    .stats,
    .cv-layout {
        grid-template-columns: 1fr 1fr
    }
}

@media (max-width:760px) {

    .nav {
        flex-direction: row;
        align-items: center;
    }

    .nav-links {
        display: none;
    }

    .hero {
        padding-top: 48px
    }

    .hero-grid,
    .cta-panel,
    .footer-grid,
    .grid-3,
    .grid-2,
    .stats,
    .cv-layout,
    .form-grid {
        grid-template-columns: 1fr
    }

    .mosaic {
        min-height: 380px
    }

    .nav-toggle {
    display: none;
    }

@media (max-width:760px) {

    .nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 26px;
        height: 18px;
        background: none;
        border: none;
        padding: 0;
        cursor: pointer;
    }

    .nav-toggle span {
        height: 2px;
        background: var(--text);
        border-radius: 2px;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(15, 17, 21, .98);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 1.2rem;
        gap: 1rem;
        border-bottom: 1px solid var(--line);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 600px) {
  .lightbox-inner {
    max-width: calc(100vw - 96px);
  }

  .lightbox-inner img {
    max-width: 100%;
    max-height: 75vh;
  }

  .lightbox-close {
    top: 12px;
    right: 12px;
  }

  .lightbox-nav {
    width: 42px;
    height: 42px;
    font-size: 18px;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }
}

.admin-gallery .gallery-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
}

.btn-danger {
  background: #c0392b;
  border: none;
  color: #fff;
}


}
