* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: all 0.4s ease;
    text-decoration: none;
}

body {
    font-family: main;
    background-color:var(--secondary);
    color: var(--main);
    -webkit-font-smoothing : antialiased;

}

:root {
    --main: #3A1A2B;
    --link: #840046;
    --secondary: #DDDDDD;
    --opacity_main:rgba(58, 26, 43, 0.715);
}

@font-face {
    font-family: main;
    src: url(../font/DocumanTRIAL-Bold.ttf);
}
@font-face {
    font-family: Title;
    src: url(../font/Exposure\ -\ [-60]-205TF.otf);
}

  
  /* Ajoute les autres ici */
  
h1,h2,h3,b {
    color: #3A1A2B;
    margin-bottom: 20px;
    font-family: main;
}

.container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    padding-top: 80px;
    max-width: 1150px;
    margin: auto;
}

.palette {
    display: flex;
    flex-direction: column;
    width:250px;
    height: 250px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}
.color {
    position: relative;
}
.color:nth-child(1) { flex: 45%; }
.color:nth-child(2) { flex: 30%; }
.color:nth-child(3),
.color:nth-child(4) { flex: 20%; }
.color:hover::after {
    content: attr(data-hex);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--opacity_main);
    color: white;
    padding: 5px 10px;
    border-radius: 775px;
    font-size: 12px;
}

.color.copied::after {
    content: "Copié!";
    background: var(--opacity_main);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;}


    .tag-wrapper {
      position: fixed;
      z-index: 10;
      bottom: 80px;
      display: flex;
      flex-wrap: wrap;
      gap: 110px;
      padding: 20px;
      justify-content: flex-start;
      font-size: .9em;
    }
    
    .tag-pair {
      position: relative;
      width: fit-content;
    }
    #hg,#hp {
width: 120px;
padding-left: 10px;
padding-right: 10px;
      word-break: break-all;
    }

    #tag_space {
      margin-left: 20px;
    }
    .tag-pair button {
      position: absolute;
      font-size: .9em;
      left: 0;
      top: 0;
      width: 95px;
      transition: all 0.2s ease;
      border: none;
      border-radius: 20px;
      padding: 8px 16px;
      background-color: var(--main);
      color: var(--secondary);
      cursor: pointer;
    }
    
    /* Premier bouton en arrière-plan */
    .tag-pair button:first-child {
      z-index: 1;
    }
    
    /* Deuxième bouton légèrement décalé */
    .tag-pair button:last-child {
      z-index: 2;
      transform: translate(0, 40px);
    }
    
    .tag-pair button.active {
      background-color: var(--link);
    }
    
    
    .book_img {
      transition: all 0.3s ease;
      order: 1;
    }
    
    .book_img.dimmed {
      opacity: 0.1;
      order: 2;
    }
    
    .container_book {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
      gap: 40px;
      max-width: 1100px;
      padding-top: 80px;
      margin: auto;
    }
    
    .book_img {
      width: 100%;
      border-radius: 8px;
      cursor: pointer;
      transition: transform 0.2s ease;
    }
    
    .book_img:hover {
      transform: scale(1.03);
    }

    .header {
        background-color: var(--main);
        color: var(--secondary);
        padding: 10px 20px;
        display: flex;
        font-size: .9em;
        justify-content: space-between;
        position: fixed;
        z-index: 999;
        width: 100%;
      }
      
      .left-section {
        font-family: main;
        display: flex;
        align-items: center;
        gap: 30px;
      }

      .logo img {
        height: 17px; /* Ajuste selon la taille que tu veux */
        object-fit: contain;
        margin-top: 2px;
        cursor: pointer;
      }
      
      .menu {
        display: flex;
        gap: 20px;
        padding-left: 20px;
      }
      
      .menu-item {
        cursor: pointer;
        position: relative;
      }
      
      .menu-item:hover {
        opacity: 0.5;
      }

a {
        text-decoration: none!important; 
}

