@import url("https://use.typekit.net/ecc0ndx.css");
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

/* ===== VARIABLES CSS ===== */
:root {
  --motif-color: #FF69B4;
  --color-primary: #E8461D;
  --color-secondary: #00BFFF;
  --color-accent: #B4EB36;
  --color-bg: #FFFFE2;
  --color-text: #E8461D;
  --color-button-text: #00BFFF;
  --color-shadow: rgba(232, 70, 29, 0.15);
  --color-shadow-strong: rgba(232, 70, 29, 0.5);
  --color-glass-bg: rgba(255, 255, 255, 0.1);
  --color-glass-border: rgba(255, 255, 255, 0.3);
  --border-radius-sm: 15px;
  --border-radius-md: 18px;
  --border-radius-lg: 20px;
  --border-radius-xl: 25px;
  --transition-base: all 0.3s ease-in-out;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --blur-sm: blur(15px);
  --blur-md: blur(20px);
  --blur-lg: blur(25px);
}

/* ===== RESET & BASE ===== */
body {
  font-family: 'sharktooth', sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  margin: 0;
  padding: 0;
  text-align: center;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}
.texte-different{
  font-size: 20px;
  color: #00BFFF;
  padding-right: 10px;

}
/* ===== MOTIF SVG ANIMÉ ===== */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--motif-color);
  -webkit-mask-image: url('images/Logo-oiseaux-motif-v3.svg');
  mask-image: url('images/Logo-oiseaux-motif-v3.svg');
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
  -webkit-mask-size: 100% auto;
  mask-size: 100% auto;
  -webkit-mask-position: 0 0;
  mask-position: 0 0;
  animation: bgPan 40s linear infinite;
  z-index: -1;
  opacity: 0.9;
  transition: background-color 0.5s ease;
}

@keyframes bgPan {
  0% {
    -webkit-mask-position: 0 0;
    mask-position: 0 0;
  }
  100% {
    -webkit-mask-position: 0 -190px;
    mask-position: 0 -190px;
  }
}

/* ===== TYPOGRAPHIE ===== */
h2 {
  margin: 100px 0 20px 0;
  font-size: 56px;
  font-weight: 600;
  font-style: italic;
  color: var(--color-primary);
  letter-spacing: 2px;
}

h3 {
  color: var(--color-primary);
  font-weight: 600;
}

#instructions h3,
#character-select h3,
#game-area h3 {
  margin-top: 0;
  font-size: 28px;
}

#instructions p {
  color: var(--color-text);
  font-family: "Inter", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-size: 16px;
  line-height: 1.6;
  margin: 10px 0;
}

.texte-color {
  font-weight: bold;
  color: var(--color-secondary);
}

/* ===== LAYOUT ===== */
#container {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 30px;
  padding: 30px 30px 100px 30px;
  max-width: 75%;
  margin: auto;
  margin-bottom: 100px;
  position: relative;
}

/* ===== GLASSMORPHISM PANELS ===== */
#instructions,
#character-select {
  background: var(--color-glass-bg);
  backdrop-filter: var(--blur-md);
  border: 1px solid var(--color-glass-border);
  border-radius: var(--border-radius-lg);
  padding: 25px;
  box-shadow: 0 8px 20px var(--color-shadow);
  position: relative;
  transition: var(--transition-smooth);
}

#instructions:hover,
#character-select:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px var(--color-shadow);
}

.scoreboard {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 35px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  padding: 15px 25px;
  background: var(--color-glass-bg);
  backdrop-filter: var(--blur-sm);
  border: 1px solid var(--color-glass-border);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 8px 20px var(--color-shadow);
}

.scoreboard span {
  color: var(--color-text);
  font-size: 1.1rem;
  letter-spacing: 1px;
}

#game {
  position: relative;
  margin: 0 auto;
  width: 700px;
  height: 500px;
  border: 1px solid var(--color-glass-border);
  background: var(--color-glass-bg);
  backdrop-filter: var(--blur-md);
  overflow: hidden;
  border-radius: var(--border-radius-xl);
  box-shadow: 0 8px 20px var(--color-shadow);
}

#startOverlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: var(--blur-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  border-radius: var(--border-radius-xl);
  border: 1px solid var(--color-glass-border);
}

#gameOver {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: var(--blur-lg);
  color: var(--color-text);
  font-size: 22px;
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  border-radius: var(--border-radius-xl);
  border: 1px solid var(--color-glass-border);
  z-index: 20;
  overflow: hidden;
}

