
/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

h1 {font-family: "Permanent Marker"; color:orange; font-size: 42px; line-height: 1.3em; font-weight: 900; padding: 16px 0 10px 0; margin: 0;}
h2 {font-family: "Permanent Marker"; color:grey; font-size: 36px; line-height: 1.3em; font-weight: 900; padding: 10px 0 16px 0; margin: 0;}
h3, h4 {font-family: "Permanent Marker"; color: #000; line-height: 1em; font-weight: 100; padding: 24px 0 12px 0; margin: 0;}
h3 {font-size: 32px;}
h4 {font-size: 28px;}

.title-banner h1 {font-family: "Permanent Marker"; color:orange; font-size: 42px; line-height: 1.3em; font-weight: 900; padding: 16px 0 10px 0; margin: 0;}
.title-banner h2 {font-family: "Permanent Marker"; color:grey; font-size: 36px; line-height: 1.3em; font-weight: 900; padding: 10px 0 16px 0; margin: 0;}
.title-banner h3, h4 {all: initial; font-family: "Permanent Marker"; color: #000; line-height: 1em; font-weight: 100; padding: 24px 0 12px 0; margin: 0;}
.title-banner h3 {font-size: 32px;}
.title-banner h4 {font-size: 28px;}

ul {list-style: disc; margin: 6px 0 6px 20px; color:black; font-family: "Patrick Hand"; font-size: 18px;}

ol {list-style-type: decimal; margin-left: 20px; padding-left: 0; font-family: "Patrick Hand"; font-size: 18px;}

li {margin-bottom: 5px;}

/* bouton se connecter */
.btn {
	padding: 10px 20px;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	text-decoration: none;
	font-size: 14px;
	transition: background-color 0.3s;
}
.btn-primary {
	background-color: #007cba;
	color: white;
}
.btn-primary:hover {
	background-color: #005a87;
}

.btn-secondary {
	background-color: #007cba;
	color: white;
}
.btn-secondary:hover {
	background-color: #005a87;
}

/* Header de description avec boutons */
.description-header {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.edit-btn, .save-btn, .cancel-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s ease;
}

.edit-btn:hover {
    background: #4caf50;
}

.save-btn {
    background: #4caf50 !important;
}

.save-btn:hover {
    background: #45a049 !important;
}

.cancel-btn {
    background: #f44336 !important;
}

.cancel-btn:hover {
    background: #da190b !important;
}

/* Ajustements pour TinyMCE */
.description-banner.editing {
    max-height: 80vh;
    overflow: visible; /* Important pour TinyMCE */
    left: 20px;
    right: 20px;
    bottom: 40px;
}

#editorContainer {
    background: white;
    border-radius: 8px;
    padding: 10px;
    margin-top: 10px;
	height:100vh;
}

#tinymce-textarea {
	padding:100px;
}

.mce-content-body{
    background: white;
}

/* Styles pour les colonnes dans l'affichage */
.columns {
    display: flex;
    gap: 20px;
    border: 2px solid #4caf50;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    background: rgba(76, 175, 80, 0.1);
}

.column {
    flex: 1;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
}




/* Page les univers */
.citation {
	background-color: #ecf0f1;
	padding: 15px;
	margin: 20px 0;
	border-left: 4px solid #e74c3c;
	font-style: italic;
}
.note {
	background-color: #fff3cd;
	padding: 10px;
	margin: 15px 0;
	border: 1px solid #ffeaa7;
	border-radius: 5px;
	font-size: 0.9em;
}
.humour {
	background-color: #d1ecf1;
	padding: 10px;
	margin: 15px 0;
	border-radius: 5px;
	font-style: italic;
	color: #0c5460;
}
.timeline {
	background-color: #e8f5e8;
	padding: 15px;
	margin: 20px 0;
	border-radius: 5px;
}
.probability {
	background-color: #f8d7da;
	padding: 15px;
	margin: 20px 0;
	border-radius: 5px;
	border: 1px solid #f5c6cb;
}
a {
	color: white;
	text-decoration: none;
}
a:hover {
	// text-decoration: underline;
	color:orange;
}
.reference {
	font-size: 0.8em;
	color: #666;
	margin-top: 5px;
}

