/* Frontend.css - Styles complets frontend pour JeuConcours */

/* ==========================================================================
   RESET ET BASES
   ========================================================================== */

.jccrs-container *,
.jccrs-container *::before,
.jccrs-container *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.jccrs-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    font-size: 16px;
}

/* ==========================================================================
   TYPOGRAPHIE
   ========================================================================== */

.jccrs-container h1,
.jccrs-container h2,
.jccrs-container h3,
.jccrs-container h4 {
    color: #2c3e50;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.jccrs-container h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.jccrs-container h2 {
    font-size: 2rem;
    margin-bottom: 1.25rem;
}

.jccrs-container h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.jccrs-container h4 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.jccrs-container p {
    margin-bottom: 1rem;
}

/* ==========================================================================
   STRUCTURE ET CONTENEURS
   ========================================================================== */

.jccrs-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

@media (min-width: 768px) {
    .jccrs-container {
        padding: 3rem 2rem;
    }
}

/* ==========================================================================
   FORMULAIRES
   ========================================================================== */

.jccrs-form-group {
    margin-bottom: 1.5rem;
}

.jccrs-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.jccrs-form-group input[type="text"],
.jccrs-form-group input[type="email"],
.jccrs-form-group input[type="password"],
.jccrs-form-group input[type="number"],
.jccrs-form-group input[type="date"],
.jccrs-form-group input[type="datetime-local"],
.jccrs-form-group select,
.jccrs-form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 2px solid #e9ecef;
    border-radius: 0.5rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.jccrs-form-group input:focus,
.jccrs-form-group select:focus,
.jccrs-form-group textarea:focus {
    border-color: #3498db;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.jccrs-form-group input[disabled],
.jccrs-form-group select[disabled],
.jccrs-form-group textarea[disabled] {
    background-color: #f8f9fa;
    opacity: 0.7;
    cursor: not-allowed;
}

.jccrs-form-group .jccrs-feedback {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    min-height: 1.25rem;
}

/* ==========================================================================
   BOUTONS
   ========================================================================== */

.jccrs-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 2px solid transparent;
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
    position: relative;
    overflow: hidden;
}

.jccrs-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.jccrs-button:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.jccrs-button:not(:disabled):active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.jccrs-button-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border-color: #3498db;
}

.jccrs-button-primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    border-color: #2980b9;
}

.jccrs-button-secondary {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
    border-color: #95a5a6;
}

.jccrs-button-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #6c7b7d 100%);
    border-color: #7f8c8d;
}

.jccrs-button-success {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    border-color: #2ecc71;
}

.jccrs-button-success:hover {
    background: linear-gradient(135deg, #27ae60 0%, #219653 100%);
    border-color: #27ae60;
}

.jccrs-button-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border-color: #e74c3c;
}

.jccrs-button-danger:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    border-color: #c0392b;
}

.jccrs-button-warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    border-color: #f39c12;
}

.jccrs-button-warning:hover {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    border-color: #e67e22;
}

.jccrs-button-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.jccrs-button-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.jccrs-button-block {
    display: block;
    width: 100%;
}

.jccrs-button-loading {
    position: relative;
    color: transparent !important;
}

.jccrs-button-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: calc(50% - 10px);
    left: calc(50% - 10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: jccrs-spinner 0.8s linear infinite;
}

