@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root{
  --bg:#080b0f;
  --panel:#10161d;
  --gold:#d9b56c;
  --gold2:#8d6a32;
  --text:#eee6d2;
  --muted:#a9a393;
  --line:#39424d;
}

*{
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

body{
  margin:0;
  background:radial-gradient(circle at 50% 0%,#1b2930 0,#090d12 35%,#05070a 100%);
  color:var(--text);
  font-family:Inter,Arial,sans-serif;
}

body:before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  opacity:.14;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.03) 1px,transparent 1px);
  background-size:32px 32px;
}


/* =========================================================
   HERO
   ========================================================= */

.hero{
  min-height:220px;
  position:relative;
  display:flex;
  align-items:flex-end;
  overflow:hidden;
  border-bottom:1px solid #67502c;
  background-image:
    linear-gradient(0deg,rgba(5,7,10,.98),rgba(5,7,10,.15) 70%),
    url('../imgs/hero1.jpg');
  background-size:cover;
  background-position:center top;
}

.hero-inner{
  width:min(1400px,94%);
  margin:0 auto;
  padding:55px 0 42px;
}

.brand{
  display:inline-flex;
  align-items:center;
  gap:14px;
  margin-bottom:22px;
  color:#f2d18a;
  font-family:Cinzel,serif;
  letter-spacing:.12em;
  text-transform:uppercase;
  font-size:14px;
}

.brand-badge{
  width:40px;
  height:40px;
  border:1px solid var(--gold);
  transform:rotate(45deg);
  display:grid;
  place-items:center;
  background:#10151a;
  box-shadow:0 0 22px #000;
}

.brand-badge span{
  transform:rotate(-45deg);
  font-size:20px;
}

h1{
  font-family:Cinzel,serif;
  font-size:clamp(38px,6vw,48px);
  line-height:1;
  margin:0;
  text-transform:uppercase;
  letter-spacing:.04em;
  text-shadow:0 4px 18px #000;
}

.subtitle{
  margin:16px 0 0;
  color:#d8d0bf;
  font-size:17px;
  max-width:760px;
}


/* =========================================================
   INDEX : NEWS DLC
   ========================================================= */