/* fin page les univers */

table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
}
th, td {
  border: 1px solid #ccc;
  padding: 0.6rem;
  text-align: left;
}
th {
  background-color: #e3e3e3;
}
.highlight {
  background-color: #dff0d8;
}


p {font-family:"Patrick Hand"; font-size: 20px;}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-image: url('background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* L'image reste fixe pendant le scroll */
    background-repeat: no-repeat;
    min-height: 100vh;	
}

/* === PAGE D'ACCUEIL === */
.home-page {
    width: 100vw;
    height: 100vh;
    display: grid;
    grid-template-areas: 
        "header header"
        "sidebar main"
        "footer footer";
    grid-template-columns: 280px 1fr;
    grid-template-rows: auto 1fr auto;
    /* background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%); */
    overflow: hidden;
}

/* Bandeau du haut */
.home-header {
    grid-area: header;
    background: rgba(0, 0, 0, 0.3);
    padding: 20px 40px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.home-header h1 {
    font-family: 'Permanent Marker', cursive;
    font-size: 2.5rem;
    color: white;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.home-header .subtitle {
    font-family: 'Patrick Hand', cursive;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 5px 0 0 0;
}

.category-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.category-nav-link {
    font-family: 'Patrick Hand', cursive;
    color: white;
    text-decoration: none;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.category-nav-link:hover {
    background: rgba(76, 175, 80, 0.3);
    transform: translateX(5px);
    border-left-width: 6px;
}

/* Contenu principal */
.home-main {
    grid-area: main;
    overflow-y: auto;
    padding: 40px;
    margin: 0px;
	padding:0px;
	display: grid;
	align-items: center;
}

.home-content {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
	animation: fadeInUp 0.8s ease-out;
}

.home-content h3 {
    font-family: 'Permanent Marker', cursive;
    color: #2a5298;
    text-align: center;
    margin-bottom: 20px;
}

.home-content p {
    font-family: 'Patrick Hand', cursive;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 15px;
    text-align: justify;
}

.home-content em {
    color: #4CAF50;
    font-weight: bold;
}

/* Bandeau du bas */
.home-footer {
    grid-area: footer;
    background: rgba(0, 0, 0, 0.3);
    padding: 15px 40px;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    text-align: center;
	display: flex;
	align-items: center;      /* centrage vertical */
	position: relative;
}

.home-footer p {
    font-family: 'Patrick Hand', cursive;
    color: rgba(255, 255, 255, 0.9);
    margin: 5px 0;
    font-size: 0.95rem;
}

.home-footer a {
    color: #4CAF50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.home-footer a:hover {
    color: #81c784;
    // text-decoration: underline;
}

.info-footer {
	margin: 0 auto;
}

.connecter-footer {
	position: absolute;
	right:20px;
}

/* === PAGE DE CATÉGORIE === */
.category-page {
    width: 100vw;
    height: 100vh;
    display: grid;
    grid-template-areas: 
        "header"
        "main"
        "footer";
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    /* background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%); */
    overflow: hidden;
}

/* Bandeau du haut réduit pour page de catégorie */
.category-page .home-header {
    padding: 15px 40px;
}

.category-page .home-header h1 {
    font-size: 1.8rem;
}

.category-page .home-header .subtitle {
    font-size: 1rem;
}

/* Contenu principal de la page de catégorie */
.category-page .home-main {
    grid-area: main;
    overflow-y: auto;
    padding: 30px;
}

.category-page .home-content {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Titre de catégorie */
.category-page-title {
    font-family: 'Permanent Marker', cursive;
    color: #4CAF50;
    text-align: center;
    font-size: 2.5rem;
    margin: 0 0 30px 0;
	padding: 20px;
}

/* Grille des pages de la catégorie */
.category-pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin: 20px;
}

/* Styles pour les boutons de page dans les catégories */
.btn-grad {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.2));
    border-radius: 10px;
    border: 2px solid #4CAF50;
    transition: all 0.3s ease;
}

.btn-grad:hover {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(76, 175, 80, 0.3));
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.quick-btn {
    font-family: 'Patrick Hand', cursive;
    text-decoration: none;
    display: block;
    padding: 15px 20px;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.quick-btn:hover {
    color: #4CAF50;
}

.start-button {
    background: linear-gradient(45deg, #4caf50, #81c784);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    margin: 20px 0;
}

.start-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* === INTERFACE DU VIEWER === */

/* Bandeau header pour le viewer */
.viewer-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 15px 40px;
    border-bottom: 3px solid #4CAF50;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.viewer-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    gap: 20px;
}

.viewer-header h1 {
    font-family: 'Permanent Marker', cursive;
    font-size: 1.8rem;
    color: white;
    margin: 0;
    padding: 0;
}

.site-title-link {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-title-link:hover {
    color: #4CAF50;
    text-decoration: none;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    font-family: 'Patrick Hand', cursive;
    font-size: 1.3rem;
}

.breadcrumb .category-link {
    color: #4CAF50;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 5px;
}

.breadcrumb .category-link:hover {
    background: rgba(76, 175, 80, 0.2);
    color: #81c784;
}

.breadcrumb .separator {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
}

.breadcrumb .page-title {
    color: white;
    font-size: 1.2rem;
}

.page-counter {
    font-family: 'Patrick Hand', cursive;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    padding: 5px 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
}

/* Contrôles de navigation */

/* Contrôles de zoom */
.zoom-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: 15px;
    padding-left: 15px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

/* Boutons de navigation en bas du contenu */
.nav-buttons-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 30px 0;
    margin-top: 20px;
}

.nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    font-size: 16px;
    min-width: 120px;
}

.nav-button:hover {
    background: rgba(76, 175, 80, 0.9);
    border-color: #4CAF50;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.5);
}

.nav-arrow {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    margin: 0 8px;
}

#zoomLevel {
    min-width: 45px;
    text-align: center;
    font-size: 12px;
    color: #ccc;
}

