/* Sidebar */
.neptune-sidebar {
  flex: 0 0 280px;
  height: 100%;
  overflow-y: auto;
  margin-left: 0; /* supprime tout centrage */
  position: sticky;
  top: 24px;
  align-self: flex-start;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 12px;
}

/* Menu mobile caché sur desktop */
.neptune-mobile-selector {
    display: none;
}

/* Le layout principal occupe tout l’espace restant */
.neptune-layout {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 28px;
  width: 100%;
  height: calc(100dvh - 280px);
  margin: 40px auto;
  padding: 0 24px;
  padding-bottom: 50px;
  box-sizing: border-box;
}

/* Panneau principal qui prend le reste */
.neptune-details {
  flex: 1; /* occupe tout l’espace restant */
  height: 100%;
  min-height: 400px;
  max-width: 1100px;
  overflow-y: auto;
  padding-bottom: 40px;
  text-align: justify;
  text-justify: inter-word;
}

.neptune-details img {
    width: 100%;
    border-radius: 10px;
    margin-top: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.neptune-details img:hover {
    transform: scale(1.03);
    box-shadow: 0 0 18px rgba(77,163,255,0.45);
    transition: 0.25s ease;
}

/* Scrollbar Neptune */
.neptune-details::-webkit-scrollbar {
    width: 8px;
}

.neptune-details::-webkit-scrollbar-thumb {
  background: rgba(77,163,255,0.4);
  border-radius: 8px;
}

.neptune-details::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #6BB4FF, #2F7EF0);
}

.neptune-sidebar::-webkit-scrollbar {
  width: 8px;
}

.neptune-sidebar::-webkit-scrollbar-thumb {
  background: rgba(77,163,255,0.4);
  border-radius: 8px;
}

.neptune-sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #6BB4FF, #2F7EF0);
}

/* Alignement des titres sidebar et panneau central */
.neptune-sidebar h3,
.neptune-details h3 {
  margin-top: 0;
  margin-bottom: 12px;
  padding-left: 4px; /* ajuste selon ton goût */
}

/* Harmonisation du padding vertical */
.neptune-sidebar,
.neptune-details {
  padding-top: 24px;
}

