@import url('https://fonts.googleapis.com/css2?family=Michroma&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

/* === COULEURS === */
:root {
  --dominant-color: #2e2e2e;
  --light-color: #4a4a4a;
  --dark-color: #1a1a1a;
  --text-color: #ffffff;
}

/* === BASE === */
html, body {
  overflow-x: hidden;
}
body {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 1rem;
  opacity: 0;
  color: var(--text-color);
  background: var(--dominant-color);
  pointer-events: none;
  transition: none;
}
.color-ready body {
  opacity: 1;
  pointer-events: all;
  transition: opacity 0.4s ease-in-out, background-color 0.4s ease-in-out;
}
h1, h2, h3 {
  font-family: "Michroma", sans-serif;
  text-align: center;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.3;
  text-shadow: 2px 2px 1px var(--dark-color);
}
p, a {
  font-family: "Montserrat", sans-serif;
}
a {
  color: var(--text-color);
  text-decoration: none;
}
b { font-weight: bold; }

/* === GRILLE === */
.main-grid {
  display: flex;
  justify-content: center;
  gap: 4rem;
  width: 85vw;
  margin: 0 auto;
  margin-top: 1rem;
  box-sizing: border-box;
}

/* === SECTIONS === */
.news,
section {
  display: flex;
  flex: 1 1 33%;
  flex-direction: column;
  gap: 1.5rem;
  box-sizing: border-box;
}
h2 {
  font-size: 0.9rem;
}

/* === HEADER === */
header {
  display: flex;
  justify-content: center;
  flex-direction: row;
  gap: 4rem;
  width: 85vw;
  margin: 0 auto;
  box-sizing: border-box;
}
.col-group {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  flex: 2;
}
.col-group .col {
  flex: 1;
}
header .col {
  display: flex;
  flex: 1 1 33.333%;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
.header-picture {
  border-radius: 100%;
  width: 10rem;
  height: 10rem;
  object-fit: cover;
}
.header-title {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.header-title h1 {
  font-family: "Montserrat", sans-serif;
  font-size: 1.3rem;
}
.header-title h2 {
  font-size: .65rem;
}
.header-title h3 {
  font-size: .65rem;
}
.twitch,
.youtube {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.twitch p,
.youtube p {
  text-align: center;
  font-weight: 500;
  font-size: 0.8rem;
  line-height: 1.5;
  text-shadow: 1px 1px 1px var(--dark-color);
}

/* === BLOCS D'ITEMS === */
.container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  width: 100%;
}
.container.header,
.container.planning {
  align-items: center;
  flex-direction: column;
  gap: 1rem;
}
.item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  flex: 1 1 20%;
  text-align: center;
}
.item--icon {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  background: var(--light-color);
  overflow: hidden;
  transition: background-color 0.4s ease-in-out, transform 0.3s ease, box-shadow 0.3s ease;
}
.item--icon img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.item:hover .item--icon {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}
.item--icon.is-vip::after {
  content: "VIP";
  position: absolute;
  top: 0;
  right: 0;
  padding: 2px 12px;
  font-family: "Michroma", sans-serif;
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #2e2e2e;
  background: linear-gradient(135deg, #ffe600, #ffac00, #ffd700);
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
  transform: rotate(45deg) translate(25%, -25%);
  z-index: 2;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.item--title p {
  font-weight: 500;
  font-size: 0.8rem;
  line-height: 1.25;
  text-shadow: 1px 1px 1px var(--dark-color);
}
#twitch-followers,
#youtube-subs,
#youtube-subs-replay,
#youtube-subs-irl {
  margin-top: .25rem;
  font-weight: 300;
  line-height: 1.25;
}

/* === NEWS === */
.iframe-wrapper {
  position: relative;
  width: 100%;
  height: 200px;
}
.iframe-wrapper a {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  cursor: pointer;
}
.iframe-wrapper iframe {
  width: 100%;
  height: 200px;
  overflow: hidden;
  border: none;
  scrollbar-width: none;
}

/* === TWITCH PLAYER === */
.twitch-player {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 85vw;
  margin: 0 auto;
}
.twitch-player h3,
.twitch-stats h3 {
  font-size: .9rem;
}
#twitch-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
}
#twitch-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  border: none;
  display: block;
}

/* === TWITCH TRACKER === */
.twitch-stats .row {
  display: flex;
  flex-direction: row;
  gap: 1rem;
}
.tt-wrapper {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
}
.tt-wrapper iframe {
  position: absolute;
  border: 0;
  width: 100%;
  height: 5000px;
  top: var(--top, 0);
  left: var(--left, 0);
}
.tt-profile {
  --top: -2555px;
  --left: 0; 
  flex: 1 1 25%;
}
.tt-chart {
  --top: -1110px;
  --left: 0;
  flex: 1 1 75%;
}

/* === FOOTER === */
footer {
  display: flex;
  gap: 2rem;
  justify-content: space-evenly;
  padding: 1rem 0;
  text-align: center;
}
footer a {
  font-size: 0.7rem;
  transition: transform 0.3s ease-in-out;
}
footer a:hover {
  transform: translateY(-5px);
}

/* === COOKIES BANNER === */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--dark-color);
    color: var(--text-color);
    padding: 1rem;
    text-align: center;
    font-size: 0.8rem;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 -2px 6px rgba(0,0,0,0.3);
}

