
@import url('https://unpkg.com/normalize.css');

:root {
  --primary: #6366f1;
  --secondary: #ec4899;
  --dark: #0f172a;
  --light: #f8fafc;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--dark);
  color: var(--light);
  overflow-x: hidden;
}

/* ----------------------------------------------------     hero-section   --------------------------------------------------------*/
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url(https://images.pexels.com/photos/15885025/pexels-photo-15885025.jpeg);
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
}

.hero-content {
  text-align: center;
  position: absolute;
  top: 7rem;
  z-index: 10;
  padding: 1rem;
}

.hero h1 {
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: 900;
  margin-bottom: 1rem;
  color: white;
  text-shadow: 5px 5px 5px rgba(0,0,0,0.5);
}

.hero p {
  font-size: clamp(1.2rem, 3vw, 2rem);
  color: white;
  text-shadow: 2px 3px 2px rgba(0,0,0,0.5);
  margin-bottom: 0.5rem;
  opacity : 0;
}

.hero .subtitle {
  font-size: clamp(1rem, 2vw, 1.5rem);
  opacity : 0;
}

.scroll-arrow {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 3rem;
  animation: bounce 2s infinite;
  cursor: pointer;
  z-index: 10;
  color: white;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-20px); }
  60% { transform: translateX(-50%) translateY(-10px); }
}

.hero img {
  position: absolute;
  bottom: 0;
  right: 1%;
  max-height: 20rem;
  z-index: 5;
}

/* Canvas backgrounds pour chaque section */
.animated-section {
  position: relative;
  overflow: hidden;
}

.animated-section canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.animated-section > *:not(canvas) {
  position: relative;
  z-index: 1;
}

  /* ----------------------------------------------------- infos-section    Mes coordonnées ----------------------------------------------------------------*/
    
.infos-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #2c2241 0% , #ffffff 11%);
  padding: 4rem 1rem;
}

.infos-container {
  max-width: 1200px;
  width: 100%;
}

.infos-title {
  text-align: center;
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 3rem;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.infos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
  padding: 0;
}


.info-card {
  position: relative; /* déjà présent mais on le confirme */
  overflow: hidden;
  min-height: 180px;
  border-radius: 1.5rem;
  border: 3px solid rgb(142 60 116 /10%); /* bordure transparente par défaut */
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(236,72,153,0.15));
  backdrop-filter: blur(10px);
  padding: 1.5rem;
  cursor: pointer;
  box-shadow:#6700e440 0px 2px 2px 2px;

  /* Transition ciblée (meilleure perf que `all`) */
  transition:
    transform 0.35s cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 0.35s cubic-bezier(0.23, 1, 0.32, 1),
    border-color 0.35s ease;
}

/* --- Pseudo-couche qui fait la bordure dégradée --- */
.info-card::before {
  content: "";
  position: absolute;
  inset: 0;                 /* top:0; right:0; bottom:0; left:0 */
  padding: 2px;            /* épaisseur de la "bordure" en px */
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;

  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow:#6700e440 0px 4px 4px 4px;

  /* Trick pour n'afficher que la marge (simule une bordure) */
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;

  opacity: 0;
  transition: opacity 0.35s ease;
}

/* --- Le contenu reste au-dessus de la pseudo-couche --- */
.info-card > * {
  position: relative;
  z-index: 2;
}

.info-card:hover {
  animation: liftGlow 1.5s ease forwards;/* remplace ton -0px */
}

.info-card:hover::before {
  animation: glow 1.5s ease-in-out ;
}

