/* Header ----------------------------------------------------------------------------------------------------------------- */

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, 
        #b77517 0%,
        #8e5b12 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 168, 255, 0.2);
    padding: 10px 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 168, 255, 0.15);
}

.logo {
    display: flex;
    align-items: center;
    margin-right: 20px;
    padding: 5px;
}

.logo img {
    height: 45px;
    width: auto;
    display: block;
    transition: var(--transition);
    filter: brightness(1.1);
}

.logo:hover img {
    filter: brightness(1.2) drop-shadow(0 0 10px var(--primary-color));
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links ul li a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 16px;
    transition: var(--transition);
    padding: 8px 15px;
    border-radius: 5px;
}

.nav-links ul li a:hover {
    color: var(--primary-color);
    text-shadow: 0 0 15px var(--text-glow);
}


/* Page ------------------------------------------------------------------------------------------------------------------ */

:root {
    --primary-color: #fcbf6a;
    --secondary-color: #e86d30;
    --background-dark: #75570c;
    --background-light: #ad8624;
    --text-light: #FFFFFF;
    --text-glow: #fcbf6a;
    --glow-color: #fcbf6a;       
    --shadow: rgba(0, 0, 0, 0.3); 
    --menu-bg: rgba(10, 26, 59, 0.95);
    --transition: all 0.3s ease;
    --spacing-lg: 2rem;
}


/* Sections communes -------------------------------------------------------------------------------------------------------- */

.section {
    border: 1px solid rgba(0, 168, 255, 0.2);
    box-shadow: var(--glow-effect);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    margin: 20px auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, 
        #1a1d13 0%, 
        #6f7445 100%);
}


/* Reset et styles de base ------------------------------------------------------------------------------------------------- */

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

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, 
        var(--background-light) 0%, 
        var(--background-dark) 50%,
        var(--background-light) 100%);
    color: var(--text-light);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}


/* Logo Container ----------------------------------------------------------------------------------------------------------- */

.logo-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
}

.logo-container a {
    flex: 1 0 18%;
    margin: 10px;
    display: inline-block;
    max-width: 100px;
}

.logo-container img {
    width: 100%;
    height: auto;
    transition: transform 0.3s;
}

.logo-container img:hover {
    transform: scale(1.1);
}


/* Hamburger Menu ----------------------------------------------------------------------------------------------------------- */

.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1001;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    margin: 5px 0;
    transition: var(--transition);
}


/* Sections et titres -------------------------------------------------------------------------------------------------------- */

section {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

section h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 2rem;
    text-shadow: 0 0 10px rgba(0, 168, 255, 0.3);
}

.title {
    color: var(--primary-color);
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    text-shadow: 0 0 10px rgba(0, 168, 255, 0.3);
}


/* Liens sociaux -------------------------------------------------------------------------------------------------------------- */

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.2rem;
    color: var(--text-light);
    text-decoration: none;
    border-radius: 20px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(0, 168, 255, 0.1);
    border: 1px solid rgba(0, 168, 255, 0.2);
}

