/* ============================
 THEMES CLAIR / SOMBRE
 ============================ */
body.theme-light {
	--bg: #f5f7fb;
	--bg2: #ffffff;
	--card: #ffffff;
	--accent: #0066cc;
	--accent-soft: #cfe4ff;
	--text: #1a1a1a;
	--muted: #555;
	background: linear-gradient(180deg, #e9f1ff 0%, #f7faff 60%, #eef4ff 100%);
}

body.theme-dark {
	--bg: #050b16;
	--bg2: #071426;
	--card: #0f2138;
	--accent: #4da3ff;
	--accent-soft: #1b3f66;
	--text: #e8f1ff;
	--muted: #9fb3d9;
	background: linear-gradient(180deg, #061224 0%, #0a1a2a 60%, #081423 100%);
}

/* Ajustement du focus pour le thème sombre */
body.theme-dark .form-row input:focus,
body.theme-dark .form-row textarea:focus {
  background: rgba(10,25,45,0.9); /* fond sombre cohérent */
  color: var(--text); /* texte clair */
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(77,163,255,0.35);
}

/* Focus clair */
body.theme-light .form-row select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(77,163,255,0.35);
    background: rgba(255,255,255,0.9);
}

/* Focus sombre */
body.theme-dark .form-row select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(77,163,255,0.35);
    color: var(--text);
}

/* Glow léger en mode sombre */
body.theme-dark .char-counter {
    color: #9fb3d9;
}

/* ============================
   BANNIÈRE NEPTUNE LIGHT (exact visuel)
   ============================ */