/* Paramètres */

/* Instructions */

.title-banner {
    padding: 15px 20px;
}

.description-banner {
	background-color: rgba(230,240,250,0.9);
    color: black;
    padding: 15px 50px;
}

/* Styles des boutons */
button {
    background: #333;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    user-select: none;
}

button:hover {
    background: #555;
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background: #666;
    cursor: not-allowed;
    opacity: 0.5;
    transform: none;
}

#imageCounter {
    margin: 0 10px;
    font-size: 13px;
    font-weight: 500;
    min-width: 60px;
    text-align: center;
}

/* États de chargement et d'erreur */
 .error {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    font-size: 18px;
    text-align: center;
}

.error {
    color: #ff6b6b;
}

/* Styles spécifiques pour les SVG */
svg {
    display: block;
    margin: 0 auto;
    max-width: none;
    max-height: none;
    user-select: none;
    pointer-events: auto;
}

/* Animation de chargement */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Animation d'entrée pour la page d'accueil */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

div.tplge_contentboxleft {color:white; width: 47%; min-height: 60px; float: left; box-sizing: border-box; background: blue; font-size: 17px; line-height: 1.3em; border: 0px solid #a0a6a9; border-radius: 3px; padding: 12px 20px 10px 20px; margin: 12px 3% 12px 0;}
div.tplge_contentboxright {color:white; width: 47%; min-height: 60px; float: right; box-sizing: border-box; background: green; font-size: 17px; line-height: 1.3em; border: 0px solid #a0a6a9; border-radius: 3px; padding: 12px 20px 10px 20px; margin: 12px 0 12px 3%;}
div.tplge_contentboxfullsize {color:white; clear: both; width: 100%; min-height: 60px; box-sizing: border-box; background: orange; font-size: 17px; border: 0px solid #a0a6a9; border-radius: 7px; padding: 20px 10px 10px 10px; margin: 5px 0 5px 0;}

/* --- Code à ajouter dans css/styles.php --- */

/* Le bouton Hamburger (invisible par défaut sur PC) */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2000; /* Au-dessus de tout */
    padding: 5px 10px;
}

/* Le conteneur du menu mobile */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5); /* Fond semi-transparent */
    z-index: 1999;
    display: none; /* Caché par défaut */
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: -280px; /* Caché à gauche */
    width: 280px;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    overflow-y: auto;
    transition: left 0.3s ease;
    z-index: 1999;
    padding-top: 60px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.3);
}

