/* ===========================================================
   CLOVIS GAMES — STYLE
   Direction : sombre fantasy moderne, accents dorés
   =========================================================== */

:root {
  --bg: #0d0e12;
  --bg-elev: #15171d;
  --bg-card: #1c1f27;
  --ink: #f4f1ea;
  --ink-soft: #b8b4a8;
  --ink-mute: #6a675f;
  --gold: #c9a35a;
  --gold-bright: #e6c785;
  --gold-deep: #8a6a2e;
  --crimson: #8b1f1f;
  --emerald: #2c5e3f;
  --azure: #1d3a5c;
  --line: #2a2d36;
  --shadow-deep: 0 20px 60px rgba(0,0,0,0.6);
  --shadow-soft: 0 4px 24px rgba(0,0,0,0.35);
  --max: 1280px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Texture/grain de fond global subtile */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.4;
  mix-blend-mode: overlay;
}

img { max-width: 100%; display: block; }

a { color: var(--gold); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold-bright); }

h1, h2, h3, h4 {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: var(--ink);
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

/* ===========================================================
   NAVIGATION
   =========================================================== */
.nav {
  position: sticky;
  top: 0;
  background: rgba(13, 14, 18, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  z-index: 100;
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav-brand img { height: 38px; width: auto; }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  align-items: center;
}
.nav-links a {
  color: var(--ink-soft);
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
  position: relative;
  padding: 6px 0;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--gold); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: var(--gold);
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--ink);
  font-size: 24px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    background: var(--bg-elev);
    padding: 20px 24px;
    gap: 18px;
    border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
}

/* ===========================================================
   HERO — INDEX (Clovis Games)
   =========================================================== */
.hero-clovis {
  min-height: 88vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 80px 0;
  overflow: hidden;
}

.hero-clovis::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(201, 163, 90, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.hero-clovis-content {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.hero-clovis img.studio-logo {
  width: 220px;
  height: 220px;
  margin: 0 auto 36px;
  animation: fadeInUp 1s ease both;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.5));
}

.hero-clovis h1 {
  font-size: clamp(40px, 6vw, 72px);
  margin-bottom: 16px;
  animation: fadeInUp 1s 0.15s ease both;
}

.hero-clovis .tagline {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(18px, 2.2vw, 24px);
  color: var(--ink-soft);
  margin-bottom: 40px;
  animation: fadeInUp 1s 0.3s ease both;
}

.hero-clovis .cta-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 1s 0.45s ease both;
}

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

/* ===========================================================
   BOUTONS
   =========================================================== */
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-family: 'Cinzel', serif;
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: 2px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .25s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
}
.btn-primary:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  color: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(201, 163, 90, 0.25);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

/* ===========================================================
   SECTIONS
   =========================================================== */
section { padding: 100px 0; position: relative; }

.section-title {
  text-align: center;
  margin-bottom: 56px;
}
.section-title h2 {
  font-size: clamp(32px, 4vw, 48px);
  margin-bottom: 12px;
}
.section-title h2::after {
  content: '';
  display: block;
  width: 64px;
  height: 1px;
  background: var(--gold);
  margin: 18px auto 0;
}
.section-title .eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

/* ===========================================================
   GRILLE JEUX (index)
   =========================================================== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.game-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  transition: all .35s;
}
.game-card:hover {
  border-color: var(--gold-deep);
  transform: translateY(-4px);
  box-shadow: var(--shadow-deep);
}
.game-card-cover {
  height: 280px;
  background: var(--bg-card);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.game-card-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.7) 100%);
}
.game-card-cover img {
  max-width: 70%;
  max-height: 70%;
  object-fit: contain;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,0.5));
  transition: transform .6s;
}
.game-card:hover .game-card-cover img { transform: scale(1.05); }

.game-card-body {
  padding: 24px;
}
.game-card-status {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold-deep);
  padding: 4px 10px;
  border-radius: 2px;
  margin-bottom: 14px;
}
.game-card-body h3 {
  font-size: 24px;
  margin-bottom: 8px;
}
.game-card-body p {
  color: var(--ink-soft);
  font-size: 15px;
  margin-bottom: 18px;
}
.game-card-coming-soon {
  background: var(--bg-card);
  border: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  color: var(--ink-mute);
  font-family: 'Cinzel', serif;
  font-size: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  min-height: 380px;
  border-radius: 4px;
}

/* ===========================================================
   SECTION STUDIO (about)
   =========================================================== */
