/* ---- BASE ---- */

@font-face {
  font-family: 'KarmaFuture'; 
  src:  url('../polices/KarmaFuture.woff2') format('woff2'),
        url('../polices/KarmaFuture.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: 'Gameshow'; 
  src:  url('../polices/Gameshow.woff2') format('woff2'),
        url('../polices/Gameshow.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: 'orangeki'; 
  src:  url('../polices/orangeki.woff2') format('woff2'),
        url('../polices/oraneki.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: block;
}
/* accordeon */

pre {
  font-size: 1rem; /* ou 14px, ou ce que tu veux */
  /*font-family: monospace;*/ /* conserve un affichage type terminal */
}

ul {
  list-style: none;
}
.acc-item-content {
  padding: 0px 10px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}
#accordion li {
  border: none;
  border-bottom: none;
}

/* 1. Définition de l’animation blink */
    @keyframes blink {
      0%, 100% { opacity: 1; }   /* visible */
      50%      { opacity: 0; }   /* invisible */
    }

    /* 2. Classe à appliquer au texte */
    .clignote {
	    color: red;
      animation: blink 1.5s linear infinite;
      /* ajustez la durée (1s) pour aller plus vite ou plus lentement */
    }

body {
  text-align: center;
  font-size: clamp(1.2rem, 2vw, 6rem);
  background: #e7e7e7;
  font-family: 'orangeki', monospace;
  /* Désactive lissage pour un effet net */
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: grayscale;
}

#page {
  background: #fff;
  margin: 2em auto;
  max-width: 900px;
  border: 2px solid #c0c0c0;
  padding: 1em;
  box-shadow: 0 2px 8px #0001;
}
#body {
  padding: 1em;
}
span.tt {
  font-family: monospace;
}
span.bold {
  font-weight: bold;
}

/* ---- TITRES ---- */
.menu-title {
  font-size: clamp(4rem, 6vw, 8rem);
  /*font-size: 2.2rem;*/
  color: #fff;
  margin: 0.5em 0;
}


.header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---- LIENS ---- */
a {
  color: #4b6983;
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: #FF6666;
}

/* Liens du menu */
a.menu, .header-grid a.menu {
  font-family: 'Gameshow', monospace;
  font-size: clamp(1.8rem, 4vw, 6rem);
  background: #4b6983;
  color: #fff;
  padding: 2px 8px;
  font-weight: bold;
  margin: 0 0.4em;
  border-radius: 3px;
}
a.title {
  font-size: clamp(4rem, 6vw, 8rem);
  color: white;
}
a.title:hover {
  color: #FF6666;
  /*background: #e7e7e7;*/
}
/* --- Liens de menu avec largeur fixe --- */
.nav-links {
    display: flex;
    gap: 1rem;
}

a.menu, a.footer-grid a.menu {
    display: flex;
    gap: 1rem;
    display: inline-block;
    min-width: 100px; /* Ajuste selon ton design */
    text-align: center;
    padding: 0.5rem 0;
    font-size: clamp(1.2rem, 3vw, 4rem);
}

a.menu:hover, .header-grid a.menu:hover, .footer-grid a.menu:hover {
  color: #FF6666;
  background: #e7e7e7;
}

/* Liens admin */
.footer-grid a.admin {
  background: #4b6983;
  color: #fff;
  padding: 4px 8px;
  margin: 0 0.5em;
  border-radius: 3px;
  transition: color 0.3s;
}
.footer-grid a.admin:hover {
  color: #FF6666;
}

/*---- div -----*/
div {
  display: block;
}
.code p {
  color: grey;
  border: 5px outset red;
  background-color: lightblue;
  text-align: left;
}

