
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: var(--background-color, #ffffff);
  color: #222;
}

/* Font variants based on body class */
@font-face {
  font-family: 'MyCustomFont';
  src: url('/static/core/fonts/DancingScript-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}


body.font-system {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
body.font-roboto {
  font-family: 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
body.font-opensans {
  font-family: 'Open Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
body.font-montserrat {
  font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
body.font-lato {
  font-family: 'Lato', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
body.font-raleway {
  font-family: 'Raleway', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
body.font-playfair {
  font-family: 'Playfair Display', 'Times New Roman', serif;
}
body.font-merriweather {
  font-family: 'Merriweather', 'Times New Roman', serif;
}

/* SEARCH BANNER */

.search-banner {
  display: none;
  background: #e9eef6;
  padding: 1rem 1.5rem;
}

.search-banner.open {
  display: block;
}

.search-banner form {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  gap: 0.75rem;
}

.search-banner input[type="text"] {
  flex: 1;
  padding: 0.6rem 0.8rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.search-banner button {
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  background: var(--accent-color, #004f8b);
  color: #fff;
  cursor: pointer;
}

.search-banner button:hover {
  opacity: 0.9;
}

/* HEADER & NAV */

header {
  background: var(--menu-bg-color, #004f8b);
  color: var(--menu-text-color, #ffffff);
}

.navbar {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo img {
  max-height: 160px;
}

.logo a {
  font-weight: bold;
  font-size: 1.2rem;
  color: var(--menu-text-color, #ffffff);
  text-decoration: none;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--menu-text-color, #ffffff);
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 700;   /* gras */


}

.nav-links a:hover {
  text-decoration: underline;
}

/* Dropdown menus */


.nav-item {
  position: relative;
}

.nav-item .submenu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #ffffff;
  color: #222;
  padding: 0.5rem 0;
  list-style: none;
  margin: 0;
  min-width: 180px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  display: none;
  z-index: 20;
}

.nav-item .submenu li a {
  display: block;
  padding: 0.35rem 0.75rem;
  color: #222;
}

.nav-item .submenu li a:hover {
  background: #f1f1f1;
}

.nav-item.has-children:hover .submenu {
  display: block;
}

/* Buttons / icons */

.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.hamburger span {
  width: 20px;
  height: 2px;
  background: var(--menu-text-color, #ffffff);
  display: block;
}

.search-icon {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--menu-text-color, #ffffff);
}

/* SIDEBAR (mobile menu) */

.sidebar {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  display: none;
  z-index: 50;
}

.sidebar.open {
  display: block;
}

.sidebar-inner {
  width: 260px;
  max-width: 80%;
  background: #ffffff;
  height: 100%;
  padding: 1rem;
  box-shadow: 2px 0 10px rgba(0,0,0,0.2);
}

.sidebar-close {
  border: none;
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
  margin-bottom: 1rem;
}

.sidebar-menu,
.sidebar-submenu {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.sidebar-menu > li {
  margin-bottom: 0.5rem;
}

.sidebar-menu a {
  color: #222;
  text-decoration: none;
  font-weight: 700;
}

.sidebar-submenu {
  padding-left: 1rem;
  margin-top: 0.25rem;
}

/* CONTENT */

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
  background: #fff;
  min-height: 70vh;
}

.hero {
  margin-bottom: 1.5rem;
}

.hero-small {
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 2.1rem;
  margin: 0 0 0.5rem;
}

.subtitle {
  margin: 0;
  color: #555;
  font-size: 1.05rem;
}

.page-content {
  font-size: 1rem;
  line-height: 1.6;
  word-wrap: break-word;      /* support ancien */
  overflow-wrap: break-word;  /* standard moderne */
}

.page-content h2 {
  margin-top: 1.5rem;
}

.page-content ul {
  padding-left: 1.2rem;
}

/* PARTNERS CAROUSEL */

.partners-carousel {
  margin-top: 2rem;
}

.partners-carousel h2 {
  margin-bottom: 1rem;
}

.carousel-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.carousel-item img {
  max-height: 150px;
  object-fit: contain;
}

/* ARTICLES LIST */

.articles-list {
  margin-top: 2rem;
}

.article-card {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}

.article-image {
  flex: 0 0 160px;
}

.article-image img {
  max-width: 100%;
  height: auto;
  display: block;
}

.article-image-center {
  margin: 0 auto 1rem;
}

.article-image-right {
  margin-left: auto;
}

.article-body h3 {
  margin: 0 0 0.3rem;
}

.article-body h3 a {
  text-decoration: none;
  color: inherit;
}

.article-body h3 a:hover {
  text-decoration: underline;
}

.article-subtitle {
  margin: 0 0 0.5rem;
  color: #555;
}

.article-summary {
  margin: 0;
}

/* ARTICLE DETAIL */

.article-detail-image {
  max-width: 500px;
  margin-bottom: 1.5rem;
  text-align: left;
}

.article-detail-image img {
  max-width: 100%;
  height: auto;
}

/* SEARCH RESULTS */

.search-results {
  list-style: none;
  padding-left: 0;
}

.search-results li {
  margin-bottom: 1rem;
}

.search-results a {
  font-weight: 600;
  text-decoration: none;
  color: #004f8b;
}

.search-results a:hover {
  text-decoration: underline;
}

.search-subtitle {
  margin: 0.1rem 0 0;
  font-size: 0.9rem;
  color: #555;
}

/* FOOTER */

footer {
  background: #f1f1f1;
  margin-top: 1.5rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.2rem 1.5rem;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-donations,
.footer-social {
  flex: 1 1 250px;
}

.btn-footer {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.4rem 0.8rem;
  background: var(--accent-color, #ff8c00);
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9rem;
}

.btn-footer:hover {
  opacity: 0.9;
}

.social-icons a {
  margin-right: 0.5rem;
  font-size: 1.4rem;
  text-decoration: none;
}

.footer-bottom {
  text-align: center;
  font-size: 0.85rem;
  padding: 0.7rem 1.5rem;
  border-top: 1px solid #ddd;
}

/* RESPONSIVE */

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  main {
    padding: 1rem;
  }

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

  .logo img {
  max-height: 40px;
}
}

/* ===== LAYOUT 2 COLONNES HOME ===== */

.home-two-columns {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}

/* gauche : galerie */
.home-left {
  flex: 1 1 50%;
}

/* droite : articles */
.home-right {
  flex: 1 1 50%;
}

/* Galerie */
/* ======== Galerie façon Instagram ======== */

.home-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

/* le conteneur est carré */
.home-gallery-item {
  position: relative;
  width: 100%;
  padding-top: 100%; /* carré = hauteur = largeur */
  overflow: hidden;
  border-radius: 12px;
  background: #eee;
}

/* le contenu se cale absolument */
.home-gallery-image,
.home-gallery-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* image recadrée façon Instagram */
.home-gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;  /* ❤️ magique */
  display: block;
  border-radius: 12px;
}

/* vidéo recadrée dans le carré */
.home-gallery-video iframe {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
}

.home-gallery-title {
  display: none; /* optionnel, plus clean façon Insta */
}

/* Articles */
.article-card {
  background: #fafafa;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.article-card h3 {
  margin-top: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .home-two-columns {
    flex-direction: column;
  }
}

/* ===== Galerie principale ===== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 15px;
}

/* carré */
.gallery-item {
  position: relative;
  width: 100%;
  padding-top: 100%;
  overflow: hidden;
  border-radius: 16px;
  background: #eee;
}

/* contenu plein cadre */
.gallery-image,
.gallery-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* image recadrée comme Instagram */
.gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

/* vidéo cadrée */
.gallery-video iframe {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  object-fit: cover;
}

.pagination {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  font-size: .9rem;
}

.page-link {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: #f0f0f0;
  text-decoration: none;
  color: #333;
}

.page-link:hover {
  background: #e0e0e0;
}

.page-current {
  font-weight: 600;
}

/* ===== Layout "Nous soutenir" : 2 colonnes ===== */

.page-donation {
  display: flex;
  gap: 2rem;
  margin-top: 1.5rem;
  align-items: flex-start;
}

/* GAUCHE : texte explicatif */
.donation-left {
  flex: 2;
}

/* DROITE : encarts de dons (colonne plus étroite) */
.donation-right {
  flex: 1;
  max-width: 360px;   /* <-- limite la taille de la colonne droite */
}

/* Section dons */
.donation-section h2 {
  margin-top: 0;
  margin-bottom: 0.8rem;
}

/* Grille d'encarts : une seule colonne, bien compacte */
.donation-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

/* Carte de don */
.donation-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.7rem 0.9rem; /* moins gros */
  border-radius: 12px;
  background: #fafafa;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.donation-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(0,0,0,0.12);
  background: #ffffff;
}

/* Logo moyen */
.donation-logo-wrapper {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.donation-logo {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.donation-logo-wrapper svg {
  width: 90%;
  height: 90%;
}

/* Texte */
.donation-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
  text-align: center;
}

.donation-desc {
  font-size: 0.85rem;
  text-align: center;
  color: #555;
}

/* Responsive : une seule colonne sous ~900px */
@media (max-width: 900px) {
  .page-donation {
    flex-direction: column;
  }

  .donation-right {
    max-width: 100%;
  }

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

@media (max-width: 600px) {
  .donation-grid {
    grid-template-columns: 1fr;
  }
}

.page-content,
.page-content p,
.page-content * {
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

.page-donation,
.donation-left {
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

.contact-section {
  margin-top: 1.5rem;
}

.contact-form .form-row {
  margin-bottom: 0.8rem;
  display: flex;
  flex-direction: column;
}

.contact-form label {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.contact-form input,
.contact-form textarea {
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  font: inherit;
}

.contact-success {
  padding: 0.6rem 0.8rem;
  background: #e6ffe6;
  border-radius: 6px;
  border: 1px solid #9ad39a;
  margin-bottom: 1rem;
}

.btn-primary {
  margin-top: 0.5rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: none;
  background: var(--accent-color, #ff8c00);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}