.studio-section {
  background: var(--bg-elev);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.studio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.studio-grid p {
  font-size: 17px;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.studio-grid p strong { color: var(--ink); }
.studio-side {
  text-align: center;
}
.studio-side img {
  max-width: 280px;
  margin: 0 auto;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.5));
}
@media (max-width: 768px) {
  .studio-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ===========================================================
   HERO — BRAKANO (page jeu)
   =========================================================== */
.brakano-hero {
  position: relative;
  min-height: 100vh;
  padding: 120px 0 80px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(139, 31, 31, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(201, 163, 90, 0.12) 0%, transparent 60%),
    var(--bg);
}

.brakano-hero-stage {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  grid-template-rows: auto auto auto;
  gap: 24px;
  align-items: center;
  min-height: 70vh;
}

.brakano-character {
  position: relative;
  z-index: 3;
  align-self: end;
}
.brakano-character img {
  width: 100%;
  max-width: 320px;
  border-radius: 4px;
  box-shadow: var(--shadow-deep), 0 0 0 1px var(--line);
  transition: transform .6s ease;
}

.brakano-character.left {
  grid-column: 1;
  grid-row: 1 / 3;
  justify-self: start;
}
.brakano-character.left img {
  transform: scaleX(-1);
}
.brakano-character.right {
  grid-column: 3;
  grid-row: 1 / 3;
  justify-self: end;
}

.brakano-center-top {
  grid-column: 2;
  grid-row: 1;
  text-align: center;
  position: relative;
  z-index: 4;
}
.brakano-center-top img {
  width: 240px;
  height: 240px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--gold-deep);
  box-shadow: var(--shadow-deep), 0 0 60px rgba(201, 163, 90, 0.25);
  margin: 0 auto;
}

.brakano-center-mid {
  grid-column: 2;
  grid-row: 2;
  text-align: center;
  position: relative;
  z-index: 4;
}
.brakano-center-mid .logo-brakano {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,0.6));
}
.brakano-center-mid .tagline {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(16px, 2vw, 22px);
  color: var(--ink-soft);
  margin-top: 16px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.brakano-rings {
  grid-column: 1 / 4;
  grid-row: 3;
  display: flex;
  gap: 32px;
  justify-content: center;
  align-items: center;
  margin-top: 40px;
  flex-wrap: wrap;
}
.brakano-ring {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--gold-deep);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 30px rgba(201, 163, 90, 0.15);
  position: relative;
  transition: transform .4s, box-shadow .4s;
}
.brakano-ring:hover {
  transform: translateY(-6px) scale(1.05);
  box-shadow: 0 14px 40px rgba(0,0,0,0.6), 0 0 40px rgba(201, 163, 90, 0.4);
  border-color: var(--gold);
}
.brakano-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brakano-cta {
  text-align: center;
  margin-top: 48px;
  position: relative;
  z-index: 4;
}
.brakano-cta .btn { margin: 4px 6px; }

/* Mobile : empiler verticalement */
@media (max-width: 900px) {
  .brakano-hero-stage {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto auto;
    gap: 30px;
  }
  .brakano-character.left,
  .brakano-character.right,
  .brakano-center-top,
  .brakano-center-mid {
    grid-column: 1;
    grid-row: auto;
    justify-self: center;
  }
  /* sur mobile, retirer le miroir : la composition est verticale */
  .brakano-character.left img { transform: none; }
  .brakano-character img { max-width: 220px; }
  .brakano-rings {
    grid-column: 1;
    grid-row: auto;
  }
  .brakano-ring { width: 100px; height: 100px; }
}