.link a{
        text-decoration: none!important; 
        color: #DDDDDD!important;
      }

      /* Sous-menus */
      
      .submenu-container {
        display: none;
        margin-left: -20px;
        position: absolute;
        top: 100%;
        z-index: 10;
        margin-top: 10px;
        font-family: main;
      }
      
      .submenu-bubble {
        background-color: var(--main);
        border-radius: 27px;
        padding: 15px;
        display: grid;
     /*    grid-template-columns: repeat(2, auto);*/
        gap: 10px 20px;
        max-width: 300px;
        font-family: main;
      }

      .submenu-bubble div {
        background-color: var(--secondary);
        color: var(--main);
        padding: 8px 12px;
        border-radius: 700px;
        cursor: pointer;
      }
      
      .submenu-bubble div:hover {
        opacity: 0.5;
      }
      
      /* Bouton Infos */
      .info-button {
        cursor: pointer;
        margin-top: 2.5px;
      }
      
      .info-button:hover {
        opacity: 0.5;
      }
      
      .info-bubble {
        font-family: main;
        position: absolute;
        top: 100%;
        left: 250px;
        margin-top: 10px;
        background-color: var(--main);
        color: var(--secondary);
        border-radius: 20px;
        padding: 20px;
        max-width: 300px;
        display: none;
        flex-direction: column;
        gap: 10px;
     
      }
      

 #real{
  max-width: 370px;
 }

  #penguin{
  max-width: 240px;
 }

  #achrome{
  max-width: 220px;
 }

.big-logo {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 98%;
    z-index: 2;
    pointer-events: none;
    text-decoration: none;
    display: block;
}

.floating_img {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
  }
  
  .floating {
    border-radius: 4px;
    position: absolute;
    max-width: 270px;
    transition: transform 0.4s ease;
    z-index: 2;
  }
  
  .floating.behind {
    z-index: 1; /* derrière le logo */
  
  }

  .grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding-top: 80px;
    padding-bottom: 140px;
    max-width: 1000px;
    margin: auto;
  }

  .grid-item {
    width: 230px;
    height: auto;
    text-align: left;
  }

  .grid-item a {
    text-decoration: none;
    color: inherit;
  }

  .playlist-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: var(--main); /* Fallback si pas d'image */
    border-radius: 8px;
    transition: transform 0.3s ease;
  }

  .playlist-image:hover {
    transform: scale(1.03);
    cursor: pointer;
  }

  .playlist-title {
    margin-top: 10px;
    font-weight: bold;
    font-size: 1rem;
  }

  .separator-container {
    padding-top: 80px;
    max-width: 800px;
    margin: auto;
  }

  .separator-block {
    margin-bottom: 40px;
    text-align: center;
  }

  .separator {
    font-size: 24px;
    margin-bottom: 20px;
    user-select: all;
  }

  .copy-btn {
    background-color: var(--main);
    color: var(--secondary);
    border: none;
    border-radius: 20px;
    padding: 10px 25px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }

  .copy-btn:hover {
    background-color: var(--opacity_main);
  }


/* EPUB WEB */

#epub-content {
  font-family: main;
    position: fixed;
    top: 100px;
    left: 50%;
    bottom: 100px;
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    color: var(--main);
    margin-bottom: 50px;
    overflow-y: auto;
    column-count: 1;
    column-gap: 40px;
    word-wrap: break-word;
    border: none;
    visibility: hidden;
    z-index: 2;
    margin: 0;
    transform: none;
    height: auto;
    width: auto;
    max-height: none;
    max-width: 600px;
    transform: translateX(-50%);
    border: var(--main) solid 2px;
}

.page:first-child p {
  color:var(--opacity_main);
  font-size: 11px;
  margin: 0;
  padding: 0;
}

.page:first-child p:nth-child(5) {
  color:var(--opacity_main)!important;
  margin-top: 15px;
}

.page:first-child p:nth-child(3),
.page:first-child p:nth-child(4),
.page:first-child p:nth-child(7) {
    color:var(--opacity_main)!important;
      margin: 0;
  padding: 0;
} 

.page:nth-child(2) {
  background-color: #3A1A2B;
  display: none !important;
    margin: 0;
  padding: 0;
}

#epub-content a {
    color: var(--link);
}

#epub-content h1, h2, h3, b {
    font-family: Title;
    font-size: 2em;
}
#epub-content li {
    margin-left: 50px;
}

/* L'image de fond dans le conteneur */
#epub-content img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* L'image remplira le conteneur sans déformation, tout en le recouvrant */
    display: block;
    opacity: 0.6; /* Opacité de l'image pour ne pas gêner le texte */
}

