/* ensemble des pages*/
html {
  scroll-behavior: smooth;
}

/* 🔹 Corps de page : applique les variables et la transition pour thème clair/sombre */
body {
  background: #000;
  color: #fff;
  font-family: 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
}

header {
  display: grid;
  grid-template-columns: auto 1fr auto; /* gauche lien | centre titre | droite image */
  align-items: center;
  gap: 16px;
  border-bottom: 2px solid #222039;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

/* On expose les enfants de .top-line directement sur la grille du header */
header .top-line {
  display: contents; /* Les enfants (lien + image) occupent les colonnes 1 et 3 */
}

/* Lien gauche */
header .commentaires {
  grid-column: 1;
  justify-self: start;
  background-color: #ff0000;
  color: rgb(252, 247, 247);
  border-radius: 60px;
  transition: background-color 0.2s;
  border: none;
  text-decoration: none;
  padding: 8px 15px;
}

/* Titre centré (colonne 2) */
header h1 {
  grid-column: 2;
  text-align: center;
  font-size: 2rem;
  margin: 0;
}

section {
  margin-bottom: 40px;
}

h2 {
  font-size: 28px;
  margin-bottom: 20px;
  border-left: 5px solid red;
  padding-left: 10px;
}

/*.commentaires {
  display: inline-block;
  background-color: #ff0000;
  color: rgb(252, 247, 247);
  text-decoration: none;
  padding: 8px 15px;
  font-size: 15px;
  /* margin: 10px;*/
/*border-radius: 60px;
  transition: background-color 0.2s;
  border: none;
}*/

.project-block {
  width: 90%;
  max-width: 1200px;
  margin: auto;
  padding: 20px;
}

/* Image à droite */
.project-img {
  grid-column: 3;
  justify-self: end;
}

.project-img img {
  max-height: 150px;
  border: 1px solid #aaa;
  border-radius: 5px;
}

.video {
  width: 400px;
  max-height: 600px;
  margin: 10px auto; /* ← centre horizontalement */
  display: block; /* ← indispensable pour <video> */
}

.souligne {
  text-decoration: underline;
  margin-bottom: 15px;
}

/* Conteneur flexbox pour aligner image + texte */
.avis-container {
  display: flex;
  align-items: center; /* Centre verticalement */
  gap: 20px; /* Espacement entre image et texte */
  margin-bottom: 20px;
}

.clients {
  width: 200px;
  max-height: 300px;
  object-fit: cover; /* Pour garder les proportions */
  border-radius: 10px; /* Optionnel : coins arrondis */
  flex-shrink: 0; /* Empêche l'image de rétrécir */
}

/* Texte justifié et centré verticalement */
.exp {
  font-size: 18px;
  text-align: justify;
  text-indent: 0;
  margin: 0; /* Supprime les marges par défaut du <p> */
  line-height: 1.6;
}

hr {
  margin: 30px 0;
  border: none;
  border-top: 1px solid rgba(255, 1, 1, 0.996); /* couleur Trait */
}

/* 🔹 PIED DE PAGE (FOOTER) */
footer {
  text-align: center;
  padding: 30px;
  background-color: var(--header-bg);
  color: var(--header-text);
  font-size: 14px;
}
/* Revenir vers le haut */
#backToTop {
  position: fixed;
  /* reste toujours visible à l’écran */
  bottom: 20px;
  /* distance du bas */
  right: 20px;
  /* distance de la droite */
  display: none;
  /* caché par défaut */
  background-color: #333;
  /* style bouton */
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 24px;
  cursor: pointer;
  transition: opacity 0.3s ease;
  z-index: 100;
  /* au-dessus du contenu */
}

#backToTop.show {
  display: block;
  /* apparaît quand la classe "show" est ajoutée */
  opacity: 0.8;
}

#backToTop:hover {
  opacity: 1;
  /* effet hover */
}

/* 🔹 RESPONSIVE MOBILE */
@media screen and (max-width: 768px) {
  .project-bottom-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

@media screen and (max-width: 768px) {
  header {
    display: flex;
    flex-direction: column; /* Le titre passe en dessous */
    align-items: center;
    padding-bottom: 15px;
    gap: 15px;
  }

  /* Ligne du haut : bouton + image */
  header .top-line {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  /* Bouton "Retour au site" */
  header .commentaires {
    font-size: 0.95rem;
    padding: 6px 10px;
    border-radius: 6px;
  }

  /* Conteneur image */
  .project-img img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
  }

  /* Le titre centré en dessous */
  header h1 {
    font-size: 1.6rem;
    text-align: center;
    margin: 0;
  }

  .video {
    width: 300px;
    max-height: 500px;
    margin-top: 10px;
  }

  /*Avis.html*/
  .avis-container {
    flex-direction: column; /* Empile image au-dessus du texte */
    align-items: flex-start;
  }

  .clients {
    width: min(100%, 320px); /* occupe la largeur, avec un maximum */
    height: auto; /* laisse la hauteur s'ajuster au ratio */
    max-height: none; /* supprime la contrainte de 300px */
    object-fit: contain; /* montre TOUTE l'image, sans rognage */
    object-position: center; /* centre l'image si des marges apparaissent */
    display: block; /* évite les petits décalages inline */
    margin: 0 auto; /* centre dans la colonne */
    border-radius: 10px;
  }
}
