/* Mushin no Shin — feuille de style responsive (accueil, contacts) */

@font-face {
	font-family: "eurofur";
	src: url(../img/eurof35.ttf) format("truetype");
	font-display: swap;
}

:root {
	--fond: #000;
	--fond-bande: #1b1a18;
	--fond-carte: #12110f;
	--bordure: #3a352e;
	--texte: #b3a38c;
	--texte-doux: #8d7e69;
	--titre: #cdbb9e;
	--lien: #e2dcc6;
	--accent: #d0574a;
	--largeur: 960px;
	--gouttiere: 16px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: #0d0c0b url(../Images/Backgroung.jpg) repeat;
	color: var(--texte);
	font-family: Arial, Helvetica, sans-serif;
	font-size: 1.0625rem;
	line-height: 1.65;
}

img, video { max-width: 100%; height: auto; display: block; }

a { color: var(--lien); text-underline-offset: 3px; }
a:hover { color: var(--titre); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--titre); outline-offset: 2px; }

h1, h2, h3 { color: var(--titre); line-height: 1.25; font-weight: normal; }
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.6rem); }
h3 { font-size: 1.2rem; }

.page {
	max-width: var(--largeur);
	margin: 0 auto;
	background: var(--fond);
	min-height: 100vh;
}

/* ---------- En-tête ---------- */

.banniere img { width: 100%; }

.nav {
	position: sticky;
	top: 0;
	z-index: 10;
	background: rgba(12, 11, 10, 0.96);
	border-bottom: 1px solid var(--bordure);
	font-family: "eurofur", Arial, sans-serif;
	letter-spacing: 2px;
}

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

.nav a {
	color: #fff;
	opacity: 0.55;
	text-decoration: none;
	display: block;
	padding: 0.7rem 0.75rem;
}
.nav a:hover, .nav a.actif, .nav .has-sub:focus-within > a { opacity: 1; }
.nav a.actif { box-shadow: inset 0 -2px 0 var(--accent); }

.nav-toggle, .sub-toggle {
	background: none;
	border: 0;
	color: #fff;
	font: inherit;
	cursor: pointer;
}

.nav-toggle { display: none; }

.sous-menu { display: none; }

.reseaux a { padding-left: 0.5rem; padding-right: 0.5rem; }

.sr-only {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap;
}

/* Bureau : menu horizontal avec sous-menus déroulants */
@media (min-width: 861px) {
	.menu { display: flex; justify-content: center; align-items: stretch; }
	.menu > li { position: relative; }
	.sub-toggle { display: none; }
	.has-sub:hover > .sous-menu,
	.has-sub:focus-within > .sous-menu {
		display: block;
		position: absolute;
		top: 100%;
		left: 0;
		min-width: 13rem;
		background: rgba(12, 11, 10, 0.97);
		border: 1px solid var(--bordure);
		letter-spacing: 1px;
		font-size: 0.95rem;
	}
	.sous-menu a { padding: 0.5rem 1rem; }
	.reseaux { margin-left: 0.5rem; display: flex; }
}

/* Mobile : bouton Menu + accordéon */
@media (max-width: 860px) {
	.nav-toggle {
		display: flex;
		align-items: center;
		gap: 0.6rem;
		width: 100%;
		padding: 0.8rem var(--gouttiere);
		font-size: 1.1rem;
		letter-spacing: 2px;
	}
	.menu { display: none; padding-bottom: 0.5rem; }
	.nav.ouvert .menu { display: block; }
	.menu > li { border-top: 1px solid var(--bordure); }
	.menu a { padding: 0.8rem var(--gouttiere); font-size: 1.05rem; }
	.has-sub { display: flex; flex-wrap: wrap; }
	.has-sub > a { flex: 1; }
	.sub-toggle { width: 3.2rem; opacity: 0.7; font-size: 1rem; }
	.sub-toggle[aria-expanded="true"] { transform: rotate(180deg); }
	.has-sub > .sous-menu { flex-basis: 100%; }
	.has-sub.deplie > .sous-menu { display: block; }
	.sous-menu a { padding-left: calc(var(--gouttiere) + 1.2rem); font-size: 0.95rem; letter-spacing: 1px; }
	.reseaux { display: flex; padding: 0 0.5rem; }
	.reseaux a { font-size: 1.4rem; }
}

