     @font-face {
     font-family: 'retro';
     src: url('./fonts/AirAmericana-Light.ttf') format('truetype');
   }

   @font-face {
     font-family: 'elegant';
     src: url('./fonts/elegant-typewriter-Light.ttf') format('truetype');
   }

   @font-face {
     font-family: 'elegant';
     src: url('./fonts/elegant-typewriter-Italic.ttf') format('truetype');
     font-style: italic;
   }

   :root{
  --encre-noire:   #1c1a16;
  --encre-cyan:    #1e7fa8;
  --encre-orange:   #e8a63c;
  --encre-jaune: #FFFFC5;

  --marge: clamp(1.25rem, 6vw, 5rem);

  --display: 'retro', serif;
  --corps:   'elegant', Georgia, serif;
  --mono:    'Space Mono', 'Courier New', monospace;
}



@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  padding: 0;
  color: var(--encre-noire);
  font-family: var(--corps);
  font-size: 17px;
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  min-height: 100vh;
}

.content{
  flex: 1;
  min-width: 0;
}

::selection{ background: var(--encre-jaune); color: var(--encre-noire); }

a{ color: inherit; }

h1,h2,h3{
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0;
  line-height: 1.05;
}

h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 35px;
}

h2 img {
  height: 1em;
  width: 1em;
}

h3 img {
  height: 1em;
  width: 1em;
}


.mono{ font-family: var(--mono); }


/* navbar */

.navbar {
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  width: clamp(180px, 16vw, 260px);
  flex-shrink: 0;
  border-right: 1px solid rgba(28, 26, 22, 0.12);
  /*background: #fdfcf9;*/
  /*background-image: url("background2.jpg");*/
  padding: var(--marge) 1.5rem;
  box-sizing: border-box;
  overflow-y: auto;

  /* z-index pour sticky – afficher par-dessus le reste de la page */
  z-index: 10;
}

.navbar::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("background2.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.3;
  z-index: 0;
}

.navbar-inner {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  height: 100%;
}

.sigle {
  font-family: var(--mono);
  font-size: 1.3rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--encre-noire);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar nav {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.navbar nav a {
  font-family: var(--corps);
  font-size: 1rem;
  color: var(--encre-noire);
  text-decoration: none;
  position: relative;
  width: fit-content;
  transition: color 0.2s ease;
  background-color: beige;
  opacity: 0.8;
}

.navbar nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--encre-cyan);
  transition: width 0.25s ease;
}

.navbar nav a:hover,
.navbar nav a:focus-visible {
  color: var(--encre-cyan);
}

.navbar nav a:hover::after,
.navbar nav a:focus-visible::after {
  width: 100%;
}

/* Repli en topbar horizontale sur petit écran */
@media (max-width: 780px) {

    body {
        flex-direction: column;
    }
  .navbar {
    position: sticky;
    height: auto;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(28, 26, 22, 0.12);
    padding: 1rem var(--marge);
  }
  .navbar-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: auto;
  }
  .navbar nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.25rem;
  }
}

/* main title */
.main{
  position: relative;
  padding: clamp(3rem, 10vw, 7rem) var(--marge) clamp(2.5rem, 6vw, 4rem);
  max-width: 1200px;
  margin: 0 auto;
}

.main .planche{
  font-family: var(--mono);
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  /*text-transform: uppercase;*/
  color: var(--encre-orange);
  display:flex;
  align-items:center;
  gap:0.6rem;
  margin-bottom: 1.4rem;
}

.main .planche .trait{ flex:1; height:1px; background:var(--encre-orange); }

/* effet quadrichromie décalée */
.titre-quadri{
  position: relative;
  display: inline-block;
  font-size: clamp(2.4rem, 7vw, 5.2rem);
  font-weight: 700;
}
.titre-quadri span{
  display:block;
}
.titre-quadri .base{ position: relative; color: var(--encre-noire); z-index: 3; }
.titre-quadri .calque{
  position: absolute; top:0; left:0;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: multiply;
}
.titre-quadri .cyan{ color: var(--encre-cyan); transform: translate(3px, 3px); z-index:2; }
.titre-quadri .magenta{ color: #b5296b; transform: translate(-3px, -2px); }

.main .accroche{
  margin-top: 1.6rem;
  max-width: 42ch;
  font-size: 1.08rem;
  font-style: italic;
}

/*Sections*/
.section{
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--marge);
  position: relative;
}

.section-tete{
  display:flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2rem;
}
.section-tete .num{
  font-family: var(--mono);
  color: var(--encre-orange);
  font-size: 1rem;
}
.section-tete h2{ font-size: clamp(1.5rem, 3vw, 2.2rem); }

footer{
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem var(--marge) 3.5rem;
  display:flex;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(28,26,22,0.6);
}

footer img {
    background-color: rgba(28,26,22,0.6);
    padding: 3px;
}

.separateur {
  width: 100%;
}

.separateur img {
  display: block;
  width: 100%;
  height: auto;
}

.container-tester {
    /* .image-droite sera `position: absolute` */
    position: relative;
    /* «marge» intérieure pour accueillir les pastilles cmjn */
    padding-inline-end: 20px;
}

/* testeurs cmjn */
.image-droite {
  position: absolute;
  top: 0;
  right: 0;
  height: 150px; /* hauteur fixe, pour éviter emmerdes dynamiques/fluides */
  width: auto;
  display: block;
}

.section-tete img {
    position: absolute;
    top: 0;
    left:-50px;
    height: 100px;
    width: auto;
    display:block
}

.hirondelle {
  position: absolute;
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.hirondelle-haut-gauche {
  top: 10%;
  left: 0;
}

.hirondelle-haut-droite {
  top: 10%;
  right: 0;
}

.hirondelle-bas-gauche {
  bottom: 0;
  left: 0;
}

.hirondelle-bas-droite {
  bottom: 0;
  right: 0;
}

.example {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--encre-orange);
    border-radius: 6px;
}

.example code {
  font-family: "Fira Code", Consolas, Monaco, monospace;
  background-color: #e9ecef;
  color: var(--encre-cyan);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.grid2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

@media (max-width: 576px) {
  .grid-container {
    grid-template-columns: 1fr;
  }
  .grid2 {
    grid-template-columns: 1fr;
  }
}

.resultat {
  padding: 1rem;
  font-size: 18px;
}

.resultat img {
  height: 18px;
}

.card {
    align-content: center;
    padding: 1rem;
    border: 1px solid  rgba(28, 26, 22, 0.12);
    border-radius: 6px;
}

.card h3 {
    text-align: center;
}

.testRegex input[type="text"],
.testRegex textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.7rem 0.9rem;
    margin-bottom: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    transition: border-color 0.2s ease;
}

.testRegex input[type="text"]:focus,
.testRegex textarea:focus {
    outline: none;
    border-color: #6c5ce7;
}

.testRegex textarea {
    min-height: 150px;
    resize: vertical;
    font-family: system-ui, sans-serif;
}
