/*======================
  Import global styles
======================*/
@import url('global.css');
@import url('header.css');
@import url('footer.css');

/*======================
  Index specific styles
======================*/
.button--flechette {
  display: none;
  opacity: 0;
  color: transparent;
  height: 1.2rem;
  margin-left: 20px;
}

/*Style des boutons principales*/
.btn--uni {
  background-color: var(--vert-texte);
  color: var(--jaune);
  padding: 12px 24px;
  border: none;
  border-radius: 25px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: auto;
  box-shadow: none;
  min-height: 44px;
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: none;
  margin: 0;
}

.btn--uni:hover {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  padding-right: 50px;
  text-decoration: none;
  transform: translateY(0);
  box-shadow: none;
}




/* Surcharge spécifique pour les flèches des boutons newsletter, podcast et subscription */
.newsletter__submit.btn--uni .button--flechette,
.podcast__button.btn--uni .button--flechette,
.subscription__button.btn--uni .button--flechette {
  opacity: 0;
  width: 16px;
  height: 16px;
  margin-left: 8px;
  transition: all 0.3s ease;
  transform: translateX(-20px);
  position: absolute;
  right: 16px;
  display: inline-block;
}

.newsletter__submit.btn--uni:hover .button--flechette,
.podcast__button.btn--uni:hover .button--flechette,
.subscription__button.btn--uni:hover .button--flechette {
  opacity: 1;
  transform: translateX(0);
}




.footer__button {
  background: var(--texte-noir) !important;
  color: var(--violet);
  padding: 12px 24px ;
  border-radius: 25px ;
  font-family: 'Inter', sans-serif;
  font-size: 21px ;
  font-weight: 650 ;
  border: none ;
  transition: all 0.3s ease ;
  text-decoration: none ;
  display: inline-flex ;
  align-items: center ;
  justify-content: center ;
  position: relative ;
  overflow: hidden ;
  width: auto ;
}

.footer__button:hover {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%) ;
  padding-right: 50px ;
}

.footer__button:hover .button--flechette {
  opacity: 1 ;
  transform: translateX(0) ;
}

.footer__button .button--flechette {
  opacity: 0 ;
  width: 16px ;
  height: 16px ;
  margin-left: 8px ;
  transition: all 0.3s ease ;
  transform: translateX(-20px) ;
  filter: brightness(0) invert(1) ;
  position: absolute ;
  right: 16px ;
  display: inline-block ;
}


/*======================
  Yellow Section Container
======================*/
.yellow-section-container {
  background-color: var(--jaune);
  width: 100%;
  position: relative;
  /* SOLUTION : Permettre au conteneur de s'adapter aux changements de hauteur */
  height: auto;
  overflow: visible;
}

/*======================
  Hero Section
======================*/
.hero {
  padding: 0 var(--spacing-xxl);
  background-color: var(--violet);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  gap: var(--spacing-xl);
  margin-top: -72px;
  padding-top: 72px;
  min-height: 100vh;
}

.hero__content {
  flex: 0 0 55%;
  max-width: 1000px;
  margin-top: -10px;
  padding: var(--spacing-Vl) 0;
  position: relative;
  z-index: 1000;
}

.hero__title {
  font-family: 'Raleway', sans-serif;
  font-size: var(--font-size-hero);
  font-weight: 900;
  line-height: 1;
  color: var(--texte-noir);
  letter-spacing: 0.5px;
  margin-left: 30px;
  margin-bottom: var(--spacing-md);
  
  /* Animation CSS équivalente au JavaScript */
  opacity: 0;
  transform: translateY(50px);
  animation: heroTitleAnimation 2s ease-out 0.3s forwards,
             heroTitleFloat 3s ease-in-out 2.3s infinite;
}

