/* ============================================
   MYRA THEME - MAIN STYLES
   ============================================ */

/* Variables CSS importées via functions.php */

/* ============================================
   RESET ET STYLES DE BASE
   ============================================ */

   * {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
  }
  
  html {
	font-size: 16px;
	scroll-behavior: smooth;
  }
  
  body {
	font-family: var(--font-family-primary);
	font-size: var(--font-size-base);
	line-height: var(--line-height-base);
	color: var(--color-text-primary);
	background-color: var(--color-bg-primary);
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
  }
  
  img {
	/* max-width: 75%; */
	height: auto;
	display: block;
	}
  
  /* Styles de fallback pour les images qui ne se chargent pas */
  img::before {
	content: '';
	display: block;
	background-color: var(--color-gray-light);
	border: 1px dashed var(--color-gray-medium);
	border-radius: var(--border-radius-sm);
  }
  
  img::after {
	content: attr(alt);
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: var(--font-size-sm);
	color: var(--color-text-secondary);
	text-align: center;
	padding: var(--spacing-sm);
  }
  
  a {
	color: inherit;
	text-decoration: none;
	transition: var(--transition-all);
  }
  
  a:hover {
	opacity: 0.8;
  }
  
  /* Règle globale pour l'interligne des textes en taille lg */
  [style*="--font-size-lg"], 
  .font-size-lg { /* Vous pouvez aussi utiliser une classe pour plus de contrôle */
      line-height: var(--line-height-base) !important;
  }
  
  /* ============================================
	 LAYOUT COMPONENTS
	 ============================================ */
  
  .site {
	width: 100%;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
  }
  
  .container {
	width: 100%;
	max-width: var(--container-max-width);
	margin: 0 auto;
	padding: 0 var(--container-padding);
  }
  
  .content-wrapper {
	width: 100%;
	margin: 0;
	display: flex; /* Active Flexbox pour un contrôle d'alignement moderne */
	flex-direction: column; /* Conserve l'empilement vertical des éléments */
	}
  
  .content-wrapper > *:last-child {
	margin-bottom: var(--spacing-3xl) !important;
}
  
  /* ============================================
	 HEADER STYLES
	 ============================================ */
  
  .site-header {
	position: relative;
	z-index: var(--z-fixed);
  }
  
  /* Header simple pour les pages internes */
  .simple-header {
	background-color: var(--color-bg-primary);
	padding: var(--spacing-sm) 0; /* 8px de padding vertical */
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    padding: 0 var(--spacing-md);
}

/* Couleur noire spécifique pour le header simple */
.simple-header .header-content {
    color: var(--color-black);
}

.simple-header .header-content a {
    color: var(--color-black);
}

.simple-header .site-branding {
    order: 2; /* Centrer le logo */
    z-index: 10; /* S'assurer qu'il reste cliquable si jamais */
}

.simple-header .site-branding a {
    display: inline-block;
    position: relative;
}

.simple-header .site-branding a:hover {
    opacity: 1;
}

.simple-header .site-logo {
    height: 55px;
    width: auto;
    transition: transform 0.4s ease; /* Transition douce pour l'opacité et le zoom */
}

.logo-hover {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0; /* Caché par défaut */
}

.simple-header .site-branding a:hover .logo-main {
    opacity: 0; /* On cache le logo principal au survol */
}

.simple-header .site-branding a:hover .logo-hover {
    opacity: 1; /* On affiche le logo de survol */
    transform: scale(1.05); /* On applique le zoom au logo visible */
}

.simple-header .main-navigation {
    order: 1; /* Placer la navigation à gauche */
    flex: 1;
}

/* Règle unifiée pour l'espacement des actions du header */
.simple-header .header-search-container,
.hero-header .header-actions {
	display: flex;
	align-items: center;
	gap: var(--spacing-lg); /* Espace uniforme de 24px */
}

/* Positionnement spécifique pour le header simple */
.simple-header .header-search-container {
order: 3;
flex: 1;
justify-content: flex-end;
}

/* --- Styles Communs pour les Icônes Sociales --- */
.site-header .social-links {
display: flex;
gap: var(--spacing-sm);
}

.site-header .social-icon {
	width: 24px;
	height: auto;
}

@media (min-width: 640px) {
	.site-header .social-icon {
		width: 30px;
	}
}

@media (min-width: 1024px) {
	.site-header .social-icon {
		width: 36px;
	}
}

.simple-header .header-menu-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 26px;
}

.simple-header .header-menu-icon img {
    width: 100%;
    height: 100%;
    filter: brightness(0); /* Rend l'icône noire */
}

/* ============================================
   RECHERCHE HEADER
   ============================================ */

.header-search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-bubble {
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.3s ease, width 0.3s ease;
	width: 0;
	overflow: hidden;
    }

.search-bubble.active {
    visibility: visible;
    opacity: 1;
    width: 250px; /* Largeur de la barre de recherche */
}

.search-bubble .search-form {
    display: flex;
    align-items: center;
}

.search-bubble .search-field {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-family: var(--font-family-primary); /* Police Georgia */
    font-size: var(--font-size-lg); /* Taille de police lg */
    line-height: var(--line-height-base);
	padding: var(--spacing-sm) 0;
    border-bottom: 2px solid var(--color-black);
    color: var(--color-black);
}

