/*
Theme Name: mon-livre
Author: cecile.redacteurweb@gmail.com
Author URI: cecile.redacteurweb@gmail.com
Description: theme du site du livre jeunesse Ho-la-vache responsive HTML5 
Version: 1.0
*/

/*général*/

h1 {
text-align: center;
}

a {
  text-decoration: none;
}

p a:hover {
  color: #088B8e;
}

body
{
font-family: 'Poppins', 'Roboto', sans-serif;
  text-align: justify;
  color: #15333F;
}

/*bandeau et header*/

.bandeau
{
  background-image: url("img/paisley_clair.webp") ; 
  background-color: rgba(255, 255, 255, 0.3);
  background-blend-mode: hue;
  display: flex;
  flex-direction: row;
  position: fixed;
  width: 100%;
  height: 150px;
  align-items: center;  
}

.bandeau img {
  box-sizing: border-box;
  width: 15%;
  margin: 30px 0px 0px 30px;}

.bandeau a
{
  display: flex;
  color: #15333F /*bleu foncé*/;
  font-size: 1em ; 
  font-weight: bold ;
}

.bandeau a:hover
{
  color: rgb(6, 119, 144) /*bleu paon*/;
}

header nav
{
  display: flex;
  border: 5px #15333F solid;
  background-color: white ;
  padding: 0px 0px 0px 0px;
  width: 80%;
  justify-content: space-evenly;
}

header nav ul
{
  list-style-type: none ;
  display: flex ;
  text-align: center;
  padding-left: 5px;
  padding-right: 5px;
}

header nav li a 
{
  padding: 0px 70px 0px 70px;
}

