/* ==========================================================================
   1. CONFIGURATION GÉNÉRALE & RESET
   ========================================================================== */

html {
    scroll-behavior: smooth;
    /* Décalage pour compenser le header fixe lors du clic sur une ancre */
    scroll-padding-top: 100px; 
}

body {
    margin: 0;
    padding: 0;
    background-color: #000; /* Fond par défaut */
    color: #fff;
    font-family: 'Inter', sans-serif;
    transition: background-color 0.8s ease; /* Transition douce pour le changement de fond au scroll */
    overflow-x: hidden;
    antialiased: tracking;
}

/* On cible tous les éléments qui ont un ID pour le scroll-margin (confort de lecture) */
[id] {
    scroll-margin-top: 100px;
}

/* Gestion de la barre de défilement */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #000;
}
::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #E50914; /* Couleur primaire au survol */
}

/* Gestion dea arrondis des cartes */
/* Surcharge globale pour toutes les cartes du site */
.rounded-3xl, 
.rounded-2xl, 
.rounded-xl,
.bg-zinc-900\/40, /* Cible vos blocs de logo */
.aspect-video {
    border-radius: var(--card-radius) !important;
}

/* On s'assure que les images à l'intérieur suivent aussi */
.overflow-hidden {
    border-radius: var(--card-radius) !important;
}

/* ==========================================================================
   2. TYPOGRAPHIE ET STYLES DE TEXTES (HIÉRARCHIE)
   ========================================================================== */

/* --- TITRES DE SECTIONS --- */
.section-title {
    font-size: 2.25rem; /* text-4xl */
    font-weight: 700;    /* font-black dft:900 */
    letter-spacing: 0.25em; /* tracking-tighter dft:-0.05em */
	text-transform: uppercase;
	font-family:  var(--titre-typo-client) !important;
		/* On ne met pas de white-space ici pour laisser le HTML (Tailwind) décider */
		display: block;
		line-height: 1.3;
	}

	/* Sur mobile, on s'assure que si le texte doit couper, il le fait proprement */
	@media (max-width: 768px) {
		.section-title {
			font-size: 1.5rem !important;
			white-space: normal !important; /* Force le retour à la ligne sur mobile */
			word-wrap: break-word;
		}
	}

/* --- SOUS-TITRES ET DESCRIPTIONS --- */
.section-description {
    font-size: 0.975rem; /* text-sm dft:0.875*/
    font-weight: 500;    /* font-medium */
    line-height: 1.625;
	letter-spacing: 0.1em;
   /* max-width: 32rem;*/     /* max-w-lg */
}

/* --- TITRES DE CARTES (Logos, Couleurs, etc.) --- */
.card-title {
    font-size: 0.625rem; /* text-[10px] dft:0.625*/
    font-weight: 700;    /* font-bold */
    text-transform: uppercase;
    letter-spacing: 0.2em; /* tracking-[0.2em] */
}

/* --- LABELS TECHNIQUES (Valeurs Hex, RGB, CMJN) --- */
.tech-label {
    font-family: 'Inter', monospace;
    font-size: 1.2rem;  /* text-xs dft:0.75 */
    font-weight: 500;
}

/* --- LABELS D'ÉTAT (AUTORISÉ / INTERDIT) --- */
.status-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- TITRE DE LA RÈGLE (ex: "Distorsion") --- */
.rule-title {
    font-size: 16px;
    font-weight: 700;
    margin-top: 0.75rem;
}

/* --- DESCRIPTION DE LA RÈGLE (ex: "Ne pas déformer...") --- */
.rule-description {
    font-size: 12px;
    line-height: 1.5;
    opacity: 0.7;
}

/* --- SPÉCIFIQUE CARTES DE COULEURS --- */

