/* Correctif fond fixe pour iOS - même que consultation.html et fiches-pedagogiques.html */
        body {
            font-family: 'Inter', sans-serif;
            background: linear-gradient(to bottom, 
                #4a90e2 0%, 
                #357abd 40%, 
                #2c7cc4 65%, 
                #f8faff 65%, 
                #f8faff 100%);
            background-repeat: no-repeat;
            background-size: 100% 100vh;
            min-height: 100vh;
            color: #333;
            overflow-x: hidden;
        }

        /* Fix pour iOS Safari */
        @supports (-webkit-touch-callout: none) {
            body {
                background-attachment: scroll;
                position: relative;
            }
            
            body::before {
                content: '';
                position: fixed;
                top: 0;
                left: 0;
                width: 100%;
                height: 100vh;
                background: linear-gradient(to bottom, 
                    #4a90e2 0%, 
                    #357abd 40%, 
                    #2c7cc4 65%, 
                    #f8faff 65%, 
                    #f8faff 100%);
                z-index: -1;
                pointer-events: none;
            }
        }

        /* Pour les autres navigateurs */
        @supports not (-webkit-touch-callout: none) {
            body {
                background-attachment: fixed;
            }
        }

        /* Correction spécifique pour le header fixe sur iOS */
        .nav-header {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 1000;
            
            /* Corrections pour iOS Safari */
            -webkit-transform: translateZ(0);
            transform: translateZ(0);
            -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
            
            /* Force le hardware acceleration */
            will-change: transform;
            
            /* Empêche le header de bouger avec la barre d'adresse */
            position: -webkit-sticky;
            position: sticky;
			padding:0;
		}
		
        .nav-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            color: #4a90e2;
            font-size: 1.5rem;
            font-weight: 700;
            text-decoration: none;
        }

        .back-button {
            color: #4a90e2;
            background: rgba(255, 255, 255, 0.2);
            padding: 10px;
            border-radius: 8px;
            margin-left: 10px;
            text-decoration: none;
            transition: all 0.3s ease;
			border: 1px solid #4a90e2;
        }

        .back-button:hover {
            background: rgba(255, 255, 255, 0.3);
        }
		
		@media (max-width: 768px) {		
			
            .nav-container {
                padding: 0 15px;
            }

            .logo {
                font-size: 1.3rem;
            }

            .back-button {
                padding: 8px;
                margin-left: 8px;
            }
		}
        
        /* Alternative avec position absolute pour iOS si sticky ne fonctionne pas */
        @supports (-webkit-touch-callout: none) {
            .nav-header {
                position: absolute;
                position: fixed;
                top: env(safe-area-inset-top, 0);
            }
        }
        
        /* Spécifique pour iOS Safari */
        @media screen and (-webkit-min-device-pixel-ratio: 1) {
            .nav-header {
                position: -webkit-sticky;
                position: sticky;
                top: env(safe-area-inset-top, 0);
                
                /* Force la création d'un nouveau stacking context */
                isolation: isolate;
                
                /* Empêche les glitches visuels */
                -webkit-transform: translate3d(0, 0, 0);
                transform: translate3d(0, 0, 0);
            }
        }
        
        /* Pour les appareils avec encoche (iPhone X et plus récents) */
        @supports (padding: max(0px)) {
            .nav-header {
                padding-top: env(safe-area-inset-top);
                top: 0;
            }
        }
        
        /* Container du header */
        .nav-container {
            background: var(--header-bg, #fff);
            padding: 1rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        /* Ajustement du contenu pour compenser le header fixe */
        body {
            padding-top: 0px; /* Ajustez selon la hauteur de votre header */
        }
        
        /* Pour iPhone avec Dynamic Island */
        @media screen and (min-width: 393px) and (max-width: 430px) and (-webkit-device-pixel-ratio: 3) {
            .nav-header {
                top: env(safe-area-inset-top, 0);
            }
        }
        
        /* Fallback pour les anciens iOS */
        @media screen and (max-device-width: 768px) and (-webkit-min-device-pixel-ratio: 1) {
            html {
                -webkit-text-size-adjust: 100%;
                -ms-text-size-adjust: 100%;
            }
            
            body {
                -webkit-overflow-scrolling: touch;
                overflow-scrolling: touch;
            }
            
            .nav-header {
                /* Force la position fixe même sur les anciens iOS */
                position: fixed !important;
                -webkit-transform: translateZ(0);
                transform: translateZ(0);
            }
        }
        
        /* Animation smooth pour éviter les saccades */
        .nav-header {
            transition: none; /* Pas de transition sur le header fixe */
        }
        
        
        /* Fix pour le contenu principal */
        .header {
            margin-top: 2rem;
        }
		
		/* Section de recherche améliorée */
		.search-section {
			max-width: 1200px;
			margin: 30px auto;
			animation: fadeIn 0.5s ease-out;
		}

		.search-container {
			background: rgba(255, 255, 255, 0.95);
			border-radius: 20px;
			padding: 0;
			box-shadow: 0 10px 30px rgba(0,0,0,0.1);
			backdrop-filter: blur(10px);
			overflow: hidden;
		}

		/* Onglets de recherche */
		.search-tabs {
			display: flex;
			background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
			border-radius: 20px 20px 0 0;
		}

		.search-tab {
			flex: 1;
			padding: 18px;
			background: transparent;
			border: none;
			color: rgba(255, 255, 255, 0.7);
			font-size: 16px;
			font-weight: 600;
			cursor: pointer;
			transition: all 0.3s ease;
			position: relative;
		}

		.search-tab.active {
			color: white;
			background: rgba(255, 255, 255, 0.1);
		}

		.search-tab:hover:not(.active) {
			background: rgba(255, 255, 255, 0.05);
			color: white;
		}

		.search-tab i {
			margin-right: 8px;
		}

		/* Corps de la recherche */
		.search-body {
			padding: 30px;
		}

		.search-panel {
			display: none;
			animation: fadeIn 0.3s ease-out;
		}

		.search-panel.active {
			display: block;
		}

		/* Style unifié pour les contrôles */
		.search-input-group {
			display: flex;
			gap: 12px;
			align-items: stretch;
		}

		.search-select,
		.search-input {
			flex: 1;
			padding: 14px 18px;
			border: 2px solid #e0e0e0;
			border-radius: 12px;
			font-size: 15px;
			background: white;
			transition: all 0.3s ease;
		}

		.search-select:focus,
		.search-input:focus {
			outline: none;
			border-color: #4a90e2;
			box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.1);
		}

		.search-btn {
			padding: 14px 28px;
			background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
			color: white;
			border: none;
			border-radius: 12px;
			font-size: 15px;
			font-weight: 600;
			cursor: pointer;
			transition: all 0.3s ease;
			white-space: nowrap;
			display: flex;
			align-items: center;
			gap: 8px;
		}

		.search-btn:hover {
			transform: translateY(-2px);
			box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
		}

		.search-btn:active {
			transform: translateY(0);
		}

		/* Label moderne */
		.search-label {
			display: block;
			color: #666;
			font-size: 14px;
			font-weight: 500;
			margin-bottom: 12px;
		}

		/* Résultats de recherche */
		.search-results {
			margin-top: 30px;
			padding: 25px;
			background: #f8f9fa;
			border-radius: 15px;
			animation: slideDown 0.3s ease-out;
		}

		@keyframes slideDown {
			from {
				opacity: 0;
				transform: translateY(-20px);
			}
			to {
				opacity: 1;
				transform: translateY(0);
			}
		}

		@keyframes fadeIn {
			from {
				opacity: 0;
			}
			to {
				opacity: 1;
			}
		}

		.results-header {
			display: flex;
			justify-content: space-between;
			align-items: center;
			margin-bottom: 20px;
			padding-bottom: 15px;
			border-bottom: 2px solid #e0e0e0;
		}

		.results-header h3 {
			color: #333;
			margin: 0;
			font-size: 20px;
		}

		.clear-btn {
			padding: 8px 16px;
			background: #dc3545;
			color: white;
			border: none;
			border-radius: 8px;
			cursor: pointer;
			font-size: 14px;
			transition: all 0.3s ease;
			display: flex;
			align-items: center;
			gap: 6px;
		}

		.clear-btn:hover {
			background: #c82333;
			transform: translateY(-1px);
			box-shadow: 0 3px 10px rgba(220, 53, 69, 0.3);
		}

		.results-container {
			max-height: 500px;
			overflow-y: auto;
			padding-right: 10px;
		}

		/* Scrollbar personnalisée */
		.results-container::-webkit-scrollbar {
			width: 8px;
		}

		.results-container::-webkit-scrollbar-track {
			background: #f1f1f1;
			border-radius: 10px;
		}

		.results-container::-webkit-scrollbar-thumb {
			background: #4a90e2;
			border-radius: 10px;
		}

		.results-container::-webkit-scrollbar-thumb:hover {
			background: #357abd;
		}

		/* Carte de résultat */
		.result-card {
			background: white;
			border-radius: 12px;
			padding: 20px;
			margin-bottom: 15px;
			border: 1px solid #e0e0e0;
			transition: all 0.3s ease;
			cursor: pointer;
		}

		.result-card:hover {
			transform: translateX(5px);
			box-shadow: 0 5px 20px rgba(0,0,0,0.1);
			border-color: #4a90e2;
		}

		.result-title {
			color: #4a90e2;
			font-size: 18px;
			font-weight: 600;
			margin-bottom: 10px;
		}

		.result-excerpt {
			color: #666;
			line-height: 1.6;
			margin-bottom: 10px;
		}

		/* Surlignage des mots trouvés */
		.highlight {
			background: linear-gradient(120deg, #ffd700 0%, #ffed4e 100%);
			padding: 2px 4px;
			border-radius: 3px;
			font-weight: 600;
			box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.3);
			animation: pulse-highlight 1s ease-in-out;
		}

		@keyframes pulse-highlight {
			0% { transform: scale(1); }
			50% { transform: scale(1.05); }
			100% { transform: scale(1); }
		}

		.result-meta {
			display: flex;
			justify-content: space-between;
			align-items: center;
			margin-top: 15px;
			padding-top: 10px;
			border-top: 1px solid #f0f0f0;
		}

		.result-regime {
			display: inline-block;
			padding: 4px 10px;
			background: #e7f3ff;
			color: #4a90e2;
			border-radius: 15px;
			font-size: 12px;
			font-weight: 600;
		}

		.result-link {
			color: #4a90e2;
			text-decoration: none;
			font-weight: 600;
			font-size: 14px;
			display: inline-flex;
			align-items: center;
			gap: 5px;
		}

		.result-link:hover {
			text-decoration: underline;
		}

		/* Message d'information */
		.search-info {
			display: flex;
			align-items: center;
			gap: 10px;
			padding: 12px 16px;
			background: #e7f3ff;
			border-radius: 10px;
			margin-top: 15px;
			color: #4a90e2;
			font-size: 14px;
		}

		.search-info i {
			font-size: 18px;
		}

		/* Responsive */
		@media (max-width: 768px) {

			.search-body {
				padding: 20px;
			}

			.search-tabs {
				flex-direction: row; /* Garder en ligne horizontale */
			}

			.search-tab {
				padding: 14px 10px;
				font-size: 14px;
			}
			
			/* Simplifier le texte en mobile mais le garder visible */
			.search-tab span {
				display: inline; /* Garder le texte visible */
			}
			
			.search-tab i {
				margin-right: 5px;
				font-size: 16px;
			}

			.search-input-group {
				flex-direction: column;
			}
			
			.search-btn {
				width: 100%;
				justify-content: center;
			}

			.results-header {
				flex-direction: column;
				gap: 15px;
				align-items: flex-start;
			}

			.clear-btn {
				align-self: flex-end;
			}
		}

		@media (max-width: 480px) {
			/* Sur très petit écran, texte simplifié */
			.search-tab {
				padding: 12px 8px;
				font-size: 13px;
			}
			
			.search-tab span {
				display: inline;
			}
			
			/* Remplacer le texte par une version courte */
			.search-tab[data-tab="select"] span::after {
				content: "Liste";
			}
			.search-tab[data-tab="select"] span {
				font-size: 0;
			}
			.search-tab[data-tab="select"] span::after {
				font-size: 13px;
			}
			
			.search-tab[data-tab="keyword"] span::after {
				content: "Mots-clés";
			}
			.search-tab[data-tab="keyword"] span {
				font-size: 0;
			}
			.search-tab[data-tab="keyword"] span::after {
				font-size: 13px;
			}
			
			.search-tab i {
				font-size: 18px;
				margin-right: 4px;
			}
		}

		/* Spinner de chargement */
		.spinner {
			width: 40px;
			height: 40px;
			border: 4px solid rgba(74, 144, 226, 0.2);
			border-top-color: #4a90e2;
			border-radius: 50%;
			animation: spin 0.8s linear infinite;
			margin: 0 auto;
		}

		@keyframes spin {
			to { transform: rotate(360deg); }
		}

		/* Animation pour les cartes mises en évidence */
		@keyframes highlight-card {
			0% { transform: scale(1); }
			50% { transform: scale(1.02); box-shadow: 0 10px 30px rgba(74, 144, 226, 0.3); }
			100% { transform: scale(1); }
		}