/* ================================================
   PALETTE OFFICIELLE – Cahier des normes CSS
   #00205f  bleu marine
   #0079b8  bleu moyen
   #01adf0  bleu ciel
   #e23a40  rouge
   #5b5d5f  gris foncé
   #6d6d6f  gris moyen
   Typographie : Ebrima (recommandée officiellement)
================================================ */

@font-face {
  font-family: 'Ebrima';
  src: url('../Fonts/ebrima.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap
}

:root {
  --navy:  #00205f;
  --blue:  #0079b8;
  --sky:   #01adf0;
  --red:   #e23a40;
  --grey:  #5b5d5f;
  --grey2: #6d6d6f;
  --white: #ffffff;
  --light: #f2f6fb;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Ebrima', 'Segoe UI', sans-serif;
  background: var(--white);
  color: var(--navy);
  overflow-x: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

body.page-enter {
  opacity: 1;
  transform: translateY(0);
}

body.page-exit {
  opacity: 0;
  transform: translateY(-8px);
}

@media (prefers-reduced-motion: reduce) {
  body {
    transition: none;
    transform: none;
    opacity: 1;
  }
}

/* ── NAVBAR ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 72px;
  border-bottom: 4px solid var(--sky);
  transition: box-shadow 0.3s ease;
}
.nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.nav-droide-logo {
  height: 44px;
  width: auto;
  filter: invert(1);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.nav-links a {
  font-family: 'Ebrima', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  padding: 7px 16px;
  border-radius: 4px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: background 0.18s, color 0.18s;
}
.nav-links a:hover,
.nav-links a.active {
  background: var(--sky);
  color: var(--white);
}
.nav-css-logo {
  margin-left: 16px;
  padding-left: 16px;
  border-left: 1px solid rgba(255,255,255,0.2);
}
.nav-css-logo img {
  display: block;
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.85;
  padding: 0 12px;
  box-sizing: content-box;
}

/* ── HERO ── */
.hero {
  background: var(--navy);
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 72px);
}
.hero::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 48%;
  width: 120px;
  background: var(--navy);
  transform: skewX(-4deg);
  z-index: 2;
}
.hero-visual {
  position: relative;
  z-index: 1;
  overflow: hidden;
}
.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0.9;
  display: block;
  will-change: transform;
}
.hero-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent 40%, var(--navy) 100%),
              linear-gradient(to bottom, rgba(0,32,95,0.2), transparent);
}
.hero-text {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 56px 64px 32px;
  gap: 28px;
}
.hero-eyebrow { display: flex; align-items: center; gap: 12px; }
.hero-eyebrow-line { width: 36px; height: 3px; background: var(--sky); flex-shrink: 0; }
.hero-eyebrow span {
  font-family: 'Ebrima', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--sky);
}
.hero-title {
  font-family: 'Ebrima', sans-serif;
  font-size: clamp(2.4rem, 4.5vw, 4rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.08;
  text-transform: uppercase;
}
.hero-title .accent     { color: var(--sky); }
.hero-title .accent-red { color: var(--red); }
.hero-desc {
  font-family: 'Ebrima', sans-serif;
  font-size: 1.05rem;
  color: rgba(255,255,255,0.72);
  line-height: 1.75;
  max-width: 440px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-primary {
  background: var(--sky);
  color: var(--white);
  font-family: 'Ebrima', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 14px 32px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: var(--blue); transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  color: var(--white);
  font-family: 'Ebrima', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 12px 30px;
  border: 2px solid rgba(255,255,255,0.35);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.btn-outline:hover { border-color: var(--sky); color: var(--sky); }
.hero-badge {
  position: absolute;
  bottom: 32px; left: 32px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0,32,95,0.75);
  border: 1px solid rgba(1,173,240,0.4);
  padding: 10px 18px;
  backdrop-filter: blur(8px);
}
.badge-droide-logo { height: 26px; width: auto; filter: invert(1); }
.hero-badge span {
  font-family: 'Ebrima', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ── STATS ── */
.stats {
  background: var(--sky);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  padding: 28px 20px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.3);
}
.stat:last-child { border-right: none; }
.stat-n {
  font-family: 'Ebrima', sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  transition: transform 0.2s ease;
}
.stat-l {
  font-family: 'Ebrima', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 6px;
}

/* ── SECTIONS ── */
.section { padding: 80px 48px; }
.section-inner { max-width: 1160px; margin: 0 auto; }
.section-label { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.section-label-line { width: 28px; height: 3px; background: var(--red); flex-shrink: 0; }
.section-label span {
  font-family: 'Ebrima', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--red);
}
.section-title {
  font-family: 'Ebrima', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  margin-bottom: 48px;
  line-height: 1.15;
}
.section-title span { color: var(--sky); }

/* ── ABOUT CARDS ── */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.about-card { padding: 40px 32px; position: relative; overflow: hidden; }
.about-card:nth-child(1) { background: var(--navy); color: var(--white); }
.about-card:nth-child(2) { background: var(--blue); color: var(--white); }
.about-card:nth-child(3) { background: var(--sky);  color: var(--white); }
.about-card::before {
  content: '';
  position: absolute;
  bottom: -20px; right: -20px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
}
.card-num {
  font-family: 'Ebrima', sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  opacity: 0.15;
  line-height: 1;
  margin-bottom: 16px;
}
.about-card h3 {
  font-family: 'Ebrima', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.about-card p {
  font-family: 'Ebrima', sans-serif;
  font-size: 0.9rem;
  line-height: 1.75;
  opacity: 0.88;
}

/* ── SECTION DARK ── */
.section-dark { background: var(--navy); padding: 80px 48px; }
.section-dark .section-title { color: var(--white); }
.section-dark .section-title span { color: var(--sky); }
.section-dark .section-label span { color: var(--sky); }
.section-dark .section-label-line { background: var(--sky); }
.nav-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.nav-card {
  border: 1px solid rgba(255,255,255,0.12);
  padding: 32px 28px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
}
.nav-card:hover { border-color: var(--sky); background: rgba(1,173,240,0.07); }
.nav-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.nav-card:nth-child(1)::before { background: var(--sky); }
.nav-card:nth-child(2)::before { background: var(--red); }
.nav-card:nth-child(3)::before { background: var(--blue); }
.nav-card-tag {
  font-family: 'Ebrima', sans-serif;
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--sky); margin-bottom: 12px;
}
.nav-card h3 {
  font-family: 'Ebrima', sans-serif;
  font-size: 1.3rem; font-weight: 700;
  color: var(--white); text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 10px;
}
.nav-card p {
  font-family: 'Ebrima', sans-serif;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.65; margin-bottom: 20px;
}
.nav-card-arrow { font-family: 'Ebrima', sans-serif; font-size: 1.1rem; color: var(--sky); font-weight: 700; }

/* ── FOOTER ── */
.footer { background: #0b0f1a; padding: 52px 48px 0; }
.footer-grid {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand { display: flex; flex-direction: column; gap: 16px; }
.footer-droide-logo {
  height: 50px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  filter: invert(1);
  opacity: 0.85;
}
.footer-brand-desc {
  font-family: 'Ebrima', sans-serif;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.7;
  max-width: 320px;
}
.footer-css-wrap { margin-top: 8px; }
.footer-css-logo {
  display: block;
  height: 50px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.7;
  padding: 10px 14px;
  box-sizing: content-box;
}
.footer-col h4 {
  font-family: 'Ebrima', sans-serif;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--sky); margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-family: 'Ebrima', sans-serif;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  margin-bottom: 10px;
  transition: color 0.18s;
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  max-width: 1160px;
  margin: 0 auto;
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-bottom p {
  font-family: 'Ebrima', sans-serif;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.25);
}
.footer-bottom .sky { color: var(--sky); }

/* ── PAGE HERO (pages intérieures) ── */
.page-hero { background: var(--navy); border-bottom: 4px solid var(--sky); }
.ph-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 400px;
}
.ph-text {
  padding: 64px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}
.ph-text .section-label-line { background: var(--sky); }
.ph-text .section-label span { color: var(--sky); }
.ph-title {
  font-family: 'Ebrima', sans-serif;
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  line-height: 1.08;
  animation: fadeUp 1s ease forwards;
}
.ph-title span { color: var(--sky); }
.ph-desc {
  font-family: 'Ebrima', sans-serif;
  font-size: 1rem;
  color: rgba(255,255,255,0.68);
  line-height: 1.75;
  max-width: 440px;
  animation: fadeUp 1.2s ease forwards;
}
.ph-img-wrap { position: relative; overflow: hidden; }
.ph-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  animation: zoomIn 1.2s ease forwards;
}
.ph-img-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--navy) 0%, transparent 30%);
  z-index: 1;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(1.08); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── TABS BAR ── */