.social-link:hover {
    background: rgba(0, 168, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(0, 168, 255, 0.3);
}



@import url('https://fonts.googleapis.com/css?family=Fredoka+One&text=%3FYOUWON!');


.board {
  display: grid;
  grid-gap: 20px;
  grid-template-columns: repeat(4, 100px);
  grid-template-rows: repeat(4, 100px);
  position: relative;
  top: 20px;
  transform-style: preserve-3d;
  transform: rotateX(50deg) rotateZ(22deg);
  user-select: none;
}

.clone {
  display: none;
}

.cube {
  animation: enter 600ms ease-out;
  transform-style: preserve-3d;
  transform: translateZ(0) scale(1);
  transition: all 350ms ease-out;
  transform-origin: 50% 50%;
  backface-visibility: hidden;
  
  &.flipped {
    pointer-events: none;
    transform: rotateY(180deg) translateZ(0) scale(1);
    transition: all 500ms ease-out;
  }
  
  &.matched {
    pointer-events: none;
    transform: rotateY(180deg) translateZ(0) scale(1);
    animation: match 650ms ease-out;
  }
}

.face {
  outline: 1px solid transparent;
  backface-visibility: hidden;
  box-shadow: inset 0 0 2px 1px #fff0d2;
  height: 100px;
  overflow: hidden;
  position: absolute;
  transform-origin: 50% 50%;
  width: 100px;
}

.face:nth-child(1) {
  background-color: wheat;
  cursor: pointer;
  transform: rotateY(0deg) translateZ(10px);
  transition: background 150ms ease-out;
    
  &:before {
    align-items: center;
    bottom: 0;
    color: #93794c;
    content: '?';
    display: flex;
    font-family: 'Fredoka One', cursive;
    font-size: 60px;
    justify-content: center;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
  }
}

.face:nth-child(2) {
  background-color: darken(wheat, 10%);
  width: 20px;
  transform: rotateY(90deg) translateZ(90px)
}
.face:nth-child(3) {
  background-color: dodgerblue;
  transform: rotateY(180deg) translateZ(10px)
}
.face:nth-child(4) {
  background-color: darken(wheat, 10%);
  width: 20px;
  transform: rotateY(270deg) translateZ(10px)
}
.face:nth-child(5) {
  background-color: darken(wheat, 10%);
  height: 20px;
  transform: rotateX(90deg) translateZ(10px)
}
.face:nth-child(6) {
  background-color: darken(wheat, 10%);
  height: 20px;
  transform: rotateX(-90deg) translateZ(90px)
}

.overlay {
  align-items: center;
  background: rgba(255,255,255,0.75);
  width: 100vw;
  display: flex;
  justify-content: center;
  left: 0;
  opacity: 1;
  position: absolute;
  height: 100vh;
  top: 0;
  transition: all 500ms ease-out;
  z-index: 100;
  
  &.hidden {
    opacity: 0;
    pointer-events: none;
    transition: all 300ms ease-out;
    
    .gameover {
      transform: translateY(60px);
      transition: all 300ms ease-out;
    }
  }
}

.gameover {
  align-items: center;
  background-color: #fff;
  border-radius: 120px;
  border: 12px solid #50b8f7;
  color: #2e2e2e;
  display: flex;
  font-family: 'Fredoka One', cursive;
  font-size: 40px;
  height: 120px;
  width: 340px;
  justify-content: space-between;
  padding: 0 10px 0 30px;
  transform: translateY(0);
  transition: all 500ms ease-out;
  user-select: none;
}

.reset {
  background-color: #fbc300;
  border-radius: 50%;
  border: 0;
  box-shadow: 0px 6px 0px 0px #f2a003;
  cursor: pointer;
  display: block;
  height: 94px;
  margin-left: 20px;
  position: relative;
  top: -3px;
  width: 96px;
  
  &:active {
    box-shadow: none;
    top: 0;
  }
  
  &:focus {
    outline: 0;
  }
}

.twitter__link {
  user-select: none;
  cursor: pointer;
  position: absolute;
  right: 10px;
  top: 12px;
  z-index: -1;
  background: #fff;
  border-radius: 20px;
  height: 30px;
  text-decoration: none;
  padding-right: 10px;
  justify-content: space-between;
  font-family: sans-serif;
  font-weight: 600;
  display: flex;
  align-items: center;
  color: #00aced;
  font-size: 14px;
  width: 74px;
  opacity: 0.4;
  z-index: 10;
  
  &:hover {
    opacity: 1;
  }
}

.twitter__icon {
  height: 30px;
}

[data-tile="egg"] { 
  div:nth-child(3) {
    background: #fff8e7 url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/62105/dino-egg.svg) center center no-repeat;
    background-size: 60px;
  }
}

[data-tile="dino"] { 
  div:nth-child(3) {
    background: #fff8e7 url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/62105/dino-dino1.svg) bottom center no-repeat;
    background-size: 85px;
  }
}

[data-tile="ahahah"] { 
  div:nth-child(3) {
    background: #fff8e7 url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/62105/dino-ah.svg) center center no-repeat;
    background-size: 60px;
  }
}

[data-tile="tri"] { 
  div:nth-child(3) {
    background: #fff8e7 url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/62105/dino-tri.svg) center center no-repeat;
    background-size: 85px;
  }
}

[data-tile="ptero"] { 
  div:nth-child(3) {
    background: #fff8e7 url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/62105/dino-ptero.svg) center center no-repeat;
    background-size: 85px;
  }
}

[data-tile="erupt"] { 
  div:nth-child(3) {
    background: #fff8e7 url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/62105/dino-erupt.svg) center center no-repeat;
    background-size: 85px;
  }
}

audio {
  display: none;
}


@keyframes enter {
  0% {
    transform: translateZ(-20px) scale(0.3);
  }
  50% {
    transform: translateZ(20px) scale(1.02);
  }
  100% {
    transform: translateZ(0) scale(1);
  }
}

@keyframes match {
  0% {
    transform: rotateY(180deg) translateZ(-15px);
  }
  50% {
    transform: rotateY(180deg) translateZ(10px);
  }
  100% {
    transform: rotateY(180deg) translateZ(0);
  }
}

.memory-section {
  padding: 2rem;
  background-color: #f0f0f0; /* Couleur de fond épurée */
  border-radius: 10px;
  margin: 2rem auto;
  max-width: 600px; /* Largeur maximale pour centrer */
  text-align: center; /* Centrer le texte */
}

.memory-section h2 {
  color: #00f; /* Couleur bleue futuriste */
  font-family: 'Arial', sans-serif; /* Police futuriste */
  font-size: 2rem; /* Taille du texte */
  margin-bottom: 1rem; /* Espace sous le titre */
}

.memory-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 cartes par ligne */
  gap: 10px; /* Espace entre les cartes */
  justify-content: center; /* Centrer le contenu */
  margin-top: 1rem;
}

/* Style pour les cartes de mémoire */
.memory-card {
  width: 100px;
  height: 100px;
  background-color: #fff;
  border: 2px solid #333;
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: transform 0.3s;
}

.memory-card:hover {
  transform: scale(1.05); /* Effet de zoom au survol */
}