.news-content{
  margin:0 0 18px;
  padding:24px 22px 20px;
  border:1px solid #2d3740;
  border-radius:9px;
  background:
    linear-gradient(90deg,rgba(217,181,108,.10),transparent 45%),
    linear-gradient(180deg,#121a22,#0c1117);
}

.news-label{
  display:inline-block;
  margin-bottom:16px;
  padding:5px 9px;
  border:1px solid #8d6a32;
  border-radius:5px;
  color:#f2d18a;
  font-family:Cinzel,serif;
  font-size:11px;
  letter-spacing:.12em;
}

.news-content h3{
  margin:0 0 14px;
  font-family:Cinzel,serif;
  font-size:20px;
  font-weight:600;
  color:#eee6d2;
}

.news-highlight{
  margin:8px 0;
  color:#cfc8b9;
  font-family:Cinzel,serif;
  font-size:14px;
  font-weight:400;
  line-height:1.6;
}

.news-highlight strong{
  color:#d8d0bf;
  font-weight:400;
}

.news-content h4{
  margin:20px 0 10px;
  font-family:Cinzel,serif;
  font-size:16px;
  font-weight:600;
  color:#d9b56c;
}

.news-highlight ul{
  margin:0;
  padding-left:22px;
}

.news-content ul.news-highlight{
  margin:0;
  padding-left:22px;
}

.news-content li{
  margin-bottom:8px;
}

.news-content li::marker{
  color:#8d6a32;
}


.news-top{
  display:grid;
  grid-template-columns:160px 1fr;
  gap:22px;
  align-items:start;
  margin-bottom:18px;
}

.pages-civs-top{
  display:grid;
  grid-template-columns:100px 1fr;
  gap:22px;
  align-items:start;
  margin-bottom:18px;
}

.news-image{
  width:100%;
  border:1px solid #2d3740;
  border-radius:9px;
  overflow:hidden;
  background:#0c1117;
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;
}

.news-image:hover{
  transform:translateY(-4px);
  border-color:#c39a56;
  box-shadow:0 9px 24px rgba(0,0,0,.45);
}

.news-image img{
  display:block;
  width:100%;
  height:auto;
}

.news-text{
  min-width:0;
}

@media(max-width:800px){

  .news-top{
    grid-template-columns:1fr;
  }

  .news-image{
    max-width:400px;
    margin:auto;
  }

}



/* =========================================================
   CIVILISATIONS : BARRE DE NAVIGATION + RECHERCHE
   ========================================================= */

.toolbar{
  position:sticky;
  top:0;
  z-index:1000;
  background:rgba(8,11,15,.94);
  backdrop-filter:blur(12px);
  border-bottom:1px solid #29313a;
}

.toolbar-inner{
  width:min(1400px,94%);
  margin:auto;
  padding:10px 0 12px;
  display:flex;
  align-items:center;
  gap:9px;
}


/* =========================================================
   BOUTONS DE FILTRE
   ========================================================= */

   .filter{
    flex:0 0 auto;
    background:#111820;
    color:#cfc8b9;
    border:1px solid #35404a;
    border-radius:8px;
    padding:11px 13px;
    cursor:pointer;
    white-space:nowrap;
    text-decoration:none;
    font-family:Arial,sans-serif;
    font-size:13.3333px;
  }

.filter.active,
.filter:hover{
  border-color:var(--gold);
  color:#f4d38b;
}

.community-link{
  margin-right:9px;
  background:#1a242e;
}

.members-link{
  margin-left:9px;
}


/* =========================================================
   BARRE DE RECHERCHE
   ========================================================= */

.search{
  flex:1;
  min-width:300px;
  background:#0c1116;
  border:1px solid #39424d;
  border-radius:8px;
  color:white;
  padding:12px 14px;
  outline:none;
}

.search:focus{
  border-color:var(--gold);
}


/* =========================================================
   CONTENU
   ========================================================= */

main{
  width:min(1400px,94%);
  margin:32px auto 80px;
}

.dlc{
  background:linear-gradient(145deg,rgba(19,27,35,.96),rgba(8,12,17,.96));
  border:1px solid #34414c;
  border-radius:14px;
  margin:22px 0;
  padding:0 18px 18px;
  box-shadow:0 18px 50px rgba(0,0,0,.25);
  overflow:hidden;
}

.dlc-head{
  display:flex;
  align-items:center;
  gap:14px;
  margin:0 -18px 14px;
  padding:13px 18px;
  border-bottom:1px solid #2e3943;
  background:linear-gradient(90deg,rgba(188,146,64,.12),transparent);
}

.dlc-mark{
    width:52px;
    height:52px;
    display:grid;
    place-items:center;
    border:1px solid #b38a48;
    background:#111820;
    border-radius:8px;
    overflow:hidden
  }
  
  .dlc-mark img{
    width:80%;
    height:80%;
    object-fit:contain
  }

.dlc h2{
  font-family:Cinzel,serif;
  margin:0;
  font-size:20px;
  letter-spacing:.04em;
}

.dlc-head span{
  color:#9e9a90;
  font-size:12px;
}


/* =========================================================
   CARTES CIVILISATIONS
   ========================================================= */

.civ-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(145px,1fr));
  gap:9px;
}