.tabs-bar {
  background: var(--white);
  border-bottom: 3px solid #e8eef6;
  display: flex;
  padding: 0 48px;
  position: sticky;
  top: 72px;
  z-index: 50;
}
.tab-btn {
  font-family: 'Ebrima', sans-serif;
  font-size: 0.88rem; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--grey);
  background: none; border: none;
  border-bottom: 3px solid transparent;
  padding: 18px 28px;
  cursor: pointer;
  margin-bottom: -3px;
  transition: color 0.18s, border-color 0.18s;
  position: relative;
  overflow: hidden;
}
.tab-btn:hover { color: var(--blue); }
.tab-btn.active { color: var(--navy); border-bottom-color: var(--sky); }
.tab-btn::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--sky);
  transition: width 0.3s ease;
}
.tab-btn:hover::after,
.tab-btn.active::after { width: 100%; }

/* ── LEVEL / TAB SECTIONS ── */
.level-section {
  display: none;
  background: var(--light);
  opacity: 0;
  transform: translateY(40px);
  pointer-events: none;
  position: absolute;
  width: 100%;
  transition: all 0.5s ease;
}
.level-section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  position: relative;
}
.level-inner { max-width: 1160px; margin: 0 auto; padding: 60px 48px; }
.level-header { margin-bottom: 44px; }
.level-badge {
  display: inline-block;
  font-family: 'Ebrima', sans-serif;
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
  padding: 4px 14px; margin-bottom: 12px;
  color: var(--white);
}
.badge-1 { background: var(--sky); }
.badge-2 { background: var(--blue); }
.badge-3 { background: var(--navy); }
.badge-4 { background: var(--red); }
.badge-5 { background: var(--grey); }
.level-header h2 {
  font-family: 'Ebrima', sans-serif;
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.level-header p {
  font-family: 'Ebrima', sans-serif;
  font-size: 0.95rem;
  color: var(--grey);
  line-height: 1.75;
  max-width: 680px;
}

/* ── PROJECT CARDS ── */
.proj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.proj-card {
  background: var(--white);
  border: 1px solid #dde8f4;
  display: flex; flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
/*.proj-card:hover { transform: translateY(-4px); box-shadow: 0 12px 36px rgba(0,32,95,0.12); }*/
.proj-card-img { width: 100%; height: 220px; object-fit: cover; display: block; }
.proj-card-icon {
  height: 120px;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, #eaf2fb, #d6e8f7);
}
.proj-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.proj-card-body h3 {
  font-family: 'Ebrima', sans-serif;
  font-size: 1.05rem; font-weight: 700;
  color: var(--navy); text-transform: uppercase; letter-spacing: 1px;
}
.proj-card-body p {
  font-family: 'Ebrima', sans-serif;
  font-size: 0.88rem; color: var(--grey); line-height: 1.65; flex: 1;
}
.proj-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.proj-tag {
  font-family: 'Ebrima', sans-serif;
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--blue);
  background: rgba(0,121,184,0.1);
  padding: 3px 10px;
}
.proj-link {
  font-family: 'Ebrima', sans-serif;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--white);
  background: var(--blue);
  text-decoration: none;
  align-self: flex-start;
  margin-top: 8px;
  padding: 7px 16px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background 0.2s, gap 0.15s;
}
.proj-link::after { content: '→'; }
.proj-link:hover { background: var(--navy); gap: 12px; }

