* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background : #EDEDE9;
    background-size: auto; /* taille originale de l’image */
    background-repeat: repeat; /* évite que l’image se répète */
    background-position: top left; /* positionne l’image en haut à gauche */
}


@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* En-tête - NE PAS TOUCHER */
.header-top {
    padding: 30px 20px 10px;
    text-align: center;
    background: #e3d5ca;
    color: #4a536b;
}

.header-top h1 {
    margin: 0;
    font-size: 28px;
    color: #4a536b;
}

/* Conteneur principal */
.content {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    background: #f0e9e0;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    color: #2d3142;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.2);

}

/* Titres */
.content h2 {
    font-size: 28px;
    margin-bottom: 25px;
    color: #264653;
    text-align: center;
}

.content h3 {
    font-size: 18px;
    color: #1d3557;
    margin-top: 30px;
    margin-bottom: 15px;
}

/* Paragraphes et listes */
.content p {
    font-size: 16px;
    margin-bottom: 20px;
}

.content ul {
    list-style-type: disc;
    margin-left: 25px;
    margin-bottom: 25px;
    font-size: 16px;
}

.content ul li {
    margin-bottom: 8px;
}

/* Images */
.image-small {
    display: block;
    max-width: 180px;
    height: auto;
    border-radius: 12px;
    margin: 15px auto 25px auto;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(3, 220px); /* 3 colonnes fixes à 220px */
  justify-content: center; /* centre la grille dans le container */
  gap: 30px 60px;
  margin-top: 5px;
  margin-bottom: 30px;
}

.activity-card {
    
  width: 250px; /* largeur fixe identique */
  background: #f5ebe0;
  border-radius: 12px;
  padding: 10px 8px 15px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  font-weight: bold;
}


.activity-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  font-weight: bold;
}

.activity-card img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  object-fit: cover;
  margin-bottom: 15px;
  border-radius: 50%; 
}

.activity-card p {
  font-size: 16px;
  color: #264653;
  margin: 0;
}

.activity-border-green-lime {
  border: 2px solid #80b918;
  background-color: #f3fae3; 
}

.activity-border-blue-electric {
  border: 2px solid #4895ef;
  background-color: #e7f1fe; 
}

.activity-border-red-coral {
  border: 2px solid #e63946;
  background-color: #ffecec; 
}

.activity-border-purple-bright {
  border: 2px solid #9d4edd;
  background-color: #f3e9fd; 
}

.activity-border-orange-bold {
  border: 2px solid #f77f00;
  background-color: #fff3e0; 
}

.activity-border-yellow-safran {
  border: 2px solid #f9c74f;
  background-color: #fffbe0; 
}

.section-physique p {
  margin-bottom: 1em;
  font-size: 16px;
  line-height: 1.5;
  color: #2d3142;
}

.section-physique p.highlight {
  font-weight: bold;
  color: #4895ef; 
  font-size: 17px;
}


.flip-grid {
  display: grid;
  grid-template-columns: repeat(3, 220px);
  justify-content: center;
  gap: 30px 60px;
  margin-top: 5px;
  margin-bottom: 30px;
  perspective: 1000px; 
}

/* Le conteneur de la flip card */
.flip-card {
  width: 250px;
  height: 280px;
  background: transparent; 
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  cursor: pointer;
  perspective: 1000px; 
  border: 3px solid transparent; 
  height: 260px;
}

/* Partie interne de la carte */
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
  border-radius: 12px; 
}

/* Au survol, la carte pivote */
.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

/* Les faces avant et arrière de la carte */
.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px;
  box-sizing: border-box;
}

/* Image sur le recto de la carte */
.flip-card-front img {
  width: 140px;
  height: 140px;
  border-radius: 5%;
  object-fit: cover;
}

/* Verso de la carte */
.flip-card-back {
  color: #264653;
  transform: rotateY(180deg);
  font-size: 16px;
  line-height: 1.4;
  font-weight: 600;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
  border-radius: 12px;
  user-select: none;
  background: transparent; 
}

/* Grille des cartes dans la section des conseils */
.grid-container.home-page {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px; 
    padding: 20px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Style des cartes de chaque item */
.grid-item.home-page {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 10px;
    background-color: #ffffff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
    height: 100%;
    min-height: 200px;
    display: flex;
    flex-direction: row;
}

/* Animation hover */
.grid-item.home-page:hover {
    transform: scale(1.03);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

/* Image dans chaque carte */
.image-container {
    width: 100%;
    height: 195px;
    overflow: hidden;
    border-radius: 8px;
}

/* Image dans chaque carte */
.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Texte dans chaque carte */
.text {
    width: 100%;
    padding: 15px;
    text-align: center;
}

/* Texte des titres dans les cartes */
.text h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #264653;
}

/* Texte des descriptions dans les cartes */
.text p {
    font-size: 14px;
    line-height: 1.3;
    color: #2d3142;
}

/* Styles spécifiques aux paragraphes de transition */
.transition-paragraph {
    font-size: 18px; 
    line-height: 1.8;
    color: #2d3142; 
    margin-bottom: 20px; 
    padding: 20px; 
    background-color: #f9f9f9; 
    border-left: 6px solid #d5bdaf; 
    border-radius: 12px; 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); 
    transition: all 0.3s ease; 
    text-align: justify;
}


.transition-paragraph:hover {
    transform: translateY(-5px); 
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2); 
}

/* Style du texte en gras */
.transition-paragraph strong {
    font-weight: bold; 
    color: #1d3557; 
}


.teaser-button {
    display: inline-block;
    font-size: 20px;
    color: #4a536b;
    border: 2px solid #aa8875;
    background-color: #d5bdaf; 
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.teaser-button:hover {
    transform: scale(1.05);  /* Agrandit légèrement le bouton au survol */
}