@keyframes jccrs-spinner {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   ALERTES ET MESSAGES
   ========================================================================== */

.jccrs-alert {
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    border: 2px solid transparent;
    border-radius: 0.75rem;
    position: relative;
}

.jccrs-alert-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.jccrs-alert-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.jccrs-alert-info {
    background-color: rgba(52, 152, 219, 0.1);
    border-color: rgba(52, 152, 219, 0.2);
    color: #2c5282;
}

.jccrs-alert-success {
    background-color: rgba(46, 204, 113, 0.1);
    border-color: rgba(46, 204, 113, 0.2);
    color: #276749;
}

.jccrs-alert-warning {
    background-color: rgba(243, 156, 18, 0.1);
    border-color: rgba(243, 156, 18, 0.2);
    color: #975a16;
}

.jccrs-alert-error {
    background-color: rgba(231, 76, 60, 0.1);
    border-color: rgba(231, 76, 60, 0.2);
    color: #c53030;
}

.jccrs-message {
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    font-weight: 500;
}

.jccrs-message.jccrs-error {
    background-color: rgba(231, 76, 60, 0.1);
    border-left: 4px solid #e74c3c;
    color: #c53030;
}

.jccrs-message.jccrs-success {
    background-color: rgba(46, 204, 113, 0.1);
    border-left: 4px solid #2ecc71;
    color: #276749;
}

/* ==========================================================================
   TABLEAU DE BORD
   ========================================================================== */

.jccrs-dashboard-welcome {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-radius: 1rem;
    padding: 2rem;
    color: white;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.jccrs-dashboard-welcome::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
}

.jccrs-welcome-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.jccrs-welcome-avatar {
    flex-shrink: 0;
}

.jccrs-welcome-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
}

.jccrs-welcome-info h3 {
    color: white;
    margin-bottom: 0.25rem;
    font-size: 1.5rem;
}