.mobile-menu.active {
    left: 0; /* Le menu apparaît */
}

.mobile-menu a {
    display: block;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-family: 'Patrick Hand', sans-serif;
    font-size: 1.2em;
}

.mobile-menu a:hover {
    background-color: rgba(255,255,255,0.1);
}

/* Instructions d'utilisation du SVG */
.svg-instructions {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 13px;
    z-index: 1000;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    animation: fadeInInstructions 0.5s ease-in-out;
}

.instruction-icon {
    font-size: 16px;
}

.instruction-text {
    line-height: 1.4;
}

.instruction-text strong {
    color: #4CAF50;
}

@keyframes fadeInInstructions {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mode normal : taille personnalisée, pas de zoom */
#svgContainer {
    width: 20vw;      /* ⬅️ Taille que vous voulez */
    height: 50vh;     /* ⬅️ Taille que vous voulez */
    margin: 20px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    cursor: default;  /* ⬅️ Pas de curseur grab en mode normal */
    border: 1px solid black;
    background-color: white;
    transition: none; /* Pas d'animation en mode normal */
}

/* Mode plein écran : zoom activé */
#svgContainer.expanded {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    margin: 0;
    z-index: 9999;
    cursor: grab;     /* ⬅️ Curseur grab en mode plein écran */
    border: none;
}

#svgContainer.expanded.dragging {
    cursor: grabbing;
}

/* Wrapper du SVG */
.svg-wrapper {
    transform-origin: 0 0;
    position: relative;
    width: 100%;
    height: 100%;
    transition: none;  /* Pas d'animation sur le wrapper */
}

/* Le SVG s'adapte au wrapper */
.svg-wrapper svg {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain;
}


/* Bouton d'expansion style Google Maps */
.map-expand-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 2px;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
	display: flex !important;
}

.map-expand-btn:hover {
    background: #f5f5f5;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.map-expand-btn:active {
    background: #e8e8e8;
}

/* Icône dans le bouton */
.map-expand-btn .expand-icon {
    display: block;
    width: 18px;
    height: 18px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* SVG pour l'icône "expand" (4 flèches vers l'extérieur) */
.map-expand-btn.collapsed .expand-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666'%3E%3Cpath d='M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z'/%3E%3C/svg%3E");
}

/* SVG pour l'icône "collapse" (4 flèches vers l'intérieur) */
.map-expand-btn.expanded .expand-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666'%3E%3Cpath d='M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z'/%3E%3C/svg%3E");
}

/* Tooltip au survol */
.map-expand-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 12px;
    white-space: nowrap;
    border-radius: 2px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.map-expand-btn:hover::before {
    opacity: 1;
}

/* Boutons de zoom pour mobile */
.mobile-zoom-controls {
    display: none;
    position: absolute;
    top: 10px;
    right: 10px;
    flex-direction: column;
    gap: 8px;
    z-index: 100;
}

.mobile-zoom-btn {
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    font-size: 20px;
    font-weight: bold;
    color: #666;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.mobile-zoom-btn:active {
    background: #e8e8e8;
    transform: scale(0.95);
}

/* Bouton reset spécifiquement au centre gauche */
#mobileResetBtn {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
	display: none;
}