/* ---------- Contenu ---------- */

main { padding: 1.5rem var(--gouttiere) 2rem; }

.contenu { max-width: 680px; margin: 0 auto; }

.logo { width: min(280px, 60%); margin: 0.5rem auto 1.5rem; }

.contenu p { hyphens: auto; }
@media (min-width: 640px) {
	.contenu p { text-align: justify; }
}
.contenu .centre, .contenu .annonce, .contenu .coordonnees { text-align: center; }

.bande {
	background: var(--fond-bande);
	text-align: center;
	padding: 0.6rem var(--gouttiere);
	margin: 2.5rem calc(-1 * var(--gouttiere)) 1.25rem;
}
.bande h2 { margin: 0; font-size: 1.3rem; }

.kanji { color: var(--titre); white-space: nowrap; }

.carte {
	background: var(--fond-carte);
	border: 1px solid var(--bordure);
	border-radius: 6px;
	padding: 1.5rem;
	margin: 2rem 0;
}

/* Encart d'accueil : l'image d'origine sur ordinateur et sur les écrans
   mobiles d'au moins ~1000 px physiques (Full HD) ; en dessous, le texte de
   l'image est lisible en HTML. */
.encart { display: none; }

@media (min-width: 600px), (min-resolution: 2.5dppx) {
	.encart { display: block; margin: 2rem auto 0; }
	.bienvenue { display: none; }
}

/* Sur mobile, l'image prend toute la largeur de l'écran */
@media (max-width: 599px) and (min-resolution: 2.5dppx) {
	.encart {
		width: calc(100% + 2 * var(--gouttiere));
		max-width: none;
		margin-left: calc(-1 * var(--gouttiere));
		margin-right: calc(-1 * var(--gouttiere));
	}
}

.bienvenue { text-align: center; }
.bienvenue h2 {
	font-family: Georgia, "Times New Roman", serif;
	letter-spacing: 3px;
	text-transform: uppercase;
	margin-top: 0;
}

.horaires {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 1rem;
	margin: 1.5rem 0 0;
	padding: 0;
	list-style: none;
}
.horaires li {
	border: 1px solid var(--bordure);
	background: #1a1815;
	padding: 0.8rem;
	text-align: center;
}
.horaires strong {
	display: block;
	color: var(--titre);
	font-family: Georgia, "Times New Roman", serif;
	letter-spacing: 2px;
	text-transform: uppercase;
}
.horaires span { display: block; }