/* ── JEUX D'ÉLÈVES ── */
.games-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.game-card {
  background: var(--white);
  border: 1px solid #dde8f4;
  display: flex; flex-direction: column;
}
.game-preview {
  height: 220px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px;
  overflow: hidden;
}
.game-preview--placeholder { background: linear-gradient(135deg, #0d1e42, #1a3a6b); }
.game-preview-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.game-preview-icon { font-size: 3rem; }
.game-preview-label {
  font-family: 'Ebrima', sans-serif;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}
.game-info { padding: 22px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.game-meta { display: flex; align-items: center; gap: 10px; }
.game-level {
  font-family: 'Ebrima', sans-serif;
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--white); padding: 3px 10px;
}
.game-year { font-family: 'Ebrima', sans-serif; font-size: 0.75rem; color: var(--grey2); }
.game-info h3 {
  font-family: 'Ebrima', sans-serif;
  font-size: 1.05rem; font-weight: 700;
  color: var(--navy); text-transform: uppercase; letter-spacing: 1px;
}
.game-info p { font-family: 'Ebrima', sans-serif; font-size: 0.88rem; color: var(--grey); line-height: 1.65; }
.game-credits {
  list-style: none;
  display: flex; flex-direction: column; gap: 3px;
  flex: 1;
}
.game-credits li {
  font-family: 'Ebrima', sans-serif;
  font-size: 0.78rem; color: var(--grey);
}
.game-credits li span {
  font-weight: 700; color: var(--blue);
  text-transform: uppercase; letter-spacing: 0.5px;
  font-size: 0.68rem;
  margin-right: 6px;
}
.game-controls {
  list-style: none;
  display: flex; flex-direction: column; gap: 3px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(0, 0, 0, 0.1);
}
.game-controls li {
  font-family: 'Ebrima', sans-serif;
  font-size: 0.78rem; color: var(--grey);
}
.game-controls li span {
  display: inline-block;
  min-width: 70px;
  font-weight: 700; color: var(--sky);
  text-transform: uppercase; letter-spacing: 0.5px;
  font-size: 0.68rem;
  margin-right: 6px;
}
.btn-play {
  margin-top: 10px;
  background: var(--sky);
  color: var(--white);
  font-family: 'Ebrima', sans-serif;
  font-size: 0.82rem; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  padding: 10px 20px;
  border: none; cursor: pointer;
  transition: background 0.2s;
  align-self: flex-start;
}
.btn-play:hover:not(:disabled) { background: var(--blue); }
.btn-play:disabled { background: #c8d8e8; color: #8aa4bc; cursor: not-allowed; }
.game-card--submit { border: 2px dashed #b0c8e0; background: #f7fafd; cursor: default; }
.submit-inner {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 32px 24px; gap: 12px;
}
.submit-icon { font-size: 2.5rem; color: #b0c8e0; line-height: 1; }
.submit-inner h3 {
  font-family: 'Ebrima', sans-serif;
  font-size: 1rem; font-weight: 700;
  color: var(--blue); text-transform: uppercase; letter-spacing: 1px;
}
.submit-inner p { font-family: 'Ebrima', sans-serif; font-size: 0.85rem; color: var(--grey); line-height: 1.65; }

/* ── GALERIE ── */
.year-filter {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 28px;
}
.year-filter-label {
  display: flex;
  align-items: center;
  gap: 12px;
}
.year-filter-line {
  width: 36px;
  height: 2px;
  background: var(--sky);
}
.year-filter-label label {
  font-family: 'Ebrima', sans-serif;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--navy);
  cursor: pointer;
}
.year-select-wrap {
  position: relative;
  display: inline-block;
}
.year-select {
  font-family: 'Ebrima', sans-serif;
  font-size: 0.88rem; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--white);
  background: var(--navy);
  border: 2px solid var(--navy);
  border-bottom: 4px solid var(--sky);
  padding: 12px 52px 12px 22px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  min-width: 220px;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
}
.year-select:hover {
  background: var(--blue);
  border-color: var(--blue);
  border-bottom-color: var(--sky);
  transform: translateY(-2px);
}
.year-select:focus {
  outline: none;
  border-color: var(--sky);
  border-bottom-color: var(--sky);
}
.year-select option {
  background: var(--white);
  color: var(--navy);
  font-weight: 700;
  letter-spacing: 1px;
}
.year-select-arrow {
  position: absolute;
  right: 18px; top: 50%;
  transform: translateY(-55%);
  color: var(--sky);
  font-size: 1rem;
  font-weight: 700;
  pointer-events: none;
  transition: transform 0.2s;
}
.year-select-wrap:hover .year-select-arrow { transform: translateY(-45%); }
.gallery-item.is-hidden { display: none; }
.gallery-empty {
  padding: 40px 0;
  text-align: center;
  font-family: 'Ebrima', sans-serif;
  font-size: 0.95rem;
  color: var(--grey);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 12px;
}
.gallery-item {
  overflow: hidden;
  background: #dde8f4;
  content-visibility: auto;
  contain-intrinsic-size: 200px;
}
.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.gallery-item:hover .gallery-img { transform: scale(1.05); }
.gi-large { grid-column: span 2; grid-row: span 2; }
.gi-wide  { grid-column: span 2; }
.gallery-ph {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #d0dcea, #e4eef8);
  font-size: 2rem;
}
.gallery-ph p {
  font-family: 'Ebrima', sans-serif;
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--grey);
}

/* ── REVEAL SCROLL ── */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left  { transform: translateX(-80px); }
.reveal-right { transform: translateX(80px); }
.reveal-left.visible,
.reveal-right.visible { transform: translateX(0); }

/* ── COMPÉTITIONS ── */
.comp-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 48px;
  align-items: start;
}
.comp-title-row {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}
.comp-logo-block {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
/*.comp-logo-block:hover {
  transform: rotate(-3deg) scale(1.05);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}*/
.comp-logo-block span {
  font-family: 'Ebrima', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 2px;
}
.comp-logo--blue  { background: var(--blue); }
.comp-logo--red   { background: var(--red); }
.comp-logo--navy  { background: var(--navy); }
.comp-logo--sky   { background: var(--sky); }
.comp-title-row h2 {
  font-family: 'Ebrima', sans-serif;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  margin-top: 6px;
}
.comp-desc {
  font-family: 'Ebrima', sans-serif;
  font-size: 0.95rem;
  color: var(--grey);
  line-height: 1.8;
  margin-bottom: 16px;
  max-width: 640px;
}
.comp-details-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 32px 0;
}
.comp-detail-card {
  background: var(--white);
  border: 1px solid #dde8f4;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  transition: all 0.35s ease;
}
/*.comp-detail-card:hover {
  transform: translateY(-10px) scale(1.04);
  box-shadow: 0 20px 50px rgba(0,32,95,0.15);
}*/
.comp-detail-icon { font-size: 1.6rem; }
.comp-detail-label {
  font-family: 'Ebrima', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--grey2);
}
.comp-detail-val {
  font-family: 'Ebrima', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
}
.comp-link-btn {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  font-family: 'Ebrima', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 12px 28px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: background 0.2s;
}
.comp-link-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--blue);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 0;
}
.comp-link-btn:hover::before { transform: translateX(0); }
.comp-link-btn span,
.comp-link-btn { position: relative; z-index: 1; }
.comp-side { display: flex; flex-direction: column; gap: 20px; }
.comp-side-img {
  width: 100%;
  height: 240px;
  overflow: hidden;
}
.comp-side-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.6s ease;
}
.comp-side-img:hover img { transform: scale(1.1); }
.comp-side-results {
  background: var(--white);
  border: 1px solid #dde8f4;
  padding: 22px;
}
.comp-side-results h4 {
  font-family: 'Ebrima', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 16px;
}
.comp-result {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid #eef2f8;
  opacity: 0;
  transform: translateX(-20px);
  animation: slideIn 0.6s ease forwards;
}
.comp-result:last-child { border-bottom: none; }
.comp-result:nth-child(2) { animation-delay: 0.1s; }
.comp-result:nth-child(3) { animation-delay: 0.2s; }
.comp-result:nth-child(4) { animation-delay: 0.3s; }
.comp-result-year {
  font-family: 'Ebrima', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
  flex-shrink: 0;
}
.comp-result-desc {
  font-family: 'Ebrima', sans-serif;
  font-size: 0.85rem;
  color: var(--grey);
}
.ph-img,
.comp-side-img img,
.gallery-img {
  cursor: zoom-in;
}
.ph-img,
.comp-side-img img {
  transition: transform 0.25s ease;
}
.ph-img:hover,
.comp-side-img img:hover {
  transform: scale(1.02);
}