/* Styles pour la recherche dans le Hero Header */
.hero-header .search-bubble .search-field {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.hero-header .search-bubble {
    margin-right: var(--spacing-lg); /* Ajoute un espacement à droite de la bulle */
}

.hero-header .search-bubble .search-field::placeholder {
    color: var(--color-primary);
    opacity: 0.7;
}

.hero-header .search-bubble .search-field::-webkit-search-cancel-button {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.g2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2333cc00' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
}

/* Style pour la croix d'annulation dans le champ de recherche */
.search-bubble .search-field::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    height: var(--font-size-lg);
    width: var(--font-size-lg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
}

.search-bubble .search-submit {
    display: none; /* On cache le bouton de soumission par défaut */
}

.simple-header .primary-menu a {
	font-size: var(--font-size-lg);
	line-height: var(--line-height-base);
	color: #bbb; /* Gris par défaut */
	transition: color 0.2s ease;
}

/* Reste noir pour indiquer la page active */
.simple-header .primary-menu .current-menu-item > a {
	color: var(--color-black);
	pointer-events: none;
}

/* Devient noir au survol */
.simple-header .primary-menu a:hover {
	color: var(--color-black);
	opacity: 1;
}

.simple-header .primary-menu {
	gap: var(--spacing-xl);
}

.nav-links {
	gap: var(--spacing-xl);
}

@media (min-width: 1024px) {
	.simple-header .header-menu-icon {
		width: 36px;
		height: 38px;
	}
}

.primary-menu {
	display: flex;
	list-style: none;
	gap: var(--spacing-lg);
	margin: 0;
}
  
  .primary-menu .nav-link {
	font-size: var(--font-size-lg);
	color: var(--color-primary);
    line-height: var(--line-height-base);
  }
  
  .hero-header {
	width: 100%;
	background-size: cover;
	background-position: top;
	background-repeat: no-repeat;
	min-height: var(--hero-height-mobile);
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	align-items: center;
	position: relative;
  }
  
  .header-nav {
	width: 100%;
	padding: var(--spacing-sm) var(--spacing-md);
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
  }
  
  .nav-links {
	display: flex;
	gap: var(--spacing-lg);
	align-items: center;
	list-style: none;
  }
  
  .nav-link {
	font-size: var(--font-size-lg);
	font-family: var(--font-family-primary);
	font-weight: var(--font-weight-regular);
	color: var(--color-primary);
	text-decoration: none;
	transition: var(--transition-all);
    line-height: var(--line-height-base);
  }
  
  .nav-link:hover {
	opacity: 0.8;
	transform: scale(1.05);
  }
  
  .header-menu-icon {
	width: 24px;
	height: 26px;
	cursor: pointer;
	transition: var(--transition-transform);
	background: none;
	border: none;
  }
  
  .header-menu-icon:hover {
	transform: scale(1.1);
  }
  
  .hero-logo {
	width: 100%;
	box-sizing: border-box;
}
  
  .hero-bottom-icon {
	position: absolute;
	bottom: var(--spacing-lg);
	right: var(--spacing-lg);
	width: 40px;
	height: 26px;
  }

  .hero-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1; /* Sous les autres éléments */
}

/* Assurer que les éléments interactifs restent au-dessus */
.header-nav,
.hero-logo-container {
    position: relative;
    z-index: 2;
}

.hero-bottom-icon {
    z-index: 2; /* Déjà en position absolute */
}
  
/* ============================================
   NAVIGATION MOBILE
   ============================================ */

.menu-toggle {
	display: none; /* Caché par défaut sur grand écran */
	position: relative;
	width: 30px;    height: 22px;
	background: transparent;
	border: none;
	cursor: pointer;
	z-index: calc(var(--z-modal) + 1);
	color: var(--color-black);
}

.hero-header .menu-toggle {
        color: var(--color-primary);
}

.menu-toggle .line {
	display: block;
	position: absolute;
	width: 100%;
	height: 2px;
	background-color: currentColor;
	transition: all 0.3s ease-in-out;
	left: 0;
}

.menu-toggle .line:nth-of-type(1) { top: 0; }
.menu-toggle .line:nth-of-type(3) { bottom: 0; }

.menu-toggle.active .line:nth-of-type(1) { transform: translateY(10px) rotate(45deg); }
.menu-toggle.active .line:nth-of-type(3) { transform: translateY(-10px) rotate(-45deg); }

.mobile-menu {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.8);
	z-index: var(--z-modal);
	display: flex;
	justify-content: center;
	align-items: center;
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu.active {
	visibility: visible;
	opacity: 1;
}

.mobile-menu-content { text-align: center; }

.mobile-menu .mobile-navigation ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.mobile-menu .mobile-navigation ul li a {
	font-size: var(--font-size-xl);
	color: var(--color-primary);
	text-decoration: none;
	display: block;
	padding: var(--spacing-md) 0;
	transition: var(--transition-all);
}

.mobile-menu .mobile-navigation ul li a:hover { opacity: 0.8; }

.mobile-menu .mobile-navigation .current-menu-item > a {
	color: var(--color-gray-medium);
	pointer-events: none;
}

 /* Styles spécifiques pour le menu mobile sur les pages intérieures (simple-header) */
    body:not(.home) .mobile-menu .mobile-navigation ul li a {
        color: #bbb; /* Gris par défaut */
    }

    body:not(.home) .mobile-menu .mobile-navigation .current-menu-item > a {
        color: var(--color-black); /* Noir si page active */
    }

    body:not(.home) .mobile-menu .mobile-navigation ul li a:hover {
        color: var(--color-black); /* Noir au survol */
        opacity: 1;
    }

.mobile-menu-close { display: none; }

@media (max-width: 1280px) {
	.menu-toggle { display: block; }
	.primary-menu,
	.hero-header .nav-links { display: none; }
	
.hero-header {
	aspect-ratio: 16 / 9;
	min-height: 0;
	height: auto;
	}
}
  
  /* ============================================
	 MAIN CONTENT
	 ============================================ */

.site-main {
	flex: 1;
	width: 100%;
}

/* Marge supérieure pour les pages internes (toutes sauf la page d'accueil) */
body:not(.home) .site-main {
	margin-top: var(--spacing-3xl); /* 72px */
}

/* Marge supérieure spécifique pour la page d'accueil pour s'aligner sous le hero */
.home .site-main {
	margin-top: var(--spacing-md); /* 24px, comme les autres visuels de la page */
}

.site-main > *:last-child {
    margin-bottom: 0 !important;
}
  
  .project-section {
	width: 100%;
	padding: 0 var(--spacing-md); /* Marge horizontale de 16px */
	margin: 0; /* Le .project-section ne gère plus aucune marge verticale */
	margin-bottom: var(--spacing-3xl); /* Espace de 4rem APRÈS le bloc texte */
}

.project-visual {
	width: 100%;
	position: relative;
	margin-bottom: var(--spacing-md); /* Espace de 16px APRÈS l'image */
}

.project-info {
	display: flex;
	flex-direction: column;
	gap: var(--spacing-xs);
	width: 100%;
}

.project-title {
	font-size: var(--font-size-sm);
	font-family: var(--font-family-primary);
	font-weight: var(--font-weight-regular);
	line-height: var(--line-height-tight);
	color: var(--color-text-primary);
	width: 100%;
  }