#mobileResetBtn:active {
    transform: translateY(-50%) scale(0.95);
}

#svgContainer.expanded #mobileResetBtn{
        display: flex !important;
		z-index:9999;
    }

/* Instructions tactiles pour mobile */
.touch-instructions {
    display: none;
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 11px;
    z-index: 1000;
    pointer-events: none;
}

/* Désactiver le zoom natif du navigateur sur le SVG */
#svgContainer {
    touch-action: none; /* Très important pour éviter les conflits */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.svg-wrapper {
    pointer-events: auto;
    touch-action: none; /* Également sur le wrapper */
}

/* S'assurer que le SVG ne bloque pas les events */
.svg-wrapper svg {
    pointer-events: none;
    touch-action: none;
}

/* === MASQUER CONTRÔLES EN MODE NORMAL === */

/* Masquer tous les contrôles sauf le bouton expand */
#svgContainer:not(.expanded) .svg-instructions,
#svgContainer:not(.expanded) .touch-instructions,
#svgContainer:not(.expanded) .mobile-zoom-controls {
    display: none !important;
}

/* === MESSAGE "AGRANDIR POUR ZOOMER" === */

/* Style du message */
.zoom-hint {
    position: absolute;
    top: 10px; /* Au-dessus du bouton expand */
    left: 70px;
    background: rgba(76, 175, 80, 0.95);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-family: 'Patrick Hand', cursive;
    font-size: 13px;
    z-index: 100;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Flèche vers la droite */
.zoom-hint::after {
    content: '';
    position: absolute;
    left: -8px; /* Pointe vers la droite */
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid rgba(76, 175, 80, 0.95); /* Flèche vers la droite */
}

/* Masquer en mode plein écran */
#svgContainer.expanded .zoom-hint {
    display: none;
}

/* Sidebar fixe */
.home-sidebar {
    grid-area: sidebar;
    background: rgba(0, 0, 0, 0.4);
    padding: 20px;
    overflow-y: auto;
    border-right: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 280px;
    z-index: 1000;
    height: 100vh;
}

.home-sidebar h3 {
    font-family: 'Permanent Marker', cursive;
    color: #4CAF50;
    margin: 0 0 20px 0;
    font-size: 1.5rem;
    text-align: center;
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, 0.4);
    padding: 10px 0;
    z-index: 10;
}

/* Item de catégorie */
.category-item {
    margin-bottom: 5px;
}

/* Toggle de catégorie */
.category-toggle {
    font-family: 'Patrick Hand', cursive;
    color: white;
    text-decoration: none;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.category-toggle:hover {
    background: rgba(76, 175, 80, 0.3);
    transform: translateX(5px);
    border-left-width: 6px;
}

.toggle-icon {
    font-size: 0.8em;
    transition: transform 0.3s ease;
    display: inline-block;
}

.category-toggle.expanded .toggle-icon {
    transform: rotate(90deg);
}

/* Liste des pages */
.category-pages {
    display: none;
    flex-direction: column;
    gap: 3px;
    padding: 5px 0 10px 0;
    margin-left: 15px;
    border-left: 2px solid rgba(76, 175, 80, 0.3);
}

.category-pages.show {
    display: flex;
}

.page-item {
    font-family: 'Patrick Hand', cursive;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    display: block;
}

.page-item:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #4CAF50;
    transform: translateX(5px);
}

/* Ajustement du contenu principal pour compenser la sidebar fixe */
.home-page {
    grid-template-columns: 280px 1fr;
}

/* Décaler uniquement le header de la page d'accueil */
.home-page .home-header {
    margin-left: 280px;
}

/* Décaler uniquement le footer de la page d'accueil */
.home-page .home-footer {
    margin-left: 280px;
}

/* Lien Accueil en haut du menu */
.home-link {
    font-family: 'Patrick Hand', cursive;
    color: white;
    text-decoration: none;
    padding: 12px 15px;
    background: rgba(255, 165, 0, 0.2);
    border-radius: 8px;
    border-left: 4px solid orange;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    display: block;
    margin-bottom: 15px;
    text-align: center;
    font-weight: bold;
}

