/* ════
   PENELOPE SARL — Design System Premium
   © 2026 Penelope Sarl, Douala, Cameroun
   ════ */

:root {
  --gold: #C9A84C;
  --gold-light: #E8C97A;
  --dark: #0A0A0F;
  --dark-2: #111118;
  --dark-3: #16161F;
  --dark-card: #1A1A26;
  --border: rgba(201, 168, 76, 0.2);
  --text-muted: rgba(255, 255, 255, 0.45);
  --text-light: rgba(255, 255, 255, 0.75);
}

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

body {
  font-family: 'Outfit', sans-serif;
  background: var(--dark);
  color: #fff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .serif { font-family: 'Cormorant Garamond', serif; }

/* Grain texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='https://i.ytimg.com/vi/Ys-R-zg6kb0/maxresdefault.jpg id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
}

/* ─── NAVBAR ─── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 0 clamp(24px, 5vw, 80px);
  height: 72px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(20px);
}

.nav-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-logo-mark {
  width: 36px; height: 36px;
  border: 1.5px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px; font-weight: 600; color: var(--gold); letter-spacing: 1px;
}
.nav-logo-text { font-family: 'Cormorant Garamond', serif; font-size: 18px; font-weight: 600; color: #fff; letter-spacing: .5px; }

.nav-links { display: flex; align-items: center; gap: 36px; list-style: none; }
.nav-links a {
  text-decoration: none; font-size: 13px; font-weight: 400;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-light); transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }

.nav-cta {
  padding: 10px 24px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase; transition: all .3s ease;
}
.nav-cta:hover { background: var(--gold); color: var(--dark); }

.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; background: none; border: none; padding: 4px;
}
.nav-hamburger span { display: block; width: 22px; height: 1.5px; background: var(--gold); transition: all .3s; }

.mobile-nav {
  display: none; position: fixed; top: 72px; left: 0; right: 0;
  background: var(--dark-2); border-bottom: 1px solid var(--border);
  padding: 0 clamp(24px, 5vw, 80px); z-index: 999;
  flex-direction: column; gap: 0;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  text-decoration: none; font-size: 13px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-light);
  padding: 16px 0; border-bottom: 1px solid var(--border);
  transition: color .2s;
}
.mobile-nav a:hover { color: var(--gold); }
.mobile-nav a:last-child { border-bottom: none; }

/* ─── PAGE HEADER ─── */
.page-header {
  padding: clamp(110px, 14vw, 160px) clamp(24px, 6vw, 100px) clamp(60px, 8vw, 100px);
  background: var(--dark-2);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.page-header-tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 24px;
}
.page-header-tag::before { content: ''; display: block; width: 32px; height: 1px; background: var(--gold); }

.page-header h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(44px, 6vw, 88px);
  font-weight: 300; line-height: 1.05; letter-spacing: -.02em;
  margin-bottom: 20px;
}
.page-header h1 em { font-style: italic; color: var(--gold); }

.page-header p {
  font-size: 17px; color: var(--text-light); line-height: 1.7;
  max-width: 560px; font-weight: 300;
}

/* ─── SECTIONS ─── */
.section { padding: clamp(70px, 9vw, 120px) clamp(24px, 6vw, 100px); }

.section-tag {
  font-size: 10px; letter-spacing: .25em; text-transform: uppercase;
  color: var(--gold); display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px;
}
.section-tag::after { content: ''; flex: 1; max-width: 48px; height: 1px; background: var(--gold); }

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(34px, 4vw, 58px); font-weight: 300;
  line-height: 1.1; letter-spacing: -.01em;
}
.section-title em { font-style: italic; color: var(--gold); }