/* ===========================================================
   SECTION CONCEPT BRAKANO
   =========================================================== */
.concept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.concept-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  padding: 32px 24px;
  border-radius: 4px;
  text-align: center;
  transition: all .3s;
}
.concept-card:hover {
  border-color: var(--gold-deep);
  transform: translateY(-4px);
}
.concept-card .icon {
  font-size: 32px;
  color: var(--gold);
  margin-bottom: 16px;
  font-family: 'Cinzel', serif;
}
.concept-card h4 {
  font-size: 18px;
  margin-bottom: 8px;
}
.concept-card p {
  color: var(--ink-soft);
  font-size: 14px;
}

/* ===========================================================
   GALERIE CARTES
   =========================================================== */
.gallery {
  background: var(--bg-elev);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.gallery-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.gallery-tab {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  padding: 10px 22px;
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .2s;
  border-radius: 2px;
}
.gallery-tab:hover { color: var(--ink); border-color: var(--gold-deep); }
.gallery-tab.active {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.gallery-item {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 3/2;
  cursor: pointer;
  transition: transform .4s;
  border: 1px solid var(--line);
}
.gallery-item:hover { transform: translateY(-4px); border-color: var(--gold-deep); }
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item .label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 16px 18px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.85));
  color: var(--ink);
  font-family: 'Cinzel', serif;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.gallery-item .badge {
  position: absolute;
  top: 12px; right: 12px;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 2px;
}
.badge.malus { background: var(--crimson); color: var(--ink); }
.badge.bonus { background: var(--emerald); color: var(--ink); }

.hidden { display: none !important; }

/* ===========================================================
   PRÉCOMMANDE
   =========================================================== */
.preorder {
  text-align: center;
}
.preorder-card {
  max-width: 640px;
  margin: 0 auto;
  background: var(--bg-elev);
  border: 1px solid var(--gold-deep);
  padding: 56px 40px;
  border-radius: 4px;
  position: relative;
}
.preorder-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, var(--gold) 0%, transparent 30%, transparent 70%, var(--gold) 100%);
  border-radius: 4px;
  z-index: -1;
  opacity: 0.4;
}
.preorder-status {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.preorder-card h3 { font-size: 30px; margin-bottom: 14px; }
.preorder-card p { color: var(--ink-soft); margin-bottom: 28px; }

.preorder-form {
  display: flex;
  gap: 8px;
  max-width: 480px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.preorder-form input[type=email] {
  flex: 1;
  min-width: 220px;
  padding: 14px 18px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 15px;
  font-family: inherit;
  border-radius: 2px;
  outline: none;
  transition: border-color .2s;
}
.preorder-form input[type=email]:focus { border-color: var(--gold); }
.preorder-form .btn { width: auto; }

.preorder-fineprint {
  font-size: 12px;
  color: var(--ink-mute);
  margin-top: 18px;
}

.form-message {
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: 2px;
  font-size: 14px;
  display: none;
}
.form-message.success { background: rgba(44, 94, 63, 0.2); border: 1px solid var(--emerald); color: #8fd0a3; display: block; }
.form-message.error   { background: rgba(139, 31, 31, 0.2); border: 1px solid var(--crimson); color: #e58a8a; display: block; }

/* ===========================================================
   FOOTER
   =========================================================== */
footer {
  background: var(--bg-elev);
  border-top: 1px solid var(--line);
  padding: 60px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand img { height: 48px; margin-bottom: 16px; }
.footer-brand p { color: var(--ink-mute); font-size: 14px; max-width: 320px; }
.footer-col h4 {
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: var(--ink);
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--ink-soft); font-size: 14px; }
.footer-col a:hover { color: var(--gold); }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-mute);
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  section { padding: 70px 0; }
  .preorder-card { padding: 40px 24px; }
}

/* ===========================================================
   ACCESSIBILITÉ — focus visible
   =========================================================== */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