/* Nom de la couleur (ex: PEACOCK TEAL) */
.color-name {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

/* Bloc des codes techniques (HEX, RVB, CMJN) */
.color-codes {
    font-family: 'Inter', monospace; /* Police plus technique */
    font-size: 11px;
    line-height: 1.8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

/* Libellé du pourcentage dans les teintes (ex: 50%) */
.tint-label {
    font-size: 10px;
    font-weight: 700;
    opacity: 0.7;
}

/* Support du clic pour la copie */
.copy-hint {
    cursor: pointer;
    transition: opacity 0.2s;
}
.copy-hint:hover {
    text-decoration: underline;
    opacity: 1;
}

/* --- SPÉCIFIQUE TYPOGRAPHIE --- */
.section-title-typo {
    font-size: 2.25rem; /* text-4xl */
    font-weight: 700;    /* font-black dft:900 */
    letter-spacing: 0.25em; /* tracking-tighter dft:-0.05em */
	text-transform: uppercase;
		/* On ne met pas de white-space ici pour laisser le HTML (Tailwind) décider */
		display: block;
		line-height: 1.3;
	}

	/* Sur mobile, on s'assure que si le texte doit couper, il le fait proprement */
	@media (max-width: 768px) {
		.section-title-typo {
			font-size: 1.5rem !important;
			white-space: normal !important; /* Force le retour à la ligne sur mobile */
			word-wrap: break-word;
		}
	}
	
/* --- SPÉCIFIQUE OVERLAY ICONOGRAPHIE --- */

/* Titre de la photo au survol (ex: Ours) */
.icono-hover-title {
    font-size: 1.25rem; /* text-xl */
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    /* Animation pour l'apparition au survol */
    transform: translateY(10px);
    transition: transform 0.4s ease-out;
}

/* On anime le titre quand la carte est survolée */
.group:hover .icono-hover-title {
    transform: translateY(0);
}

/* Copyright en dessous (ex: © Inuksuk 2026) */
.icono-hover-copyright {
    font-size: 10px;
    font-weight: 600;
    font-style: italic;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.6); /* Blanc translucide */
    margin-top: 4px;
    /* Légère animation de retard par rapport au titre */
    transform: translateY(10px);
    transition: transform 0.5s ease-out;
}

.group:hover .icono-hover-copyright {
    transform: translateY(0);
}

/* --- GESTION DU CONTRASTE DYNAMIQUE --- */

/* Cas 1 : Textes sur FOND FONCÉ (Par défaut) */
.text-on-dark .section-title { color: #ffffff; }
.text-on-dark .section-description { color: #9ca3af; } /* text-gray-400 */
.text-on-dark .card-title { color: #ffffff; }
.text-on-dark .tech-label { color: #6b7280; } /* text-gray-500 */
.text-on-dark .rule-title { color: #ffffff; } /* pour do/dont */
.text-on-dark .rule-description { color: #9ca3af; }

/* Cas 2 : Textes sur FOND CLAIR */
.text-on-light .section-title { color: #000000; }
.text-on-light .section-description { color: #4b5563; } /* text-gray-600 */
.text-on-light .card-title { color: #000000; }
.text-on-light .tech-label { color: #9ca3af; } /* text-gray-400 */
.text-on-light .rule-title { color: #000000; } /* pour do/dont */
.text-on-light .rule-description { color: #4b5563; }

/* ==========================================================================
   3. HEADER & NAVIGATION (Z-INDEX & EFFETS)
   ========================================================================== */

/* Gestion des profondeurs (On conserve le z-index élevé) */
header, #main-sidebar {
    z-index: 9999 !important;
}

/* --- SIDEBAR NAVIGATION (ISOLÉ) --- */

/* Style de base des liens */
#main-sidebar nav a {
    position: relative;
    transition: all 0.3s ease;
    opacity: 0.7; /* Légèrement plus visible par défaut */
    color: var(--menu-text-default, #9ca3af) !important;
    display: block;
}

/* Effet au survol (Roll-over) */
#main-sidebar nav a:hover {
    opacity: 1 !important;
    color: var(--menu-text-active, #ffffff) !important;
    transform: translateX(5px);
}

/* État ACTIF (Lien sélectionné) */
#main-sidebar nav a.active {
    opacity: 1 !important;
    color: var(--menu-text-active, #ffffff) !important;
    font-weight: 700;
}

/* La Barre d'accentuation (Indicateur géré par PHP) */
#main-sidebar nav a.active::before {
    content: "";
    position: absolute;
    left: -25px; /* Ajustez selon votre layout */
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    /* Utilisation de la variable accent centralisée */
    background-color: var(--accent-color, #E50914) !important;
    border-radius: 4px;
    transition: background-color 0.5s ease;
    display: block !important;
}

/* ==========================================================================
   4. COMPOSANTS INTERFACE (CARTES, IMAGES, LIGHTBOX)
   ========================================================================== */

/* Cartes avec effet de flou */
.bg-zinc-900\/50 {
    backdrop-filter: blur(10px);
}

/* Transition et ombre portée pour les visuels (Logos/Pictos) */
.group img {
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.2));
    will-change: transform;
}

/* Lightbox : Doit dominer absolument tout l'écran */
#custom-lightbox {
    z-index: 999999 !important; 
    position: fixed !important;
    inset: 0 !important;
}

/* ==========================================================================
   5. MENU MOBILE & ANIMATIONS (UNIFORMISÉ)
   ========================================================================== */

#mobile-menu-overlay {
    will-change: transform;
    backface-visibility: hidden;
    /* On garde la transition du panneau lui-même s'il glisse */
    transition: transform 0.4s ease-in-out; 
}

/* On supprime l'animation individuelle des liens */
.mobile-nav-link {
    opacity: 1 !important;
    transform: none !important;
    /* On retire toute animation ou délai résiduel */
    animation: none !important;
    transition: color 0.3s ease; 
}

/* On neutralise explicitement les délais de cascade précédents */
#mobile-menu-overlay:not(.translate-x-full) .mobile-nav-link:nth-child(n) {
    animation-delay: 0s !important;
    opacity: 1 !important;
    transform: none !important;
}

/* ==========================================================================
   6. STYLES DÉDIÉS À LA PAGE D'ERREUR (error.php)
   ========================================================================== */

.error-page-body {
    background-color: #000000;
}

.error-page-code {
    font-size: 12vw;
    color: #ffffff;
    user-select: none;
}

.error-page-title {
    color: #ffffff;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.error-page-message {
    color: #9ca3af;
}

.error-page-button {
    background-color: #ffffff;
    color: #000000;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    display: inline-block;
}

.error-page-button:hover {
    background-color: #f3f4f6;
}

@media (max-width: 768px) {
    .error-page-code {
        font-size: 20vw;
        margin-bottom: 2rem;
    }
}

/* ==========================================================================
   7. STYLES PAGE LOGIN
   ========================================================================== */

/* Style des paragraphes (P) du login */
.login-box p {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Taille logo*/
.w-logo {
    width: 50%;
}
.shadow-logo {
    /*--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    --tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);
    box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);*/
}

/* ==========================================================================
   8. STYLES OBSOLÈTES OU POTENTIELLEMENT INUTILES
   ========================================================================== */

/* .bg-overlay : Était utilisé pour un dégradé fixe en fond, 
   conflit potentiel avec le changement de couleur de fond géré par le JS.
*/
/*
.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    transition: background 1s ease;
    background: radial-gradient(circle at top right, #1a1a1a, #000);
}
*/

/* Doublon de scroll-behavior dans html. 
   Doublon de margin/padding 0 dans body (déjà géré en haut).
   Doublon de z-index lightbox (consolidé en haut).
*/