/* ─── BUTTONS ─── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 34px; background: var(--gold);
  color: var(--dark); text-decoration: none;
  font-size: 12px; font-weight: 600; letter-spacing: .15em;
  text-transform: uppercase; transition: all .3s ease;
}
.btn-primary:hover {
  background: var(--gold-light); transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(201, 168, 76, .25);
}

.btn-ghost {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 0; color: var(--text-light); text-decoration: none;
  font-size: 12px; font-weight: 500; letter-spacing: .12em;
  text-transform: uppercase; border-bottom: 1px solid rgba(255,255,255,.2);
  transition: all .3s;
}
.btn-ghost:hover { color: var(--gold); border-color: var(--gold); }

.btn-outline {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 30px; border: 1px solid var(--border);
  color: var(--text-light); text-decoration: none;
  font-size: 12px; font-weight: 500; letter-spacing: .12em;
  text-transform: uppercase; transition: all .3s;
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

/* ─── TICKER ─── */
.ticker {
  background: var(--dark-2); border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); padding: 18px 0;
  overflow: hidden; position: relative;
}
.ticker-fade-l { position: absolute; left: 0; top: 0; bottom: 0; width: 120px; background: linear-gradient(to right, var(--dark-2), transparent); z-index: 2; }
.ticker-fade-r { position: absolute; right: 0; top: 0; bottom: 0; width: 120px; background: linear-gradient(to left, var(--dark-2), transparent); z-index: 2; }
.ticker-track { display: flex; width: max-content; animation: ticker 40s linear infinite; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker-track:hover { animation-play-state: paused; }
.ticker-item {
  display: flex; align-items: center; gap: 32px; padding: 0 40px;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--text-muted); white-space: nowrap;
}
.ticker-item::after { content: '◆'; font-size: 6px; color: var(--gold); }

/* ─── GRID CARDS (services style) ─── */
.grid-bordered {
  display: grid; gap: 1px;
  background: var(--border); border: 1px solid var(--border);
}
.grid-bordered-3 { grid-template-columns: repeat(3, 1fr); }
.grid-bordered-2 { grid-template-columns: repeat(2, 1fr); }

.card-dark {
  background: var(--dark-2); padding: 40px 36px;
  position: relative; overflow: hidden;
  transition: background .4s ease;
}
.card-dark::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--gold); transform: scaleX(0); transform-origin: left;
  transition: transform .4s ease;
}
.card-dark:hover { background: var(--dark-card); }
.card-dark:hover::before { transform: scaleX(1); }

/* ─── CTA BAND ─── */
.cta-band {
  background: var(--gold);
  padding: clamp(70px, 9vw, 120px) clamp(24px, 6vw, 100px);
  display: grid; grid-template-columns: 1fr auto;
  align-items: center; gap: 40px;
}
.cta-band-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(38px, 4.5vw, 68px); font-weight: 300;
  color: var(--dark); line-height: 1.1; letter-spacing: -.02em;
}
.cta-band-title em { font-style: italic; }
.btn-dark {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 18px 40px; background: var(--dark); color: var(--gold);
  text-decoration: none; font-size: 12px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; white-space: nowrap; transition: all .3s;
}
.btn-dark:hover { background: var(--dark-3); }

/* ─── DIVIDER ─── */
.divider { height: 1px; background: var(--border); }

/* ─── FOOTER ─── */
.footer {
  background: var(--dark-2); border-top: 1px solid var(--border);
  padding: clamp(64px, 8vw, 100px) clamp(24px, 6vw, 100px) 40px;
}
.footer-top {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px; padding-bottom: 60px;
  border-bottom: 1px solid var(--border); margin-bottom: 40px;
}
.footer-brand p { font-size: 13px; line-height: 1.8; color: var(--text-muted); margin: 20px 0 24px; font-weight: 300; max-width: 280px; }
.footer-contact-item { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.footer-contact-item span { color: var(--gold); font-size: 12px; }
.footer-col h4 { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-bottom: 24px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-col a { text-decoration: none; font-size: 13px; color: var(--text-muted); transition: color .2s; font-weight: 300; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-bottom p, .footer-bottom a { font-size: 12px; color: var(--text-muted); letter-spacing: .04em; text-decoration: none; }
.footer-bottom a:hover { color: var(--gold); }

/* ─── ANIMATIONS ─── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { opacity: 0; animation: fadeUp .8s ease forwards; }
.d1 { animation-delay: .1s; } .d2 { animation-delay: .25s; } .d3 { animation-delay: .4s; }

/* ─── ACCESSIBILITY ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .ticker-track { animation: none; }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1100px) {
  .grid-bordered-3 { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
  .cta-band { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .grid-bordered-3, .grid-bordered-2 { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .cta-band { grid-template-columns: 1fr; }
}

/* === LOGOS TICKER === */
.logos-ticker {
  width: 100%;
  overflow: hidden;
}

.logos-ticker-track {
  display: flex;
  align-items: center;
  gap: 60px;
  animation: logos-scroll 35s linear infinite;
  width: max-content;
}

.ticker-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 70px;
  min-width: 140px;
}

.ticker-logo img {
  max-width: 140px;
  max-height: 60px;
  height: auto;
  width: auto;
  object-fit: contain;
  opacity: 0.6;
  filter: grayscale(1) brightness(1.5);
  transition: all 0.4s ease;
}

.ticker-logo img:hover {
  opacity: 1;
  filter: grayscale(0) brightness(1);
}

@keyframes logos-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.logos-ticker-track:hover {
  animation-play-state: paused;
}

/* === GALERIE === */
.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* === ÉVÉNEMENTS RESPONSIVE === */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}
/* Conteneur flex pour titre + image à droite */
.formation-title-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

/* Petit cadre image à droite */
.formation-title-image {
  width: 120px;
  height: 90px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--dark-3);
  box-shadow: 0 6px 15px rgba(0,0,0,0.4);
  transition: transform 0.3s ease;
}

