@font-face {
  font-family: Redaction35;
  src: url('fonts/Redaction_35-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Redaction35;
  src: url('fonts/Redaction_35-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: Redaction35;
  src: url('fonts/Redaction_35-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Redaction50;
  src: url('fonts/Redaction_50-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Redaction50;
  src: url('fonts/Redaction_50-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: Redaction50;
  src: url('fonts/Redaction_50-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Redaction70;
  src: url('fonts/Redaction_70-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Redaction70;
  src: url('fonts/Redaction_70-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: Redaction70;
  src: url('fonts/Redaction_70-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}


@font-face {
  font-family: Redaction100;
  src: url('fonts/Redaction_100-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Redaction100;
  src: url('fonts/Redaction_100-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: Redaction100;
  src: url('fonts/Redaction_100-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

    /* ===== GENERAL ===== */


    :root {
      --vert: #E5F6A5;
      --gris: #CCCCCC;
      --noir: #111111;
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      font-family: Redaction20, serif;
      color: black;
      background: #CCCCCC;
      z-index: 0;
      position: relative;

    }



        /* ===== HEADER ===== */


    header {
      background: #CCCCCC;
      border-bottom: 1px solid black;
      padding: 0.5rem 0.5rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      }

    header h1 { 

      font-size: 1.5em;
      font-family: Redaction50;
      font-weight: 700;
      text-decoration: none;
    }


    nav a {
      margin-left: 1.5rem;
      text-decoration: none;
      color: black;
      font-size: 1.5rem;
      position: relative;
      padding: 0 0.2rem;
      font-family: Redaction50, serif;
    }

    nav a::before {
      content: "";
      position: absolute;
      left: 0;
      bottom: 0.1em;
      width: 100%;
      height: 0.8em;
      background: #E5F6A5;
      z-index: -1;
      transform: scaleX(0);
      transform-origin: left;
      transition: transform 0.18s ease;
    }

    nav a:hover::before,
    .menu-link.active::before { transform: scaleX(1); }

  

    h1 a {
      text-decoration: none;
      color: black;
      position: relative;
      padding: 0 0.2rem;
      font-family: Redaction50, serif;
    }

    h1 a::before {
      content: "";
      position: absolute;
      left: 0;
      bottom: 0.1em;
      width: 100%;
      height: 0.8em;
      background: #E5F6A5;
      z-index: -1;
      transform: scaleX(0);
      transform-origin: left;
      transition: transform 0.18s ease;
    }

    h1 a:hover::before,
    .menu-link.active::before { transform: scaleX(1); }

.chapters {
  background: var(--gris);
  border-bottom: none;

  max-height: 0;
  opacity: 0;
  padding: 0;

  overflow: hidden;

  transition:
    max-height 0.25s ease,
    opacity 0.25s ease,
    padding 0.25s ease;
}

.chapters.visible {
  max-height: 340px;          /* hauteur du menu ouvert */
  opacity: 1;
  padding-left: 0.5rem;
  border-bottom: 1px solid black;
}


.chapters-scroll {
  display: flex;
  gap: 0.5rem;

  overflow-x: auto;
  overflow-y: hidden;

  margin-left: 0;
  margin-right: 0;
  padding-bottom: 2rem;      /* espace pour la scrollbar */
  scrollbar-gutter: stable;


  scrollbar-width: thin;
  scrollbar-color: #111111 transparent;
scrollbar-color: thumb track;

}





.chapter-thumb {
  flex: 0 0 160px;           /* largeur fixe */
  font-size: 0.75rem;
  font-family: Redaction50, serif;
  font-weight: 700;
}

.chapters a {
  position: relative;
  display: block;
  text-decoration: none;
  color: black;
  padding: 0 0.2rem;
  z-index: 0;
}



.chapters a:hover {
  text-decoration: underline;
  text-decoration-thickness: 5px;
  text-decoration-color: #E5F6A5;
}


/* ===== MENU IMG HOVER ===== */

.thumb-figure {
  margin: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}


.img-default {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
}

.img-hover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  z-index: 2;
  transition: opacity 0.2s ease;
}


.thumb-figure img {
  display: block;
  width: 100%;
}




/* ===== CAROUSEL ===== */

.chapter-text { 
      margin-bottom: 3rem; 
      margin-left: 2rem;
      margin-right: 25rem;
      font-family: Redaction35, serif;
      font-size: 1.5rem;
      font-weight: 400;
      max-width: 1500px; 
      text-justify: auto;
    }

h2{
      font-family: Redaction50, serif;
      font-size: 1.5rem;
      font-weight: 700;
      margin-bottom: 1rem; 
      margin-left: 2rem;
      margin-right: 15rem;
      margin-top: 3rem;
 
    }


    .carousel {
      width: 100%;
      overflow: hidden;
      margin-top: 0rem;
      cursor: col-resize;
    }

    .carousel-track {
      display: flex;
      transition: transform 0.45s ease;
    }

    .carousel img {
      width: 100%;
      flex-shrink: 0;

    }

    footer {
      border-top: 2px solid var(--noir);
      padding: 1rem 2rem;
      font-size: 0.75rem;
    }

    /* ===== CURSEUR TORCHE ===== */

#torch {
  position: fixed;
  top: 0;
  left: 0;
  width: 400px;
  height: 400px;
  pointer-events: none;
  border-radius: 100%;

  background: #E5F6A5;

  transform: translate(-50%, -50%);
  z-index: 1;

  /* IMPORTANT : aucun blend mode */
  filter: blur(50px);
}

header,
main,
section,
img,
p,
h1, h2, h3 {
  position: relative;
  z-index: 2;
}

  /* SURLIGNAGE */

#editor {
  border: 1px solid #ccc;
  padding: 15px;
  min-height: 300px;
 
}

/* ===== Mots-clés progressifs ===== */
.keyword {
  display: inline-block;
  padding: 0 2px;
  --progress: 0%;
  background-color: #E5F6A5;
  background-size: var(--progress) 100%;
  background-repeat: no-repeat;
  background-position: 0 0;
  transition: background-size 0.2s linear;
}

/* Surlignage manuel éditeur */
.highlight-manual {
  background-color: #D2A3FF;
  color: black;
}


/* ===== Responsive ===== */


@media screen and (max-width: 768px) {

 .carousel {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    overflow: hidden;
  }

  .carousel img {
    width: 100vw;
    height: auto;
    display: block;
  }

   .chapter-text {
    margin-left: 0;
    margin-right: 0;

    padding-left: 1rem;
    padding-right: 1rem;

    max-width: 100vw;
    width: 100vw;

    font-size: 1.5rem;
    line-height: 1.6;
  }

  h2 {
    width: 100vw;
    max-width: 100vw;
    margin-left: 0;
    margin-right: 0;

    padding-left: 1rem;
    padding-right: 1rem;

    font-size: 1.5rem;
  }

  
  header h1 { 
  font-size: 1em;
  margin-left: 0;
  margin-right: 0;
}

nav a {
  font-size: 1rem;
  margin-left: 1rem;
}

}
