

/* ****************** LE TITRE ************** */



/* Couleur et style du titre */
.site-header-title a {
  color: #383838; /* ta nouvelle couleur #5F7E75 */
  display: inline-block;
  transition: transform 0.2s ease, color 0.2s ease;
  text-decoration: none;
}

/* Effet zoom au survol + changement de couleur du TITRE */
.site-header-title a:hover {
  transform: scale(1.05);
  color: #FF7A85; /* corail doux au survol */
}



/* Effet DE FLIP DU TITRE */

.title-flipped {
  display: inline-block;
  transform: scaleX(-1);
  transition: transform 0.5s ease;
}

.flip-it .title-flipped {
  transform: scaleX(1);
}

/* TITRE DU SITE CLIQUABLE */

/* Titre du site */
.site-header-title a {
  display: inline-block;
  transform: scale(1);
  transform-origin: left center; /* zoom depuis la gauche */
  transition: transform 0.2s ease;
}

.site-header-title a:hover {
  transform: scale(1.08); /* même amplitude que les liens */
}






/* ***************** MENU EN HAUT A DROITE ********************* */

.menu-cartes {
  position: relative; /* base pour positionner la liste */
  display: inline-block;
}

/* Liste déroulante */
.menu-list {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  background: white;
  position: absolute;
  right: 0;
  top: 2.5rem;
  min-width: 200px;
  z-index: 9999;

  /* État fermé */
  max-height: 0;
  opacity: 0;
  transform: translateY(-10px);
  overflow: hidden;
  pointer-events: none; /* empêche clic quand fermé */

  /* Animation fluide */
  transition:
    max-height 0.35s ease,
    opacity 0.35s ease,
    transform 0.35s ease;
}

/* Liens du menu */
.menu-list li a {
  display: block;
  padding: 0.75rem 1rem;
  color: #333;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  transform: scale(1);
  transform-origin: left center;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.menu-list li a:hover {
  transform: scale(1.08);
  background-color: #f5f5f5;
}

/* État ouvert */
.menu-list.show {
  max-height: 500px; /* assez grand pour contenir tous les liens */
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  animation: menuBounce 0.4s ease-out;
}

/* Animation de rebond à l'ouverture */
@keyframes menuBounce {
  0%   { transform: translateY(-10px); opacity: 0; }
  60%  { transform: translateY(2px); opacity: 1; }
  80%  { transform: translateY(-1px); }
  100% { transform: translateY(0); }
}

/* Mode sombre */
.dark .menu-list {
  background: #1f2937; /* gris foncé */
}

.dark .menu-list li a {
  color: #f3f4f6;
}

.dark .menu-list li a:hover {
  background-color: #374151;
}





/* ****************** LES CARTES PAGES PRINCIPALES ************** */


/* Carte au ratio 4:5 */
.card {
  position: relative;
  width: 100%;
  padding-top: 125%;
  overflow: hidden;
  cursor: pointer;
  border-radius: 0;
  transform: scale(1);
  transition: transform 0.2s ease-out, box-shadow 0.1s ease;
  z-index: 0;
  margin: 0;
}



/* Image en fond, couvre toute la carte */
.card figure {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  margin: 0;
  overflow: hidden;
  z-index: 0;
}

.card figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Corps de la carte positionné absolu sur toute la surface */
.card .card-body {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  margin: 0;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 1rem;
}

/* Titre blanc, au centre verticalement */
.card .card-title {
  color: white !important;
  font-size: 2rem;
  font-weight: bold;
  text-shadow: 0 0 5px rgba(0,0,0,0.7);
  margin: 0 auto;
}

/* Supprimer les autres infos */
.card .date,
.card p,
.card .card-actions {
  display: none;
}

/* Survol des cartes : zoom rebond + coins arrondis + ombre */
.card:hover {
  transform: scale(1.02); /* zoom léger, sans rebond */
  filter: none;
  z-index: 10;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12); /* ombre subtile */
}


@keyframes bounceZoom {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.02); }
  70%  { transform: scale(1.01); }
  100% { transform: scale(1.02); }
}