.sous-menu {
  display: none; /* Cache les sous-menus par défaut */
  position: absolute;
  background-color: white;
  padding: 0;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

.deroulant {
  position: relative;
}

.deroulant:hover .sous-menu {
  display: block; /* Affiche le sous-menu au survol */
}

.sous-menu li {
  padding: 10px 10px 10px 70px;
}

.sous-menu li a {
  color: #15333F;
  display: block;
  padding: 5px 10px;
}

.sous-menu li a:hover {
  background-color: #ddd;
}

/* titres*/
.titres
{
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: auto;
  background-color: #FCFCFA /*blanc crème*/;
  font-family: Helvetica;
}

.titres h1
{
  font-family: 'Caveat Brush', cursive;
  margin-top: 120px;
  margin-bottom: 0%;
  text-align: center;
  font-size: 8em;
  color: #15333F /*bleu foncé*/;
}

.titres h2
{
  margin-top: -40px;
  margin-bottom:0%;
  text-align: center;
  font-size: 1.5em;
  color: #088B8e /*bleu paon*/;
}

.titres h3
{
  font-family: 'Caveat Brush', cursive;
  margin: 0px;
  text-align: center;
  font-size: 3em;
  color: #15333F /*bleu foncé*/;
}

.titres h4
{
  text-align: center;
  margin: 20px 0px 0px 0px;
  font-size: 3em;
  color: #088B8e /*bleu paon*/;
}

.titres h4+p
{
  margin-top: 0%;
  margin-bottom: 0%;
  text-align: center;
  color: #088B8e /*bleu paon*/;
  font-size: 1.3em;
}

h5
{
  font-family: 'Caveat Brush', cursive;
  text-align: center;
  margin: auto;
  font-size: 2em;
  color: #15333F/*bleu foncé*/;
}

h6
{
  font-family: 'Caveat Brush', cursive;
  text-align: left;
  font-weight: bold;
  font-size: 1.5em;
  margin: 0;
  color: #15333F /*bleu foncé*/;
}

.titremenu
{
  font-family: 'Caveat Brush', cursive;
  text-align: center;
  font-weight: bold;
  font-size: 1.7em;
  color: #15333F;
  border: 5px #15333F solid;
  background-color: white;
  border-radius:10px/10px;
  padding:5px 10px 5px 10px;
  margin:5%;
}

/* mainpage*/

.mainpage
{
  background-color: #FCFCFA /*blanc crème*/;
  font-family: Helvetica;
  display: flex ;
  flex-direction: row;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}

.article
{
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  margin: 0;
  padding: 20px;
  width: 70%;;
  box-sizing: border-box;
}

.image_centrale_hor
{
  display: flex;
  align-items: center;
  justify-content: center;
}

.image_centrale_hor img
{
  width: 500px;
  height: auto;
}

.image_centrale_ver
{
  display: flex;
  align-items: center;
  justify-content: center;
}

.image_centrale_ver img
{
  height: 500px;
  width: auto ;
}

.image_centrale_bandeau
{
  display: flex;
  align-items: center;
  justify-content: center;
}

.image_centrale_bandeau img
{
  width: 90% ;  
  height: auto;
}

.image_gauche
{
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  margin: 10px 30px 0px 30px;
}

.image_gauche img
{
  width: 300px;
  height: 300px;
}

.image_gauche_texte
{
  display: flex;
  flex-direction: column;
  margin: 0px 30px 0px 30px;
}

.cadre
{
  border-radius: 20px;
  background-color: rgba(8,139,148, 0.1) /*bleu paon*/;
  margin: 10px 10px 10px 10px ;
  display: flex;
  flex-direction: column;
  justify-content: left;
  text-align: left;
}

.cadre p
{
  margin-top: 20px;
  margin-bottom: 20px;
}

/*slider*/
.diaporama {
      position: relative; /* Nécessaire pour positionner les flèches */
      width: 90%;
      max-width: 800px;
      overflow: hidden;
      margin: auto;
      border-radius: 10px;
      display: flex; 
      flex-direction: column;
      justify-content: center; 
      align-items: center;
  }
  
  /* Assurer que les images restent sur une seule ligne */
  .elements {
       display: flex;
       transition: transform 0.5s ease-in-out;
       justify-content: center;
       align-items: center;
  }
  
  /* Adapter toutes les images à la même taille */
  .element img {
       width: 100%;
       height: 450px;
       object-fit: cover; /* Empêche la déformation et garde les proportions */
  }
  
  /* Positionnement des flèches pour qu'elles restent sur les côtés de l'image */
.btn {
  position: absolute;
  transform: translateY(-50%);
  background-color: #088B8e /*bleu paon*/;
  color: white;
  border: none;
  padding: 15px;
  cursor: pointer;
  font-size: 24px;
  z-index: 10;
}

.btn:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

/* Ajustement des flèches pour qu'elles restent proches des images */
.left {
  left: 0%; /* Ajuste l'écart entre la flèche et l'image */
}

.right {
  right: 0%;
}

/* carousel vidéo */
.carousel {
  max-width: 100%; /*ou 400px;*/
  /*margin: auto;*/
  overflow: hidden;
  position: relative;
  /*overflow-x: auto;*/
}

.carousel-track {
  display: flex;
  transition: transform 0.3s ease; 
  max-height: 700px;
}

.carousel-track video {
  min-width: 100%;
  height: auto;
  background: #eee;
}

/*.carousel video {
  width: 100%;
  flex-shrink: 0;
}*/
.carousel-buttons {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  font-size: 2rem;
  background: rgba(255,255,255,0.8);
  border: none;
  cursor: pointer;
  z-index: 10;
}

.carousel-button.prev {
  left: 10px;
}
.carousel-button.next {
  right: 10px;
}

/*.carousel-buttons button {
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  padding: 10px;
  cursor: pointer;
}*/

/* STYLE PAR DEFAUT DES BOUTONS (DESKTOP) */
.carousel-button, .diaporama-button, .menu-button {
  background-color: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  padding: 10px;
  font-size: 24px;
  cursor: pointer;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  transition: background-color 0.3s, transform 0.3s;
}

/* Effet au survol */
.carousel-button:hover, .diaporama-button:hover, .menu-button:hover {
  background-color: rgba(0, 0, 0, 0.6);
  transform: translateY(-50%) scale(1.1);
}

/* Position spécifique */
.prev {
  left: 10px;
}
.next {
  right: 10px;
}
  
/*menus side */

.menuside-left, 
.menuside-right {
  background-image: url("img/paisley_clair.webp") ; 
  background-size: 150%;
  padding: 10px ;
  text-align: center;
  border-radius: 10px/10px ;
  box-shadow: 5px 5px 10px black ;
  margin: 0; 
  font-size: 1.3em;
  width: 15%;  
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-break: break-word;
}

.menuside-left ul, 
.menuside-right ul {
	flex-direction: column;
	list-style-type: none ;
	padding: 0px ;
}

.menuside-left a, 
.menuside-right a {
	color: #FFF ;
}

.menuside-left a:hover,
.menuside-right a:hover {
	color: rgb(42,42,96) ;
  font-weight: bold;
	overflow-x: auto;
}

.menuside-left li,
.menuside-right li{
	border: 1px #088B8e solid;
  background-color: #088B8e ;
	border-radius: 10px/10px ;
	box-shadow: 5px 5px 10px black ;
	padding: 5px 10px 5px 10px ;
	margin: 10%;
}	

.menuside-left li,
.menuside-right li,
.titremenu {
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.menuside-left p, 
.menuside-right p{
	flex-direction: column;
	text-align: center ;
}

/* footer*/

footer
{
  background-color: #088B8e;
  margin-top: 10px ;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  color: white;
}

footer ul
{
  list-style-type: none ;
  display: flex ;
  justify-content: space-around ; 
}

footer a
{
  font-weight: bold ;
  padding: 0px 20px 0px 20px;
}

footer a:hover
{
  color: rgb(42,42,96)
}

/* ------------------------------------------- */
/* RESPONSIVE DESIGN POUR HO LA VACHE ! */
/* ------------------------------------------- */

/* Large écran : ordinateur classique */
@media screen and (min-width: 1025px) {
  .mainpage {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
  }
  .menu-button {
    display: none;
  }
}

/* Écran tablette */
@media screen and (min-width: 768px) and (max-width: 1024px) {
  .mainpage {
    display: flex;
  }

  .menuside-left,
  .menuside-right {
    margin: 0px;
    font-size: 0.8em;
  }

  .menu-button {
    display: none;
  }

  .bandeau img {
    width: 15%;
    margin: 0px;
  }

  header nav {
    width: 80%;
    flex-wrap: wrap;
    justify-content: center;
  }

  header nav li a {
    padding: 10px 20px;
  }
  .titres h1 {
    font-size: 6.5em;
  }

  .titres h4 {
    font-size: 2em;
  }

  .image_centrale_ver img {
    height: 400px;
    width: auto;
  }

  .image_gauche {
    margin: 10px 0px 0px 0px;
  }

  .image_gauche_texte {
    margin: 0px 0px 0px 10px;
  }
}

/* Petit écran : smartphone */
@media screen and (max-width: 767px) {
  .mainpage {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .bandeau {
    position: relative;
  }

  .menuside-left,
  .menuside-right {
    display: none;
  }

  .article {
    width: 95%;
  }

  .bandeau {
    flex-direction: column;
    height: auto;
    padding: 10px 0;
  }

  .bandeau img {
    width: 20%;
    margin: 10px 0;
  }

  header nav {
    flex-direction: column;
    width: 70%;
    padding: 0;
    background-color: white;
  }

  header nav ul {
    flex-direction: column;
    align-items: center;
    padding: 0;
  }

  header nav li a {
    padding: 10px 0;
  }

  .titres h1 {
    font-size: 3em;
    margin-top: 0;
  }

  .titres h2 {
    font-size: 1em;
    margin-top: 0;
  }

  .titres h4 {
    font-size: 2em;
  }

  h6 {
    display: flex;
    justify-content: center;
  }

  .image_gauche {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 10px 0px 0px 0px;
  }

  .image_gauche_texte {
    margin: 0;
  }

  .image_centrale_ver img {
    height: 300px;
    width: auto;
  }
  
  .image_centrale_hor img {
      width: 100%;
      height: auto;
  }

  .diaporama {
    width: 100%;
  }

  .carousel-track {
    display: flex;
    overflow-x: auto; /* remplace scroll*/    
    flex-wrap: nowrap;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; /* pour le scroll fluide sur iOS */
    transform: none !important;
  } 

  .carousel-track video {
    flex: 0 0 100%;
    scroll-snap-align: center;
    width: 100%;
    height: auto;
  }

  .carousel-button, .diaporama-button, .menu-button {
      padding: 15px;
      font-size: 32px;
    }
    .prev,#prev {
      left: 5px;
    }

    .next, #next {
      right: 5px;
    }

    #prev, #next {
  display: none;
    }

    .carousel::before,
  .carousel::after {
    content: "‹";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(0, 0, 0, 0.2);
    font-size: 2rem;
    pointer-events: none;
  }

  .carousel::before {
    left: 5px;
  }

  .carousel::after {
    content: "›";
    right: 5px;
  }

    .menuside-left, .menuside-right {
      position: relative; /* plus en fixed */
      transform: none;
      top: auto;
      left: auto;
      right: auto;
      width: 100%; 
      margin: auto;
      display: inline-block;
      text-align: center;
      padding: 10px 0;
      box-sizing: border-box;
    }
  
    /*les deux menus réorganisés*/
  /*#menus-mobile {
      display: contents;
      justify-content: space-around;
      flex-wrap: wrap;
      background: #eee;
      margin-top: 20px;
    }*/
  .menuside-left ul,
  .menuside-right ul {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
  }

  .menuside-left li,
  .menuside-right li {
    flex: 0 0 auto;
    min-width: 130px;
    font-size: 0.8em;
    margin: 5px;
  }  

    .scroll-wrapper {
      position: relative;
      overflow: hidden;
      display: flex;
      align-items: center;
      margin: 10px 0;
    }

.scroll-wrapper::before,
.scroll-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 30px;
  z-index: 2;
  pointer-events: none; /* ne bloque pas les clics */
}