.project-title .spectacle-name {
	text-transform: uppercase;
	font-style: italic;
  }

  .project-date {
	font-size: var(--font-size-sm);
	font-family: var(--font-family-primary);
	font-weight: var(--font-weight-regular);
	line-height: var(--line-height-tight);
	color: var(--color-text-primary);
	width: 100%;
  }
  
  .description-text {
	font-size: var(--font-size-lg);
	font-family: var(--font-family-primary);
	font-weight: var(--font-weight-regular);
	line-height: var(--line-height-tight);
	color: var(--color-text-primary);
	width: 100%;
	margin: 0; /* On réinitialise la marge horizontale qui causait le décalage */
	margin-bottom: var(--spacing-3xl); /* On conserve l'espacement vertical */
	padding: 0 var(--spacing-md); /* On applique le même type de padding que .project-section */
	}
  
  .description-link {
	font-size: var(--font-size-base);
	color: #bbb;
	text-decoration: none;
    line-height: var(--line-height-base);
  }
  
  .description-link:hover {
	text-decoration: underline;
	  color: var(--color-text-primary); /* Il devient noir au survol */
  }
  
  .project-visual {
	width: 100%;
	position: relative;
	}
  
  .project-image {
	width: 100%;
	aspect-ratio: 16 / 9; /* On définit un ratio fixe pour harmoniser la hauteur des images */
    object-fit: cover; /* Assure que l'image remplit le ratio sans être déformée */
	border-radius: 0;
	transition: transform 0.3s ease;
	transform: none !important; /* Forcer la rÃƒÂ©initialisation */
	margin: 0;
	}
  
  .project-image:hover {
	transform: scale(1.02) !important;
  }
  
  .project-overlay-icon {
	position: absolute;
	bottom: var(--spacing-md);
	right: var(--spacing-md);
	width: 40px;
	height: 26px;
  }
  
  /* ============================================
	 FOOTER STYLES
	 ============================================ */

/* Aligne le padding du footer sur celui du header pour la cohérence */
.site-footer .container {
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
}

.site-footer {
	width: 100%;
	margin-top: var(--spacing-3xl); /* Règle l'espacement à 64px */
	margin-bottom: var(--spacing-sm);
  }
  
  .footer-logo {
	width: 100%;
	margin: 0 auto var(--spacing-xl);
}
  
  .footer-info {
	display: flex;
	flex-direction: column;
	gap: var(--spacing-md);
	align-items: center;
	text-align: center;
  }
  
  .footer-text {
	font-size: var(--font-size-sm);
	font-family: var(--font-family-primary);
	font-weight: var(--font-weight-regular);
	line-height: var(--line-height-tight);
	color: var(--color-text-primary);
  }
  
  .footer-copyright {
	font-size: var(--font-size-sm);
	text-align: center;
	margin-top: var(--spacing-2xl); /* Ajoute 64px d'espace au-dessus */
}

@media (max-width: 638px) {
    .footer-copyright {
        font-size: var(--font-size-xs);
    }

    .footer-info {
        display: block;
        text-align: left;
    }

    .footer-info .footer-text {
        display: inline;
        font-size: var(--font-size-xs);
    }
    
    .footer-info .footer-text:nth-child(1),
    .footer-info .footer-text:nth-child(3) {
        margin-right: var(--spacing-md);
    }

    .footer-info .footer-text:nth-child(2)::after {
        content: '';
        display: block;
        height: var(--spacing-sm);
    }
	
	.site-footer {
        margin-top: var(--spacing-sm); /* 40px au lieu de 72px */
    }
	
	.footer-copyright {
        margin-top: var(--spacing-lg); /* 32px au lieu de 48px par défaut */
    }
}

/* ============================================
	 UTILITY CLASSES
	 ============================================ */
  
  .sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
  }
  
  /* Classe pour forcer la rÃƒÂ©initialisation des transforms */
  .reset-transform {
	transform: none !important;
  }
  
  /* Classe pour dÃƒÂ©sactiver toutes les animations */
  .no-animations * {
	animation: none !important;
	transition: none !important;
	transform: none !important;
  }
  
  .text-center {
	text-align: center;
  }
  
  .text-left {
	text-align: left;
  }
  
  .text-right {
	text-align: right;
  }
  
  .interactive {
	cursor: pointer;
	transition: var(--transition-transform);
  }
  
  .interactive:hover {
	transform: translateY(-2px);
  }
  
  .interactive:active {
	transform: translateY(0);
  }
  
  /* ============================================
	 RESPONSIVE STYLES
	 ============================================ */

/* Styles pour le menu mobile et la recherche */
@media (max-width: 1280px) {
	/* Cacher les éléments de recherche du header */
	.header-search-container {
		display: none;
	}

	/* Style pour le conteneur de recherche dans le menu mobile */
	.mobile-menu .mobile-search {
		margin-bottom: var(--spacing-xl); /* Marge en bas pour espacer du menu */
		padding: 0 var(--spacing-lg);
	}

	/* Style pour le formulaire de recherche mobile */
	.mobile-menu .search-form {
		display: flex;
		border-bottom: 1px solid var(--color-primary); /* Ligne blanche en dessous */
	}

	.mobile-menu .search-field {
		flex-grow: 1;
		border: none;
		background: transparent;
		color: var(--color-primary); /* Texte en blanc */
		font-family: var(--font-family-primary); /* Police Georgia */
		font-size: var(--font-size-lg);
		text-transform: uppercase; /* Texte en majuscules */
		padding: var(--spacing-sm) 0;
		outline: none;
	}

	.mobile-menu .search-field::placeholder {
		color: var(--color-primary);
		opacity: 0.7;
	}

	.mobile-menu .search-submit {
		display: none; /* On cache le bouton "Rechercher" */
	}
	
	/* On cache spécifiquement la recherche du simple-header sur mobile */
    .simple-header .search-bubble,
    .simple-header .search-toggle-button {
        display: none;
    }
	
/* Nouveau code (avec du gris) */
body:not(.home) .mobile-menu .search-form {
    border-bottom-color: #bbb; /* Bordure grise */
}

body:not(.home) .mobile-menu .search-field {
    color: var(--color-black); /* Texte tapé en noir */
}

body:not(.home) .mobile-menu .search-field::placeholder {
    color: #bbb; /* Placeholder en gris */
    opacity: 1;
}
	
}

/* Responsive pour les icônes sociales du header */
@media (max-width: 768px) {
.site-header .social-icon {
    width: 30px; /* Taille augmentée pour mobile */
}

/* --- CORRECTION DÉFINITIVE DU HERO HEADER MOBILE --- */
.hero-header {
    flex-wrap: wrap;
    align-items: flex-start; /* Aligne les items en haut de leur ligne */
    align-content: flex-start; /* CORRECTION : Resserre les lignes en haut du conteneur */
    flex-direction: row;
    height: auto;
    aspect-ratio: unset;
    min-height: 0;
    /* padding: var(--spacing-md); */ /* <-- SUPPRESSION : On enlève le padding global */
    gap: var(--spacing-sm); /* Espace contrôlé entre la ligne 1 et le logo */
}

.hero-header .header-nav {
    order: 1;
    display: flex;
    align-items: center;
    mix-blend-mode: difference;
    width: 100%; /* CORRECTION : Prend toute la largeur pour espacer ses enfants */
    justify-content: space-between; /* CORRECTION : Espace les enfants (burger et icônes) */
    padding: var(--spacing-sm) var(--spacing-md); /* AJOUT : Padding interne pour cette ligne */
    box-sizing: border-box; /* Pour que le padding n'augmente pas la largeur */
}

.hero-header .header-actions {
    /* Les règles d'ordre et de display sont maintenant sur .header-nav */
    mix-blend-mode: difference; /* On le garde pour être sûr */
}

/* Le menu burger lui-même (qui est dans le .header-nav) */
.hero-header .menu-toggle {
    display: block; /* S'assurer qu'il est visible */
}

.hero-header .hero-logo-container {
    order: 2; /* Vient en deuxième ligne */
    flex-basis: 100%;
    padding: 0 var(--spacing-md); /* AJOUT : Padding interne pour le logo */
    margin: 0; /* On annule les marges précédentes */
    box-sizing: border-box; /* Pour que le padding n'augmente pas la largeur */
}

#logo-animation-wrapper {
    padding: 0 !important;
    margin-top: 0 !important;
}