.formation-title-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.formation-title-image:hover {
  transform: scale(1.05);
}
/* ------- Galerie : grille propre et images centrées ------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  align-items: stretch;
  margin: 0 auto;
  padding: 8px;
}

/* Chaque cellule : on centre le visuel */
.gallery-item {
  background: var(--dark-3);
  border: 1px solid var(--border);
  overflow: hidden;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px; /* hauteur minimale esthétique */
  position: relative;
}

/* Contrainte de l'image pour qu'elle remplisse proprement */
.gallery-item img,
.gallery-item picture,
.gallery-item .gallery-media {
  width: 100%;
  height: 100%;
  object-fit: cover;       /* recadrage propre */
  object-position: center; /* centre le sujet */
  display: block;
  transition: transform .6s cubic-bezier(.2,.9,.3,1), filter .45s ease, opacity .45s ease;
  transform-origin: center;
  filter: grayscale(0.35) contrast(1.05);
  opacity: 0.95;
}

/* Hover : premium subtle effect */
.gallery-item:hover img {
  transform: scale(1.06);
  filter: grayscale(0) contrast(1);
  opacity: 1;
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
}

/* Optional caption overlay (small, subtle) */
.gallery-caption {
  position: absolute;
  left: 12px;
  bottom: 10px;
  font-size: 12px;
  color: rgba(255,255,255,0.9);
  background: rgba(10,10,10,0.35);
  padding: 6px 10px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
  display: none; /* active si tu veux montrer des légendes */
}

/* ------- Scroll reveal animation (CSS baseline) ------- */
.reveal {
  opacity: 0;
  transform: translateY(12px) scale(0.995);
  will-change: transform, opacity;
}

.reveal.revealed {
  opacity: 1;
  transform: none;
  transition: opacity .6s cubic-bezier(.2,.9,.3,1), transform .6s cubic-bezier(.2,.9,.3,1);
}

/* Stagger helper (applied via inline style or JS using data-delay) */
.reveal[data-delay="1"] { transition-delay: .06s; }
.reveal[data-delay="2"] { transition-delay: .12s; }
.reveal[data-delay="3"] { transition-delay: .18s; }
.reveal[data-delay="4"] { transition-delay: .24s; }

/* Responsive tweak */
@media (max-width: 640px) {
  .gallery-grid { gap: 8px; }
  .gallery-item { min-height: 120px; border-radius: 4px; }
}
/* ─── BLOC IMAGE EXPERT (ÉQUILIBRE PARFAIT) ─── */
.card-visual {
    width: 100%;
    height: 240px; /* ON AUGMENTE LA HAUTEUR : Pour que l'image respire */
    margin: 25px 0;
    background: var(--dark-3);
    border: 1px solid var(--border);
    overflow: hidden;
    display: block;
    position: relative;
}

.card-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* REMPLIT SANS DÉFORMER */
    object-position: center 20%; /* AJUSTE LE CADRAGE : Pour voir les visages/haut des têtes */
    display: block;
    opacity: 0.85;
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Effet Premium au survol */
.card-dark:hover .card-visual img {
    opacity: 1;
    transform: scale(1.05);
}

/* ALIGNEMENT DU TEXTE */
.card-dark h2, .card-dark h3 {
    margin-top: 10px;
    font-size: 24px;
    color: var(--gold);
    text-align: left; /* FORCE L'ALIGNEMENT À GAUCHE */
}

.card-dark p, .card-dark .tag {
    text-align: left;
    margin-top: 8px;
}