/* ==========================================================================
   QElectroTech – feuille de style du site (HTML + CSS uniquement, sans JS)
   Remplace modele.css. Aucune dépendance externe.
   ========================================================================== */

@font-face {
	font-family: "Exo";
	src: url(design_new/Exo-Bold.otf);
	font-weight: 700;
	font-display: swap;
}

:root {
	--qet-blue: #2a6bb8;
	--qet-blue-dark: #1d4f8c;
	--qet-blue-light: #e8f0fa;
	--qet-yellow: #f5c400;
	--text: #222;
	--text-muted: #5a6270;
	--bg: #ffffff;
	--bg-alt: #f4f6f9;
	--border: #dde2e9;
	--radius: 8px;
	--shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 4px 14px rgba(0, 0, 0, .06);
	--max-width: 1140px;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
	:root {
		--qet-blue-light: #1b2a3d;
		--text: #e3e6ea;
		--text-muted: #a3abb6;
		--bg: #15191f;
		--bg-alt: #1c2129;
		--border: #2e3540;
		--shadow: 0 1px 3px rgba(0, 0, 0, .4);
	}
	a { color: #7fb2ef; }
	/* Les logos et captures gardent un fond clair pour rester lisibles */
	.sponsor-logo, .card-media, .shot img { background: #fff; }
}

/* ── Base ─────────────────────────────────────────────────────────────── */

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

html { scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.6;
	color: var(--text);
	background: var(--bg);
}

img { max-width: 100%; height: auto; border: 0; }

a { color: var(--qet-blue); }
a:hover { color: var(--qet-blue-dark); }

h1, h2, h3, h4 { line-height: 1.25; margin: 1.6em 0 .6em; }
h1, h2 { font-family: "Exo", var(--font); }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }

code {
	overflow-wrap: anywhere;
	font-size: .9em;
	background: var(--bg-alt);
	border: 1px solid var(--border);
	border-radius: 4px;
	padding: .05em .35em;
}

:focus-visible { outline: 3px solid var(--qet-yellow); outline-offset: 2px; }

/* ── En-tête : bannière historique QET + barre de navigation ─────────── */

.site-header { background: var(--qet-blue); position: relative; z-index: 10; }

.banner {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	height: 120px;
	overflow: hidden;
	/* The strip of the left/right pictures and the repeated motif must line up:
	   all three are drawn at their native height (120 px, motif 47 px). */
	background: var(--qet-blue) url(design_new/entete_motif.png) repeat-x left bottom;
	background-size: auto 47px;
}
.banner img { display: block; height: 120px; width: auto; flex-shrink: 0; }

.navbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem;
	max-width: var(--max-width);
	margin: 0 auto;
	padding: .35rem 1rem;
}

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

.nav-item { position: relative; }