.hero-header .hero-logo {
    width: 100%;
    max-height: initial;
    height: auto;
    margin: 0;
}

/* On cache la navigation textuelle qui ne doit pas apparaître */
.hero-header .nav-links {
    display: none;
}
	
	/* Réorganisation du simple-header pour mobile (logo en dessous) */
    
    /* On autorise les éléments du header à passer à la ligne */
    .simple-header .header-content {
        flex-wrap: wrap;
        justify-content: space-between; /* Aligne le burger à gauche et les icônes à droite */
    }

    /* On force le logo à prendre toute la largeur pour le faire passer en dessous */
    .simple-header .site-branding {
        order: 3; /* On le place en dernier dans l'ordre d'affichage */
        flex-basis: 100%; /* Il prend toute la largeur disponible, ce qui le force à la ligne */
        padding-top: var(--spacing-sm); /* On ajoute un petit espace au-dessus */
    }
	
	    /* On s'assure que le lien du logo prend aussi toute la largeur */
    .simple-header .site-branding a {
        display: block;
    }

    /* On ÉTIRE l'image du logo pour qu'elle prenne toute la largeur */
    .simple-header .site-branding .site-logo {
        width: 100%; /* L'image prend 100% de la largeur de son conteneur */
		max-height: initial; /* On annule la hauteur max héritée pour mobile */
		height: auto;
		margin: 0;
    }

    /* On ajuste les éléments qui restent sur la ligne du haut */
    .simple-header .main-navigation,
    .simple-header .header-search-container {
        flex: initial; /* On annule le 'flex: 1' pour qu'ils ne s'étirent pas inutilement */
    }
    
    .simple-header .header-search-container {
      order: 2; /* On s'assure que les icônes viennent après le burger */
    }
}
  
  /* Tablette */
  @media (min-width: 640px) {
	.nav-links,
	.simple-header .primary-menu {
		gap: var(--spacing-xl); /* Espacement pour tablette */
	}

	.hero-header {
	  min-height: var(--hero-height-tablet);
	}
	
	.nav-links {
	  gap: var(--spacing-xl);
	}
	
	.nav-link {
	  font-size: var(--font-size-xl);
	}
	
	.header-menu-icon {
	  width: 30px;
	  height: 32px;
	}
	
	.project-info {
		display: flex; /* On revient à Flexbox */
		flex-direction: row; /* Force l'affichage en ligne sur les grands écrans */
		justify-content: flex-start; /* Aligne les éléments à gauche, comme sur la page spectacle */
		gap: 3.75rem; /* Espacement de 60px */
		align-items: flex-start;
	}
	
	.project-title {
		flex: 0 0 50%; /* Donne une largeur de base de 50% à la colonne de gauche */
		font-size: var(--font-size-base);
	}
	
	.project-date {
		font-size: var(--font-size-base);
	}
	
	.description-text {
	  font-size: var(--font-size-xl);
	  padding: 0 var(--spacing-xl);
	}
	
	.footer-info {
	  flex-direction: row;
	  justify-content: space-between;
	  text-align: left;
	}
	
	.footer-text {
	  font-size: var(--font-size-base);
	}
	  
  }
  
/* Styles spécifiques pour les tablettes afin d'éviter le collage */
@media (min-width: 800px) and (max-width: 1200px) {
    .simple-header .primary-menu a {
        font-size: var(--font-size-base); /* Police légèrement réduite */
    }

    .simple-header .primary-menu {
        gap: var(--spacing-md); /* Espacement réduit entre les liens */
    }
}
  
  /* Desktop */
  @media (min-width: 1024px) {
	.nav-links,
	.simple-header .primary-menu {
		gap: var(--spacing-2xl); /* Espacement pour desktop */
	}

    .simple-header .header-menu-icon {
        width: 36px;
        height: 38px;
    }

	.simple-header .search-bubble {
		right: calc(36px + var(--spacing-md));
	}
	
	.hero-header {
	  min-height: var(--hero-height-desktop);
	}
	
	.header-nav {
		width: 100%;
		padding: 0 var(--spacing-md); /* Uniquement padding horizontal */
		min-height: 76px; /* Hauteur calée sur le simple-header (logo 60px + padding 2*8px) */
		align-items: center; /* Assure l'alignement vertical au centre */
	}
	
	.nav-links {
	  gap: var(--spacing-2xl);
	}
	
	.nav-link {
	  font-size: var(--font-size-lg);
	}
	
	.header-menu-icon {
	  width: 36px;
	  height: 38px;
	}
	
	.hero-bottom-icon {
	  width: 68px;
	  height: 44px;
	}
	
	.project-title {
		font-size: var(--font-size-base);
	}
	
	.project-date {
	  font-size: var(--font-size-base);
	}
	
	.description-text {
		font-size: var(--font-size-lg);
		padding: 0 var(--spacing-3xl); /* Application du padding large dès 1024px */
	}
	
	.project-overlay-icon {
	  width: 62px;
	  height: 40px;
	}
	
	.footer-text {
	  font-size: var(--font-size-base);
	}
  }
  
  /* Large Desktop */
  @media (min-width: 1280px) {
	.nav-link {
	  font-size: var(--font-size-lg);
	}
	
	.hero-logo {
	  max-width: 100%;
	}
	
  }
  
  /* Extra Large Desktop */
  @media (min-width: 1536px) {
	.description-text {
		padding: 0 var(--spacing-3xl); /* Doit être 72px */
	  }
  }

.nav-link {
	font-size: var(--font-size-lg);
}

.hero-logo-container {
    width: 100%;
}

html {
    width: 100%;
}

/* ============================================
   SVG LOGO ANIMATION
   ============================================ */

.hero-logo-container {
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	mix-blend-mode: difference;
}