@keyframes glow {
  0% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes liftGlow {
  0%   { transform: translateY(0); box-shadow: 0 0 0 rgba(99,102,241,0); }
  50%  { transform: translateY(-10px); box-shadow: 0 15px 40px rgba(99,102,241,0.4); }
  100% { transform: translateY(0); box-shadow: 0 0 0 rgba(99,102,241,0); }
}



.info-card-front {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  transition: all 0.4s ease;
}

.info-card-front img {
  width: 80px;
  height: 80px;
  opacity: 0.9;
}

.info-card.flipped .info-card-front {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.info-card-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
}

.info-card-back {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.4s ease;
  pointer-events: none;
  box-shadow:#6700e440 0px 2px 2px 2px;
}

.info-card.flipped .info-card-back {
  opacity: 1;
  transform: scale(1);
  pointer-events: all;
}

.info-card-back .situation {
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
  color: #827d8c;
  text-align: center;

}

.info-card-back .info-text {
  font-size: 1.2rem;
  text-align: center;
  word-break: break-word;
  color: #ffffff;
 
}

.info-card-back a {
  color: #0f172a;
  background: var(--primary);
  text-decoration: none;
  font-weight: 600;
  border: 2px solid var(--primary);
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
}

.info-card-back a:hover {
  background: var(--secondary);
  border-color: var(--secondary);
  transform: scale(1.05);
}

.tap-hint {
  font-size: 0.9rem;
  opacity: 0.6;
  font-style: italic;
  margin-top: 1rem;
}



  /*     --------------------------------------------------  about-section   ----------------------------------------      */

.about-section {
  min-height: 70vh;
  display: flex;
  align-items: start;
  justify-content: center;
  background: linear-gradient(white 0%, #0f172a 5% 90%, white 95% 100%);
  padding: 15rem 5rem 15rem 5rem;
  opacity: 1;
}

.about-content {
  max-width: 900px;
  text-align: center;
}

.about-content h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 2rem;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-content p {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  line-height: 1.8;
  opacity: 0.9;
  margin-bottom: 1.5rem;
}

.highlight {
  color: var(--primary);
  font-weight: 600;
}

/* ------------------------------------------------------------    main-section   -----------------------------------------------------------*/

.main-section {
  position: relative;
  background: white;
  padding: 0.5rem 0rem 5rem 0rem;
  min-height: 100vh;
}

.sticky-container {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: end;
  justify-content: center;
  perspective: 2000px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  padding: 2rem;
  max-width: 1200px;
  width: 100%;
}

/* cartes avant d'apparaitre */
.card {
  background: linear-gradient(135deg, rgb(42 45 152 / 15%), rgba(236, 72, 153, 0.2));
  backdrop-filter: blur(10px);
  border: 5px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.5rem;
  padding: 2.5rem;
  transform-style: preserve-3d;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  opacity: 0;
  transform: translateY(20px) rotateX(-15deg) scale(1);
  box-shadow: 0 10px 20px 5px rgba(0, 0, 0, 0.3);
}

/*  arrivée dans partie main section */
.card.show {
  opacity: 1;
  transform: translateY(10) rotateX(0) scale(1);
}

/* on passe dessus */
.card:hover {
  transform: translateY(-20px) scale(1.05);
  box-shadow: 0 30px 80px rgba(99, 102, 241, 0.4);
  border-color: rgba(99, 102, 241, 0.5);
}



.card-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.card:nth-child(2) .card-icon { animation-delay: 0.5s; }
.card:nth-child(3) .card-icon { animation-delay: 2s; }
.card:nth-child(4) .card-icon { animation-delay: 3s; }

.card h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
}

.card ul {
  list-style: none;
  color: #5b5763;
}

.card li {
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  transform-origin: left;
}

.card li:hover {
  padding-left: 1rem;
  border-color: var(--primary);
}

.card li:last-child {
  border-bottom: none;
}

.card strong {
  color: var(--primary);
  display: block;
  margin-bottom: 0.3rem;
}

.card .date {
  font-size: 0.85rem;
  opacity: 1;
  font-style: italic;
  color: #5b5763;
}

.nav .a {
  opacity: 0;
}


/*  ------------------------------------------------------------    adaptation téléphone    -------------------------------------------------------*/
@media (max-width: 768px) {
  .hero {
    height: 90vh;
  }
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1rem;
  }
  .sticky-container{
    position: relative; 
    height: auto;
  }

  .main-section {
    min-height: 100vh;
  }

  .infos-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .about-section {
    min-height: auto;
    padding: 3rem 1.5rem 3rem 1.5rem;
    position: relative; 
    z-index: 5;
  }

  .scroll-arrow {
    left: 35%;
    transform: translateX(-35%);
    font-size: 4rem;
  }
}

@media (max-width: 600px) {
  .hero {
    background-attachment: scroll;
  }
}

.credits{
  padding: 1rem 3rem;
  text-align: center;

}