/* ---- GRILLE PRINCIPALE ---- */
.grid-layout {
  display: grid;
  grid-template-areas:
    "header"
    "main"
    "footer";
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
}
header  { grid-area: header; background: #4b6983; color: #fff;}
main    { grid-area: main;  background: #fff;}
footer  { grid-area: footer;}

/* ---- FORMULAIRE ---- */

/* 1. POLICE BITMAP ET TAILLE FLUIDE */
:root {
  --pixel-font: 'orangeki'; /*, monospace;*/
  --font-min: 0.875rem;   /* ≈14px */
  --font-opt: 1.5vw;
  --font-max: 1.25rem;    /* ≈20px */
  --bg-color: white;
  /*--bg-color: #0f0;*/
  --fg-color: #000;
  --border-color: #000;
  --radius: 10px;
  --padding: 0.5em 1em;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
textarea,
select,
button {
  font-family: var(--pixel-font);
  font-size: clamp(var(--font-min), var(--font-opt), var(--font-max));

  background-color: var(--bg-color);
  color: var(--fg-color);
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  padding: var(--padding);

  /* Désactive styles natifs pour select, bouton */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  /* Transition légère */
  transition: 
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.1s ease,
    box-shadow 0.1s ease;
}

/* 2. CURSEUR */
input, textarea, select, button {
  cursor: pointer;
}

/* 3. HOVER : INVERSION DES COULEURS + LÉGÈRE TRANSLATION */
input:hover,
textarea:hover,
select:hover,
button:hover {
  background-color: var(--fg-color);
  color: var(--bg-color);
  transform: translateY(-2px);
}

/* 4. ACTIVE : BOUTON/CHAMP ENFONCÉ */
input:active,
textarea:active,
select:active,
button:active {
  transform: translateY(0);
  box-shadow: inset 0 2px 0 var(--border-color);
}

/* 5. FOCUS : OUTLINE PIXELISÉ */
input:focus,
textarea:focus,
select:focus,
button:focus {
  outline: 2px dashed var(--bg-color);
  outline-offset: 2px;
}

/* 6. ARROW PERSONNALISÉ POUR select */
select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg width='8' height='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 2l4 4 4-4z' fill='%23000'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 0.75em) center;
  background-size: 0.5em;
}

/* 7. TEXTAREA : gérer hauteur */
textarea {
  resize: vertical;
  min-height: 4em;
}

/* 8. BOUTONS « glitch » (optionnel) */
button.glitch:hover {
  animation: glitch 0.3s infinite;
}
@keyframes glitch {
  0%,100% { text-shadow: 2px 2px #f00, -2px -2px #0ff; }
  20%,60% { text-shadow: -2px -2px #f00, 2px 2px #0ff; }
  40%,80% { text-shadow: 2px -2px #f00, -2px 2px #0ff; }
}


/* ---- HEADER ---- */
.header-style {
  background: #4b6983;
  border: 2px solid #7590ae;
  text-align: center;
  padding: 10px;
  color: #fff;
}

/* ---- ERREURS ---- */
.error {
  color: #ff6666;
  font-weight: bold;
}

/* ---- FOOTER ---- */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1em;
  padding: 1em 0;
  background: #4b6983;
  color: #fff;
  text-align: center;
}
@media (max-width: 800px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 500px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- RESPONSIVE LAYOUT ---- */
@media (min-width: 700px) {
  .grid-layout {
    grid-template-areas:
      "header header"
      "main main"
      "footer footer";
    grid-template-columns: 200px 1fr;
  }
}
@media (max-width: 700px) {
  #page { margin: 0.5em; }
  .menu-title { font-size: 1.3rem; }
}
/* --- MENU BURGER --- */
.navbar {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.burger-toggle {
  display: none;
}
.burger-icon {
  display: none;
  flex-direction: column;
  cursor: pointer;
  margin-left: auto;
  width: 36px;
  height: 36px;
  justify-content: center;
}
.burger-icon span {
  display: block;
  width: 28px;
  height: 4px;
  background: #fff;
  margin: 4px 0;
  border-radius: 2px;
  transition: 0.3s;
}
.nav-links {
  display: flex;
  gap: 1em;
}
@media (max-width: 800px) {
  .nav-links {
    flex-direction: column;
    position: absolute;
    top: 50px;
    left: 0; right: 0;
    background: #4b6983;
    text-align: center;
    display: none;
    z-index: 10;
  }
  .burger-icon {
    display: flex;
  }
  .burger-toggle:checked + .burger-icon + .nav-links {
    display: flex;
  }
  /* Hide vertical bar separators on mobile */
  .nav-links a:not(:last-child)::after {
    display: none;
  }
}