/* Animation d'entrée du titre */
@keyframes heroTitleAnimation {
  0% {
    opacity: 0;
    transform: translateY(50px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animation flottante continue */
@keyframes heroTitleFloat {
  0%, 100% {
    transform: translateY(0);
  }
  33% {
    transform: translateY(-5px);
  }
}

.hero__subtitle {
  font-size: var(--font-size-lg);
  font-weight: 600;
  line-height: 1.5;
  color: var(--texte-noir);
  opacity: 0.95;
  margin-left: 30px;
  margin-bottom: var(--spacing-lg);
  max-width: 800px;
}

.hero__download {
  display: flex;
  gap: var(--spacing-md);
  margin-top: var(--spacing-xl);
  align-items: center;
  filter: drop-shadow(var(--ombre-douce));
  margin-left: 30px;
}

.hero__download-link {
  display: block;
  transition: var(--transition-lent);
  filter: drop-shadow(var(--ombre-douce));
  border-radius: 0;
}

.hero__download-link:hover {
  transform: translateY(0) scale(1.01);
}

.download__img {
  height: 48px;
  width: auto;
  display: block;
}

.hero__lune {
  position: absolute;
  right: 0px;
  bottom: 75px;
  width: 80%;
  height: auto;
  align-items: baseline;
  z-index: 1;
  opacity: 0.95;
}

.hero__pois {
  position: absolute;
  right: 15%;
  top: 25%;
  width: 180px;
  height: auto;
  z-index: 10;
  animation: bounce 4s infinite ease-in-out;
  filter: drop-shadow(var(--ombre-moyenne));
}

@keyframes bounce {
  0%, 100% { transform: translateY(0) rotate(3deg); }
  50% { transform: translateY(-30px) rotate(-3deg); }
}

/*======================
  Fonctionnalités
======================*/
#fonctionnalites {
  display: flex;
  flex-direction: column;
  align-items: left;
  position: relative;
  margin-top: -75px;
  padding-top: 75px;
  margin-bottom: 0;
  padding-bottom: 0;
  z-index: 3;
  overflow: visible;
  /* SOLUTION : Assurer que la section s'adapte aux changements de hauteur */
  min-height: auto;
  height: auto;
}

.features__hello-image {
  position: absolute;
  top: 30%;
  right: -15px;
  width: 300px;
  height: 300px;
  z-index: 1;
  overflow: visible;
  object-fit: contain;
  max-height: 100%;
}

.features__list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  max-width: 1000px;
  width: 100%;
  margin: 50px auto 0 0;
  padding: 40px 20px 0px 60px;
  position: relative; /* Nécessaire pour le positionnement absolu des enfants */
}

.features__item {
  position: relative;
  background: #fff;
  border-radius: 35px;
  padding: 24px 32px;
  cursor: pointer;
  margin-bottom: var(--spacing-xs);
  box-shadow: var(--ombre-douce);
  margin-left: 40px;
}

.features__item-title{
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  font-size: var(--font-size-xl);
  color: var(--vert-menu);
  list-style: none;
}

.features__item-title::-webkit-details-marker{
  display: none;
}

/* flèche pivotante */
.features__arrow{
  font-size: 1.8rem;
  width: 1.2rem;
  height: 1.5rem;
  margin-left: 25px;
  color: var(--vert-texte);
  transition: transform 0.3s ease;
  transform: rotate(90deg);
}

.features__item[open] .features__arrow {
  transform: rotate(0deg);
}

/* Zone dédiée unique pour afficher le contenu de l'item ouvert */
.features__content-zone {
  position: absolute;
  left: 100%;
  top: 3%;
  transform: translateY(-50%);
  width: 1200px;
  max-width: 95%;
  padding: var(--spacing-md);
  font-size: 23px;
  font-weight: 700;
  text-align: left;
  color: var(--vert-menu);
  line-height: 1.5;
  white-space: normal;
  word-wrap: break-word;
  background: transparent;
  transition: all 0.3s ease;
  z-index: 100;
  min-height: 200px;
}

/* Structure du contenu avec image téléphone */
.features__content-wrapper {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-lg);
  height: 100%;
}

.features__text-content {
  flex: 1;
  min-width: 0; /* Permet au texte de se rétrécir */
}