.home-link:hover {
    background: rgba(255, 165, 0, 0.4);
    transform: translateX(5px);
    border-left-width: 6px;
}

/* Header rouge quand connecté */
.logged-in .home-header,
.logged-in .viewer-header {
    background: linear-gradient(135deg, #c72c41 0%, #801336 100%) !important;
}

/* ==========================================
   RESPONSIVE MOBILE - BLOC UNIQUE
   ========================================== */
@media screen and (max-width: 768px) {
    /* === MENU HAMBURGER === */
    .hamburger-btn {
        display: block;
    }
    
    /* === SIDEBAR MOBILE === */
    .home-sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100%;
        z-index: 1999;
        transition: left 0.3s ease;
        background: rgba(0, 0, 0, 0.9);
        backdrop-filter: blur(10px);
        padding-top: 60px;
    }
    
    .home-sidebar.active {
        left: 0;
    }
    
    /* === HEADERS === */
    .home-header h1, 
    .viewer-header h1 {
        padding-left: 50px;
        font-size: 1.5rem;
    }
    
    .home-header .subtitle {
        font-size: 1rem;
        padding-left: 50px;
    }
    
    .viewer-header {
        padding: 10px 20px;
    }
    
    .viewer-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .viewer-header h1 {
        font-size: 1.4rem;
    }
    
    .breadcrumb {
        font-size: 1.1rem;
        flex-wrap: wrap;
        padding-left: 0;
    }
    
    .breadcrumb .page-title {
        font-size: 1rem;
    }
    
    /* === PAGE D'ACCUEIL === */
    .home-page {
        grid-template-areas: 
            "header"
            "main"
            "footer";
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
    }
    
    .home-page .home-header,
    .home-page .home-footer {
        margin-left: 0;
    }
    
    .home-main {
        padding: 10px;
        margin-left: 0;
		overflow-x: hidden;
    }
    
    .home-content {
        padding: 20px;
        margin: 20px;
    }
    
    .home-content h1,
    .home-content h3 {
        font-size: 2rem;
    }
    
    .home-features {
        grid-template-columns: 1fr;
    }
    
    /* === PAGE CATÉGORIE === */
    .category-page-title {
        font-size: 1.8rem;
    }
    
    .category-pages-grid {
        grid-template-columns: 1fr;
    }
    
    /* === NAVIGATION === */
    .nav-buttons-container {
        gap: 20px;
        padding: 20px 0;
    }
    
    .nav-button {
        padding: 10px 20px;
        min-width: 100px;
        font-size: 14px;
    }
    
    .nav-arrow {
        font-size: 20px;
    }
    
    /* === ZOOM CONTROLS === */
    .zoom-controls {
        gap: 5px;
        margin-left: 8px;
        padding-left: 8px;
    }
    
    button {
        padding: 6px 8px;
        font-size: 11px;
    }
    
    /* === SVG CONTAINER === */
    #svgContainer {
        width: 90vw;
    }
    
    #svgContainer.expanded {
        width: 100vw;
    }
    
    .map-expand-btn {
        top: 10px;
        left: 10px;
        bottom: auto;
        right: auto;
    }
    
    .map-expand-btn .expand-icon {
        width: 16px;
        height: 16px;
    }
    
    /* === INSTRUCTIONS SVG === */
    .svg-instructions {
        display: none;
    }
    
    .touch-instructions {
        display: block;
        font-size: 11px;
        padding: 6px 10px;
    }
    
    /* === COLONNES === */
    .columns {
        flex-direction: column;
        gap: 10px;
    }
}

/* === DÉTECTION TACTILE (tablettes) === */
@media (max-width: 968px), (pointer: coarse) {
    .mobile-zoom-controls {
        display: flex;
    }
    
    .svg-instructions {
        display: none;
    }
    
    .touch-instructions {
        display: block;
    }
}