#logo-animation-wrapper {
    position: relative;
    line-height: 0;
    margin-top: var(--spacing-sm);
	width: 100%; 
	display: flex;
	justify-content: center;
	padding: 0 var(--spacing-md);
	box-sizing: border-box;
}

/* Le logo final, initialement invisible */
#animated-logo {
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

#pixel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(var(--pixel-cols, 50), 1fr);
    grid-template-rows: repeat(var(--pixel-rows, 50), 1fr);
    pointer-events: none;
    gap: 2px; /* CHANGEMENT CLÉ : Ajoute un espace entre les pixels */
    
    /* C'est la partie clé : on utilise le logo comme masque */
    mask-image: url('../images/img_logo_myra_1.png');
    -webkit-mask-image: url('../images/img_logo_myra_1.png');
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-position: center;

    /* Important: pas de couleur de fond pour laisser voir le hero derrière */
}

#pixel-overlay .pixel {
    background-color: rgba(51, 204, 0, 0.7); /* CHANGEMENT : Vert du thème avec 70% d'opacité */
    opacity: 0; /* Les pixels commencent invisibles */
    transition: opacity 0.2s ease-out; /* Transition pour l'apparition */
}

/* Classe ajoutée par JS à la fin de l'animation */
#logo-animation-wrapper.logo-revealed #animated-logo {
    opacity: 1; /* Fait apparaître le logo final */
}

#logo-animation-wrapper.logo-revealed #pixel-overlay {
    opacity: 0; /* Fait disparaître la grille de pixels */
    transition: opacity 0.4s ease-in-out;
}

/* ============================================
   TEMPLATE PAGE AGENCE
   ============================================ */

/* Espacement du contenu de la page agence */
.agence-intro p,
.service-item p,
.service-item ul {
    margin-bottom: 1.5rem;
}

.agence-intro > *:last-child {
    margin-bottom: 0;
}

.page-agence-container {
    width: 100%; 
    margin: 0 0 var(--spacing-4xl);
    padding: 0; /* Le padding horizontal est maintenant géré par les sections enfants */
    padding-bottom: var(--spacing-3xl); /* Espace avant footer */
    font-family: var(--font-family-primary); /* Utilisation de la police serif */
    box-sizing: border-box; 
    display: flex;
    flex-direction: column;
    gap: var(--spacing-4xl); /* Espacement uniforme entre les sections */
}

/* On applique le padding directement à chaque section pour un contrôle indépendant */
.agence-intro {
	padding: 0 var(--spacing-3xl); /* Padding large et unifié de 64px */
}

/* Style pour le contenu "Plus d'infos" */
.more-info-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
}

.toggle-info-link {
	font-size: var(--font-size-base);
	cursor: pointer;
	color: #bbb; /* On le met en gris par défaut */
}

/* On ajoute une règle pour le survol */
.toggle-info-link:hover {
	text-decoration: underline;
	color: var(--color-text-primary); /* Il devient noir au survol */
}

.agence-intro p {
    font-size: var(--font-size-lg);
    line-height: var(--line-height-tight); /* Interligne réduit pour une meilleure lecture */
}
  
  /* Suppression des règles de marge superflues */
  
  .agence-intro ul {
      font-size: var(--font-size-lg); /* Assurez-vous que la taille de la police est héritée */
      line-height: var(--line-height-base);
  }
  
  .agence-services {
    margin: 0; /* Suppression des marges pour utiliser le gap du parent */
    padding: 0 var(--spacing-md); /* Padding fin pour les services, SANS padding vertical */
    display: flex;
    flex-direction: column;
    gap: var(--spacing-4xl); /* Espace restauré entre chaque service */
}

.agence-services ul {
    padding-left: 2rem;
    list-style: none;
}

.agence-services ul li {
    position: relative;
    padding-left: 1.5rem; /* Espace pour l'image */
}
  
.agence-services ul li::before {
      content: '';
      position: absolute;
      left: 0;
      top: 0.7em; /* Ajustement pour l'alignement vertical */
      transform: translateY(-50%);
      width: 1rem; /* Taille de la puce */
      height: 1rem; /* Taille de la puce */
      background-image: url('../images/M yra.png');
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;
  }
  
  .service-item {
    width: 70%; /* Largeur définie à 70% */
}

/* Premier service (Relations presse) - aligné à droite */
.service-item:nth-child(1) {
    align-self: flex-end;
}

/* Deuxième service (Influence) - aligné à gauche */
.service-item:nth-child(2) {
    align-self: flex-start;
}

/* Troisième service (Coaching) - aligné à droite */
.service-item:nth-child(3) {
    align-self: flex-end;
}

.service-item h2 {
    font-size: var(--font-size-tight);
    font-weight: var(--font-weight-regular);
    text-transform: uppercase;
    margin-bottom: 0;
}

.service-item p,
.equipe-intro-text p {
    font-size: var(--font-size-tight);
    line-height: var(--line-height-tight);
    color: var(--color-text-primary);
}

.agence-equipe {
    margin-top: 0; /* Suppression de la marge pour utiliser le gap du parent */
    padding: 0 var(--spacing-md); /* Padding large, comme pour l'introduction */
	display: flex;
	flex-direction: column;
	gap: var(--spacing-5xl);
}

.agence-equipe h2 {
	font-size: var(--font-size-tight); /* Pour correspondre à "RELATIONS PRESSE" */
    font-weight: var(--font-weight-regular);
    text-transform: uppercase;
	margin-bottom: 0;
}

.equipe-intro-text {
  width: 70%;
  margin: 0 auto/* Centrage horizontal + marge en bas */
}

.team-grid {
    display: grid;
    grid-template-columns: 1fr; /* Une colonne sur mobile */
    gap: var(--spacing-2xl) var(--spacing-lg);
}

@media (min-width: 768px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr); /* Deux colonnes sur tablette */
    }
}

@media (min-width: 1024px) {
    .team-grid {
        grid-template-columns: repeat(5, 1fr); /* Cinq colonnes sur desktop */
    }
}

.team-member {
    display: flex;
    flex-direction: column;
}

.team-member .member-photos {
    display: flex; /* Changé de grid à flex pour une meilleure gestion d'une seule image */
    margin-bottom: var(--spacing-md);
    background-color: transparent; /* Suppression du placeholder */
    border: none; /* Suppression du placeholder */
    height: auto; /* Suppression de la hauteur fixe */
    align-items: center; /* Assure un alignement vertical centré */
    justify-content: center;
    width: 100%; /* La photo prend toute la largeur de sa colonne */
    /* aspect-ratio est retiré d'ici pour être mis sur l'image */
    overflow: hidden; /* Cache les parties de l'image qui dépassent */
}

