/* =======================
   Import Google Font Orbitron
======================= */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap');

/* =======================
   Reset / Global
======================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Orbitron', sans-serif;
  color: #00f2ff;
  background-image: url(/stylesheet/images/body_background.png);
  line-height: 1.5;
}

/* =======================
   Main container
======================= */
#fiche_presentation,
#fiche_description,
#fiche_donnees {
  max-width: 600px;
  margin: 20px auto;
  padding: 20px;
  background: linear-gradient(to bottom right, #0a0a0a, #1a1a1a);
  border: 2px solid #00f2ff;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0,242,255,0.5), 0 0 25px rgba(0,242,255,0.2) inset;
}

/* =======================
   Headings
======================= */
h1, h2, h3 {
  color: #00f2ff;
  text-align: center;
  margin-bottom: 10px;
}

h2 span {
  color: #aefeff;
}

/* =======================
   Desktop Table Style
======================= */
#fiche_donnees table,
#fiche_description table,
#fiche_presentation table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  display: table; /* desktop */
}

#fiche_donnees td, #fiche_donnees th,
#fiche_description td, #fiche_description th,
#fiche_presentation td, #fiche_presentation th {
  padding: 10px;
  border: 1px solid #00f2ff;
  color: #cce6ff;
}

#fiche_donnees th,
#fiche_description th,
#fiche_presentation th {
  background-color: #111;
  font-weight: bold;
  text-align: left;
}

/* =======================
   Emphasized rows
======================= */
#fiche_donnees tr:nth-child(odd) td {
  background-color: #0d0d0d;
}

#fiche_donnees tr:hover td {
  background-color: #111;
}

/* =======================
   Links
======================= */
a {
  color: #00f2ff;
  text-decoration: none;
  transition: color 0.3s;
}

a:hover, a:focus {
  color: #ffffff;
  text-decoration: underline;
}

/* =======================
   Specific link colors
======================= */
#fiche_donnees a.official-site,
#fiche_donnees a.french-translation,
#fiche_donnees a.archived-files {
  color: #ffe0b3;
}

#fiche_donnees a.official-site:hover,
#fiche_donnees a.french-translation:hover,
#fiche_donnees a.archived-files:hover,
#fiche_donnees a.official-site:focus,
#fiche_donnees a.french-translation:focus,
#fiche_donnees a.archived-files:focus {
  color: #ffffff;
}

/* =======================
   Mini-cards Mobile
======================= */
.emulator-cards {
  display: none; /* caché desktop */
}

@media (max-width: 768px) {

  /* Table desktop hidden, show cards */
  #fiche_donnees table,
  #fiche_description table,
  #fiche_presentation table {
    display: none;
  }

  .emulator-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
  }

  .emulator-card {
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    border: 2px solid #00f2ff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 0 12px rgba(0,242,255,0.4), 0 0 20px rgba(0,242,255,0.2) inset;
    transition: transform 0.2s, box-shadow 0.3s;
  }

  .emulator-card:hover,
  .emulator-card:focus-within {
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(0,242,255,0.6), 0 0 30px rgba(0,242,255,0.3) inset;
  }

  .emulator-card a {
    display: block;
    font-weight: bold;
    font-size: 1.1em;
    color: #ffe0b3;
    text-decoration: none;
    margin-bottom: 8px;
  }

  .emulator-card a:hover,
  .emulator-card a:focus {
    color: #00f2ff;
  }

  .emulator-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.95em;
  }

  .emulator-info span {
    display: flex;
    justify-content: space-between;
  }

  .emulator-info span strong {
    color: #00f2ff;
  }

  /* Adjust container for mobile */
  #fiche_presentation, #fiche_description, #fiche_donnees {
    padding: 15px;
    margin: 10px auto;
  }

  h1, h2, h3 {
    text-align: center;
  }
}

/* =======================
   Accessibility focus
======================= */
a:focus, button:focus, input:focus, textarea:focus {
  outline: 2px dashed #00f2ff;
  outline-offset: 3px;
}

/* =======================
   Strong / labels
======================= */
strong {
  color: #00f2ff;
}

.retrait {
  padding-left: 15px;
}

#fiche_description p {
  color: #cce6ff;
  line-height: 1.6;
}

/* Mini-cards mobile */
.emulator-cards {
    display: none; /* caché sur desktop */
}

@media (max-width: 768px) {
    /* Cacher les tables desktop sur mobile */
    #fiche_presentation table,
    #fiche_description table,
    #fiche_donnees table {
        display: none;
    }

    /* Afficher les mini-cards */
    .emulator-cards {
        display: flex;
        flex-direction: column;
        gap: 15px;
        margin-top: 10px;
    }

    .emulator-card {
        background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
        border: 2px solid #00f2ff;
        border-radius: 12px;
        padding: 15px;
        box-shadow: 0 0 12px rgba(0,242,255,0.4), 0 0 20px rgba(0,242,255,0.2) inset;
        transition: transform 0.2s, box-shadow 0.3s;
    }

    .emulator-card:hover,
    .emulator-card:focus-within {
        transform: translateY(-3px);
        box-shadow: 0 0 20px rgba(0,242,255,0.6), 0 0 30px rgba(0,242,255,0.3) inset;
    }

    .emulator-card a {
        display: block;
        font-weight: bold;
        font-size: 1.1em;
        color: #ffe0b3;
        text-decoration: none;
        margin-bottom: 8px;
    }

    .emulator-card a:hover,
    .emulator-card a:focus {
        color: #00f2ff;
    }

    .emulator-info {
        display: flex;
        flex-direction: column;
        gap: 6px;
        font-size: 0.95em;
    }

    .emulator-info span {
        display: flex;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .emulator-info span strong {
        color: #00f2ff;
    }
}