.features__content-image {
  position: relative;
  width: 40%;
  height: 550px;
  margin-right: 50px;
  margin-left: auto;
  flex-shrink: 0;
  object-fit: contain; /* Changé de 'cover' à 'contain' pour éviter le rognage */
  align-self: flex-end;
  margin-top: 70px;
  overflow: visible !important;
  max-height: 100%; /* S'assurer que l'image ne dépasse pas le conteneur */
}

/* Contenu de chaque item - Caché par défaut pour la zone dédiée en desktop */
.features__item-content {
  display: none;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

/* Afficher le contenu de l'item ouvert dans la zone dédiée */
.features__item[open] .features__item-content {
  display: none; /* Toujours caché même quand ouvert - géré par la zone dédiée */
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/*======================
  Footer image (bonhome)
======================*/
.footer-image__wrapper {
  justify-content: baseline;
  align-items: center;
  display: flex;
  background-color: var(--jaune);
  margin-top: 70px;
  padding-top: 0;
}

.footer-image__footer{
  width: 30%;
  margin-left: 100px;
  position: relative;
  bottom: 0;
}

/*======================
  Souscription
======================*/
.subscription {
  text-align: center;
  color: var(--vert-texte);
  margin: var(--spacing-xl) auto;
  max-width: var(--container-max-width);
  border-radius: var(--border-radius-xl);
  position: relative;
  overflow: visible;
}

.subscription h1 {
  font-family: 'Inter', sans-serif;
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin-bottom: var(--spacing-lg);
  line-height: 1.2;
  letter-spacing: -0.5px;
}


/*======================
  Illustrations animées - Disposition 2x2 avec Flexbox
======================*/

.animation__container {
  display: flex;
  flex-direction: column;
  gap: 50px;                               /* espacement vertical minimal entre les lignes */
  width: 100%;                            /* largeur max du conteneur */
  max-width: 1600px;                      /* augmenter la largeur max pour plus d'espace */
  margin: 10px auto;                      /* marges minimales */
  padding: 0 5px;                         /* padding minimal pour éviter les bords */
  margin-top: 170px;
  margin-bottom: 90px;
  margin-left: 100px;
  /* SOLUTION : Suivre le flux naturel de la page */
  position: relative;
  height: auto;
  /* Assurer que le conteneur s'adapte au contenu */
  overflow: visible;
}

/* Première ligne : pois et frigo */
.animation__row--top {
  display: flex;
  gap: 58px;                               /* espacement horizontal minimal entre les colonnes */
  width: 105%;
  min-height: 450px;                       /* hauteur minimale au lieu de fixe */
  height: 450px;                            /* s'adapte au contenu */
}

/* Deuxième ligne : slogan et bras */
.animation__row--bottom {
  display: flex;
  gap: 58px;                               /* espacement horizontal minimal entre les colonnes */
  width: 105%;
  min-height: 450px;                       /* hauteur minimale au lieu de fixe */
  height: 450px;                            /* s'adapte au contenu */
}

/* Chaque bloc individuel */
.animation__container--bloc1,
.animation__container--bloc3,
.animation__container--bloc4 {
  flex: 1;                                /* chaque bloc prend la même largeur */
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 26px;
  padding: 2px;                           /* padding minimal */
  position: relative;                      /* pour le positionnement des overlays */
  overflow: visible;                        /* éviter les débordements */
  min-height: 450px;                      /* hauteur minimale au lieu de fixe */
  height: 450px;                            /* s'adapte au contenu */
}

/* Bloc spécial pour le frigo avec overlay */
.animation__container--bloc2 {
  flex: 1;                                /* chaque bloc prend la même largeur */
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 26px;
  padding: 2px;                           /* padding minimal */
  position: relative;                      /* pour le positionnement des overlays */
  overflow: visible;                        /* éviter les débordements */
  min-height: 450px;                      /* hauteur minimale au lieu de fixe */
  height: 450px;                            /* s'adapte au contenu */
  /* SOLUTION SPÉCIALE : Assurer que le frigo suit le contenu */
  z-index: 2;
}

.animation__img {
  width: 100%;                            /* prendre toute la largeur disponible */
  height: 100%;                            /* prendre toute la hauteur disponible */
  object-fit: cover;                       /* couvre tout le bloc sans espaces vides */
  border-radius: 26px;
  display: block;
  margin: 0;
  /* Assurer que les images s'adaptent au contenu */
  max-height: 100%;
  min-height: 100%;
}


.animation__img--pois {
  background-color: var(--jaune);
}

.animation__img--arm {
  width: 100%;
  height: 100%;
  object-fit: cover;                       /* bras entier visible et cohérent */
}

/*======================
  Animation du frigo
======================*/
.frigo-container,
.slogan-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  /* SOLUTION : Assurer que les conteneurs suivent le contenu */
  overflow: visible;
  z-index: 1;
}

.animation__img--frigo-overlay,
.animation__img--slogan-overlay {
  position: absolute;
  /* Positionner exactement au centre du conteneur */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* Utiliser les mêmes dimensions que les images de base */
  width: 100%;
  height: 100%;
  opacity: 0;
  /* Garder les mêmes propriétés que les images de base */
  object-fit: cover;
  border-radius: 26px;
  display: block;
  margin: 0;
  /* Assurer que les overlays suivent le contenu */
  pointer-events: none;
  z-index: 1;
  /* SOLUTION FINALE : Assurer que les overlays suivent le contenu */
  transition: all 0.3s ease;
  will-change: transform, opacity;
  /* SOLUTION ULTIME : Assurer que les overlays suivent le contenu */
  transform-style: preserve-3d;
  backface-visibility: hidden;
  /* SOLUTION ULTIME : Assurer que les overlays suivent le contenu */
  transform-origin: center center;
}

/* S'assurer que les images de base et overlay ont exactement les mêmes dimensions */
.animation__img--frigo,
.animation__img--frigo-overlay {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 26px;
  margin: 0;
}

.animation__img--slogan,
.animation__img--slogan-overlay {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 26px;
  margin: 0;
}

/* Animations */
@keyframes frigoOverlay {
  0%, 80% { opacity: 0; }
  10%, 70% { opacity: 1; }
}

@keyframes sloganOverlay {
  0%, 80% { opacity: 0; }
  10%, 70% { opacity: 1; }
}

/*======================
   Déclenchement au survol (desktop) 
   Animation auto (mobile)
======================*/

/* Desktop */
@media (min-width: 992px) {
  /* Désactiver l'animation auto par défaut */
  .animation__img--frigo-overlay,
  .animation__img--slogan-overlay {
    animation: none;
    opacity: 0;
  }

  /* Animation au survol */
  .animation__container--bloc2:hover .animation__img--frigo-overlay {
    animation: frigoOverlay 2s infinite;
  }
  .animation__container--bloc3:hover .animation__img--slogan-overlay {
    animation: sloganOverlay 2s infinite;
  }

  /* Contrôle GIFs */
  .animation__img--pois,
  .animation__img--arm {
    animation-play-state: paused;
  }
  .animation__container--bloc1:hover .animation__img--pois,
  .animation__container--bloc4:hover .animation__img--arm {
    animation-play-state: running;
  }
}

/* Mobile */
@media (max-width: 991.98px) {
  .animation__img--frigo-overlay {
    animation: frigoOverlay 2s infinite;
  }
  .animation__img--slogan-overlay {
    animation: sloganOverlay 2s infinite;
  }

  .animation__img--pois,
  .animation__img--arm {
    animation-play-state: running;
  }
}


/*======================
  Podcast
======================*/
#podcast {
  display: flex;
  flex-direction: row;
  height: 100%;
  padding: var(--spacing-xxxl) 0px;
  background-color: var(--jaune);
  align-items: center;
  gap: var(--spacing-xxxl);
  position: relative;
}