.dream-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0;
  padding: 0;
  margin: 0;
}

.dream-column {
  padding: 0;
  margin: 0;
}

.card {
  margin: 0;
  border-radius: 0;
}
.prose h1 {
  margin-bottom: 0;
}
.prose h2 {
  margin-top: 0;
}







/* ****************** POUR LA MISE EN FORME DU CONTENU DES PAGES ************** */


/* IMAGE AVEC TEXTE — float + taille contrôlée */

.image-avec-texte {
  overflow: hidden;
  margin: 20px 0;
}

/* Image par défaut */
.image-avec-texte img {
  border-radius: 8px;
  height: auto;
  max-width: 100%;
  margin-bottom: 20px;
}

/* Tailles prédéfinies */
.image-avec-texte.size-small img {
  width: 150px;
}

.image-avec-texte.size-medium img {
  width: 300px;
}

.image-avec-texte.size-large img {
  width: 500px;
}

/* Alignement avec float */
.image-avec-texte.left img {
  float: left;
  margin-right: 20px;
}

.image-avec-texte.right img {
  float: right;
  margin-left: 20px;
}

/* Texte */
.image-avec-texte .texte {
  text-align: justify;
  overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
  .image-avec-texte {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 20px;
  }

  .image-avec-texte img {
    float: none !important;
    display: block;
    margin: 0 0 20px 0;
    width: auto;
    max-width: 90vw;
  }

  .image-avec-texte .texte {
    width: 100%;
    text-align: left;
  }
}



/* AGENDA EN DESSOUS D'ici ! */


.agenda {
  display: flex;
  flex-direction: column;
  gap: 0;       /* plus de gap inutile, c'est la bordure qui sépare */
  margin: 2rem 0;
}

.agenda-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem 0;
  border-bottom: 1px solid #ddd;
}

.agenda-item:last-child {
  border-bottom: none;
}

.agenda-left {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1 1 50%;
}

.agenda-date {
  font-weight: bold;
  color: #FF7A85;  /* vert de gris #6A8C82 */
}

.agenda-location {
  color: #555;
}

.agenda-title {
  flex: 1 1 50%;
  font-weight: 700;
  font-size: 1.3rem;
  color: #222;
  text-align: right;
}

/* Responsive : sur mobile, empiler et centrer */
@media (max-width: 768px) {
  .agenda-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .agenda-title {
    margin-top: 0.5rem;
    font-size: 1.4rem;
    text-align: center;
  }

  .agenda-left {
    align-items: center;
  }
}


.prose p {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  line-height: 1.6; /* valeur typique entre 1.2 et 1.6 */
}




/* AJOUT D'ESPACE simplifier dans le markdown grace à un shortcode */
.espace-dynamique {
  margin-top: var(--espace-hauteur, 2rem);
}




/* UN PEU DE MARGE AUTOUR DU SITE / POUR LE FORMAT TELEPHONE */

@media (max-width: 768px) {
  body {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Si ton contenu principal est dans un container */
  main, .container, .content {
    padding-left: 15px;
    padding-right: 15px;
  }
}



/* DE LA MARGE ENTRE TITRE ET SOUS-TITRE */

.prose h1 {
  margin-bottom: 0.3em;
}

.prose h2 {
  margin-top: 0;
}












/* ****************** L'ENVERS'************** */


/* OVERLAY DES CARTES DE L ENVERS */

body.modal-open {
  overflow: hidden; /* empêche le scroll de la page derrière */
}

.overlay {
  position: fixed;
  inset: 0; /* top:0; right:0; bottom:0; left:0 */
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  display: none;
  z-index: 99999; /* au-dessus de tout */
  overflow-y: auto;  /* permet de scroller dans l’overlay si contenu long */
}

.overlay.show {
  display: block;
  animation: fadeInOverlay 1.2s ease forwards;
}

@keyframes fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}


.overlay-content {
  background: #fff;
  margin: 10% auto;
  padding: 2rem;
  width: 90%;
  max-width: 600px;           
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  transform: scale(0.85);
  animation: zoomInOverlay 0.8s ease forwards;
}