.team-member .member-photos img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4; /* Le ratio est maintenant sur l'image */
    object-fit: cover;   /* Remplit le cadre du ratio en rognant si nécessaire */
    object-position: top; /* Garde le haut de l'image visible */
}

.team-member .member-info {
    text-align: left; /* Texte aligné à gauche */
    padding-left: 1rem; /* Décalage par rapport à l'image */
    display: flex;
    flex-direction: column;
    gap: 0.1px; /* Espace uniforme réduit à 1px */
}

.page-agence-container .team-member h3 {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-regular);
    text-transform: uppercase;
    margin-bottom: 0; /* Géré par le gap du parent */
}

.team-member p {
    font-size: var(--font-size-sm);
    margin-bottom: 0; /* Géré par le gap du parent */
}

.team-member a {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    text-decoration: none;
}

.team-member a:hover {
    text-decoration: underline;
}

/* Responsive pour la page agence */
@media (max-width: 768px) {
    .agence-intro {
        padding: 0 var(--spacing-md);
    }

    .service-item {
        width: 100%;
        align-self: flex-start !important;
    }

    .equipe-intro-text {
        width: 100%;
        margin: 0;
    }
}

/* ============================================
   TEMPLATE PAGE SAISON
   ============================================ */

.page-saison-container {
    width: 100%;
    margin: 0 0 var(--spacing-4xl);
    padding: 0 var(--spacing-md); /* Marge horizontale réduite à 16px */
    padding-bottom: var(--spacing-3xl); /* Espace avant footer */
    font-family: var(--font-family-primary);
    box-sizing: border-box;
}

/* Sous-menu */
.saison-submenu {
    margin-bottom: var(--spacing-5xl); /* Marge augmentée */
    text-align: center;
}

.submenu-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-2xl);
}

.submenu-link {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-regular);
    color: #bbb; /* Gris par défaut */
    text-decoration: none; /* Jamais de soulignement */
    text-transform: uppercase;
    transition: var(--transition-all);
    line-height: var(--line-height-base);
}

.submenu-link.active {
    font-weight: var(--font-weight-regular);
    color: var(--color-black); /* Noir si actif */
    pointer-events: none;
}

.submenu-link:hover {
    color: var(--color-black); /* Noir au survol */
    opacity: 1;
}

/* Grille des théâtres */
.theatres-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    column-gap: var(--spacing-md); /* Espacement horizontal */
    row-gap: var(--spacing-xl);    /* Espacement vertical */
    margin-top: var(--spacing-xl);
}

.theatre-item {
    overflow: hidden;
}

.theatres-grid .theatre-info {
    margin-left: 1rem;
	max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.4s ease-out, margin-top 0.4s ease-out;
}

.theatre-item:hover .theatre-info {
    margin-top: 1rem;
    max-height: 200px; /* Hauteur suffisante pour afficher le contenu */
    opacity: 1;
}

.theatres-grid .theatre-photo {
    width: 100%;
    aspect-ratio: 4 / 3; /* Le ratio rectangulaire pour uniformiser */
    /* Les styles de placeholder sont retirés */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gray-dark);
    transition: transform 0.3s ease;
}

.theatres-grid .theatre-item:hover .theatre-photo {
    transform: translateY(-2px);
}

.theatres-grid .theatre-photo img {
    width: 80%;
    height: 80%;
    object-fit: contain; /* Affiche le logo en entier sans le rogner */
}

.theatre-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.theatre-name {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-regular);
    color: var(--color-text-primary);
    margin: 0;
    line-height: var(--line-height-tight);
    white-space: normal; /* Permet le retour à la ligne */
    text-transform: uppercase;
}

/* Ajoutez cette nouvelle règle juste après .theatre-name */
.theatre-direction {
    font-size: var(--font-size-sm);
    margin: 0;
}

.theatre-link,
.theatre-link:hover {
    text-decoration: none;
    color: inherit;
}

/* Responsive */
@media (max-width: 1024px) {
    .theatres-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .theatres-grid {
        grid-template-columns: 1fr;
    }
    
    .submenu-links {
        flex-direction: column;
        gap: var(--spacing-md);
    }
}

/* Responsive pour la grille de projets de la page d'accueil */
@media (max-width: 768px) {
    .project-visual.project-1,
    .project-visual.project-1 + .project-section,
    .project-visual.project-3,
    .project-visual.project-3 + .project-section {
        width: 100% !important;
        align-self: initial !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .project-image,
    .hero-header {
        aspect-ratio: 1 / 1.7;
    }
}

/* ============================================
   TEMPLATE PAGE AGENDA
   ============================================ */

/* Aligne le padding de la grille d'événements sur celui du header/footer */
.agenda-events .container {
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
}

.agenda-page .agenda-topbar {
	padding: var(--spacing-sm) 0;
	border-bottom: 1px solid #000;
}

.agenda-page .agenda-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.agenda-page .nav-left .agenda-menu {
	display: flex;
	list-style: none;
	gap: var(--spacing-lg);
	text-transform: uppercase;
}

.agenda-page .agenda-logo {
	position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.agenda-page .agenda-logo img {
	height: 25px;
}

.agenda-page .agenda-search {
	background: none;
	border: none;
	cursor: pointer;
}

/* --- Agenda Page Specific Styles --- */

.agenda-events .month-group + .month-group {
    margin-top: var(--spacing-md);
}

.agenda-filters {
	padding: 0 0 var(--spacing-md);
	font-size: var(--font-size-base);
}

.agenda-filters .category-filters ul,
.agenda-filters .month-filters ul {
	display: flex;
	flex-wrap: wrap;
	gap: var(--spacing-md);
	list-style: none;
	justify-content: center;
	text-transform: uppercase;
    align-items: baseline; /* Changed from center to baseline for better text alignment */
}

.agenda-filters .category-filters {
	margin-bottom: 1rem;
}

.agenda-filters a {
	color: #bbb; /* Gris par défaut */
    text-decoration: none; /* Jamais de soulignement */
}

.agenda-filters a.filter-active,
.agenda-filters .month-filters a {
	pointer-events: auto;
}

.agenda-filters a.active {
	color: var(--color-black); /* Noir pour le filtre sélectionné */
	pointer-events: none;
}

.agenda-filters .filter-inactive {
	color: #bbb;
	pointer-events: none;
}

/* Style au survol pour tous les filtres */
.agenda-filters ul a:hover {
    color: var(--color-black); /* Noir au survol */
    opacity: 1;
}

.month-filters .year-nav {
    font-size: var(--font-size-lg);
}

.arrow-icon {
    width: 2em;
    height: 2em;
    vertical-align: middle;
}

.agenda-events {
	padding: var(--spacing-md) 0;
	padding-bottom: var(--spacing-3xl); /* Espace avant footer */
}

/* Correctif : annule la marge du dernier mois pour éviter un double espacement */
.agenda-events .month-group:last-child {
    margin-bottom: 0;
}

.month-title {
	text-align: center;
	font-size: var(--font-size-lg);
	text-transform: uppercase;
	margin-bottom: var(--spacing-xl);
	font-weight: var(--font-weight-regular);
    line-height: var(--line-height-base);
}

.events-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	row-gap: var(--spacing-xl); /* Espacement vertical */
    column-gap: var(--spacing-md); /* Espacement horizontal */
}

.event-item {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	overflow: hidden;
}

.event-item img {
	width: 100%;
	margin-bottom: var(--spacing-sm);
}

.event-item .event-info {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--spacing-md);
	margin-left: 1rem;
	margin-top: 1rem;
	width: 100%;
	box-sizing: border-box;
	overflow: hidden;
}