.neptune-sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Module dans la sidebar */
.neptune-module {
    background: rgba(255,255,255,0.55);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

body.theme-dark .neptune-module {
    background: rgba(10,25,45,0.65);
}

.neptune-module img {
    width: 36px;
    height: 36px;
    filter: drop-shadow(0 0 6px rgba(77,163,255,0.55));
}

.neptune-module span {
    font-weight: 500;
    color: var(--accent);
}

/* Hover */
.neptune-module:hover {
    transform: translateX(4px);
    box-shadow: 0 6px 20px rgba(77,163,255,0.35);
}

/* Active module */
.neptune-module.active {
    border-left: 4px solid var(--accent);
    background: rgba(77,163,255,0.15);
}

/* Miniature */
.neptune-diagram-thumb {
    max-width: 360px;
	max-height: 240px;
    height: auto;
    border-radius: 12px;
    cursor: zoom-in;
    transition: transform 0.25s ease;
    display: inline-block;
}

.neptune-diagram-thumb:hover {
    transform: scale(1.03);
}

/* Modal Neptune */
.neptune-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(8px);
    z-index: 999;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.neptune-modal-img {
    width: 100%;              /* taille d’affichage dans la fenêtre */
    max-width: 1200px;        /* limite pour les grands écrans */
    height: auto;            /* conserve les proportions */
    border-radius: 16px;
    box-shadow: 0 0 25px rgba(77,163,255,0.45);
    animation: neptuneZoom 0.25s ease;
}

@keyframes neptuneZoom {
    from { transform: scale(0.85); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

/* Tableaux Neptune */
.neptune-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 0.95em;
    color: var(--text);
	background: rgba(255,255,255,0.03);
    backdrop-filter: blur(8px);
    border-radius: 12px;
}

.neptune-table th,
.neptune-table td {
    padding: 10px 16px;
    text-align: left;
    vertical-align: top;
}

/* ============================
   Équilibrage des tableaux à 3 colonnes
   ============================ */
.neptune-table th:nth-child(1),
.neptune-table td:nth-child(1),
.neptune-table th:nth-child(2),
.neptune-table td:nth-child(2),
.neptune-table th:nth-child(3),
.neptune-table td:nth-child(3) {
    width: auto;
}

/* Spécifique aux tableaux à 3 colonnes */
.neptune-table tr > *:nth-child(3) {
    width: 33%;
}

/* Spécifique aux tableaux à 2 colonnes */
.neptune-table tr > *:nth-child(2):last-child {
    width: 65%;
}

/* En-tête subtile */
.neptune-table thead th {
    border-bottom: 1px solid rgba(77,163,255,0.35);
    color: var(--accent);
}

/* Lignes alternées */
.neptune-table tbody tr:nth-child(even) {
    background-color: rgba(255,255,255,0.03);
}

/* Effet hover */
.neptune-table tbody tr:hover {
    background-color: rgba(77,163,255,0.08);
    transition: background-color 0.2s ease;
}

/* Bouton flottant Neptune */
.sidebar-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  background: rgba(77,163,255,0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(77,163,255,0.4);
  color: var(--text);
  font-size: 1.2rem;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  transition: background 0.3s ease, transform 0.2s ease;
}

.sidebar-toggle:hover {
  background: rgba(77,163,255,0.25);
  transform: scale(1.05);
}

/* Neptune Row */
/* Layout horizontal */
.neptune-row {
    display: flex;
	align-items: center;
    gap: 28px;
    margin: 32px 0;
}

.neptune-row-left,
.neptune-row-right {
    flex: 1;
}

.neptune-row-left .neptune-img-block,
.neptune-row-right .neptune-img-block {
  display: flex;
  flex-direction: column; /* image au-dessus, caption en dessous */
  align-items: center;    /* centrage horizontal */
  justify-content: center; /* centrage vertical dans la colonne */
  text-align: center;
  gap: 8px; /* espace entre image et légende */
}

/* Image */
.neptune-row-left img,
.neptune-row-right img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.neptune-caption {
    opacity: 0.7;
    margin-top: 8px;
    font-size: 0.9em;
    text-align: center;
}

.footer-spacer {
	height: 0px;
}

/* ============================
   Adaptation responsive
   ============================ */

/* Tablettes (≤ 1024px) */
@media (max-width: 1024px) {
    .neptune-diagram-thumb {
        width: 35%;
    }
    .neptune-modal-img {
        width: 65%;
		max-width: 900px;
    }
}

/* Tablettes (≤ 900px) */
@media (max-width: 900px) {
	.neptune-layout {
		margin-top: 20px;
		grid-template-columns: 1fr;
		flex-direction: column;
		justify-content: normal;
		height: auto;        /* ✅ laisse la page respirer */
		overflow-y: visible; /* ✅ supprime le scroll interne */
	}

	/* Cache la sidebar sur mobile */
	.neptune-sidebar {
		display: none;
	}

	/* Menu mobile Neptune */
	.neptune-mobile-selector {
		display: block;
		width: 100%;
		color: var(--text);
		margin-bottom: 20px;
		border: 1px solid rgba(0,80,200,0.15);
		border-radius: 12px;
		backdrop-filter: blur(12px);
		box-shadow: 0 4px 14px rgba(77,163,255,0.25);
		transition: all 0.3s ease;
	}
  
	/* Select – version identique à reviews */
	.neptune-mobile-selector select {
		width: 100%;
		padding: 12px 14px;
		border-radius: 10px;
		border: 1px solid var(--accent);        /* ✔ identique à reviews */
		background: var(--bg2);                 /* ✔ identique à reviews */
		color: var(--text);
		font-size: 1em;
		font-weight: 500;
		outline: none;
		transition: border-color 0.25s ease, box-shadow 0.25s ease;
	}

	/* Hover / Focus – identique à reviews */
	.neptune-mobile-selector select:hover,
	.neptune-mobile-selector select:focus {
		border-color: var(--accent);
		box-shadow: 0 0 10px rgba(77,163,255,0.35);
	}

	/* Options – identique à reviews */
	.neptune-mobile-selector option {
		background: var(--background);
		color: var(--text);
		font-weight: 500;
		padding: 8px;
	}

	/* Option désactivée */
	.neptune-mobile-selector option[value=""] {
		color: var(--muted);
	}
  
	.neptune-details {
		width: 100%;
		height: auto;        /* ✅ laisse le contenu prendre sa hauteur naturelle */
		min-height: auto;    /* ✅ supprime la contrainte desktop */
		overflow-y: visible; /* ✅ supprime le scroll interne */
	}
  
	.neptune-row,
	.neptune-row-reverse {
		flex-direction: column;
	}

	.footer-spacer {
		height: 120px; /* hauteur du footer + respiration */
	}
}

/* Mobiles (≤ 768px) */
@media (max-width: 768px) {
    .neptune-diagram-thumb {
        width: 50%;
    }
    .neptune-modal-img {
        width: 80%;
		max-width: 700px;
    }
}

/* Petits écrans (≤ 480px) */
@media (max-width: 480px) {
    .neptune-diagram-thumb {
        width: 70%;
    }
    .neptune-modal-img {
        width: 90%;
		max-width: 400px;
    }
}