.overlay.show .overlay-content {
  animation: zoomInOverlay 0.8s ease forwards;
}

@keyframes zoomInOverlay {
  from {
    transform: scale(0.85);
  }
  to {
    transform: scale(1);
  }
}

.close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 1.8rem;
  color: #d62a2a;
  cursor: pointer;
  z-index: 10;
}





/* EFFET MIROIR SUR LE L'ENVERS */


.normal-letter {
  display: inline-block;
}

.mirror-text {
  display: inline-block;
  transform: scaleX(-1); /* effet miroir horizontal */
}

/* TEXTE D'INTRO DANS L'ENVERS CENTRÉ */

.intro-lenvers {
  max-width: 800px;
  margin: 0 auto;
  padding-bottom: 1em;
  text-align: center;
}





/* Custom pour le back seulement */
.back-mode.dream-grid {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  position: relative !important;
  height: auto !important;
}

.back-mode .dream-column {
  position: static !important;
  flex: 0 0 auto;
  width: 250px; /* largeur de chaque carte */
}

/* Masquer la barre de scroll sur tous les navigateurs */
.back-mode.dream-grid {
  -ms-overflow-style: none;  /* IE et Edge */
  scrollbar-width: none;     /* Firefox */
}

.back-mode.dream-grid::-webkit-scrollbar {
  display: none; /* Chrome, Safari et Opera */
}





/* LES FLECHES GAUCHE DROITE DE DEFILEMENT */
.nav-controls {
  margin-top: 0.5rem;
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.nav-btn {
  background: transparent;
  border: none;
  color: rgb(0, 0, 0);
  font-size: 3.5rem;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  padding: 0 0.4rem;
  transition: transform 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.nav-btn:hover {
  transform: scale(1.2);
  color: #FF7A85; /* jaune précédent : #ffd700 */

}

/* État désactivé aux extrémités */
.nav-btn.disabled,
.nav-btn[aria-disabled="true"] {
  opacity: 0.35;
  color: #363636;         /* reste blanc mais atténué */
  cursor: default;
  pointer-events: none;   /* bloque le clic */
  transform: none;        /* supprime l’effet zoom */
}

/* ——— AJOUT : cacher sur téléphone ——— */
@media (max-width: 768px) {
  .nav-controls {
    display: none;
  }
}




/* CARTES DU BACK — avec espace et coins arrondis */
.back-mode .dream-column {
  padding: 0.5rem; /* espace horizontal/vertical entre les cartes */
}

.back-mode .card {
  position: relative;
  width: 100%;
  padding-top: 190%;           /* ratio 4:5 */
  overflow: hidden;
  cursor: pointer;
  border-radius: 12px;         /* coins arrondis */
  transform: scale(1);
  transition: transform 0.25s ease, box-shadow 0.2s ease;
  will-change: transform;
  z-index: 0;
  margin: 0;
  background-color: #000;
}

.back-mode .card-cover {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
  border-radius: 12px; /* suit la forme de la carte */
}

.back-mode .card-body {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 1rem;
  z-index: 1;
}

.back-mode .card-title {
  color: white !important;
  font-size: 1.9rem;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(0,0,0,1);
  margin: 0 auto;
}

/* Effet zoom au survol */
.back-mode .card:hover {
  transform: scale(1.08); /* zoom plus marqué */
  filter: none;
  z-index: 10;
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* Responsive : plus petits arrondis sur mobile pour garder l’harmonie */
@media (max-width: 768px) {
  .back-mode .dream-column {
    padding: 0.4rem;
  }
  .back-mode .card,
  .back-mode .card-cover {
    border-radius: 8px;
  }

  .back-mode .card-title {
    font-size: 1.6rem; /* plus petit sur mobile */
  }
}


/* VIDEO CONTENEUR DANS L'ENVERS */





.video-container {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
}

.video-container iframe {
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: none;
}





header,
.navbar,
.site-header {
  z-index: 500 !important;
}