/* Conteneur de pagination (les boutons) */
/* Masquer les boutons au départ */
.pagination {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: none; /* Masquer les boutons */
    justify-content: center;
    gap: 10px;
}


/* Styles des boutons de pagination */
#prevPage, #nextPage, #printBook {
    padding: 10px 20px;
    background-color: var(--main); /* Couleur principale */
    color: var(--secondary);
    border: none;
    border-radius: 775px;
    cursor: pointer;
    font-size: .9em;
    transition: background-color 0.3s ease;
}

#prevPage:disabled, #nextPage:disabled {
    background-color: var(--secondary);
    color: var(--main);
    cursor: not-allowed;
    padding: 10px 20px;
}

#prevPage {
  position: fixed;
  top: 50%;
  left: 20px;
  margin-top: 6px;
  visibility: hidden;
}

#nextPage {
  position: fixed;
  top: 50%;
  right: 20px;
  margin-top: 6px;
  visibility: hidden;
}

#printBook {
  visibility: hidden;
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
}

hr {
  margin-bottom: 20px;
}

#prevPage:hover, #nextPage:hover, #printBook:hover {
    background-color: var(--opacity_main); /* Couleur au survol */
}

/* Boutons généraux (si tu as d'autres boutons dans la page) */
button {
    font-family: main;
    background-color: var(--main); /* Couleur principale */
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    font-size: .9em;
}

button:disabled {
    background-color: var(--secondary);
    cursor: not-allowed;
}

button:hover {
    background-color: var(--opacity_main); /* Couleur au survol */
}

/* Style pour les pages */
.page {
    display: none;
    position: relative;
    padding-bottom: 40px;
}

#file-input {
    opacity: 0; /* Masquer le bouton */
    position: absolute; /* Laisser l'élément dans son emplacement sans qu'il soit visible */
    z-index: -1; /* Placer sous tous les autres éléments */
}

#file-input-label {
  font-family: main;
  font-size: .9em;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  margin-top: 25px;
  z-index: 10;
  background-color: var(--main);
  padding: 10px 20px 10px 20px;
  border-radius: 775px;
  color: var(--secondary);
  z-index: 1;
  text-align: center;
}

#file-input-label:hover {
opacity: .5;
}

#printBtn {
  display: none;
}

/* Style pour le folio en bas de chaque page */
.folio {
  display: none;
}

ol {
  display: none;
}


hr {
  margin-bottom: 30px;
  margin-top: 30px;
  border: #3A1A2B 2px dotted;

  width: 100%;
   height: 0px; 
  /* background-color: var(--secondary); */

}

p {
  line-break:auto;
  word-wrap: break-word;
  margin-top: 15px;
    margin-bottom: 15px;
}

.contenu-page {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.intro {
    margin-bottom: 40px;
     margin-top: 40px;
}

.intro h1 {
    font-size: 2em;
    margin-bottom: 10px;
    text-align: left;
}

.intro p {
    font-size: 1.1em;
    line-height: 1.5;
    text-align: left;
    max-width: 1200px;
}
.galerie {
    max-width: 100%;
   
    margin: 0 auto; /* centre le bloc dans la page */
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}


.galerie img {
    width: 100%; /* prendra toute la largeur dispo du conteneur */
    max-width: 100vw; /* limite à la largeur de l’écran */
    height: 1080px;
    object-fit: cover;
    margin: 5px 0;
    box-sizing: border-box;
    display: block;
}




@media (orientation: portrait) {

  img#pageShadow {
    display: none;
  }

  .page {
    display: block!important;
    padding-bottom: 0;
  }

  #printBtn {
    display: block;
    visibility: hidden;
  }

  #epub-content {
    font-family: main;
    position: fixed;
    top: 40px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    color: var(--main);
    margin-bottom: 50px;
    overflow-y: auto;
    column-count: 1;
    column-gap: 40px;
    word-wrap: break-word;
    border: none;
    visibility: hidden;
    z-index: 2;
    margin: 0;
    border-radius: 0;
    transform: none;
    height: auto;
    width: auto;
    max-height: none;
  }

  .folio {
    display: none;
  }

  h2 {
    margin-top: 20px;
  }

  .left-section {
    font-family: main;
    display: flex;
    align-items: center;
    gap: 0px;
  }

}