#gameOver h3 {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 20px;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: textPulse 2s ease-in-out infinite alternate;
}

@keyframes textPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

#gameOver .message {
  margin: 20px 0;
  font-size: 1.1em;
  text-align: center;
  color: var(--color-accent);
  line-height: 1.6;
}

#gameOver p {
  color: var(--color-text);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 10px 0;
}

/* ===== BOUTONS ===== */
#startBtn {
  padding: 12px 40px;
  font-size: 24px;
  font-weight: 600;
  background: transparent;
}

#startBtn,
#gameOver button,
#gameOver .portfolio-btn {
  display: inline-block;
  position: relative;
  font-family: "Inter", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  color: var(--color-button-text);
  border: 1px solid var(--color-glass-border);
  background: #FFFFE2;
  box-shadow: 
    0 8px 25px var(--color-shadow-strong),
    inset 0 1px 0 rgba(232, 70, 29, 0.3);
  transition: var(--transition-base);
  cursor: pointer;
  border-radius: var(--border-radius-md);
  overflow: hidden;
}


#gameOver button,
#gameOver .portfolio-btn {
  margin: 15px;
  padding: 15px 30px;
  font-size: 16px;
  font-weight: 400;
  text-decoration: none;
}

#gameOver .portfolio-btn {
  font-weight: 600;
  font-size: 20px;
}

#startBtn:hover,
#gameOver button:hover,
#gameOver .portfolio-btn:hover {
  background: #FFFFE2;
  color: var(--color-primary);
  box-shadow: 
    0 15px 35px rgba(232, 70, 29, 0.3),
    0 0 20px rgba(255, 255, 255, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* ===== SÉLECTION DE PERSONNAGES ===== */
#character-select img {
  display: block;
  width: 80px;
  margin: 15px auto;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: var(--border-radius-sm);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 4px 8px rgba(232, 70, 29, 0.2));
  position: relative;
  overflow: hidden;
}

#character-select img:hover {
  border-color: var(--color-secondary);
  transform: scale(1.1) rotate(2deg);
  box-shadow: 0 8px 20px var(--color-shadow);
}

/* ===== JEU ===== */
#game-area {
  position: relative;
}

#player,
.player {
  position: absolute;
  bottom: 10px;
  left: 180px;
  width: 40px;
  height: auto;
}

.obstacle {
  position: absolute;
  width: 50px;
  height: 50px;
  top: 0;
}

.obstacle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

@keyframes obstacleShimmer {
  0%, 100% { opacity: 0.3; transform: translateX(-100%); }
  50% { opacity: 0.8; transform: translateX(100%); }
}

/* ===== RESPONSIVE IPAD ===== */
@media screen and (max-width: 1024px) and (min-width: 768px) {
  #container {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
    max-width: 75%;
  }

  h2 {

    font-size: 42px;
    margin: 15px 0;
  }

  #instructions,
  #character-select {
    padding: 20px;
  }

  #instructions h3,
  #character-select h3,
  #game-area h3 {
    font-size: 24px;
  }

  #instructions p {
    font-size: 15px;
  }

  #game {
    width: 100%;
    max-width: 600px;
    height: 450px;
  }

  .scoreboard {
    max-width: 100%;
    padding: 12px 20px;
    margin-bottom: 25px;
  }

  .scoreboard span {
    font-size: 1rem;
  }

  #startBtn {
    padding: 10px 35px;
    font-size: 20px;
  }

  #character-select {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
  }

  #character-select h3 {
    width: 100%;
    margin-bottom: 15px;
  }

  #character-select img {
    width: 70px;
    margin: 0;
  }

  #gameOver h3 {
    font-size: 2rem;
  }

  #gameOver button,
  #gameOver .portfolio-btn {
    padding: 12px 25px;
    font-size: 15px;
    margin: 10px;
  }

  #gameOver .portfolio-btn {
    font-size: 18px;
  }
}

@media screen and (max-width: 1024px) and (min-width: 768px) and (orientation: landscape) {
  #container {
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 15px;
    padding: 15px;
  }

  #game {
    height: 400px;
  }

  h2 {
    font-size: 36px;
    margin: 10px 0;
  }
}

@media screen and (max-width: 1366px) and (min-width: 1025px) {
  #container {
    max-width: 75%;
    gap: 25px;
    padding: 25px;
  }

  #game {
    width: 100%;
    max-width: 650px;
    height: 480px;
  }

  h2 {
    font-size: 48px;
  }
}