.civ-card{
  text-decoration:none;
  color:var(--text);
  min-height:142px;
  padding:13px 8px 10px;
  border:1px solid #2d3740;
  background:linear-gradient(180deg,#121a22,#0c1117);
  border-radius:9px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  transition:.18s ease;
  position:relative;
  overflow:hidden;
}

.civ-card:after{
  content:"";
  position:absolute;
  inset:0;
  background:radial-gradient(circle at 50% 0,rgba(224,177,91,.13),transparent 55%);
  opacity:0;
  transition:.18s;
}

.civ-card:hover{
  transform:translateY(-4px);
  border-color:#c39a56;
  box-shadow:0 9px 24px rgba(0,0,0,.45);
}

.civ-card:hover:after{
  opacity:1;
}

.civ-icon{
  width:64px;
  height:64px;
  position:relative;
  display:grid;
  place-items:center;
  filter:drop-shadow(0 4px 5px #000);
}

.civ-icon:before{
  display:none;
}

.civ-icon img{
  position:relative;
  width:56px;
  height:56px;
  object-fit:contain;
  z-index:2;
}

.civ-icon span{
  display:none;
  position:relative;
  z-index:2;
  width:56px;
  height:56px;
  align-items:center;
  justify-content:center;
  font-family:Cinzel,serif;
  font-weight:700;
  color:#f4d28b;
  font-size:14px;
}

.civ-name{
  font-family:Cinzel,serif;
  font-size:13px;
  text-align:center;
  line-height:1.15;
  z-index:2;
}

.civ-new-label{
  position:absolute;
  z-index:3;
  top:0;
  left:0;
  width:46px;
  height:46px;
  display:block;
  pointer-events:none;
}

.civ-new-label img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  filter:drop-shadow(0 2px 4px rgba(0,0,0,.55));
}


/* =========================================================
   ELEMENTS CACHÉS
   ========================================================= */

.hidden{
  display:none!important;
}


/* =========================================================
   FOOTER
   ========================================================= */

footer{
  border-top:1px solid #252d34;
  color:#77736b;
  text-align:center;
  padding:25px;
  font-size:12px;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media(max-width:600px){

  .hero{
    min-height:360px;
  }

  .hero-inner{
    padding-bottom:30px;
  }

  .toolbar-inner{
    flex-wrap:wrap;
  }

  .search{
    min-width:0;
    width:100%;
    flex-basis:100%;
  }

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

  .civ-card{
    min-height:132px;
  }

  .filter{
    padding:10px 12px;
    font-size:12px;
  }
}

/* =========================================================
   Soundtrack
   ========================================================= */


.sound-btn{
    position:absolute;
    right:-2px;
    bottom:-2px;
    width:22px;
    height:22px;
    padding:0;
    border:1px solid #d9b56c;
    border-radius:50%;
    background:#111820;
    color:#f4d38b;
    font-size:10px;
    cursor:pointer;
    z-index:5;
  }
  
  .sound-btn:hover{
    background:#d9b56c;
    color:#111820;
  }


  .official-link{
    color:#f4d38b;
    text-decoration:none;
    transition:.18s ease;
  }
  
  .official-link:hover{
    color:#ffe4a8;
    text-decoration:underline;
    text-underline-offset:3px;
    text-shadow:0 0 8px rgba(244,211,139,.25);
  }

/* =========================================================
   FORMULAIRE D'ENREGISTREMENT
   ========================================================= */

.register-form{
  display:grid;
  gap:18px;
  max-width:680px;
  margin:0 auto;
}

/* Lecture audio — état actif et progression visuelle */
.soundtrack-page .civ-card.sound-active{
  border-color:#d9b56c;
  background:linear-gradient(180deg,#30271a,#17140f);
  box-shadow:inset 0 0 0 1px rgba(217,181,108,.45),0 0 12px rgba(217,181,108,.2);
}

.soundtrack-page .sound-progress-track{
  position:absolute;
  z-index:5;
  right:0;
  bottom:0;
  left:0;
  height:4px;
  overflow:hidden;
  background:rgba(0,0,0,.45);
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease;
}

.soundtrack-page .sound-progress-fill{
  display:block;
  width:0;
  height:100%;
  background:linear-gradient(90deg,#b88b3e,#f2d18a);
  box-shadow:0 0 8px rgba(242,209,138,.65);
  transition:width .12s linear;
}

.soundtrack-page .civ-card.sound-active .sound-progress-track{
  opacity:1;
}

.soundtrack-page .civ-card[style*="#382133"].sound-active{
  background:linear-gradient(180deg,#30271a,#17140f)!important;
}

.soundtrack-page .civ-card.sound-active:hover{
  transform:translateY(-4px);
  border-color:#f2d18a;
  background:linear-gradient(180deg,#3c301e,#1c1811);
  box-shadow:inset 0 0 0 1px rgba(217,181,108,.55),0 9px 24px rgba(0,0,0,.45),0 0 14px rgba(217,181,108,.25);
}

.soundtrack-page .civ-card[style*="#382133"].sound-active:hover{
  background:linear-gradient(180deg,#3c301e,#1c1811)!important;
}

/* Grandes pochettes uniquement dans la section soundtrack du jeu */
.soundtrack-page .game-soundtrack-grid{
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:12px;
}

.soundtrack-page .game-track-card{
  min-height:0;
  padding:12px;
  gap:9px;
}

.soundtrack-page .game-track-art{
  width:100%;
  aspect-ratio:1 / 1;
  overflow:hidden;
  border:1px solid rgba(217,181,108,.32);
  border-radius:7px;
  background:#10151b;
  box-shadow:0 4px 10px rgba(0,0,0,.32);
  z-index:2;
}

.soundtrack-page .game-track-art img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}

@media(max-width:1100px){
  .soundtrack-page .game-soundtrack-grid{
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
}

@media(max-width:900px){
  .soundtrack-page .game-soundtrack-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:600px){
  .soundtrack-page .game-soundtrack-grid{
    grid-template-columns:1fr;
  }
}

.register-field{
  display:grid;
  gap:8px;
}

.register-field label{
  color:#d9b56c;
  font-family:Cinzel,serif;
  font-size:14px;
}

.register-field input,
.register-field textarea{
  width:100%;
  min-height:44px;
  padding:10px 12px;
  border:1px solid #39424d;
  border-radius:8px;
  background:#0c1116;
  color:#eee6d2;
  font:inherit;
}

.register-field textarea{
  min-height:180px;
  resize:vertical;
}

.register-field input:focus,
.register-field textarea:focus{
  border-color:var(--gold);
  outline:2px solid rgba(217,181,108,.18);
}

.contact-email{
  min-height:44px;
  display:flex;
  align-items:center;
  padding:10px 12px;
  border:1px solid #39424d;
  border-radius:8px;
  background:#111820;
  color:#d8d0bf;
  overflow-wrap:anywhere;
}

.contact-content .auth-message{
  max-width:680px;
  margin:0 auto 18px;
}

.register-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  justify-content:flex-end;
  margin-top:4px;
}

.register-actions .filter{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
}

.register-actions button{
  font:inherit;
}
.register-content{
  margin-bottom:0;
}

.register-login-actions{
  justify-content:center;
}

.register-signup-prompt{
  margin:2px 0 -8px;
  color:#cfc8b9;
  text-align:center;
  font-size:14px;
}

.register-create-actions{
  justify-content:center;
}
.register-actions button:disabled{
  opacity:.55;
  cursor:not-allowed;
}

.auth-message{
  padding:12px 14px;
  border:1px solid #39424d;
  border-radius:8px;
  background:#0c1116;
  color:#eee6d2;
  line-height:1.5;
}

.auth-message[data-kind="success"]{
  border-color:#4b7758;
  color:#c3e2c4;
}

.auth-message[data-kind="error"]{
  border-color:#8d4545;
  color:#f0c2b8;
}

.contact-login-prompt{
  color:#cfc8b9;
  font-family:Cinzel,serif;
  font-size:14px;
  font-weight:400;
  line-height:1.6;
}

.account-profile-reminder{
  margin:0 auto 18px;
  width:fit-content;
  max-width:100%;
  border-color:#8a7040;
  background:#171711;
  color:#ead7a8;
  text-align:center;
}
.account-content{
  max-width:none;
  margin:0;
  padding:8px 4px 4px;
  border:0;
  border-radius:0;
  background:none;
}

.account-details{
  margin:0;
}

.account-row{
  display:grid;
  grid-template-columns:1fr;
  gap:6px;
  padding:16px 4px;
  border-bottom:1px solid #2d3740;
}

.account-row:first-child{
  padding-top:4px;
}

.account-row dt{
  color:#d9b56c;
  font-family:Cinzel,serif;
}

.account-row dd{
  margin:0;
  color:#eee6d2;
  overflow-wrap:anywhere;
}

.account-actions{
  margin-top:22px;
  justify-content:center;
}

@media(max-width:600px){
  .account-row{
    grid-template-columns:1fr;
    gap:6px;
  }
}
.account-form{
  display:grid;
  gap:14px;
  max-width:620px;
  margin:0 auto;
  justify-items:center;
  text-align:center;
}

.account-section-title{
  margin:18px 0 2px;
  color:#d9b56c;
  font-family:Cinzel,serif;
  font-size:18px;
  letter-spacing:.03em;
}
.account-profile-hint{
  margin:-12px 0 -10px;
  color:#d9b56c;
  font-size:11px;
  line-height:1.1;
}

.account-details{
  width:310px;
  max-width:100%;
  justify-self:center;
  margin:0 0 4px;
}

.account-field{
  display:grid;
  gap:8px;
  width:310px;
  max-width:100%;
  justify-self:center;
  text-align:left;
}

.account-field label{
  color:#d9b56c;
  font-family:Cinzel,serif;
  font-size:14px;
}

.account-field input,
.account-field select{
  position:relative;
  z-index:1;
  pointer-events:auto;
  width:100%;
  max-width:310px;
  margin-right:auto;
  min-height:44px;
  padding:10px 12px;
  border:1px solid #39424d;
  border-radius:8px;
  background:#0c1116;
  color:#eee6d2;
  font:inherit;
}

.account-field input:focus,
.account-field select:focus{
  border-color:var(--gold);
  outline:2px solid rgba(217,181,108,.18);
}

.account-divider{
  width:100%;
  margin:12px 0 0;
  border:0;
  border-top:1px solid #39424d;
}

.account-logout{
  justify-content:center;
  margin-top:20px;
  padding-top:18px;
  border-top:1px solid #2d3740;
}

.account-actions button:disabled,
.account-logout button:disabled{
  opacity:.55;
  cursor:not-allowed;
}
.account-field input:disabled,
.account-field select:disabled{
  opacity:.65;
  cursor:wait;
}

.members-content{
  max-width:none;
  margin:0;
  padding:8px 4px 4px;
  border:0;
  border-radius:0;
  background:none;
}

.members-list{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(180px,1fr));
  gap:14px;
  list-style:none;
  margin:0;
  padding:0;
}

.member-row{
  position:relative;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
  min-width:0;
  padding:14px;
  border:1px solid #2d3740;
  border-radius:11px;
  background:linear-gradient(180deg,#151d25,#0c1117);
  color:#eee6d2;
  line-height:1.5;
}

.member-card{
  min-height:248px;
  flex-direction:column;
  justify-content:flex-start;
  gap:11px;
  overflow:hidden;
  text-align:center;
  box-shadow:0 8px 20px rgba(0,0,0,.22);
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;
}

.member-card:hover{
  transform:translateY(-4px);
  border-color:#c39a56;
  box-shadow:0 9px 24px rgba(0,0,0,.45);
}

.member-card-current{
  border-color:#d9b56c;
  background:linear-gradient(180deg,#30271a,#17140f);
  box-shadow:inset 0 0 0 1px rgba(217,181,108,.45),0 0 12px rgba(217,181,108,.2);
}

.member-card-current:hover{
  border-color:#f2d18a;
  background:linear-gradient(180deg,#3c301e,#1c1811);
  box-shadow:inset 0 0 0 1px rgba(217,181,108,.55),0 9px 24px rgba(0,0,0,.45),0 0 14px rgba(217,181,108,.25);
}

.member-incomplete{
  cursor:default;
}

.member-card::before{
  content:"";
  position:absolute;
  inset:0 0 auto;
  height:120px;
  pointer-events:none;
  background:radial-gradient(ellipse at 50% 0,rgba(217,181,108,.13),transparent 72%);
}

.member-name{
  color:#f2d18a;
  font-weight:600;
}

.member-card-name{
  z-index:1;
  width:100%;
  min-height:2.4em;
  display:grid;
  place-items:center;
  margin:0;
  font-family:Cinzel,serif;
  font-size:17px;
  line-height:1.2;
  overflow-wrap:anywhere;
}

.member-card-emblem{
  z-index:1;
  display:grid;
  place-items:center;
  width:104px;
  height:104px;
  flex:0 0 104px;
  border:2px solid #b99755;
  border-radius:50%;
  background:radial-gradient(circle at 35% 28%,#29333a,#0c1117 72%);
  box-shadow:inset 0 0 0 4px rgba(217,181,108,.1),0 5px 14px rgba(0,0,0,.4);
}

.member-card-emblem img{
  width:76px;
  height:76px;
  object-fit:contain;
  filter:drop-shadow(0 3px 5px #000);
}

.member-card-fallback{
  color:#f2d18a;
  font-family:Cinzel,serif;
  font-size:34px;
}

.member-card-level{
  z-index:1;
  padding:3px 10px;
  border:1px solid #39424d;
  border-radius:999px;
  background:#0c1117;
  color:#d8d0bf;
  font-size:12px;
}

.member-since{
  z-index:1;
  display:grid;
  place-items:center;
  align-content:center;
  gap:2px;
  width:70px;
  height:70px;
  flex:0 0 70px;
  margin-top:auto;
  border:3px double #c4a05c;
  border-radius:50%;
  background:radial-gradient(circle at 35% 28%,#4a3b24,#17140f 72%);
  box-shadow:0 3px 10px rgba(0,0,0,.38),inset 0 0 0 2px rgba(217,181,108,.12);
  color:#f2d18a;
  font-family:Cinzel,serif;
  font-size:12px;
  font-weight:600;
  line-height:1.1;
}

.member-since-label,
.member-since-year{
  display:block;
  white-space:nowrap;
}

.member-incomplete{
  background:#0c1117;
}

.member-card-status{
  z-index:1;
  padding:3px 9px;
  border:1px solid #8a7040;
  border-radius:999px;
  background:#171711;
  color:#ead7a8;
  font-size:11px;
  line-height:1.4;
}

.member-separator{
  color:var(--muted);
}

.members-empty{
  color:var(--muted);
}

@media(max-width:600px){
  .members-list{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
  }

  .member-row{
    gap:5px;
  }

  .member-card{
    padding:12px 8px;
  }

  .member-card-name{
    font-size:14px;
  }
}