/* Lightbox */
body.lightbox-open {
  transform: none !important;
}
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 32, 95, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 40px;
  cursor: zoom-out;
}
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}
.lightbox-img {
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}
.lightbox.is-open .lightbox-img {
  transform: scale(1);
}
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 12px;
  border-radius: 50%;
  transition: background 0.2s ease;
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 1024px) {

  .navbar {
    padding: 0 24px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero::after {
    display: none;
  }

  .hero-visual {
    height: 420px;
  }

  .hero-text {
    padding: 56px 40px;
    text-align: center;
    align-items: center;
  }

  .hero-desc {
    max-width: 700px;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-badge {
    position: static;
    margin: 0 auto 40px;
    width: fit-content;
  }

  .cards-3,
  .nav-cards,
  .proj-grid,
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid,
  .comp-layout,
  .ph-inner {
    grid-template-columns: 1fr;
  }

  .comp-details-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .section,
  .section-dark,
  .level-inner {
    padding-left: 32px;
    padding-right: 32px;
  }
}
@media (max-width: 768px) {

  .navbar {
    height: auto;
    padding: 18px;
    flex-direction: column;
    gap: 18px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-css-logo {
    display: none;
  }

  .hero-visual {
    height: 280px;
  }

  .hero-text {
    padding: 42px 20px;
  }

  .hero-title {
    font-size: 2.8rem;
  }

  .hero-desc {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .hero-cta {
    width: 100%;
    flex-direction: column;
  }

  .btn-primary,
  .btn-outline {
    width: 100%;
  }

  .cards-3,
  .nav-cards,
  .proj-grid,
  .games-grid,
  .gallery-grid,
  .footer-grid,
  .stats,
  .comp-details-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-auto-rows: 220px;
  }

  .gi-large,
  .gi-wide {
    grid-column: span 1;
    grid-row: span 1;
  }

  .section-title,
  .ph-title {
    font-size: 2rem;
  }

  .section-label span,
  .hero-eyebrow span {
    letter-spacing: 2px;
  }

  .section,
  .section-dark,
  .level-inner,
  .ph-text {
    padding-left: 20px;
    padding-right: 20px;
  }

  .tabs-bar {
    overflow-x: auto;
    padding: 0 8px;
  }

  .tab-btn {
    white-space: nowrap;
    padding: 14px 16px;
    font-size: 0.75rem;
  }

  .footer {
    padding: 48px 20px 0;
    text-align: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 10px;
  }

  .comp-title-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
@media (max-width: 480px) {

  .hero-title {
    font-size: 2.2rem;
  }

  .section-title,
  .ph-title {
    font-size: 1.7rem;
  }

  .hero-desc,
  .about-card p,
  .nav-card p,
  .proj-card-body p,
  .game-info p {
    font-size: 0.9rem;
  }

  .card-num {
    font-size: 2.8rem;
  }

  .stat-n {
    font-size: 2rem;
  }

  .hero-badge {
    flex-direction: column;
    text-align: center;
  }

  .comp-title-row {
    flex-direction: column;
    align-items: flex-start;
  }
}




/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-visual { height: 300px; }
  .hero::after { display: none; }
  .hero-text { padding: 48px 28px; }
  .cards-3, .nav-cards { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .navbar { padding: 0 24px; }
  .section, .section-dark { padding: 56px 24px; }
  .ph-inner { grid-template-columns: 1fr; }
  .ph-img-wrap { height: 260px; }
  .ph-text { padding: 48px 24px; }
  .tabs-bar { padding: 0 16px; overflow-x: auto; }
  .tab-btn { padding: 14px 16px; font-size: 0.8rem; }
  .proj-grid, .games-grid { grid-template-columns: 1fr; }
  .level-inner { padding: 40px 24px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gi-large, .gi-wide { grid-column: span 1; grid-row: span 1; }
  .comp-layout { grid-template-columns: 1fr; }
  .comp-details-grid { grid-template-columns: repeat(2, 1fr); }
  .comp-title-row { flex-direction: column; align-items: flex-start; gap: 14px; }
}