/* Reset + font */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background: #f9f9fb;
  color: #1f1f1f;
  line-height: 1.6;
}

/* Banniere */
.banner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(90deg, #6a5acd, #f3e8ff);
  color: white;
  text-align: center;
  padding: 15px 0;
  font-size: 1.8em;
  font-weight: bold;
  z-index: 20;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.container, nav {
  margin-top: 70px;
}

/* pour laisser place à la bannière */

/* Sections générales */
section {
  position: relative;
  padding: 4rem 1rem;
  overflow: hidden;
}

section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.3);
  z-index: 0;
}

.container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  z-index: 1;
}

/* Titres et texte */
h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-align: center;
}

h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

h4 {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}

p {
  margin-bottom: 0.5rem;
}

/* Boutons */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 9999px;
  background: #6a5acd;
  color: white;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.3s;
}

.btn:hover {
  background: #5a49c0;
}

/* Section Principales fonctionnalités */
#features .container {
  max-width: 1200px; /* limite la largeur du conteneur */
  margin: 0 auto;
  padding: 0 1rem;
}

#features .grid {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
}

@media(max-width: 768px) {
  #features .grid {
    flex-direction: column;
  }
}

#features .cards {
  display: flex;
  gap: 8px;
}

#features .card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 1rem;
  padding: 1rem;
  transition: transform 0.3s, box-shadow 0.3s;
  width: 100%; /* s’assure que la carte prend la largeur de sa colonne */
  box-sizing: border-box;
}

/* Alternance pastel (violet / menthe / rose) */
#features .card:nth-child(3n+1) {
  background: linear-gradient(145deg, #ede6ff, #f7f3ff);
  border: 1px solid #e2d6ff;
}

#features .card:nth-child(3n+2) {
  background: linear-gradient(145deg, #e6fff7, #f2fffb);
  border: 1px solid #c3f7e7;
}

#features .card:nth-child(3n) {
  background: linear-gradient(145deg, #ffe6f1, #fff0f7);
  border: 1px solid #ffcce2;
}

#features .card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 10px 10px 0 0;
  margin-bottom: 10px;
}

#features .card h3 {
  margin-bottom: 0.5rem;
}

/* ------------------------------------ */
/* Section Story Generation */
.story-generation {
  background: linear-gradient(135deg, #f3e8ff, #ffffff);
  padding: 4rem 1rem;
}

.story-generation .intro {
  text-align: center;
  margin-bottom: 3rem;
}

.story-generation .badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.5rem 1rem;
  background: rgba(106, 90, 205, 0.1);
  border-radius: 9999px;
  color: #6a5acd;
  font-weight: 500;
}

.story-generation .grid {
  display: flex;
  gap: 1.5rem;
  flex-direction: row;
}

@media (max-width: 768px) {
  .story-generation .grid {
    flex-direction: column;
  }
}

.story-generation .card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(6px);
  border: 1px solid #ddd;
  border-radius: 1rem;
  padding: 1.5rem;
  transition: transform 0.3s, box-shadow 0.3s;
}

.story-generation .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.story-generation .card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(106, 90, 205, 0.1);
  border-radius: 1rem;
  padding: 0.5rem;
  margin-bottom: 1rem;

  & img {
    height: 30vh;
    width: 32vh;
    border-radius: 12px;
  }
}

.story-generation .card-genre {
  display: inline-block;
  background: rgba(106, 90, 205, 0.1);
  color: #6a5acd;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.story-generation .card p {
  font-weight: 500;
  font-size: 1rem;
}

/* Section How It Works */
.story-generation .how-it-works {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(6px);
  border-radius: 2rem;
  padding: 2rem;
  max-width: 900px;
  margin: 2rem auto 0 auto;
  border: 1px solid #ddd;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.story-generation .steps {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .story-generation .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.story-generation .step {
  text-align: center;
}

.story-generation .step-number {
  width: 40px;
  height: 40px;
  background: rgba(106, 90, 205, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.5rem auto;
  font-weight: bold;
  color: #6a5acd;
}

/* Section Description du projet */
#description .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  text-align: center;
}

#description .intro {
  max-width: 800px;
  margin: 0 auto 2rem auto;
  font-size: 1.2rem;
  color: #333;
}

#description .project-image {
  margin-bottom: 2rem;
}

#description .project-image img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#description .actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* Responsive texte */
@media (max-width: 767px) {
  h2 {
    font-size: 2rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  h4 {
    font-size: 1rem;
  }
}

/* Section Pourquoi Infinistories */
.why-infinistories {
  background: linear-gradient(180deg, #faf6ff 0%, #fff 100%);
  padding: 6rem 2rem;
  text-align: center;
}

.why-infinistories .badge {
  display: inline-block;
  background: rgba(180, 140, 255, 0.15);
  color: #7b4efc;
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  font-weight: 600;
  margin-bottom: 1rem;
}

.why-infinistories h2 {
  font-size: 2.2rem;
  color: #4c3b90;
  margin-bottom: 1rem;
}

.why-infinistories p {
  max-width: 700px;
  margin: 0 auto 3rem auto;
  color: #555;
  line-height: 1.7;
}

.why-infinistories .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.why-infinistories .card {
  background: white;
  border-radius: 1.5rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.why-infinistories .card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.why-infinistories .card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.why-infinistories h3 {
  color: #6b44e0;
  margin-bottom: 0.8rem;
}

/* Footer */
.footer {
  background: #f7f3ff;
  color: #4a3b8c;
  padding: 3rem 1rem;
  text-align: center;
  margin-top: 4rem;
  border-top: 2px solid #e4d9ff;
}

.footer-logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: #6a3ffb;
  margin-bottom: 0.5rem;
}

.footer-text {
  font-size: 1rem;
  color: #5e4fa2;
  margin-bottom: 1.5rem;
}

.footer-links {
  margin-bottom: 1rem;
}

.footer-links a {
  color: #6a3ffb;
  text-decoration: none;
  margin: 0 0.8rem;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #b37aff;
}

.footer-copy {
  font-size: 0.9rem;
  color: #6f639f;
  margin-top: 1rem;
}