.jccrs-welcome-email {
    opacity: 0.9;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.jccrs-welcome-id {
    font-size: 0.875rem;
    opacity: 0.8;
}

.jccrs-welcome-id code {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: monospace;
}

.jccrs-welcome-actions {
    display: flex;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

/* Sections du dashboard */
.jccrs-dashboard-section {
    margin-bottom: 3rem;
}

.jccrs-dashboard-section h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e9ecef;
}

.jccrs-dashboard-section h3::before {
    font-size: 1.5em;
}

/* Liste des concours */
.jccrs-concours-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .jccrs-concours-list {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

.jccrs-concours-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.jccrs-concours-card:hover {
    border-color: #3498db;
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.jccrs-concours-card.jccrs-concours-expiring {
    border-color: #f39c12;
}

.jccrs-concours-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.jccrs-concours-card h4 {
    flex: 1;
    margin-bottom: 0;
    color: #2c3e50;
}

.jccrs-concours-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.jccrs-badge-warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.jccrs-concours-description {
    color: #6c757d;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.jccrs-concours-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.jccrs-concours-date-label {
    font-weight: 600;
}

.jccrs-concours-date-value {
    color: #2c3e50;
    font-weight: 500;
}

.jccrs-concours-scores {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.jccrs-score-item {
    text-align: center;
}

.jccrs-score-label {
    display: block;
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.jccrs-score-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
}

.jccrs-concours-actions {
    display: flex;
    gap: 0.75rem;
}

/* Tableau des scores */
.jccrs-scores-table {
    overflow-x: auto;
    background: white;
    border-radius: 1rem;
    border: 2px solid #e9ecef;
}

.jccrs-scores-table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.jccrs-scores-table th {
    background-color: #f8f9fa;
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e9ecef;
    white-space: nowrap;
}

.jccrs-scores-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.jccrs-scores-table tr:last-child td {
    border-bottom: none;
}

.jccrs-scores-table tr:hover {
    background-color: #f8f9fa;
}

.jccrs-diff-positive {
    color: #2ecc71;
    font-weight: 600;
}

.jccrs-diff-negative {
    color: #e74c3c;
    font-weight: 600;
}

.jccrs-diff-equal {
    color: #95a5a6;
    font-weight: 600;
}

.jccrs-diff-up::before {
    content: '↑ ';
}

.jccrs-diff-down::before {
    content: '↓ ';
}

/* Statistiques */
.jccrs-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.jccrs-stat-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.jccrs-stat-card:hover {
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.jccrs-stat-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.jccrs-stat-content {
    flex: 1;
}

.jccrs-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.2;
}

.jccrs-stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* ==========================================================================
   CONCOURS
   ========================================================================== */

/* En-tête du concours */
.jccrs-concours-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-radius: 1rem;
    padding: 2rem;
    color: white;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.jccrs-concours-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
}

.jccrs-concours-header h2 {
    color: white;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.jccrs-concours-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.jccrs-concours-status {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.jccrs-status-active {
    background-color: rgba(46, 204, 113, 0.2);
    color: #27ae60;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.jccrs-status-inactive {
    background-color: rgba(149, 165, 166, 0.2);
    color: #7f8c8d;
    border: 1px solid rgba(149, 165, 166, 0.3);
}

.jccrs-concours-deadline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    opacity: 0.9;
}

.jccrs-countdown {
    font-family: monospace;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    min-width: 120px;
    text-align: center;
}

.jccrs-concours-description {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 2px solid #e9ecef;
    line-height: 1.7;
}

.jccrs-concours-description p {
    margin-bottom: 1rem;
}

.jccrs-concours-description p:last-child {
    margin-bottom: 0;
}

/* Scores en haut du concours */
.jccrs-concours-scores-header {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 2px solid #e9ecef;
}

.jccrs-score-display {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .jccrs-score-display {
        grid-template-columns: repeat(3, 1fr);
    }
}

.jccrs-score-box {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0.75rem;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.jccrs-score-box:hover {
    border-color: #3498db;
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.jccrs-score-label {
    display: block;
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    font-weight: 500;
    min-height: 2.5em;
}

.jccrs-score-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
}

.jccrs-concours-login-notice {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 0.75rem;
    border: 1px solid rgba(52, 152, 219, 0.2);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .jccrs-concours-login-notice {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.jccrs-concours-login-notice p {
    margin: 0;
    flex: 1;
    color: #2c5282;
    font-weight: 500;
}

/* Diaporama des jeux */
.jccrs-games-slider {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 2px solid #e9ecef;
}

.jccrs-slider-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.jccrs-slider-prev,
.jccrs-slider-next {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    color: #2c3e50;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.jccrs-slider-prev:hover,
.jccrs-slider-next:hover {
    background: #3498db;
    border-color: #3498db;
    color: white;
    transform: scale(1.05);
}

.jccrs-slider-prev:disabled,
.jccrs-slider-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.jccrs-slider-prev:disabled:hover,
.jccrs-slider-next:disabled:hover {
    background: #f8f9fa;
    border-color: #e9ecef;
    color: #2c3e50;
}

.jccrs-slider-counter {
    flex: 1;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.jccrs-current-slide {
    color: #3498db;
}

.jccrs-slider-counter-sep {
    margin: 0 0.5rem;
    color: #95a5a6;
}

.jccrs-slider-container {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

.jccrs-game-slide {
    display: none;
    animation: jccrs-fadeIn 0.5s ease;
}

.jccrs-game-slide.active {
    display: block;
}

@keyframes jccrs-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.jccrs-game-slide h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-size: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e9ecef;
}

.jccrs-game-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 75%; /* Ratio 4:3 */
    background: #f8f9fa;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 2px solid #e9ecef;
}

.jccrs-game-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

.jccrs-game-instructions {
    text-align: center;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(52, 152, 219, 0.05);
    border-radius: 0.75rem;
    border: 1px solid rgba(52, 152, 219, 0.1);
}

.jccrs-game-instructions p {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-weight: 500;
}

.jccrs-game-note {
    font-size: 0.875rem;
    opacity: 0.7;
}

.jccrs-slider-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.jccrs-slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e9ecef;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.jccrs-slider-dot:hover {
    background: #bdc3c7;
    transform: scale(1.2);
}

.jccrs-slider-dot.active {
    background: #3498db;
    transform: scale(1.2);
}

/* Classement du concours */
.jccrs-concours-ranking {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 2px solid #e9ecef;
}

.jccrs-ranking-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

@media (min-width: 768px) {
    .jccrs-ranking-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.jccrs-ranking-header h3 {
    margin: 0;
}

.jccrs-ranking-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.jccrs-ranking-limit {
    padding: 0.5rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 0.5rem;
    background: white;
    color: #2c3e50;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.jccrs-ranking-limit:focus {
    border-color: #3498db;
    outline: none;
}

.jccrs-ranking-table {
    overflow-x: auto;
    border-radius: 0.75rem;
    border: 1px solid #e9ecef;
}

.jccrs-ranking-table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.jccrs-ranking-table th {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e9ecef;
    white-space: nowrap;
}

.jccrs-ranking-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.jccrs-ranking-table tr:last-child td {
    border-bottom: none;
}

.jccrs-ranking-table tr:hover {
    background-color: #f8f9fa;
}

/* Rang */
.jccrs-rank {
    width: 80px;
}

.jccrs-rank-number {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: #2c3e50;
}

.jccrs-rank-medal {
    font-size: 1.25em;
}

/* Joueur */
.jccrs-player {
    min-width: 200px;
}

.jccrs-player-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.jccrs-player-avatar {
    flex-shrink: 0;
}

.jccrs-player-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #e9ecef;
    object-fit: cover;
}

.jccrs-player-details {
    flex: 1;
    min-width: 0;
}

.jccrs-player-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jccrs-player-you {
    font-size: 0.875rem;
    color: #3498db;
    font-weight: 500;
    margin-left: 0.25rem;
}

.jccrs-player-id {
    font-size: 0.75rem;
    color: #95a5a6;
    font-family: monospace;
}

/* Score */
.jccrs-score {
    font-weight: 700;
    color: #2c3e50;
}

.jccrs-score-value {
    font-size: 1.25rem;
}

.jccrs-score-details {
    font-size: 0.875rem;
    color: #95a5a6;
    font-weight: normal;
    margin-top: 0.25rem;
}

/* Dernière activité */
.jccrs-last-activity {
    font-size: 0.9rem;
    color: #6c757d;
    white-space: nowrap;
}

.jccrs-no-activity {
    color: #95a5a6;
    font-style: italic;
}

/* Rang utilisateur en dehors du top */
.jccrs-user-rank-outside {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 0.75rem;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.jccrs-user-rank-summary {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .jccrs-user-rank-summary {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.jccrs-user-rank-label {
    font-weight: 500;
    color: #2c5282;
}

.jccrs-user-rank-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #3498db;
}

.jccrs-show-full-ranking {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.jccrs-show-full-ranking:hover {
    color: #2980b9;
    text-decoration: underline;
}

.jccrs-ranking-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.jccrs-ranking-note {
    color: #95a5a6;
    font-size: 0.875rem;
    margin: 0;
}

/* Styles pour les top 3 */
.jccrs-top-1 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, transparent 100%) !important;
}

.jccrs-top-1 .jccrs-rank-number {
    color: #d4af37;
}

.jccrs-top-2 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.1) 0%, transparent 100%) !important;
}

.jccrs-top-2 .jccrs-rank-number {
    color: #c0c0c0;
}

.jccrs-top-3 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.1) 0%, transparent 100%) !important;
}

.jccrs-top-3 .jccrs-rank-number {
    color: #cd7f32;
}

.jccrs-current-player {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1) 0%, transparent 100%) !important;
    border-left: 4px solid #3498db !important;
}

.jccrs-current-player .jccrs-player-name {
    color: #3498db;
}

/* ==========================================================================
   LIENS DE CONNEXION/INSCRIPTION
   ========================================================================== */

.jccrs-login-link,
.jccrs-register-link {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
    color: #6c757d;
}

.jccrs-login-link a,
.jccrs-register-link a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.jccrs-login-link a:hover,
.jccrs-register-link a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* Mobile (jusqu'à 767px) */
@media (max-width: 767px) {
    .jccrs-container h1 {
        font-size: 2rem;
    }
    
    .jccrs-container h2 {
        font-size: 1.75rem;
    }
    
    .jccrs-container h3 {
        font-size: 1.25rem;
    }
    
    .jccrs-welcome-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .jccrs-welcome-actions {
        width: 100%;
    }
    
    .jccrs-welcome-actions .jccrs-button {
        flex: 1;
    }
    
    .jccrs-concours-actions {
        flex-direction: column;
    }
    
    .jccrs-concours-actions .jccrs-button {
        width: 100%;
    }
    
    .jccrs-ranking-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .jccrs-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Tablette (768px à 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .jccrs-concours-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .jccrs-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop (1024px et plus) */
@media (min-width: 1024px) {
    .jccrs-concours-list {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .jccrs-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@keyframes jccrs-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.jccrs-pulse {
    animation: jccrs-pulse 2s infinite;
}

@keyframes jccrs-shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.jccrs-shake {
    animation: jccrs-shake 0.5s ease-in-out;
}

/* ==========================================================================
   UTILITAIRES
   ========================================================================== */

.jccrs-text-center {
    text-align: center;
}

.jccrs-text-right {
    text-align: right;
}

.jccrs-text-left {
    text-align: left;
}

.jccrs-mt-1 { margin-top: 0.25rem; }
.jccrs-mt-2 { margin-top: 0.5rem; }
.jccrs-mt-3 { margin-top: 1rem; }
.jccrs-mt-4 { margin-top: 1.5rem; }
.jccrs-mt-5 { margin-top: 3rem; }

.jccrs-mb-1 { margin-bottom: 0.25rem; }
.jccrs-mb-2 { margin-bottom: 0.5rem; }
.jccrs-mb-3 { margin-bottom: 1rem; }
.jccrs-mb-4 { margin-bottom: 1.5rem; }
.jccrs-mb-5 { margin-bottom: 3rem; }

.jccrs-hidden {
    display: none !important;
}

.jccrs-visible {
    display: block !important;
}

/* Loading overlay */
.jccrs-loading {
    position: relative;
    min-height: 200px;
}

.jccrs-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.jccrs-loading::before {
    content: '';
    position: absolute;
    top: calc(50% - 25px);
    left: calc(50% - 25px);
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: jccrs-spinner 1s linear infinite;
    z-index: 1001;
}

/* ==========================================================================
   ACCESSIBILITÉ
   ========================================================================== */

.jccrs-container a:focus,
.jccrs-container button:focus,
.jccrs-container input:focus,
.jccrs-container select:focus,
.jccrs-container textarea:focus {
    outline: 3px solid rgba(52, 152, 219, 0.5);
    outline-offset: 2px;
}

.jccrs-container .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .jccrs-button {
        border-width: 3px;
    }
    
    .jccrs-alert {
        border-width: 3px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .jccrs-button,
    .jccrs-concours-card,
    .jccrs-stat-card,
    .jccrs-score-box,
    .jccrs-slider-prev,
    .jccrs-slider-next,
    .jccrs-slider-dot {
        transition: none;
    }
    
    .jccrs-button:not(:disabled):hover,
    .jccrs-concours-card:hover,
    .jccrs-stat-card:hover,
    .jccrs-score-box:hover {
        transform: none;
    }
    
    .jccrs-game-slide {
        animation: none;
    }
}

/* ==========================================================================
   THÈMES ALTERNATIFS
   ========================================================================== */

/* Mode sombre */
@media (prefers-color-scheme: dark) {
    .jccrs-container {
        color: #e0e0e0;
        background-color: #1a1a1a;
    }
    
    .jccrs-container h1,
    .jccrs-container h2,
    .jccrs-container h3,
    .jccrs-container h4 {
        color: #ffffff;
    }
    
    .jccrs-concours-card,
    .jccrs-stat-card,
    .jccrs-scores-table,
    .jccrs-concours-description,
    .jccrs-concours-scores-header,
    .jccrs-games-slider,
    .jccrs-concours-ranking {
        background-color: #2d2d2d;
        border-color: #404040;
        color: #e0e0e0;
    }
    
    .jccrs-score-value,
    .jccrs-score-label,
    .jccrs-player-name,
    .jccrs-rank-number,
    .jccrs-concours-date-value {
        color: #ffffff;
    }
    
    .jccrs-concours-date-label,
    .jccrs-score-details,
    .jccrs-game-instructions p,
    .jccrs-ranking-note {
        color: #b0b0b0;
    }
    
    .jccrs-scores-table th,
    .jccrs-ranking-table th {
        background-color: #333333;
        color: #ffffff;
        border-color: #404040;
    }
    
    .jccrs-scores-table td,
    .jccrs-ranking-table td {
        border-color: #404040;
    }
    
    .jccrs-scores-table tr:hover,
    .jccrs-ranking-table tr:hover {
        background-color: #333333;
    }
    
    .jccrs-form-group input[type="text"],
    .jccrs-form-group input[type="email"],
    .jccrs-form-group input[type="password"],
    .jccrs-form-group input[type="number"],
    .jccrs-form-group input[type="date"],
    .jccrs-form-group input[type="datetime-local"],
    .jccrs-form-group select,
    .jccrs-form-group textarea {
        background-color: #333333;
        border-color: #404040;
        color: #e0e0e0;
    }
    
    .jccrs-form-group input:focus,
    .jccrs-form-group select:focus,
    .jccrs-form-group textarea:focus {
        border-color: #3498db;
        box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
    }
    
    .jccrs-game-wrapper {
        background-color: #333333;
        border-color: #404040;
    }
    
    .jccrs-game-iframe {
        background-color: #2d2d2d;
    }
    
    .jccrs-slider-prev,
    .jccrs-slider-next {
        background-color: #333333;
        border-color: #404040;
        color: #e0e0e0;
    }
    
    .jccrs-slider-prev:hover,
    .jccrs-slider-next:hover {
        background-color: #3498db;
        border-color: #3498db;
        color: #ffffff;
    }
    
    .jccrs-slider-dot {
        background-color: #404040;
    }
    
    .jccrs-slider-dot:hover {
        background-color: #505050;
    }
    
    .jccrs-slider-dot.active {
        background-color: #3498db;
    }
    
    .jccrs-ranking-limit {
        background-color: #333333;
        border-color: #404040;
        color: #e0e0e0;
    }
    
    .jccrs-player-avatar img {
        border-color: #404040;
    }
    
    .jccrs-player-id {
        color: #808080;
    }
    
    .jccrs-dashboard-welcome {
        background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    }
    
    .jccrs-concours-header {
        background: linear-gradient(135deg, #1a252f 0%, #0d1218 100%);
    }
    
    .jccrs-alert-info {
        background-color: rgba(52, 152, 219, 0.15);
        border-color: rgba(52, 152, 219, 0.3);
        color: #a0d2f7;
    }
    
    .jccrs-alert-success {
        background-color: rgba(46, 204, 113, 0.15);
        border-color: rgba(46, 204, 113, 0.3);
        color: #a8f1c6;
    }
    
    .jccrs-alert-warning {
        background-color: rgba(243, 156, 18, 0.15);
        border-color: rgba(243, 156, 18, 0.3);
        color: #f8d9a8;
    }
    
    .jccrs-alert-error {
        background-color: rgba(231, 76, 60, 0.15);
        border-color: rgba(231, 76, 60, 0.3);
        color: #f8b4ae;
    }
    
    .jccrs-concours-login-notice,
    .jccrs-user-rank-outside {
        background-color: rgba(52, 152, 219, 0.15);
        border-color: rgba(52, 152, 219, 0.3);
    }
    
    .jccrs-concours-login-notice p,
    .jccrs-user-rank-label {
        color: #a0d2f7;
    }
    
    .jccrs-game-instructions {
        background-color: rgba(52, 152, 219, 0.1);
        border-color: rgba(52, 152, 219, 0.2);
    }
}

/* Impression */
@media print {
    .jccrs-button,
    .jccrs-slider-nav,
    .jccrs-slider-dots,
    .jccrs-game-wrapper,
    .jccrs-ranking-actions,
    .jccrs-show-full-ranking,
    .jccrs-login-link,
    .jccrs-register-link,
    .jccrs-alert-actions {
        display: none !important;
    }
    
    .jccrs-container {
        padding: 0;
        max-width: none;
    }
    
    .jccrs-dashboard-welcome,
    .jccrs-concours-header {
        background: none !important;
        color: #000 !important;
        padding: 1rem !important;
        border: 1px solid #000 !important;
    }
    
    .jccrs-dashboard-welcome h3,
    .jccrs-concours-header h2 {
        color: #000 !important;
    }
    
    .jccrs-concours-card,
    .jccrs-stat-card,
    .jccrs-scores-table,
    .jccrs-concours-description,
    .jccrs-concours-scores-header,
    .jccrs-games-slider,
    .jccrs-concours-ranking {
        border: 1px solid #000 !important;
        page-break-inside: avoid;
    }
    
    .jccrs-ranking-table table,
    .jccrs-scores-table table {
        min-width: auto;
    }
}