/*
Theme Name: EnDanse 2027
Theme URI: https://www.endanse.com
Description: Theme enfant de Twenty Twenty-Five aux couleurs de l'association EnDanse : orange de la brosse du logo, jaune des pastilles, fonds creme et peche. Grille d'actualites en colonnes, bandeau festival, mise en page adaptee au mobile.
Author: Association EnDanse
Version: 2.1.0
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 7.4
Template: twentytwentyfive
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: endanse-2027
*/

/* Motif de pastilles repris du logo EnDanse. */
.ed-dots-o { background-image: radial-gradient(circle, #E84E0E 3px, rgba(0,0,0,0) 3.6px); background-size: 22px 22px; }
.ed-dots-y { background-image: radial-gradient(circle, #FECC00 3px, rgba(0,0,0,0) 3.6px); background-size: 22px 22px; }
.ed-dots-w { background-image: radial-gradient(circle, #FFFFFF 3px, rgba(0,0,0,0) 3.6px); background-size: 22px 22px; }

/* Vignette d'article : si l'article n'a pas d'image mise en avant, on affiche le motif. */
.ed-card .wp-block-post-featured-image { margin: 0; }
.ed-card .wp-block-post-featured-image { background: var(--wp--preset--color--peach); }
.ed-card .wp-block-post-featured-image img { width: 100%; display: block; }

/* Degrade de la charte, utilise en filet sous l'en-tête de page. */
.ed-rule { height: 10px; background: linear-gradient(90deg, #E84E0E 0%, #F08262 45%, #FECC00 100%); }

/* Les liens du contenu restent lisibles sur fond clair. */
.wp-block-post-content a:where(:not(.wp-element-button)) { color: #B83C05; text-underline-offset: 3px; }
.wp-block-post-content a:where(:not(.wp-element-button)):hover { color: #2A1F18; }

/* Titres d'articles dans les grilles : pas de soulignement, couleur de texte. */
.ed-card .wp-block-post-title a { color: #2A1F18; text-decoration: none; }
.ed-card .wp-block-post-title a:hover { color: #B83C05; }

/* Cible tactile minimale sur les boutons, pour le mobile. */
.wp-block-button__link { min-height: 48px; display: inline-flex; align-items: center; }


/* Pied de page : les liens doivent rester lisibles sur le brun profond. */
.has-brown-background-color a:where(:not(.wp-element-button)) {
	color: #FDF8F2;
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: rgba(253, 248, 242, 0.45);
}
.has-brown-background-color a:where(:not(.wp-element-button)):hover,
.has-brown-background-color a:where(:not(.wp-element-button)):focus {
	color: #FECC00;
	text-decoration-color: #FECC00;
}
.has-brown-background-color .wp-block-site-title a {
	text-decoration: none;
}
/* La ligne de mentions legales etait trop pale pour etre lue. */
.has-brown-background-color .has-small-font-size,
.has-brown-background-color .has-small-font-size a:where(:not(.wp-element-button)) {
	color: #D9CCC0;
}
.has-brown-background-color .wp-block-separator {
	border-color: rgba(253, 248, 242, 0.25);
	color: rgba(253, 248, 242, 0.25);
}


/* Mur de logos partenaires : des cases regulieres, logos centres et non deformes. */
.ed-logos {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 16px;
}
.ed-logos .wp-block-image {
	margin: 0;
	background: #FFFFFF;
	border: 1px solid #EFE4D6;
	border-radius: 14px;
	padding: 16px;
	height: 130px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.ed-logos .wp-block-image img {
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 96px;
	object-fit: contain;
}
@media (max-width: 1000px) { .ed-logos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px)  { .ed-logos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }


/* Fiches partenaires : deux colonnes, logo dans un cadre regulier. */
.ed-partners {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 28px;
}
@media (max-width: 820px) { .ed-partners { grid-template-columns: 1fr; } }
.ed-partner .wp-block-image {
	margin: 0 0 1.1rem;
	background: #FFFFFF;
	border: 1px solid #EFE4D6;
	border-radius: 14px;
	height: 116px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 14px;
}
.ed-partner .wp-block-image img {
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 84px;
	object-fit: contain;
}


/* Emplacement reserve a une photo d'artiste pas encore fournie. */
.ed-photo-attente {
	border: 1px dashed #C9B6A4;
	border-radius: 14px;
	height: 260px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #6B5B4E;
	font-size: 0.9375rem;
	margin-bottom: 1.1rem;
}


/* Fiches artistes : portrait detoure pose sur un fond peche. */
.ed-artists {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
}
@media (max-width: 1000px) { .ed-artists { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px)  { .ed-artists { grid-template-columns: 1fr; } }
.ed-artist .wp-block-image {
	margin: 0 0 1.1rem;
	background: #FFEDE0;
	border-radius: 18px;
	height: 320px;
	overflow: hidden;
	display: flex;
	align-items: flex-end;
	justify-content: center;
}
.ed-artist .wp-block-image img {
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 320px;
	object-fit: contain;
	display: block;
}


/* Image a la une d'un article : contenue en hauteur, centree sur un fond peche.
   Sans cette limite, un portrait s'affiche sur toute la largeur de la page. */
.wp-block-post-featured-image.ed-hero-image {
	background: #FFEDE0;
	border-radius: 20px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	max-height: 520px;
}
.wp-block-post-featured-image.ed-hero-image img {
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 520px;
	object-fit: contain;
	display: block;
	border-radius: 0;
}
@media (max-width: 700px) {
	.wp-block-post-featured-image.ed-hero-image,
	.wp-block-post-featured-image.ed-hero-image img { max-height: 380px; }
}
/* Les images posees dans le corps d'un article restent dans la colonne. */
.wp-block-post-content .wp-block-image img {
	max-width: 100%;
	height: auto;
}


/* Tableau de tarifs */
.ed-tarifs { overflow-x: auto; margin-block: 1.6rem; }
.ed-tarifs table { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: 0.95rem; }
.ed-tarifs th, .ed-tarifs td { border: 1px solid var(--wp--preset--color--line); padding: 0.7rem 0.9rem; text-align: left; vertical-align: middle; }
.ed-tarifs thead th { background: var(--wp--preset--color--peach); font-weight: 600; }
.ed-tarifs tbody tr:nth-child(even) td { background: rgba(0, 0, 0, 0.025); }
.ed-tarifs th:not(:first-child), .ed-tarifs td:not(:first-child) { text-align: center; white-space: nowrap; }
.ed-tarifs tbody td:first-child { font-weight: 600; }


/* Diaporama */
.ed-diapo { position: relative; margin-block: 1.6rem; max-width: 620px; margin-inline: auto; }
.ed-diapo-piste { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; border-radius: 20px; scrollbar-width: none; }
.ed-diapo-piste::-webkit-scrollbar { display: none; }
.ed-diapo-piste figure { flex: 0 0 100%; margin: 0; scroll-snap-align: center; }
.ed-diapo-piste img { display: block; width: 100%; height: auto; }
.ed-diapo-nav { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; pointer-events: none; padding: 0 0.6rem; }
.ed-diapo-nav button { pointer-events: auto; width: 38px; height: 38px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, 0.88); color: var(--wp--preset--color--contrast); font-size: 1.25rem; line-height: 1; cursor: pointer; display: grid; place-items: center; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12); }
.ed-diapo-nav button:hover { background: #fff; }
.ed-diapo-points { display: flex; gap: 0.45rem; justify-content: center; margin-top: 0.85rem; }
.ed-diapo-points button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px; background: var(--wp--preset--color--line); cursor: pointer; }
.ed-diapo-points button[aria-current="true"] { background: var(--wp--preset--color--orange); }
@media (prefers-reduced-motion: reduce) { .ed-diapo-piste { scroll-behavior: auto; } }




/* Fiches d'artistes et de DJ : ni categorie ni date */
.ed-fiche-artiste .taxonomy-category,
.ed-fiche-artiste .wp-block-post-date { display: none; }


/* Liens de retour en bas de fiche */
.ed-retour { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 2.6rem; padding-top: 1.4rem; border-top: 1px solid var(--wp--preset--color--line); }
.ed-retour a { display: inline-flex; align-items: center; padding: 0.55rem 1.1rem; border: 1px solid var(--wp--preset--color--line); border-radius: 999px; background: var(--wp--preset--color--peach); color: var(--wp--preset--color--orange-dark); text-decoration: none; font-size: 0.9375rem; font-weight: 600; }
.ed-retour a:hover { background: var(--wp--preset--color--orange); color: #fff; border-color: var(--wp--preset--color--orange); }


/* Thematiques */
.ed-terme {
	margin: 1.6rem 0 0.35rem;
	padding-top: 1.2rem;
	border-top: 1px solid var(--wp--preset--color--line);
	color: var(--wp--preset--color--orange-dark);
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
}
.ed-terme:first-of-type { margin-top: 0.9rem; padding-top: 0; border-top: 0; }
.ed-terme + p, .ed-terme + ul, .ed-terme + ol { margin-top: 0; }
.wp-block-details > summary { font-weight: 600; cursor: pointer; }


/* Visionneuse de galerie */
.ed-vis { position: fixed; inset: 0; z-index: 9999; display: none; align-items: center; justify-content: center; background: rgba(20, 14, 10, 0.94); }
.ed-vis.ouverte { display: flex; }
.ed-vis figure { margin: 0; max-width: 94vw; max-height: 94vh; display: flex; flex-direction: column; align-items: center; gap: 0.7rem; }
.ed-vis img { max-width: 94vw; max-height: 86vh; width: auto; height: auto; object-fit: contain; border-radius: 6px; box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5); }
.ed-vis figcaption { color: rgba(255, 255, 255, 0.75); font-size: 0.875rem; letter-spacing: 1px; }
.ed-vis button { position: absolute; border: 0; background: rgba(255, 255, 255, 0.12); color: #fff; cursor: pointer; display: grid; place-items: center; border-radius: 999px; line-height: 1; }
.ed-vis button:hover { background: var(--wp--preset--color--orange); }
.ed-vis-f { top: 1.1rem; right: 1.1rem; width: 46px; height: 46px; font-size: 1.7rem; }
.ed-vis-p, .ed-vis-s { top: 50%; transform: translateY(-50%); width: 54px; height: 54px; font-size: 2rem; }
.ed-vis-p { left: 1.1rem; }
.ed-vis-s { right: 1.1rem; }
@media (max-width: 600px) {
	.ed-vis-p, .ed-vis-s { width: 44px; height: 44px; font-size: 1.6rem; }
	.ed-vis-p { left: 0.4rem; } .ed-vis-s { right: 0.4rem; }
}
.wp-block-gallery img, .ed-galerie img { cursor: zoom-in; }


/* Sommaire des galeries par annee */
.ed-annees { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.6rem; margin-block: 1.8rem; }
.ed-annees > .wp-block-group { margin: 0; }
.ed-annee-img { display: block; width: 100%; height: 180px; object-fit: cover; }


/* Formulaire de contact */
.ed-form { margin-block: 1.6rem; }
.ed-form p { margin: 0 0 1.1rem; }
.ed-form label { display: block; font-weight: 600; font-size: 0.9375rem; margin-bottom: 0.35rem; }
.ed-form input[type="text"], .ed-form input[type="email"], .ed-form textarea {
	width: 100%; box-sizing: border-box; padding: 0.75rem 0.9rem;
	border: 1px solid var(--wp--preset--color--line); border-radius: 12px;
	background: #fff; color: var(--wp--preset--color--contrast);
	font: inherit; font-size: 1rem;
}
.ed-form input:focus, .ed-form textarea:focus { outline: 2px solid var(--wp--preset--color--orange); outline-offset: 1px; border-color: var(--wp--preset--color--orange); }
.ed-form textarea { resize: vertical; min-height: 9rem; }
.ed-form label span { color: var(--wp--preset--color--orange-dark); }
.ed-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ed-form-rgpd { font-size: 0.8125rem; color: var(--wp--preset--color--muted); }
.ed-form-envoi { padding: 0.8rem 1.9rem; border: 0; border-radius: 999px; background: var(--wp--preset--color--orange); color: #fff; font: inherit; font-weight: 600; font-size: 1rem; cursor: pointer; }
.ed-form-envoi:hover { background: var(--wp--preset--color--orange-dark); }
.ed-form-msg { padding: 1rem 1.2rem; border-radius: 14px; margin-block: 1.4rem; font-weight: 600; }
.ed-form-ok { background: var(--wp--preset--color--peach); color: var(--wp--preset--color--orange-dark); }
.ed-form-erreur { background: #fdeaea; color: #9b2222; }