body.theme-light .hd-header {
	background: linear-gradient(180deg, #e9f1ff 0%, #f7faff 60%, #eef4ff 100%);
    box-shadow: 0 4px 14px rgba(0, 80, 200, 0.18);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

/* ============================
   BANNIÈRE NEPTUNE NIGHT (exact visuel)
   ============================ */
body.theme-dark .hd-header {
	background: linear-gradient(180deg, #061224 0%, #0a1a2a 60%, #081423 100%);
    box-shadow: 0 4px 18px rgba(0, 80, 200, 0.35);
    border-radius: 12px;
    backdrop-filter: blur(8px);
}

.neptune-logo img {
    filter: drop-shadow(0 0 8px rgba(77,163,255,0.45));
}

body {
	font-family: "Segoe UI", Inter, sans-serif;
	background: var(--bg);
	color: var(--text);
	margin: 0;
	transition: background 0.4s ease, color 0.4s ease;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
	background: radial-gradient(circle at top center,
				rgba(77,163,255,0.12) 0%,
				transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* ============================
 INFO-BULLES NEPTUNE (SOUS LE CURSEUR, ALIGNÉES)
 ============================ */

.neptune-tooltip {
	position: relative;
	display: inline; /* ✅ garde le lien dans le flux du texte */
}

/* Apparition fluide */
.neptune-tooltip:hover::after {
	opacity: 1;
	transform: translateX(-70%) translateY(6px);
	box-shadow: 0 6px 18px rgba(77,163,255,0.35);
}

/* Base commune clair/sombre */
.neptune-tooltip::after {
	content: attr(data-tooltip);
	position: absolute;
	left: 50%;
	top: calc(100% + 8px); /* ✅ juste sous le texte, sans décalage */
	transform: translateX(-50%);
	padding: 8px 12px;
	font-size: 0.85em;
	white-space: nowrap;
	border-radius: 10px;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.25s ease, transform 0.25s ease;
	backdrop-filter: blur(12px);
	box-shadow: 0 4px 12px rgba(0,0,0,0.25);
	border: 1px solid rgba(77,163,255,0.35);
	z-index: 50;
}

/* Thème clair */
body.theme-light .neptune-tooltip::after {
	background: rgba(255,255,255,0.9);
	color: #222;
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
	border-color: rgba(0,100,200,0.25);
}

/* Thème sombre */
body.theme-dark .neptune-tooltip::after {
	background: rgba(10,25,45,0.9);
	color: var(--text);
	box-shadow: 0 4px 12px rgba(0,0,0,0.45);
	border-color: rgba(77,163,255,0.45);
}

/* ============================
 STRUCTURE GLOBALE NEPTUNE
 ============================ */
html, body {
	height: 100%;
	margin: 0;
	padding: 0;
}

body {
	display: flex;
	flex-direction: column;
    width: 100%;
    overflow-x: hidden; /* ✅ empêche tout débordement */
}

.page-wrapper {
    max-width: 1100px;
    margin: 40px auto;
    box-sizing: border-box;
	text-align: justify;
	text-justify: inter-word;
}

/* ============================
 HEADER
 ============================ */
/* LOGO NEPTUNE (clair / sombre) */

.neptune-logo {
	display: flex;
	align-items: center;
	margin-bottom: 4px;
}

.neptune-logo a {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
}

/* Les deux logos sont masqués par défaut */
.neptune-logo img {
	height: 40px;
	width: auto;
	display: none;
	opacity: 0;
	transform: translateY(6px);
	animation: logoFadeIn 0.8s ease forwards;
	filter: drop-shadow(0 0 6px rgba(77,163,255,0.45));
}

/* Logo clair */
body.theme-light .neptune-logo .logo-light {
	display: block;
}

/* Logo sombre */
body.theme-dark .neptune-logo .logo-dark {
	display: block;
}

/* Animation d’apparition */
@keyframes logoFadeIn {
	from {
			opacity: 0;
			transform: translateY(6px);
			filter: drop-shadow(0 0 0 rgba(77,163,255,0));
	}
	to {
			opacity: 1;
			transform: translateY(0);
			filter: drop-shadow(0 0 6px rgba(77,163,255,0.45));
	}
}

.hd-header {
	/*align-self: stretch;*/
	width: 98%;
	margin-top: 5px;
	align-self: center;
	box-sizing: border-box;
	position: relative;
	padding: 20px 28px;
	background: var(--card);
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	overflow: visible;
}

/* Ligne du haut */
.hd-top {
	margin-bottom: 4px;
}

.hd-top h1 {
	margin: 0;
	font-size: 1.8em;
	color: var(--accent);
}

.hd-top h2 {
	margin: 0;
	font-size: 1.25em;
	font-weight: 600;
}

.hd-sub {
	margin: 0;
	font-size: 0.95em;
	color: var(--muted);
}

/* Ligne du bas : phrase + liens */
.hd-bottom {
	display: flex;
	justify-content: space-between; /* phrase à gauche, liens à droite */
	align-items: center; /* alignement vertical parfait */
	margin-top: 4px;
}

.hd-links {
	display: flex;
	font-size: 0.95em;
	gap: 18px;
	/* white-space: nowrap;  empêche les liens de passer à la ligne */
}

.hd-links a {
	color: var(--accent);
	font-weight: 500;
	text-decoration: none;
}

.hd-links a:hover {
	color: var(--accent-soft);
}

/* Toggle en haut à droite */
.theme-toggle {
	position: absolute;
	top: 20px;
	right: 28px;
	font-size: 1.6em;
	cursor: pointer;
	transition: transform 0.2s ease;
	z-index: 100
}

.theme-toggle:hover {
	transform: scale(1.15);
}

.theme-toggle::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    top: calc(100% + 10px);
    background: rgba(255,255,255,0.9);
    color: #222;
    font-size: 0.75rem;
	font-weight: 500;
	padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(77,163,255,0.35);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
	backdrop-filter: blur(12px);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
    z-index: 9999;
}

.theme-toggle:hover::after {
    opacity: 1;
    transform: translateX(-70%) translateY(0);
	box-shadow: 0 6px 18px rgba(77,163,255,0.35);
}

body.theme-dark .theme-toggle::after {
    background: rgba(10,25,45,0.9);
    color: var(--text);
}

/* ============================
 TITRES GLOBAUX
 ============================ */
.section-card h3,
.content h3 {
	font-weight: 600;
	font-size: 1.28em;
	margin-bottom: 20px;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--accent);
	color: var(--accent);
	text-shadow: 0 0 10px rgba(77,163,255,0.45);
	animation: fadeInTitle 0.6s ease;
}

.section-card h4,
.content h4 {
	font-weight: 400;
	font-size: 1.2em;
	margin-bottom: 20px;
	padding-bottom: 8px;
	color: var(--accent);
	text-shadow: 0 0 10px rgba(77,163,255,0.45);
	animation: fadeInTitle 0.6s ease;
}

@keyframes fadeInTitle {
	from { opacity: 0; transform: translateY(-6px); }
	to { opacity: 1; transform: translateY(0); }
}

/* ============================
 CARTES PREMIUM (global)
 ============================ */
.section-card,
.card {
	margin: 24px 0;
	padding: 24px 26px;
	border-radius: 14px;
	backdrop-filter: blur(14px);
	box-sizing: border-box;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

body.theme-light .section-card,
body.theme-light .card {
	background: rgba(255,255,255,0.55);
	box-shadow: 0 4px 18px rgba(0,0,0,0.1);
}

body.theme-dark .section-card,
body.theme-dark .card {
	background: rgba(10,25,45,0.65);
	box-shadow: 0 4px 22px rgba(0,0,0,0.4);
}

.section-card:hover,
.card:hover {
	transform: translateY(-4px);
	box-shadow: 0 6px 26px rgba(0,0,0,0.25);
}

/* ============================
 BOUTONS NEPTUNE
 ============================ */

/* Bouton principal */
.btn-primary {
	padding: 10px 22px;
	border: 1px solid rgba(77,163,255,0.5);
	background: linear-gradient(135deg, var(--accent-soft), var(--accent));
	color: #fff;
	font-weight: 500;
	font-size: 0.95em;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(77,163,255,0.35);
	transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
	margin-right: auto;
}

.btn-primary:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(77,163,255,0.45);
	opacity: 0.95;
}

.btn-primary:disabled {
	opacity: 0.6;
	cursor: default;
	box-shadow: none;
}

/* Bouton secondaire (Revenir en arrière) */
.btn-secondary {
	padding: 10px 22px;
	border: 1px solid rgba(120,120,120,0.5);
	background: linear-gradient(135deg, var(--bg2), var(--bg3));
	color: var(--text);
	font-weight: 500;
	font-size: 0.95em;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0,0,0,0.12);
	transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
	margin-left: auto;
}

.btn-secondary:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(77,163,255,0.25);
	opacity: 0.95;
}

/* ============================
   Bouton "Retour en haut" – Global
   ============================ */
.scroll-top-mobile {
	display: none; /* caché par défaut */
	z-index: 998;
	border-radius: 50px;
	padding: 10px 22px;
	font-size: 0.9em;
	box-shadow: 0 4px 14px rgba(77,163,255,0.35);
	transition: opacity 0.3s ease, transform 0.2s ease;
}

/* Thème clair */
body.theme-light .scroll-top-mobile {
	background: linear-gradient(135deg, var(--accent-soft), var(--accent));
	color: #fff;
	border: 1px solid rgba(0,80,200,0.25);
}

/* Thème sombre */
body.theme-dark .scroll-top-mobile {
	background: linear-gradient(135deg, #1b3f66, var(--accent));
	color: var(--text);
	border: 1px solid rgba(77,163,255,0.35);
}

/* Effet hover */
.scroll-top-mobile:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(77,163,255,0.45);
}

/* ============================
 GLOW BLEU NEPTUNE
 ============================ */
.neptune-glow {
	color: var(--accent);
	text-shadow: 0 0 12px rgba(77,163,255,0.6);
}

/* ============================
 LISTES GLOBALES
 ============================ */
.section-card ul {
	margin: 0;
	padding-left: 20px;
	line-height: 1.55em;
}

.section-card li {
	margin: 6px 0;
	opacity: 0.9;
}

/* ============================
 Links (global)
 ============================ */

.global-link {
	color: var(--accent);
	text-decoration: none;
	font-weight: 500;
	transition: opacity 0.2s ease;
}

.global-link:hover {
	opacity: 0.7;
}

.link-icon {
    width: 24px;
    height: 24px;
    margin-right: 6px;
    vertical-align: middle;
    fill: currentColor; /* 🔥 couleur du texte */
}

/* ============================
 FOOTER (global)
 ============================ */
.footer {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	text-align: center;
	font-size: 0.85em;
	color: var(--text);
	opacity: 0.6;
	padding: 10px 0;
	backdrop-filter: blur(6px);
	background: rgba(255,255,255,0.02);
	border-top: 1px solid rgba(77,163,255,0.15);
	z-index: 999;
}

.footer-main,
.footer-links {
    display: inline;
    white-space: nowrap;
}

.footer a {
	color: var(--accent);
	text-decoration: none;
}
.footer a:hover {
	text-decoration: underline;
}

.footer {
	backdrop-filter: blur(6px);
	background: rgba(255,255,255,0.02);
	border-top: 1px solid rgba(77,163,255,0.15);
}

.footer-spacer {
	height: 120px; /* hauteur du footer + respiration */
}

@media (max-width: 900px) {
	
	.neptune-logo{
		display:block;
	}
	
	.neptune-logo img {
		height: 32px;
		width: auto;
	}

    .page-wrapper {
        margin-top: 20px;
		max-width: 90%;
		box-sizing: border-box;
    }

	h2 {
		font-size: 1.1em;
	}
	
	.hd-top {
		text-align: center;
	}
	
	.hd-bottom {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}

	.hd-links {
		flex-wrap: wrap;
		justify-content: center;
		gap: 12px;
		width: 100%;
		font-size: 0.9em;
	}

	.hd-sub {
		width: 100%;
		font-size: 0.9em;
		text-align: center;
	}

	.hd-header {
		padding: 16px 20px;
		width: 95%;
	}

	.theme-toggle {
		top: 16px;
		right: 20px;
		font-size: 1.75em;
	}
	
	.theme-toggle::after {
		display: none;
	}
	
	.neptune-tooltip::after {
		display: none;
	}
	
	.global-link {
		padding: 2px 8px;
		border-radius: 14px;
		backdrop-filter: blur(4px);
		transition: transform 0.25s ease, box-shadow 0.25s ease;
	}

	/* Thème clair */
	body.theme-light .global-link {
		background: rgba(255,255,255,0.08);
		box-shadow: 0 4px 18px rgba(0,0,0,0.15);
	}

	/* Thème sombre */
	body.theme-dark .global-link {
		background: linear-gradient(135deg, #0a1a2a, #081423);
		box-shadow: 0 4px 22px rgba(77,163,255,0.35);
	}

	.footer {
		font-size: 0.8em;
		padding: 0;
	}

    .footer-main {
        display: block;
        margin-bottom: 4px;
    }

    .footer-links {
        display: flex;
        justify-content: center;
        gap: 12px;
        white-space: nowrap; /* empêche le retour à la ligne */
    }

	.btn-primary,
	.btn-secondary {
		width: 100%;
		text-align: center;
		font-size: 0.95em;
	}

	.scroll-top-mobile {
		display: block;
		position: relative;
		right: 32px; /* ✅ espace plus confortable à droite */
		left: 32px;  /* ✅ optionnel : équilibre visuel si tu veux le centrer */
		width: calc(100% - 64px); /* ✅ garde la largeur fluide sans toucher les bords */
	}

}