.nav-link {
	display: block;
	padding: .5rem .8rem;
	color: #fff;
	text-decoration: none;
	border-radius: 6px;
	cursor: pointer;
	font-weight: 500;
}
.nav-link:hover, .nav-item:focus-within > .nav-link { background: rgba(255, 255, 255, .15); color: #fff; }
.nav-item.is-active > .nav-link { background: rgba(255, 255, 255, .22); }

.has-dropdown > .nav-link::after {
	content: "";
	display: inline-block;
	margin-left: .45em;
	border: 5px solid transparent;
	border-top-color: currentColor;
	border-bottom: 0;
	vertical-align: middle;
}

.dropdown-toggle, .burger-toggle { position: absolute; opacity: 0; pointer-events: none; }

.dropdown {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 280px;
	list-style: none;
	margin: 0;
	padding: .4rem 0;
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}
.dropdown a {
	display: block;
	padding: .45rem 1rem;
	color: var(--text);
	text-decoration: none;
}
.dropdown a:hover, .dropdown a[aria-current] { background: var(--qet-blue-light); color: var(--qet-blue); }

.has-dropdown:hover > .dropdown,
.has-dropdown:focus-within > .dropdown,
.dropdown-toggle:checked ~ .dropdown { display: block; }

.nav-actions { display: flex; gap: .5rem; align-items: center; }
/* Language selector (top right) */
.lang-switch { position: relative; }
.btn-lang {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	background: transparent;
	color: #fff;
	border-color: rgba(255, 255, 255, .6);
	cursor: pointer;
}
.btn-lang:hover, .lang-switch:focus-within .btn-lang { background: rgba(255, 255, 255, .15); }
.lang-switch .dropdown { left: auto; right: 0; min-width: 190px; }
.lang-switch .dropdown a[aria-current] { font-weight: 700; }


.burger { display: none; }

/* ── Boutons ──────────────────────────────────────────────────────────── */

.btn {
	display: inline-block;
	padding: .5rem 1rem;
	border-radius: 6px;
	border: 2px solid transparent;
	font-weight: 600;
	text-decoration: none;
	line-height: 1.3;
	white-space: nowrap;
}
.btn-primary { background: #fff; color: var(--qet-blue); }
.btn-primary:hover { background: var(--qet-blue-light); color: var(--qet-blue-dark); }
.btn-donate { background: var(--qet-yellow); color: #222; }
.btn-donate:hover { background: #ffd83a; color: #000; }
.btn-blue { background: var(--qet-blue); color: #fff; }
.btn-blue:hover { background: var(--qet-blue-dark); color: #fff; }
.btn-outline { border-color: var(--qet-blue); color: var(--qet-blue); background: transparent; }
.btn-outline:hover { background: var(--qet-blue-light); }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: .8rem 0; }

/* ── Contenu ──────────────────────────────────────────────────────────── */

.contenu {
	display: block;
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 1rem 1rem 3rem;
}
.contenu > h2:first-child { margin-top: 1rem; }

/* Bandeau d'accueil pleine largeur */
.hero {
	margin: -1rem calc(50% - 50vw) 2rem;
	padding: 3rem calc(50vw - 50% + 1rem);
	background: linear-gradient(135deg, var(--qet-blue) 0%, var(--qet-blue-dark) 100%);
	color: #fff;
}
.hero-inner {
	display: grid;
	grid-template-columns: 1fr 1.25fr;
	gap: 2.5rem;
	align-items: center;
}
.hero h1 { margin-top: 0; font-size: 2.6rem; color: #fff; }
.hero p { font-size: 1.15rem; opacity: .95; }
.hero .btn-primary { font-size: 1.1rem; padding: .7rem 1.4rem; }
.hero .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .7); font-size: 1.1rem; padding: .7rem 1.4rem; }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .15); }
.hero-shot img {
	display: block;
	border-radius: var(--radius);
	box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
}
.hero .hero-license {
	font-size: 1rem;
	border-left: 3px solid var(--qet-yellow);
	padding-left: .8rem;
}
.hero-meta { font-size: .95rem !important; opacity: .85 !important; }

.page-title {
	margin: -1rem calc(50% - 50vw) 2rem;
	padding: 1.8rem calc(50vw - 50% + 1rem);
	background: var(--qet-blue);
	color: #fff;
}
.page-title h1 { margin: 0; color: #fff; }
.page-title p { margin: .3rem 0 0; opacity: .9; font-size: 1.1rem; }

.lead { font-size: 1.15rem; color: var(--text-muted); }
.center { text-align: center; }

/* Grilles de cartes */
.grid { display: grid; gap: 1.2rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 1.2rem 1.3rem;
	display: flex;
	flex-direction: column;
}
.card h3 { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card-media { margin: -1.2rem -1.3rem 1rem; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.card-media img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.card .eyebrow { text-transform: uppercase; font-size: .78rem; letter-spacing: .06em; color: var(--text-muted); margin: 0; }

.tag {
	display: inline-block;
	font-size: .75rem;
	font-weight: 600;
	padding: .1rem .5rem;
	border-radius: 99px;
	background: var(--bg-alt);
	border: 1px solid var(--border);
	color: var(--text-muted);
	vertical-align: middle;
	font-family: var(--font);
}
.tag-ci { background: #fff6d6; border-color: #f0d36a; color: #6b5300; }
.tag-warn { background: #fde8e8; border-color: #f2b8b8; color: #8a1f1f; }

.note {
	border-left: 4px solid var(--qet-blue);
	background: var(--qet-blue-light);
	padding: .8rem 1rem;
	border-radius: 0 var(--radius) var(--radius) 0;
	margin: 1rem 0;
}
.note-warn { border-left-color: #d98a00; background: #fff6e0; color: #222; }

/* Section alternée pleine largeur */
.band {
	margin: 3rem calc(50% - 50vw);
	padding: 2.5rem calc(50vw - 50% + 1rem);
	background: var(--bg-alt);
}

/* Features (alternating text / pictures) */
.features { display: grid; gap: 2.2rem; margin: 2rem 0 3rem; }
.feature {
	display: grid;
	grid-template-columns: 1fr 1.3fr;
	gap: 2rem;
	align-items: center;
}
.feature:nth-of-type(even) .feature-media { order: -1; }
.feature h3 { margin-top: 0; }
.feature-media { display: grid; gap: .8rem; }
.feature-media img {
	display: block;
	width: 100%;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	background: #fff;
	max-height: 460px;
	object-fit: contain;
}
.feature-text { grid-template-columns: 1fr; max-width: 52rem; }
.feature-more ul { columns: 2; column-gap: 2rem; padding-left: 1.2rem; }
.feature-more li { break-inside: avoid; margin-bottom: .3rem; }

/* AI / MCP block */
.ai-block {
	margin: 2.5rem 0 1.5rem;
	padding: 1.2rem 1.5rem;
	border: 1px solid var(--border);
	border-left: 4px solid var(--qet-blue);
	border-radius: var(--radius);
	background: var(--qet-blue-light);
}
.ai-block h2 { margin-top: 0; }
.ai-block > :last-child { margin-bottom: 0; }

/* Soutiens */
.sponsor {
	display: flex;
	gap: 1.5rem;
	align-items: flex-start;
	margin-bottom: 2rem;
}
.sponsor-logo {
	flex: 0 0 180px;
	padding: .6rem;
	border-radius: var(--radius);
	text-align: center;
}
.sponsor-logo img { width: 160px; }
.sponsor h3 { margin-top: .2rem; }
.sponsor p { margin: .4rem 0; }

/* ── Téléchargements : onglets en CSS pur (ancres #windows #linux #macos) ── */

.os-tabs { margin-top: 1rem; }
.os-tablist {
	display: flex;
	gap: .3rem;
	border-bottom: 2px solid var(--border);
	margin-bottom: 1.5rem;
	flex-wrap: wrap;
}
.os-tablist a {
	padding: .6rem 1.3rem;
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--text-muted);
	text-decoration: none;
	border-bottom: 3px solid transparent;
	margin-bottom: -2px;
}
.os-tablist a:hover { color: var(--qet-blue); }

/* Par défaut : Windows ; sinon l'onglet désigné par l'ancre de l'URL */
.os-panel { display: none; scroll-margin-top: 12rem; }
#windows, .os-panel:target { display: block; }
.os-tabs:has(.os-panel:target) #windows:not(:target) { display: none; }

.os-tablist a[href="#windows"],
.os-tabs:has(#linux:target) .os-tablist a[href="#linux"],
.os-tabs:has(#macos:target) .os-tablist a[href="#macos"] {
	color: var(--qet-blue);
	border-bottom-color: var(--qet-blue);
}
.os-tabs:has(#linux:target) .os-tablist a[href="#windows"],
.os-tabs:has(#macos:target) .os-tablist a[href="#windows"] {
	color: var(--text-muted);
	border-bottom-color: transparent;
}

.dl-list { list-style: none; margin: .4rem 0; padding: 0; }
.dl-list li { padding: .3rem 0; border-bottom: 1px dashed var(--border); }
code.block { display: block; white-space: pre; overflow-x: auto; overflow-wrap: normal; margin: .3rem 0; padding: .3rem .5rem; }
.dl-list li:last-child { border-bottom: 0; }
.store-badges { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin: .5rem 0; }
.store-badges img { height: 48px; width: auto; }

/* Anciennes versions repliables */
details.version {
	border: 1px solid var(--border);
	border-radius: var(--radius);
	margin: .5rem 0;
	background: var(--bg);
}
details.version > summary {
	cursor: pointer;
	padding: .6rem 1rem;
	font-weight: 600;
	list-style-position: inside;
}
details.version[open] > summary { border-bottom: 1px solid var(--border); background: var(--bg-alt); }
details.version > ul { margin: .6rem 0; padding: 0 1rem 0 2.2rem; }

/* ── Captures d'écran ─────────────────────────────────────────────────── */

.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.shot { margin: 0; }
.shot img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: contain;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}
.shot figcaption { margin-top: .5rem; color: var(--text-muted); font-size: .95rem; }

/* ── Compatibilité avec les anciennes pages (news.php, contact.php…) ──── */

.news_top {
	background: var(--qet-blue);
	color: #fff;
	padding: .6rem 1rem;
	border-radius: var(--radius) var(--radius) 0 0;
	font-weight: 600;
}
.news_middle { padding: 1rem; border: 1px solid var(--border); border-top: 0; }
.news_bottom { padding: .5rem 1rem; background: var(--bg-alt); border: 1px solid var(--border); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); }

/* ── Pied de page ─────────────────────────────────────────────────────── */

.site-footer { background: #2b3036; color: #d5d9de; margin-top: 2rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-inner {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1fr;
	gap: 2rem;
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 2.5rem 1rem 1rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: .25rem 0; }
.footer-col strong { color: #fff; }
.footer-about img { margin: .2rem .4rem 0 0; vertical-align: middle; }
.footer-langs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .3rem 1.2rem;
	padding: 1rem;
	border-top: 1px solid #40464e;
}
.footer-langs a[aria-current] { font-weight: 700; text-decoration: underline; }
.footer-bottom { text-align: center; margin: 0; padding: 1rem; border-top: 1px solid #40464e; font-size: .9rem; }

/* ── Responsive ───────────────────────────────────────────────────────── */

@media (max-width: 960px) {
	.hero-inner { grid-template-columns: 1fr; }
	.grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
	.footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
	/* Same proportions as on desktop: 64/120 of every height */
	.banner { height: 64px; background-size: auto 25px; }
	.banner img { height: 64px; }
	.banner .banner-art { display: none; }

	.burger {
		display: inline-flex;
		align-items: center;
		gap: .5rem;
		color: #fff;
		font-weight: 600;
		cursor: pointer;
		padding: .5rem .3rem;
	}
	.burger span { display: block; width: 22px; height: 2px; background: #fff; box-shadow: 0 6px 0 #fff, 0 -6px 0 #fff; }
	.burger span + span { display: none; }

	.nav-actions { margin-left: auto; order: 1; }
	.nav-menu { order: 2; }
	.nav-actions .btn-donate { display: none; }
	.nav-menu { display: none; flex: 1 0 100%; flex-direction: column; padding-bottom: .5rem; }
	.burger-toggle:checked ~ .nav-menu { display: flex; }

	.dropdown { position: static; box-shadow: none; border: 0; background: rgba(255, 255, 255, .1); min-width: 0; }
	.has-dropdown:hover > .dropdown { display: none; }
	.dropdown-toggle:checked ~ .dropdown { display: block; }
	.dropdown a { color: #fff; }
	.lang-switch .dropdown { position: absolute; background: var(--bg); border: 1px solid var(--border); box-shadow: var(--shadow); }
	.lang-switch .dropdown a { color: var(--text); }

	.grid-2, .grid-3, .grid-4, .shots, .feature { grid-template-columns: 1fr; }
	.feature:nth-of-type(even) .feature-media { order: 0; }
	.feature-more ul { columns: 1; }
	.hero h1 { font-size: 2rem; }
	.sponsor { flex-direction: column; gap: .5rem; }
	.sponsor-logo { flex-basis: auto; }
	.footer-inner { grid-template-columns: 1fr; }
}