.event-item .event-info p {
	font-size: var(--font-size-sm);
	line-height: var(--line-height-tight);
	margin: 0;
}

.event-item .event-info .event-title {
	text-transform: uppercase;
	font-style: italic;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 85%; /* 100% au lieu de 90% */
	min-width: 0;
}

.event-item .event-info .event-author {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 85%; /* 100% au lieu de 90% */
	min-width: 0;
}

.event-item .event-info .event-location {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 85%; /* 100% au lieu de 90% */
	min-width: 0;
}

.event-item .event-info .event-details-left,
.event-item .event-info .event-details-right {
	box-sizing: border-box;
	overflow: hidden;
}

.event-item > a {
    display: flex;
    flex-direction: column;
    height: 100%; /* S'assure que le lien prend toute la hauteur de la carte */
}

.event-image-container {
    width: 100%;
    aspect-ratio: 4 / 3; /* Un ratio standard pour commencer, ajustable */
    overflow: hidden;
    background-color: var(--color-gray-light);
    margin-bottom: 0;
    flex-shrink: 0; /* Empêche le conteneur de l'image de se compresser */
}

.event-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.spectacle-dates,
.event-date {
    white-space: nowrap;
}

@media (max-width: 768px) {
	.events-grid {
		grid-template-columns: 1fr;
	}
	.agenda-page .nav-left {
		display: none;
	}
	.agenda-page .agenda-logo {
		position: static;
		transform: none;
		margin-right: auto;
	}
}

/*--------------------------------------------------------------
# Single Spectacle Page
--------------------------------------------------------------*/
.spectacle-detail {
	padding: 0 0 2rem;
}

/* Marge horizontale spécifique pour le contenu de la page spectacle */
.spectacle-detail .spectacle-header.container {
    padding-left: 4rem;
    padding-right: 4rem;
}

/* On annule le padding du conteneur de contenu pour le gérer enfant par enfant */
.spectacle-content.container {
    padding-left: 0;
    padding-right: 0;
}

.spectacle-header {
	display: flex;
	justify-content: flex-start;
    gap: 3.75rem; /* 60px */
    padding-bottom: var(--container-padding); /* Crée l'espacement souhaité en bas */
    align-items: flex-start;
    margin: 0 0 0 0; /* Marge du bas à 0 pour un contrôle précis de l'espacement */
}

.spectacle-header-left {
    flex: 0 0 50%; /* Donne une largeur de base de 50% à la colonne de gauche */
    padding-right: 1.25rem; /* 20px */
}

.spectacle-header-left p,
.spectacle-header-right p {
	margin: 0;
	font-size: var(--font-size-lg);
    line-height: var(--line-height-tight);
}

.spectacle-title {
	margin: 0;
	font-size: var(--font-size-lg);
    line-height: var(--line-height-base);
	text-transform: uppercase;
	font-style:italic;
}

.spectacle-gallery {
	position: relative;
	margin-top: 0; /* L'espacement est maintenant géré par le padding du header */
}

.spectacle-gallery .main-image {
	width: 100%;
	margin: 0;
}