.cookie-banner button {
    background: var(--light-color);
    color: var(--text-color);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-family: "Montserrat", sans-serif;
    transition: background 0.3s ease;
}
.cookie-banner button:hover {
    background: var(--dominant-color);
}

/* === RESPONSIVE === */
@media screen and (min-width: 1024px) and (max-width: 1500px) {
    .header-picture {
        width: 6rem;
        height: 6rem;
    }
    .main-grid,
    .twitch-player { width: 85vw; }
    .header-title h1 { font-size: 1.1rem; }
    .header-title h2, h2 { font-size: .5rem; }
    .header-title h3 { font-size: 0.5rem; }
    .twitch p, .youtube p { font-size: .7rem; ;}
    .twitch-player h3,
    .twitch-stats h3 { font-size: .5rem; }
    .item--title p { font-size: .7rem; }
}

@media screen and (max-width: 1024px) {
  body {
    margin-top: 0.5rem;
    padding: 0;
    gap: 0;
  }
  .main-grid {
    width: 100vw;
    flex-direction: column;
    gap: .75rem;
    margin-top: .75rem;
  }
  .container {
    gap: 0;
    width: 95vw;
    margin: 0 auto;
    justify-content: space-evenly;
  }
  header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
    width: 95vw;
    padding: .5rem 0 .75rem;
    align-items: center;
  }
  header > .col:nth-child(1) { grid-column: 1; }
  header > .col:nth-child(2) { grid-column: 2; }
  header > .col.news {
    grid-column: 1 / -1;
    width: 100%;
    text-align: center;
    margin-top: .25rem;
    gap: .75rem;
  }
  .container.header,
  .container.planning {
    width: 100% !important;
    gap: .75rem;
  }
  header .col {
    width: auto !important;
    max-width: none !important;
    flex: initial;
  }
  .news,
  section {
    width: 100vw;
    padding: 0 .5rem;
    gap: .75rem;
  }
  .header-picture {
    width: 6rem;
    height: 6rem;
  }
  .header-title {
    gap: .5rem;
    padding-bottom: 1rem;
  }
  .header-title h3 { font-size: .5rem }
  .twitch .header-title,
  .youtube .header-title { padding-bottom: 0; }
  .header-title h1 { font-size: 1.1rem; }
  .header-title h2, h2 { font-size: 0.5rem; }
  .iframe-wrapper {
    height: 150px;
    overflow: hidden;
  }
  .item { gap: .5rem; }
  .item--title p { font-size: 0.7rem; }
  .twitch-player {
    padding-top: 1rem;
    gap: .5rem;
    width: 100vw;
  }
  .twitch-player h3,
  .twitch-stats h3 { font-size: 0.55rem; }
  .twitch-stats .row {
    flex-direction: column;
    gap: .75rem;
    height: 50rem;
  }
  .tt-profile {
    flex: 1 1 100%;
    height: 50rem;
    --top: -2965px;
  }
  .tt-chart {
    flex: 1 1 100%;
    height: 25rem;
    --top: -1975px;
  }
  footer { gap: .5rem; }
  footer a { font-size: .5rem; }
}