/* =========================================================
   STYLE DÉDIÉ : PAGE D'ACCUEIL (976-MAYOTTE.YT)
   ========================================================= */

/* Structure générale */
.page-accueil {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-accueil main {
  flex: 1 0 auto;
}

.accueil-section {
  padding: 40px 0;
}

.accueil-section.fond-doux {
  background-color: #f6f3eb;
  border-top: 1px solid #e9e4d6;
  border-bottom: 1px solid #e9e4d6;
}

.wrap-acc {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* En-têtes de sections : pleine largeur sans blocage */
.section-intro {
  margin-bottom: 24px;
  width: 100%;
}

.section-intro h2 {
  font-size: clamp(1.5rem, 2.5vw, 1.9rem);
  color: var(--nuit, #0d2430);
  margin: 0 0 8px 0;
  max-width: 100% !important;
}

.section-intro p {
  color: #475569;
  max-width: 100% !important;
  margin: 0;
  line-height: 1.55;
  text-wrap: pretty;
}

/* =========================================================
   1. HERO : PLEINE LARGEUR & 4 INDICATEURS COLORÉS
   ========================================================= */
.hero-pro {
  background: linear-gradient(135deg, #093937 0%, #0e5b56 50%, #147d77 100%);
  color: #ffffff;
  padding: 40px 0 0;
  position: relative;
}

.hero-haut {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 36px;
  align-items: stretch;
}

.hero-texte {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow-dore {
  display: inline-block;
  align-self: flex-start;
  background: rgba(242, 201, 76, 0.18) !important;
  color: #f7d070 !important;
  border: 1px solid rgba(242, 201, 76, 0.4);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.hero-texte h1 {
  font-size: clamp(2rem, 3.4vw, 2.85rem) !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  max-width: 100% !important;
  color: #ffffff !important;
  margin: 0 0 14px 0 !important;
}

.hero-texte .lead {
  font-size: 1.02rem;
  line-height: 1.6;
  color: #e2f1ef;
  margin: 0 0 22px 0;
  max-width: 100% !important;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-visuel {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visuel img {
  width: 100%;
  height: 100%;
  max-height: 340px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Bandeau des 4 repères clés sur une seule ligne */
.hero-stats-bandeau {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.stat-carte {
  background: #ffffff;
  border-radius: 10px;
  padding: 14px 12px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-bottom: 4px solid transparent;
  transition: transform 0.2s ease;
}

.stat-carte:hover {
  transform: translateY(-3px);
}

.stat-chiffre {
  display: block;
  font-family: var(--f-display, sans-serif);
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 4px;
  white-space: nowrap;
}

.stat-libelle {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
}

.stat-communes { border-bottom-color: #0284c7; }
.stat-communes .stat-chiffre { color: #0284c7; }

.stat-recif { border-bottom-color: #0d9488; }
.stat-recif .stat-chiffre { color: #0d9488; }

.stat-surface { border-bottom-color: #d97706; }
.stat-surface .stat-chiffre { color: #d97706; }

.stat-dep { border-bottom-color: #e11d48; }
.stat-dep .stat-chiffre { color: #e11d48; }

.diviseur-vague {
  margin-top: 20px;
  line-height: 0;
}

.diviseur-vague img {
  display: block;
  width: 100%;
  height: auto;
}

/* =========================================================
   2. DOSSIERS DOCUMENTAIRES (3 PILIERS)
   ========================================================= */
.grille-piliers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.carte-pilier {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 12px rgba(13, 36, 48, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.carte-pilier:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(13, 36, 48, 0.08);
}

.carte-pilier img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.carte-pilier-corps {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.carte-pilier-corps .num {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--lagon-profond, #005a87);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.carte-pilier-corps h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.carte-pilier-corps p {
  font-size: 0.93rem;
  color: #475569;
  line-height: 1.55;
  margin-bottom: 16px;
  flex: 1;
}

.carte-pilier-corps .lien-suite {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--lagon-profond, #005a87);
  text-decoration: none;
}

.carte-pilier-corps .lien-suite:hover {
  text-decoration: underline;
}

/* =========================================================
   3. GALERIE PHOTO (4 COLONNES)
   ========================================================= */
.grille-galerie {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.galerie-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  margin: 0;
  background: #e2e8f0;
}

.galerie-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.galerie-item:hover img {
  transform: scale(1.05);
}

.galerie-item figcaption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 8px 12px;
  background: linear-gradient(transparent, rgba(13, 36, 48, 0.85));
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
}

/* =========================================================
   4. COMMUNES & VILLAGES (2 COLONNES ÉQUILIBRÉES)
   ========================================================= */
.grille-territoire {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.carte-territoire {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(13, 36, 48, 0.04);
}

.carte-territoire img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.carte-territoire-corps {
  padding: 22px;
}

.carte-territoire-corps h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.carte-territoire-corps p {
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

/* =========================================================
   5. BANNIÈRE LAGON
   ========================================================= */
.banniere-lagon {
  background: linear-gradient(135deg, #0b3d3b 0%, #147d77 100%);
  color: #ffffff;
  border-radius: 14px;
  padding: 36px 32px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 30px;
  align-items: center;
}

.banniere-lagon h2 {
  color: #ffffff;
  font-size: 1.7rem;
  margin: 6px 0 14px;
}

.banniere-lagon p {
  color: #e0f2f1;
  font-size: 0.98rem;
  line-height: 1.65;
  margin-bottom: 20px;
}

.banniere-lagon ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.banniere-lagon li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
  font-size: 0.92rem;
  color: #f1f8f7;
}

.banniere-lagon li::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: #f2c94c;
  font-size: 0.9rem;
}

/* =========================================================
   6. ACTUALITÉS (TRIO COMPACT SUR 1 LIGNE)
   ========================================================= */
.actu-header-align {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 22px;
}

.btn-actu-top {
  font-size: 0.85rem !important;
  padding: 8px 16px !important;
  white-space: nowrap;
}

.grille-actu-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.actu-box-compact {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-left: 4px solid #94a3b8;
  box-shadow: 0 2px 8px rgba(13, 36, 48, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.actu-box-compact:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(13, 36, 48, 0.08);
}

.actu-box-compact.cat-alerte { border-left-color: #dc2626; }
.actu-box-compact.cat-institution { border-left-color: #005a87; }
.actu-box-compact.cat-nature { border-left-color: #0d9488; }
.actu-box-compact.cat-societe { border-left-color: #d97706; }

.actu-box-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.actu-source {
  font-size: 0.78rem;
  font-weight: 700;
  color: #005a87;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 60%;
}

.actu-badge-mini {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  padding: 2px 7px;
  border-radius: 4px;
}

.actu-box-titre {
  margin: 0 0 12px 0;
  font-size: 0.95rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.actu-box-titre a {
  color: #0d2430;
  text-decoration: none;
}

.actu-box-titre a:hover {
  color: #005a87;
  text-decoration: underline;
}

.actu-box-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: #64748b; /* plus foncé : la date était trop pâle pour être lisible */
  border-top: 1px dashed #f1f5f9;
  padding-top: 10px;
}

.actu-lien-lire {
  color: #005a87;
  font-weight: 600;
  text-decoration: none;
}

.actu-lien-lire:hover {
  text-decoration: underline;
}

.actu-vide {
  grid-column: 1 / -1;
  padding: 18px;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  font-size: 0.9rem;
  color: #64748b;
}

/* =========================================================
   7. VIDÉOS (FORMAT 16:9 RESPONSIVE)
   ========================================================= */
.grille-videos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.carte-video {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(13, 36, 48, 0.04);
}

.iframe-ratio {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000000;
}

.iframe-ratio iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-notice {
  padding: 14px 18px;
  font-size: 0.85rem;
  color: #64748b;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.video-notice a {
  color: var(--lagon-profond, #005a87);
  text-decoration: underline;
  font-weight: 600;
}

/* =========================================================
   RESPONSIVE (TABLETTES & SMARTPHONES)
   ========================================================= */
@media (max-width: 900px) {
  .hero-haut {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .hero-visuel {
    order: -1;
  }
  .hero-visuel img {
    max-height: 240px;
  }
  .hero-stats-bandeau {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .grille-piliers,
  .grille-actu-trio {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .grille-galerie {
    grid-template-columns: repeat(2, 1fr);
  }
  .grille-territoire,
  .grille-videos,
  .banniere-lagon {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .accueil-section {
    padding: 30px 0;
  }
  .banniere-lagon {
    padding: 24px 20px;
  }
}

/* =========================================================
   8. BLOCS AJOUTÉS : nouveaux arrivants, crédits photo,
      vidéos au clic, « Restez informé »
   ========================================================= */
/* Remplace les styles en ligne de la bannière du lagon */
.section-sans-haut { padding-top: 0; }
.eyebrow-transparent { background: rgba(255, 255, 255, 0.18); color: #ffffff; }

/* Bloc « Vous arrivez bientôt à Mayotte ? » */
.grille-arrivants {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.carte-arrivant {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  background: #ffffff;
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.carte-arrivant:hover,
.carte-arrivant:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}
.carte-arrivant-icone { font-size: 1.6rem; }
.carte-arrivant-titre { font-weight: 700; }
.carte-arrivant-desc { font-size: 0.92rem; opacity: 0.8; }
.arrivants-suite { margin-top: 24px; text-align: center; }

/* Crédits photo */
.galerie-item figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.credit-photo { font-size: 0.75rem; opacity: 0.7; }
.credits-galerie { margin-top: 16px; font-size: 0.85rem; opacity: 0.8; }

/* Bloc « Restez informé » */
.bloc-contact-lecteurs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: center;
}
@media (min-width: 800px) {
  .bloc-contact-lecteurs { grid-template-columns: 1.2fr 1fr; }
}
.bloc-contact-actions { display: flex; flex-direction: column; gap: 12px; }
.form-newsletter { display: flex; gap: 8px; flex-wrap: wrap; }
.form-newsletter input[type="email"] {
  flex: 1 1 200px;
  padding: 10px 14px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  font: inherit;
}
.visuellement-cache {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Crédits photo sous l'image principale et dans les cartes */
.credit-photo { color: inherit; white-space: nowrap; }
/* Image principale : le crédit se pose sur l'image, en bas à droite
   (.hero-visuel est un bloc flex : sans cela, le lien se placerait à côté de l'image) */
.credit-hero {
  position: absolute;
  right: 10px;
  bottom: 8px;
  z-index: 1;
  margin: 0;
  padding: 2px 9px;
  border-radius: 99px;
  background: rgba(13, 36, 48, 0.65);
  color: #ffffff;
}
.credit-carte { display: block; margin-top: 10px; }

/* Vidéos : aperçu cliquable, le lecteur YouTube n'est chargé qu'au clic */
.video-facade { position: relative; }
.video-lancer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  border: 0;
  cursor: pointer;
  color: #ffffff;
  font: inherit;
  text-align: center;
  background-color: #0d2430;
  background-image: linear-gradient(135deg, #0a5c63 0%, #0d2430 100%);
  background-size: cover;
  background-position: center;
}
/* Voile sombre : le texte reste lisible même par-dessus une vignette */
.video-lancer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(13, 36, 48, 0.45);
  transition: background 0.15s ease;
}
.video-lancer > * { position: relative; }
.video-lancer:hover::before,
.video-lancer:focus-visible::before { background: rgba(13, 36, 48, 0.25); }
.video-lancer:focus-visible { outline: 3px solid #e0a526; outline-offset: -3px; }
.video-lancer-icone {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #ffffff;
  color: #0a5c63;
  font-size: 1.6rem;
  padding-left: 4px;
}
.video-lancer-texte { font-weight: 700; font-size: 1.05rem; }
.video-lancer-note { font-size: 0.8rem; opacity: 0.9; max-width: 34ch; }

@media (max-width: 600px) {
  .video-lancer-icone { width: 52px; height: 52px; font-size: 1.3rem; }
  .video-lancer-note { display: none; }
}