.spectacle-gallery .main-image img {
	width: 100%;
	height: auto;
	display: block;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.spectacle-content {
	display: flex;
	flex-direction: column;
	gap: var(--spacing-3xl);
	margin-top: var(--spacing-3xl);
	margin-bottom: var(--spacing-3xl);
}

/* On applique les marges spécifiques à chaque enfant du contenu */
.spectacle-description {
    padding: 0 4.5rem; /* Padding horizontal mis à 4rem */
}
.spectacle-info {
    padding: 0 var(--spacing-md);
}

.spectacle-description {
	width: 100%;
	font-size: var(--font-size-lg);
    line-height: var(--line-height-tight);
}

.spectacle-info {
	width: 100%;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 1.5rem;
}

.info-block {
	display: flex;
	flex-direction: column;
}

.info-block ul {
	list-style: none;
	padding-left: 0;
	margin-top: 0;
}

.info-block p,
.info-block ul a {
	font-size: 1rem;
	margin: 0;
}

.spectacle-gallery-secondary {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
}

.secondary-image {
	margin: 0;
}

.secondary-image img {
	width: 100%;
	height: auto;
}

/* ============================================
	 STYLES PAGE SPECTACLE
	 ============================================ */
  
  .spectacle-gallery-secondary .secondary-image {
	margin-bottom: var(--spacing-lg);
  }

/* Pour les écrans plus grands (tablette et ordinateur) */
@media (min-width: 768px) {
	.spectacle-gallery-secondary {
		display: flex;
		flex-direction: column;
		gap: var(--spacing-2xl); /* Applique la même marge verticale que la page d'accueil */
		padding-top: var(--spacing-xl);
		padding-bottom: var(--spacing-xl);
		padding-left: var(--spacing-md); /* Ajout pour l'alignement horizontal */
		padding-right: var(--spacing-md); /* Ajout pour l'alignement horizontal */
	}
  
	.spectacle-gallery-secondary .secondary-image {
	  width: 70%;
	  margin-bottom: 0;
	}

	  .spectacle-gallery-secondary .secondary-image img {
		width: 100%;
		height: 100%;
		aspect-ratio: 3 / 2;
		object-fit: cover;
	  }
  
	  .spectacle-gallery-secondary .secondary-image.align-left {
		align-self: flex-start;
	  }
  
	  .spectacle-gallery-secondary .secondary-image.align-right {
		align-self: flex-end;
	  }
  }

/* Style pour les crédits de la galerie secondaire */
.spectacle-gallery-secondary .secondary-image .credits {
			font-size: 1rem;
			color: var(--color-text-primary);
			text-align: left;
			margin-top: var(--spacing-md);
			margin-left: var(--spacing-md);
}

.photo-credits-container {
	margin-top: var(--spacing-md);
	padding: 0 var(--spacing-md); /* Ajout du padding pour alignement horizontal */
}

/* On s'assure que le info-block ne prend qu'une fraction de l'espace sur les grands écrans */
@media (min-width: 768px) {
	.photo-credits-container .info-block {
		flex-basis: 33%; /* Prend environ un tiers de la largeur */
		max-width: 500px; /* Mais pas plus de 350px */
	}
}

/* Responsive pour la page spectacle */
@media (max-width: 768px) {
    .spectacle-detail .spectacle-header.container {
        /* On force la pleine largeur et on annule les marges du .container */
        width: 100%;
        max-width: none;
        margin: 0;
        /* On applique le bon padding pour l'alignement et on ajuste le contenu */
        padding: 0 var(--spacing-md) var(--spacing-md);
        box-sizing: border-box;
        justify-content: flex-start;
        gap: var(--spacing-xs);
    }
	
	
    .spectacle-description {
        padding: 0 1.5rem;
    }

    .spectacle-header-left p,
    .spectacle-header-right p {
        font-size: var(--font-size-sm);
    }

/* Styles pour la galerie secondaire en mode responsive */
    .spectacle-gallery-secondary.container {
        /* On force la pleine largeur et on annule TOUS les styles du .container */
        width: 100vw;
        max-width: none;
        margin: 0;
        margin-left: 50%;
        transform: translateX(-50%);
        padding: 0;
        box-sizing: border-box;
    }

    .spectacle-detail .spectacle-gallery-secondary {
        display: block; /* On annule la grille */
    }

    .spectacle-gallery-secondary .secondary-image {
        width: 100%;
        align-self: center; /* On s'assure que l'image est centrée dans le conteneur pleine largeur */
    }

    .spectacle-gallery-secondary .secondary-image img {
        aspect-ratio: 1 / 1.5;
        object-fit: cover;
        width: 100%;
    }

    .spectacle-gallery {
        width: 100vw;
        margin-left: 50%;
        transform: translateX(-50%);
    }

    .spectacle-gallery .main-image img {
        aspect-ratio: 1 / 1.5;
        object-fit: cover;
        width: 100%;
    }
}

/* ============================================
   STYLES GALERIE PROTÉGÉE
   ============================================ */

.spectacle-gallery-protected {
    margin-top: var(--spacing-2xl);
    margin-bottom: var(--spacing-2xl);
    padding: var(--spacing-xl);
    border-top: 1px solid var(--color-black);
    border-bottom: 1px solid var(--color-black);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.password-input-wrapper {
    position: relative;
}

#gallery-password-form .gallery-password-label {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-lg);
    line-height: var(--line-height-base);
    font-weight: var(--font-weight-regular); /* Pas de gras */
    text-transform: uppercase; /* Texte en capitales */
    color: var(--color-black);
    white-space: nowrap; /* Empêche le texte de passer à la ligne */
    padding: var(--spacing-sm) 0;
}

#gallery-password-form {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    /* margin: 0 auto; est maintenant géré par le flex-container parent */
}

#gallery-password {
    border: none;
    background: transparent;
    outline: none;
    width: 15ch; /* Ajusté pour la taille du placeholder */
    font-family: var(--font-family-primary);
    font-size: var(--font-size-lg);
    line-height: var(--line-height-base);
    font-weight: var(--font-weight-regular); /* Pas de gras */
    padding: var(--spacing-sm) 0;
    color: var(--color-black);
    text-transform: uppercase; /* Texte en capitales */
}

#gallery-password-form button {
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: var(--font-family-primary);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-regular); /* Pas de gras */
    text-transform: uppercase; /* Texte en capitales */
    color: var(--color-black);
    padding: var(--spacing-sm);
    line-height: var(--line-height-base);
}

#gallery-password-form button:hover {
    opacity: 0.7;
}

#gallery-feedback {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: var(--spacing-xs);
    font-size: var(--font-size-sm);
    text-align: left;
    white-space: nowrap;
}

#gallery-feedback.error {
    color: #d9534f; /* Couleur d'erreur */
    text-transform: uppercase; /* Texte en capitales */
}

#gallery-feedback.success {
    color: #5cb85c; /* Couleur de succès */
}

#protected-gallery-container:not(:empty) {
    margin-top: var(--spacing-lg);
}

/* Styles spécifiques à la mise en page de la page d'accueil */
/* ========================================================== */

/* Alignement des projets de 70% de large */
.project-visual.project-1,
.project-visual.project-1 + .project-section {
	width: 70%;
	align-self: flex-end;
	margin-right: var(--spacing-md); /* Pousse le bloc depuis le bord droit */

}

.project-visual.project-3,
.project-visual.project-3 + .project-section {
	width: 70%;
	align-self: flex-start;
	margin-left: var(--spacing-md); /* Pousse le bloc depuis le bord droit */

}

/* ==========================================================================
   Password Modal Styles
   ========================================================================== */

/* Voile d'arrière-plan */
.password-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px); /* Effet de flou moderne */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
}

/* Conteneur du formulaire */
.password-modal-content {
    position: relative;
    padding: 2rem 3rem;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

/* Styles pour le formulaire (hérités et quelques ajustements) */
.password-modal-content #gallery-password-form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.password-modal-content .gallery-password-label {
    margin-bottom: 1rem;
    font-weight: bold;
}

/* Bouton pour fermer la modale */
.close-password-modal {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--color-text);
}


/* --- Styles quand la modale est active --- */

body.modal-is-open .password-modal-overlay {
    opacity: 1;
    visibility: visible;
}

body.modal-is-open .password-modal-content {
    transform: scale(1);
}

/* ============================================
   SEARCH RESULTS PAGE
   ============================================ */

.search-results {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.search-results > article {
    width: 100%;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .search-results > article {
        width: calc(50% - 1rem);
    }
}

/* Style du titre de la page de recherche */
.search .page-title {
    font-weight: normal;
    text-transform: uppercase;
    font-size: var(--font-size-lg);
}

.spectacle-search-item {
    display: flex;
    flex-direction: column;
}

.spectacle-search-item__image a {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.spectacle-search-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.spectacle-search-item:hover .spectacle-search-item__image img {
    transform: scale(1.05);
}

.spectacle-search-item__content {
    padding-top: 1rem;
    color: var(--color-text-primary); /* Assure la même couleur pour le titre et le client */
}

.spectacle-search-item__content .entry-title {
    font-size: var(--font-size-base);
	font-weight: normal;
    margin-bottom: 0.5rem;
	text-transform: uppercase;
    font-style: italic;
}

.spectacle-search-item__client {
    font-size: var(--font-size-base);
	font-weight: normal;
}