/* ---------------------------
   STYLE PRIMAIRE AMÉLIORÉ
   --------------------------- */

/* Fond global avec dégradé multi-couleurs */
body {
  margin: 0;
  font-family: "Poppins", Arial, sans-serif;
  background: linear-gradient(135deg, #e3f2fd 0%, #fef9e7 50%, #fce4ec 100%);
  background-attachment: fixed;
  color: #333;
  line-height: 1.6;
  animation: bgMove 15s infinite alternate ease-in-out;
}

@keyframes bgMove {
  from { background-position: left; }
  to { background-position: right; }
}

/* HERO Primaire - Styles par défaut (PC) */
.hero {
  background: url('images/primaire.jpg') center/cover no-repeat;
  background-attachment: fixed;
  position: relative;
  padding: 6rem 1rem;
  color: #fff;
  text-align: left;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 102, 204, 0.6), rgba(255, 111, 97, 0.55));
  backdrop-filter: blur(3px);
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
}

/* 📱 Version MOBILE */
@media (max-width: 768px) {
  .hero {
    background: url('images/primaire.jpg') center/contain no-repeat;
    background-attachment: scroll; /* corrige bug mobile */
    background-color: #000; /* couleur de fond si l’image ne couvre pas tout */
    padding: 4rem 1rem;
  }
}

/* 💻 Version PC large */
@media (min-width: 1024px) {
  .hero {
    background-size: cover;
    padding: 8rem 2rem;
  }
}


.hero .container {
  position: relative;
  z-index: 1;
}



.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 102, 204, 0.6), rgba(255, 111, 97, 0.55));
  backdrop-filter: blur(1.5px)
}

.hero .container {
  position: relative;
  z-index: 1;
  animation: fadeIn 2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero .kicker {
  font-size: 1rem;
  text-transform: uppercase;
  color: #ffeb3b;
  font-weight: 600;
  letter-spacing: 2px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 700;
  margin: 1rem 0;
  line-height: 1.2;
  background: linear-gradient(90deg, #ff9800, #f2f3f8, #fbfbfb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 6s infinite linear;
}

@keyframes shine {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}

.hero .lead {
  font-size: 1.2rem;
  max-width: 650px;
  margin-bottom: 1.5rem;
}

/* Boutons colorés */
.btn, .btn-outline {
  padding: .8rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  transition: all .4s ease;
  text-decoration: none;
  font-size: 1rem;
}

.btn {
  background: linear-gradient(135deg, #0066cc, #00bcd4);
  color: #fff;
  border: none;
}

.btn:hover {
  background: linear-gradient(135deg, #004c99, #0097a7);
  transform: scale(1.05);
}

.btn-outline {
  border: 2px solid #fff;
  color: #fff;
  background: transparent;
}

.btn-outline:hover {
  background: #fff;
  color: #0066cc;
}

/* Sections */
.section {
  padding: 4rem 1rem;
}

.section.alt {
  background: #f9fcff;
}

/* Titres */
.section-head h2 {
  font-size: 2rem;
  margin-bottom: .5rem;
  background: linear-gradient(45deg, #ff5722, #4caf50, #2196f3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-head p {
  color: #666;
  max-width: 650px;
  margin: 0 auto;
}

/* Grilles de cartes */
.grid-3 {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 2rem;
}

.card.feat {
  background: linear-gradient(135deg, #ffffff, #f0f4ff);
  border-radius: 1rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform .3s ease, box-shadow .3s ease, background .3s ease;
}

.card.feat:nth-child(1) { background: linear-gradient(135deg, #e3f2fd, #bbdefb); }
.card.feat:nth-child(2) { background: linear-gradient(135deg, #fce4ec, #f8bbd0); }
.card.feat:nth-child(3) { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); }

.card.feat:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card.feat .feat-emoji {
  font-size: 2.5rem;
  margin-bottom: .8rem;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.card.feat h3 {
  color: #0066cc;
  margin-bottom: .5rem;
  font-size: 1.3rem;
}

/* CTA Section */
.section.center {
  text-align: center;
}

.section.center h2 {
  color: #004c99;
  font-size: 2rem;
  margin-bottom: 1rem;
}

/* Footer Primaire */
.site-footer {
  background: linear-gradient(135deg, #004c99, #283593);
  color: #fff;
  padding: 2rem 1rem;
  text-align: center;
}

.footer-nav a {
  color: #ffeb3b;
  text-decoration: none;
  margin-right: 1rem;
  transition: color .3s;
}

.footer-nav a:hover {
  color: #fff;
}