.scroll-wrapper::before {
  left: 0;
  background: linear-gradient(to right, rgba(255,255,255,0.9), rgba(255,255,255,0));
}

.scroll-wrapper::after {
  right: 0;
  background: linear-gradient(to left, rgba(255,255,255,0.9), rgba(255,255,255,0));
}
  
    .scroll-container {
      overflow-x: auto;
      white-space: nowrap;
      scroll-behavior: smooth;
      scroll-snap-type: x mandatory;
      scroll-padding-left: 30px;
      flex: 1;
      padding: 5px 30px; /* espace pour les flèches */
      display: flex;
      -webkit-overflow-scrolling: touch; /* pour le scroll fluide sur iOS */
      gap: 10px; /* optionnel : espace entre les éléments */
      cursor: grab; /*pour petit rebond*/
      flex-wrap: nowrap;
    }

    .scroll-container video {
      scroll-snap-align: center;
      min-width: 100%;
    }
    .scroll-container:active {
      cursor: grabbing;
    } 
  
    .scroll-container ul {
      display: flex;
      flex-direction: row;
      gap: 10px;
      padding: 0;
      margin: 0;
      list-style: none;
      flex-wrap: nowrap;
    }
  
    .scroll-container li {
      flex: 0 0 auto /* empêche l'étirement */;
      margin: 0 5px;
      white-space: normal
      scroll-snap-align: start;
      min-width: 140px;
    }

    .scroll-container::after {
      content: "";
      display: block;
      flex: 0 0 40px; /* Espace à droite, ajuste selon la taille de ta flèche */
    }
    
  
    .menu-button {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      z-index: 10;
      background: rgba(255, 255, 255, 0.6);
      padding: 5px 10px;
      font-size: 20px;
      cursor: pointer;
      user-select: none;
      color: #088B8e;
    }
  
    .menu-button.left {
      left: 0;
    }
  
    .menu-button.right {
      right: 0;
    }

    footer {
      flex-direction: row;
      height: auto;
      justify-content: center;
    }

    footer p {
      display: flex;
      justify-content: center;
      align-content: center;
    }
}

/* ------------------------------------------- */