.bouton {
	display: inline-block;
	margin-top: 1.25rem;
	padding: 0.75rem 1.5rem;
	border: 1px solid var(--titre);
	color: var(--titre);
	text-decoration: none;
	letter-spacing: 1px;
}
.bouton:hover { background: var(--titre); color: #000; }

.centre { text-align: center; }

/* ---------- Contacts ---------- */

.annonce {
	text-align: center;
	color: var(--accent);
	font-size: clamp(1.25rem, 3.5vw, 1.6rem);
	font-weight: bold;
	margin: 0 0 2rem;
}
.annonce span { display: block; }

.enseignants {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 1rem;
	list-style: none;
	padding: 0;
	margin: 1rem 0;
}
.enseignants li { text-align: center; padding: 1rem; margin: 0; }
.enseignants strong { display: block; color: var(--titre); font-size: 1.1rem; }

.bloc-photo {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
	align-items: center;
	margin: 1.5rem 0;
}
@media (min-width: 640px) {
	.bloc-photo { grid-template-columns: 3fr 2fr; }
}
.bloc-photo img { width: 100%; border: 1px solid var(--bordure); }

.creneau { margin: 0 0 1rem; }
.creneau strong { display: block; color: var(--titre); letter-spacing: 2px; }

address { font-style: normal; }

.coordonnees {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem 1.5rem;
	font-size: 1.15rem;
}
.coordonnees a { color: var(--accent); text-decoration: none; }
.coordonnees a:hover { text-decoration: underline; }
.coordonnees .fas { margin-right: 0.4rem; }

.reseaux-contact a { font-size: 1.6rem; margin: 0 0.4rem; color: var(--lien); }

/* ---------- Pied de page ---------- */

.pied {
	border-top: 1px solid var(--bordure);
	padding: 1.25rem var(--gouttiere);
	text-align: center;
	font-size: 0.85rem;
	font-style: italic;
	color: var(--texte-doux);
}
.pied p { margin: 0.25rem 0; }

/* ---------- Onglets des rubriques ---------- */

.onglets {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.4rem;
	padding: 0.75rem var(--gouttiere) 0;
	font-family: "eurofur", Arial, sans-serif;
	letter-spacing: 1px;
}
.onglets a {
	color: #fff;
	opacity: 0.55;
	text-decoration: none;
	padding: 0.35rem 0.8rem;
	border: 1px solid var(--bordure);
	border-radius: 3px;
	font-size: 0.95rem;
}
.onglets a:hover { opacity: 1; }
.onglets a.actif { opacity: 1; border-color: var(--accent); }

/* ---------- Contenu repris des anciennes pages ----------
   Les tableaux de mise en page d'origine deviennent fluides. */

.ancien table { width: 100% !important; height: auto !important; border-collapse: collapse; }
.ancien td, .ancien th { width: auto !important; height: auto !important; font-weight: normal; }
.ancien img { margin-left: auto; margin-right: auto; }
.ancien img[align="left"] { float: left; margin: 0.25rem 1rem 0.5rem 0; max-width: 45%; }
.ancien img[align="right"] { float: right; margin: 0.25rem 0 0.5rem 1rem; max-width: 45%; }
.ancien td[bgcolor], .ancien th[bgcolor] { background: var(--fond-bande); }
.ancien td[bgcolor] h2, .ancien td[bgcolor] h3,
.ancien th[bgcolor] h2, .ancien th[bgcolor] h3 { margin: 0.5rem 0; text-align: center; }
.ancien .indentation em { color: var(--accent); font-size: 1.15em; }
.ancien .Rouge { color: var(--accent); }
.ancien video { margin: 1rem auto; }
.ancien::after { content: ""; display: block; clear: both; }

/* Grands tableaux (lexiques) : défilement horizontal si besoin */
.defile { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.defile td { padding: 0.3rem 0.5rem; vertical-align: top; border-bottom: 1px solid #1f1d1a; }

@media (max-width: 599px) {
	.ancien img[align="left"], .ancien img[align="right"] { float: none; max-width: 100%; margin: 0.5rem auto; }
}

/* ---------- Galeries ---------- */

.galerie h2 {
	background: var(--fond-bande);
	text-align: center;
	padding: 0.5rem;
	font-size: 1.2rem;
	margin: 2rem 0 1rem;
}
.vignettes {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 0.5rem;
}
@media (max-width: 420px) {
	.vignettes { grid-template-columns: repeat(3, 1fr); gap: 4px; }
}
.vignettes a { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #111; }
.vignettes img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s, opacity 0.3s; opacity: 0.9; }
.vignettes a:hover img, .vignettes a:focus-visible img { transform: scale(1.05); opacity: 1; }

.visionneuse {
	width: 100vw; height: 100vh; max-width: none; max-height: none;
	margin: 0; padding: 0; border: 0;
	background: rgba(0, 0, 0, 0.94);
	color: var(--texte);
}
.visionneuse::backdrop { background: rgba(0, 0, 0, 0.8); }
.visionneuse figure {
	margin: 0; height: 100%;
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	padding: 3rem 0.5rem;
}
.visionneuse img { max-width: 100%; max-height: 100%; object-fit: contain; }
.visionneuse figcaption { margin-top: 0.5rem; text-align: center; }
.visionneuse button {
	position: absolute; background: rgba(0, 0, 0, 0.4); border: 0; color: #fff;
	font-size: 2.5rem; line-height: 1; cursor: pointer; padding: 0.5rem 0.9rem; opacity: 0.75;
}
.visionneuse button:hover { opacity: 1; }
.v-fermer { top: 0.25rem; right: 0.5rem; }
.v-prec { left: 0.25rem; top: 50%; transform: translateY(-50%); }
.v-suiv { right: 0.25rem; top: 50%; transform: translateY(-50%); }
.v-compteur { position: absolute; top: 0.9rem; left: 1rem; margin: 0; font-size: 0.9rem; }

/* ---------- Calendrier ---------- */

.evenements { list-style: none; padding: 0; }
.evenements li { margin: 0 0 1rem; }
.evenements time { display: block; color: var(--titre); font-weight: bold; }
.a-venir { text-align: center; font-style: italic; color: var(--texte-doux); }

/* Lexiques sur mobile : terme et kanji sur une ligne, définition dessous */
@media (max-width: 599px) {
	.defile table, .defile tbody, .defile tr { display: block; }
	.defile tr { padding: 0.6rem 0; border-bottom: 1px solid #1f1d1a; }
	.defile td { display: inline; border: 0; padding: 0 0.5rem 0 0; }
	.defile td:nth-child(n+3) { display: block; padding-top: 0.25rem; }
	.defile td:first-child { color: var(--titre); font-weight: bold; }
}
.defile th { color: var(--titre); text-align: left; padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--bordure); }
@media (max-width: 599px) {
	.defile thead { display: none; }
}
.defile td:nth-child(2) { white-space: nowrap; }

/* ---------- Calendrier : couleurs par discipline et par niveau ---------- */

:root {
	--iaido: #d0574a;
	--jodo: #4f9ad0;
	--n-international: #a385d6;
	--n-national: #d9ad3c;
	--n-regional: #6db36d;
	--n-local: #8f877b;
}

.filtres { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; margin: 1rem 0; }
.filtres button {
	background: none; color: var(--texte); border: 1px solid var(--bordure); border-radius: 999px;
	padding: 0.35rem 0.9rem; font: inherit; font-size: 0.9rem; cursor: pointer;
}
.filtres button.d-iaido { border-color: var(--iaido); }
.filtres button.d-jodo { border-color: var(--jodo); }
.filtres button[aria-pressed="true"] { background: var(--titre); color: #000; border-color: var(--titre); }

.legende { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; list-style: none; padding: 0; margin: 0 0 1rem; }

.evenement {
	display: grid;
	grid-template-columns: 9.5rem 1fr;
	gap: 0.25rem 1rem;
	padding: 0.75rem 0.75rem 0.75rem 1rem;
	border-left: 4px solid var(--iaido);
	background: var(--fond-carte);
}
.evenement.d-jodo { border-left-color: var(--jodo); }
.evenement.d-iaido.d-jodo { border-image: linear-gradient(var(--iaido) 50%, var(--jodo) 50%) 1; }
.evenement p { margin: 0; text-align: left; }
.evenement time { font-weight: bold; color: var(--titre); }
.ev-titre { color: var(--lien); font-weight: bold; }
.ev-lieu, .ev-remarque { font-size: 0.92rem; }
.ev-remarque { font-style: italic; color: var(--texte-doux); }
.ev-etiquettes { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.35rem 0 !important; }
.ev-lien { font-size: 0.9rem; }

.discipline, .niveau, .grades {
	display: inline-block; font-size: 0.78rem; padding: 0.1rem 0.5rem; border-radius: 3px; line-height: 1.5;
}
.discipline { color: #000; font-weight: bold; }
.discipline.d-iaido { background: var(--iaido); }
.discipline.d-jodo { background: var(--jodo); }
.niveau { border: 1px solid; }
.n-international { color: var(--n-international); }
.n-national { color: var(--n-national); }
.n-regional { color: var(--n-regional); }
.n-local { color: var(--n-local); }
.grades { border: 1px dashed var(--bordure); }

.sources { font-size: 0.85rem; color: var(--texte-doux); text-align: center; margin-top: 2rem; }

@media (max-width: 599px) {
	.evenement { grid-template-columns: 1fr; }
}
.evenement.termine { opacity: 0.6; }
.etat-termine { display: inline-block; font-size: 0.78rem; padding: 0.1rem 0.5rem; border-radius: 3px; background: #333; color: #ccc; }
.ancien .taille { font-size: 1.6rem; color: var(--titre); font-style: normal; }
.ancien .italique { font-style: italic; }
.contenu { overflow-wrap: anywhere; }
