:root {
  --main-bg: #fff;
  --main-text: #222;
  --accent: #000;
}

a {
  color: inherit; /* Garde la couleur du texte parent */
  text-decoration: none; /* Retire le soulignement */
}

a:focus,
a:active,
a:visited {
  outline: none; /* ✅ Supprime le contour bleu */
  box-shadow: none;
}

a:hover {
  font-weight: bold;
}

/* Reset et structure de base */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: 'Inter', Arial, sans-serif; }

body {
  background: var(--main-bg);
  color: var(--main-text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

header {
  background: #f8f8f8;
  padding: 1rem;
  text-align: center;
  border-bottom: 1px solid #ddd;
}

header h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

nav a {
  margin: 0 1rem;
  text-decoration: none;
  color: var(--main-text);
}
nav a:hover { color: var(--accent); }

main {
  flex: 1;
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
  text-align: center;
  overflow: visible;
}

footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  color: #666;
  border-top: 1px solid #ddd;
}

/* === Contenu injecté === */
.content-text {
  font-size: 1rem;
  margin: 1.5rem 0;
  line-height: 1.8; /* ✅ Augmente l'interligne (valeur entre 1.6 et 1.8 recommandée) */
}
.content-image, .content-video {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  height: auto;
  margin: 0.5rem auto;
}
.content-link { display: inline-block; margin: 1rem; }
.content-link img { max-width: 120px; display: block; margin: 0 auto; }

/* === Tiles (contact) === */
.tile {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.8rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 0.8rem 1rem;
  text-decoration: none;
  color: var(--main-text);
  max-width: 350px;
  margin: 0.8rem auto;
  transition: transform 0.2s, box-shadow 0.2s, border 0.2s;
}

.tile:hover {
  transform: translateY(-2px) scale(1.02);
  border: 1.5px solid var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background: #fff;
}

.tile-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: grayscale(1) invert(1); /* ✅ Inversion logo */
  transition: filter 0.2s;
}

.tile span {
  font-size: 1.1rem;
  font-weight: 500;
}

/* Grille pour les tiles en contact */
.contact-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.chapter {
  width: 95vw;
  margin-bottom: 3rem;
  position: relative;
  justify-self: center;
  box-sizing: border-box;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 10px;
}

.chapter-inner {
  max-width: 900px; /* Contenu centré et limité */
  margin: 0 auto;
  padding: 1rem 2rem;
  text-align: center;
}

.chapter-header {
  font-weight: bold;
  font-size: 1.4rem;
  margin-bottom: 1rem;
  text-align: center;
}

.chapter-content {
  max-width: 100%;
  margin: 0 auto 0;
  text-align: center;
  line-height: 1.8;
  font-size: 1.05rem;
  transition: max-height 0.4s ease;
  max-height: 300px; /* replié par défaut */
  overflow: hidden;
  position: relative;
}

.chapter:not(.collapsed) .chapter-content {
  max-height: 8000px; /* déplié */
}

.chapter.collapsed .chapter-content::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), white 80%);
}

.chapter-toggle {
  display: block;
  margin: 0 auto 0;
  cursor: pointer;
  width: fit-content;
  transition: transform 0.3s ease;
  transform: scaleY(0.8);
  transform: translateY(-20%);
}

.chapter:not(.collapsed) .chapter-toggle {
  transform: scaleY(-0.8);
}

/* Chevron pur CSS */
.chevron {
  position: relative;
  display: block;
  height: 40px;
  width: 40px;
}
.chevron::before,
.chevron::after {
  position: absolute;
  content: "";
  border: 20px solid transparent;
}
.chevron::before {
  top: 0;
  border-top-color: #222; /* couleur chevron */
  left: 50%;               /* ✅ centre horizontalement */
  transform: translateX(-50%); /* ✅ ajuste au centre */
}
.chevron::after {
  top: -4px;
  border-top-color: #fff; /* masque interne */
  left: 50%;               /* ✅ centre horizontalement */
  transform: translateX(-50%); /* ✅ ajuste au centre */
}

.chapter-summary {
  position: fixed;
  top: 100px; /* sous la barre de navigation */
  right: 20px;
  width: 200px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  z-index: 100;
}

.chapter-summary h3 {
  margin-top: 0;
  font-size: 16px;
  border-bottom: 1px solid #eee;
  padding-bottom: 5px;
}

.chapter-summary ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.chapter-summary li {
  margin: 6px 0;
}

.chapter-summary a {
  text-decoration: none;
  color: #333;
  transition: color 0.2s;
}

.chapter-summary a:hover {
  color: #007bff;
}

/* Conteneur responsive pour les iframes (YouTube, Instagram) */
/* Responsive vidéos YouTube (16:9) */
.responsive-embed {
  position: relative;
  width: 100%;
  margin: 20px auto;
  padding-bottom: 56.25%; /* ratio 16:9 */
  height: 0;
}

.responsive-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Vidéos locales en responsive */
.content-video {
  display: block;
  margin: 20px auto;
  height: auto;            /* ✅ adapte à la vidéo */
  object-fit: cover;       /* ✅ évite les bandes noires */
  background: none;  
}

/* Instagram posts */
.instagram-post {
  max-width: 500px;
  margin: 20px auto;
  width: 100%;
  justify-self: center;
  justify-items: center;
}
.instagram-post blockquote {
  width: 100% !important;
  min-width: auto !important;
}