.podcast__img {
  display: flex;
  flex: 0 0 40%;
  width: 1000px;
  height: 600px;
  border-radius: var(--border-radius-lg);
  margin-left: 6px;
  margin-right: 0;
}

.podcast__latest{
  margin-top: 100px;
  margin-left: 92px;
  margin-right: 0;
  padding: 0;
}

.podcast__latest h1{
  font-family: 'Raleway', sans-serif;
  font-size: 62px;
  font-weight: 900;
  color: var(--vert-texte);
  line-height: auto;
  margin-right: 0;
  padding: 0;
}

.podcast__description {
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  flex: 1;
  color: var(--vert-texte);
  padding:0;
  transform: translateZ(0);
  margin-right: 0;
  padding: 0;
}



.podcast__description p {
  font-family: 'Inter', sans-serif;
  font-size: 30px;
  color: var(--vert-texte);
  font-weight: 700;
  line-height: auto;
  margin-bottom: var(--spacing-xl);
  margin-top: 0;
  letter-spacing: -0.5px;
  text-align: left;
}



/*======================
  Newsletter
======================*/
.newsletter {
  text-align: left;
  color: var(--vert-texte);
  position: relative;
  height: 100%;
}

/* Couche de fond derrière le contenu newsletter mais qui couvre également le bloc images animées  */
.newsletter__background-layer {
  position: absolute;
  top: -800px;
  left: 0;
  width: 100%;
  max-height: 500%;
  background-color: var(--jaune);
  z-index: -1;
}

