/* ========================================================
   1. SOCLE COMMUN (Couleurs & Design global)
   S'applique au Mobile ET à l'Ordinateur
   ======================================================== */
:root {
    --rs-primary: #fc4c02;
    --rs-primary-dark: #e34002;
    --rs-dark: #1e293b;
    --rs-gray: #64748b;
    --rs-light: #f1f5f9;
    --rs-success: #16a34a;
    --rs-radius: 12px;
    --rs-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

/* Reset de sécurité pour éviter les débordements */
.rs-dashboard-wrapper, .rs-container, .rs-team-dashboard {
    box-sizing: border-box;
    width: 100%;
}
.rs-dashboard-wrapper *, .rs-container *, .rs-team-dashboard * {
    box-sizing: border-box;
}

/* --- WIDGET CHALLENGE (Design) --- */
.rs-challenge-card {
    background: white; border: 1px solid #e2e8f0; border-radius: var(--rs-radius);
    padding: 20px; margin-bottom: 30px; box-shadow: var(--rs-shadow);
    position: relative; overflow: hidden;
}
.rs-challenge-card.completed { border-color: #fbbf24; background: linear-gradient(to bottom, #ffffff, #fffbeb); }
.rs-challenge-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 15px; }
.rs-challenge-badge { font-size: 0.75em; font-weight: bold; padding: 4px 10px; border-radius: 20px; background: var(--rs-light); color: var(--rs-gray); white-space: nowrap; margin-left:10px; }
.completed .rs-challenge-badge { background: var(--rs-success); color: white; }
.rs-progress-track { height: 10px; background: var(--rs-light); border-radius: 10px; overflow: hidden; margin-top:5px; }
.rs-progress-fill { height: 100%; background: var(--rs-primary); border-radius: 10px; transition: width 1s ease-in-out; }
.completed .rs-progress-fill { background: var(--rs-success); }
.rs-challenge-reward { margin-top: 15px; padding: 10px; background: #ecfdf5; border: 1px dashed #10b981; border-radius: 8px; display: flex; gap: 15px; align-items: center; }

/* --- WIDGET SÉRIES / FLAMME (Design) --- */
.rs-streak-box { position: relative; transition: transform 0.2s; }
.rs-streak-box.rs-fire-on { border: 1px solid #fdba74; background: linear-gradient(to bottom, #fff, #fff7ed); }
.rs-streak-box.rs-fire-on h3 { color: #ea580c; }
.rs-streak-box.rs-fire-off { opacity: 0.8; filter: grayscale(100%); }
.rs-fire-on .rs-fire-anim { display: inline-block; animation: rsPulseFire 1.5s infinite ease-in-out; }
@keyframes rsPulseFire {
    0% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(252, 76, 2, 0)); }
    50% { transform: scale(1.2); filter: drop-shadow(0 0 10px rgba(252, 76, 2, 0.4)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(252, 76, 2, 0)); }
}
.rs-tooltip { display: none; position: absolute; bottom: -30px; left: 50%; transform: translateX(-50%); background: #334155; color: white; padding: 4px 8px; border-radius: 4px; font-size: 0.7em; white-space: nowrap; z-index: 10; }
.rs-streak-box:hover .rs-tooltip { display: block; }

/* --- BOUTONS & INPUTS (Global) --- */
.button, button[type="submit"], .rs-btn {
    cursor: pointer; font-weight: 600; border-radius: 50px; transition: transform 0.1s;
}
.button:active { transform: scale(0.98); }


/* ========================================================
   2. VERSION ORDINATEUR (DESKTOP)
   On force la grille à 4 colonnes ici pour ne pas casser l'existant
   ======================================================== */
@media (min-width: 769px) {
    .rs-stat-row {
        display: grid;
        grid-template-columns: repeat(4, 1fr); /* 4 Colonnes strictes */
        gap: 20px;
        margin-bottom: 30px;
    }
    
    .rs-content-split {
        display: flex;
        flex-direction: row; /* Côte à côte */
        gap: 40px;
    }

    .rs-col-podium { flex: 1; }
    .rs-col-chat { flex: 1.5; }

    /* On s'assure que les tableaux s'affichent en entier */
    .mobile-hide { display: table-cell !important; }
}


/* ========================================================
   3. VERSION MOBILE (SMARTPHONE)
   Ces règles ne s'activent QUE sur les petits écrans (< 768px)
   ======================================================== */
@media (max-width: 768px) {
	/* ========================================================
   CUSTOMISATION MENU TWENTY TWENTY-FIVE (MOBILE)
   ======================================================== */

	/* 1. Le Conteneur principal (L'écran qui s'ouvre) */
	.wp-block-navigation__responsive-container.is-menu-open {
		background-color: #1e293b !important; /* Votre Bleu Nuit */
		width: 100% !important;  /* 100% largeur */
		height: 100vh !important; /* 100% hauteur */
		top: 0 !important;
		left: 0 !important;
		padding-top: 20vh !important; /* On descend un peu le texte */
	}
	
	.wp-block-navigation__responsive-container.is-menu-open {
		padding:0 !important;
	}

	/* 2. Les Liens du menu */
	.wp-block-navigation__responsive-container .wp-block-navigation-item__content {
		color: #ffffff !important; /* Texte Blanc */
		font-size: 1.8rem !important; /* Gros texte */
		font-weight: 700 !important;
		text-align: center !important;
		display: block !important;
		margin-bottom: 15px !important;
		transition: transform 0.2s, color 0.2s;
	}

	/* Effet au survol (si on touche) */
	.wp-block-navigation__responsive-container .wp-block-navigation-item__content:hover,
	.wp-block-navigation__responsive-container .wp-block-navigation-item__content:focus {
		color: #fc4c02 !important; /* Votre Orange */
		transform: scale(1.1);
		background: none !important; /* Enlève le gris moche par défaut */
	}

	/* 3. Le Bouton "Fermer" (La croix) */
	.wp-block-navigation__responsive-container-close {
		background: none !important;
		top: 20px !important;
		right: 20px !important;
	}

	/* Couleur de la croix */
	.wp-block-navigation__responsive-container-close svg {
		fill: #ffffff !important; /* Croix blanche */
		width: 32px !important;
		height: 32px !important;
	}

	/* 4. Le Bouton "Burger" (L'ouverture) */
	/* On s'assure qu'il est bien visible */
	.wp-block-navigation__responsive-container-open {
		color: #1e293b; /* Couleur du burger fermé */
	}
	.wp-block-navigation .wp-block-navigation.items-justified-right {
		--navigation-layout-justification-setting: flex-start;
		--navigation-layout-justify: flex-start;
	}
	main, .entry-content, footer .wp-block-group {
		padding-right:0 !important;
		padding-left:0 !important;
	}
    /* --- STATS DASHBOARD --- */
    .rs-stat-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 2 carrés par ligne */
        gap: 10px;
        margin-bottom: 20px;
    }
    
    .rs-stat-box {
        padding: 10px;
        min-height: 100px; /* Hauteur mini pour le confort */
    }
    
    .rs-stat-box h3 { font-size: 1.2rem; }
    .rs-icon { font-size: 1.5rem; }

    /* --- TABLEAUX CLASSEMENT --- */
    .rs-table th, .rs-table td { padding: 10px 5px; font-size: 0.9em; }
    
    /* On cache les colonnes moins importantes sur mobile */
    .mobile-hide, .rs-cat-badge { display: none !important; }
    
    .rs-user-cell img { width: 28px; height: 28px; }
    .rs-mobile-only-meta { display: block; font-size: 0.75em; color: #94a3b8; margin-top: 2px; }

    /* --- PAGE ÉQUIPE & CHAT --- */
    .rs-content-split {
        display: flex;
        flex-direction: column; /* L'un en dessous de l'autre */
        gap: 30px;
    }
    
    .rs-team-header { padding: 20px 10px; }
    .rs-team-header h1 { font-size: 1.8em; }
    .rs-team-badge { font-size: 3em; }

    .rs-chat-box { height: 350px; } /* Moins haut pour le clavier virtuel */

    /* --- FORMULAIRES (Anti-Zoom iPhone) --- */
    input[type="text"], input[type="number"], input[type="date"], select, textarea {
        font-size: 16px !important; /* Crucial pour iOS */
        padding: 12px !important;
    }
    
    /* --- PWA BANNER --- */
    .rs-pwa-banner {
        width: 92% !important;
        bottom: 10px !important;
        padding: 12px !important;
    }
    .rs-pwa-text strong { font-size: 0.9em; }
    .rs-pwa-icon { font-size: 1.2em; }
}