.newsletter__container{
  margin: 0;
  width: 100%;
  background-color: var(--vert-souscription);
  padding: var(--spacing-xxxl);
  margin-bottom: 250px;
}

.newsletter__image {
  position: absolute;
  top: 110px;
  right: 125px;
  width: 45%;
  height: 100%;
  max-width: 800px;
  margin-right: -13px;
  object-fit: cover;
  border-radius: 25px;
  z-index: 1000;
  opacity: 1;
}

.newsletter__title {
  font-family: 'Raleway', sans-serif;
  font-size: 62px;
  font-weight: 900;
  margin-bottom: var(--spacing-xl);
  position: relative;
  z-index: 1;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
  margin-left: 0px;
  color: var(--vert-texte);
}

/*======================
  Newsletter Form Styles
======================*/
.newsletter__form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    max-width: 500px;
    margin: 0;
    align-items: flex-start;
    margin-left: 0px;
}

.newsletter__input {
    flex: 1;
    padding: var(--spacing-md);
    border: 2px solid var(--color-primary);
    border-radius: 25px;
    font-size: var(--font-size-md);
    background: white;
    color: var(--texte-noir);
    transition: all 0.3s ease;
    width: 100%;
}

.newsletter__input:focus {
    outline: none;
    border-color: var(--color-secondary);
}

.newsletter__submit {
    /* Utilise les styles de .btn--uni par défaut */
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: var(--font-size-md);
    font-weight: 600;
    color: var(--vert-souscription);
    background-color: var(--vert-texte);
    gap: var(--spacing-xs);
    white-space: nowrap;
    width: auto;
    align-self: flex-start;
    min-width: auto;
    max-width: 200px;
  height: 44px;
}

.newsletter__submit:disabled,
.newsletter__submit.processing {
    cursor: not-allowed;
    opacity: 0.8;
    transform: none;
}

.button--flechette {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    color: var(--jaune);
}



.newsletter__email {
  padding: var(--spacing-md);
  border: none;
  border-radius: var(--border-radius-lg);
  border: 2px solid transparent;
  font-size: var(--font-size-md);
  background-color: var(--vert-texte);
  color: white;
  width: 100%;
}

.newsletter__email:focus {
  outline: none;
  border-color: var(--vert-menu);
  box-shadow: var(--ombre-moyenne);
  transform: translateY(-2px);
}

.newsletter__email::placeholder {
  color: var(--vert-souscription);
}

.footer__title {
  font-family: 'Raleway', sans-serif;
  font-size: 64px;
  font-weight: 900;
  color: var(--texte-noir);
  line-height: 1.2;
}
