/* =============================================================
   Scores - Application de gestion de parties de jeux
   CSS Principal - Design responsive mobile-first
   ============================================================= */

/* -----------------------------------------------------------
   Variables CSS
   ----------------------------------------------------------- */
:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --primary-light: #6c83f2;
    --secondary: #7209b7;
    --success: #06d6a0;
    --success-dark: #05b588;
    --warning: #ffd166;
    --warning-dark: #e6b84d;
    --danger: #ef476f;
    --danger-dark: #d93a5f;
    --info: #118ab2;
    --info-dark: #0e7a9e;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --gray-light: #dee2e6;
    --gray-lighter: #e9ecef;
    --white: #ffffff;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --border-radius: 8px;
    --border-radius-sm: 4px;
    --border-radius-lg: 12px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.08);
    --transition: all 0.2s ease;
    --sidebar-width: 260px;
    --navbar-height: 60px;
}

/* -----------------------------------------------------------
   Reset & Base
   ----------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--dark);
    background-color: var(--light);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* -----------------------------------------------------------
   Typographie
   ----------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1rem; }

/* -----------------------------------------------------------
   Container
   ----------------------------------------------------------- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* -----------------------------------------------------------
   Navbar
   ----------------------------------------------------------- */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--navbar-height);
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand:hover {
    color: var(--primary-dark);
}

.navbar-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.navbar-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--dark);
    transition: var(--transition);
    border-radius: 1px;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-link {
    color: var(--gray);
    font-weight: 500;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
}

.navbar-link:hover {
    color: var(--primary);
    background: var(--light);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: 0.5rem;
    padding-left: 1rem;
    border-left: 1px solid var(--gray-light);
}

/* -----------------------------------------------------------
   Sidebar
   ----------------------------------------------------------- */
.layout-with-sidebar {
    display: flex;
    flex: 1;
    min-height: calc(100vh - var(--navbar-height));
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--white);
    border-right: 1px solid var(--gray-light);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: var(--navbar-height);
    height: calc(100vh - var(--navbar-height));
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--gray-light);
}

.sidebar-header h3 {
    font-size: 1rem;
    color: var(--dark);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-nav {
    flex: 1;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem;
    color: var(--gray);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-link:hover {
    color: var(--primary);
    background: var(--light);
}

.sidebar-link.active {
    color: var(--primary);
    background: rgba(67, 97, 238, 0.1);
    font-weight: 600;
}

.sidebar-footer {
    padding: 0.75rem;
    border-top: 1px solid var(--gray-light);
}

.main-content {
    flex: 1;
    padding: 1.5rem;
    min-width: 0;
}

.main-content.with-sidebar {
    padding: 1.5rem 2rem;
}

/* -----------------------------------------------------------
   Boutons
   ----------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    white-space: nowrap;
    font-family: var(--font-family);
    line-height: 1.4;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
}

.btn-success {
    background: var(--success);
    color: var(--white);
    border-color: var(--success);
}

.btn-success:hover {
    background: var(--success-dark);
    border-color: var(--success-dark);
    color: var(--white);
}

.btn-warning {
    background: var(--warning);
    color: var(--dark);
    border-color: var(--warning);
}

.btn-warning:hover {
    background: var(--warning-dark);
    border-color: var(--warning-dark);
    color: var(--dark);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
    border-color: var(--danger);
}

.btn-danger:hover {
    background: var(--danger-dark);
    border-color: var(--danger-dark);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-outline-danger {
    background: transparent;
    color: var(--danger);
    border-color: var(--danger);
}

.btn-outline-danger:hover {
    background: var(--danger);
    color: var(--white);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* -----------------------------------------------------------
   Cartes
   ----------------------------------------------------------- */
.card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow);
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.card-header h2,
.card-header h3 {
    margin: 0;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Card clickable */
.card-link {
    display: block;
    color: inherit;
}

.card-link:hover {
    color: inherit;
}

.card-link:hover .card {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* -----------------------------------------------------------
   Formulaires
   ----------------------------------------------------------- */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.375rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.9rem;
    font-family: var(--font-family);
    border: 2px solid var(--gray-light);
    border-radius: var(--border-radius);
    background: var(--white);
    color: var(--dark);
    transition: var(--transition);
    line-height: 1.4;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

.form-control::placeholder {
    color: var(--gray);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236c757d' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--gray);
    margin-top: 0.25rem;
}

.form-error {
    font-size: 0.8rem;
    color: var(--danger);
    margin-top: 0.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--primary);
}

/* -----------------------------------------------------------
   Alertes / Messages Flash
   ----------------------------------------------------------- */
.alert {
    padding: 0.875rem 1.25rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.9rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-success {
    background: rgba(6, 214, 160, 0.15);
    color: #047857;
    border: 1px solid rgba(6, 214, 160, 0.3);
}

.alert-danger {
    background: rgba(239, 71, 111, 0.15);
    color: #b91c4a;
    border: 1px solid rgba(239, 71, 111, 0.3);
}

.alert-warning {
    background: rgba(255, 209, 102, 0.2);
    color: #92400e;
    border: 1px solid rgba(255, 209, 102, 0.4);
}

.alert-info {
    background: rgba(17, 138, 178, 0.15);
    color: #0e7a9e;
    border: 1px solid rgba(17, 138, 178, 0.3);
}

.alert-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    padding: 0;
    line-height: 1;
}

.alert-close:hover {
    opacity: 1;
}

/* -----------------------------------------------------------
   Badges
   ----------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    white-space: nowrap;
}

.badge-primary {
    background: rgba(67, 97, 238, 0.15);
    color: var(--primary);
}

.badge-secondary {
    background: var(--gray-lighter);
    color: var(--gray);
}

.badge-success {
    background: rgba(6, 214, 160, 0.15);
    color: #047857;
}

.badge-warning {
    background: rgba(255, 209, 102, 0.2);
    color: #92400e;
}

.badge-danger {
    background: rgba(239, 71, 111, 0.15);
    color: #b91c4a;
}

.badge-info {
    background: rgba(17, 138, 178, 0.15);
    color: var(--info);
}

/* -----------------------------------------------------------
   Tableaux
   ----------------------------------------------------------- */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--border-radius);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.table th,
.table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
}

.table th {
    font-weight: 600;
    color: var(--gray);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--light);
}

.table tbody tr:hover {
    background: rgba(67, 97, 238, 0.02);
}

.table td .btn-group {
    justify-content: flex-end;
}

/* -----------------------------------------------------------
   Grille de statistiques
   ----------------------------------------------------------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 0.25rem;
}

/* -----------------------------------------------------------
   Grille de cartes
   ----------------------------------------------------------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

/* -----------------------------------------------------------
   Pages
   ----------------------------------------------------------- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-light);
}

.page-header h1 {
    margin: 0;
}

.page-description {
    color: var(--gray);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* -----------------------------------------------------------
   Page d'erreur
   ----------------------------------------------------------- */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 2rem;
}

.error-page h1 {
    font-size: 5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.error-page p {
    font-size: 1.25rem;
    color: var(--gray);
    margin-bottom: 2rem;
}

/* -----------------------------------------------------------
   Page d'accueil (non connecté)
   ----------------------------------------------------------- */
.hero {
    text-align: center;
    padding: 4rem 1rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.hero p {
    font-size: 1.1rem;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero .btn-group {
    justify-content: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
}

.feature-card {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
}

.feature-card .feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--gray);
    font-size: 0.9rem;
    margin: 0;
}

/* -----------------------------------------------------------
   Auth pages
   ----------------------------------------------------------- */
.auth-container {
    max-width: 420px;
    margin: 2rem auto;
}

.auth-container .card {
    padding: 0;
}

.auth-container .card-body {
    padding: 2rem;
}

.auth-container h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

/* -----------------------------------------------------------
   Profil
   ----------------------------------------------------------- */
.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--gray-lighter);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--gray);
    flex-shrink: 0;
}

.profile-info h2 {
    margin-bottom: 0.25rem;
}

.profile-info .profile-role {
    color: var(--gray);
    font-size: 0.9rem;
}

/* -----------------------------------------------------------
   Commentaires
   ----------------------------------------------------------- */
.comments-section {
    margin-top: 2rem;
}

.comment {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-light);
}

.comment:last-child {
    border-bottom: none;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gray-lighter);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--gray);
    flex-shrink: 0;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
}

.comment-author {
    font-weight: 600;
    font-size: 0.9rem;
}

.comment-date {
    font-size: 0.8rem;
    color: var(--gray);
}

.comment-content {
    font-size: 0.9rem;
    line-height: 1.5;
}

/* -----------------------------------------------------------
   Scores / Manches
   ----------------------------------------------------------- */
.rounds-section {
    margin-top: 1.5rem;
}

.round-card {
    background: var(--white);
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-light);
    margin-bottom: 1rem;
    overflow: hidden;
}

.round-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--light);
    border-bottom: 1px solid var(--gray-light);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.round-header h4 {
    margin: 0;
    font-size: 0.95rem;
}

.round-body {
    padding: 1rem;
}

.score-input-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.score-input-row .player-name {
    min-width: 120px;
    font-weight: 500;
    font-size: 0.9rem;
}

.score-input-row .form-control {
    max-width: 150px;
}

/* -----------------------------------------------------------
   Empty state
   ----------------------------------------------------------- */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    margin-bottom: 1.5rem;
}

/* -----------------------------------------------------------
   Invitation link
   ----------------------------------------------------------- */
.invite-box {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.invite-box .form-control {
    flex: 1;
    min-width: 200px;
    background: var(--light);
    font-family: monospace;
    font-size: 0.85rem;
}

/* -----------------------------------------------------------
   Footer
   ----------------------------------------------------------- */
.footer {
    margin-top: auto;
    padding: 1.5rem 0;
    text-align: center;
    color: var(--gray);
    font-size: 0.85rem;
    border-top: 1px solid var(--gray-light);
    background: var(--white);
}

/* -----------------------------------------------------------
   Utilitaires
   ----------------------------------------------------------- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--gray); }
.text-success { color: var(--success-dark); }
.text-danger { color: var(--danger); }
.text-primary { color: var(--primary); }
.text-small { font-size: 0.85rem; }
.font-bold { font-weight: 600; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }

/* -----------------------------------------------------------
   Modal de confirmation
   ----------------------------------------------------------- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    max-width: 450px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal h3 {
    margin-bottom: 1rem;
}

.modal p {
    color: var(--gray);
    margin-bottom: 1.5rem;
}

.modal .btn-group {
    justify-content: flex-end;
}

/* -----------------------------------------------------------
   Toast notifications
   ----------------------------------------------------------- */
.toast-container {
    position: fixed;
    top: calc(var(--navbar-height) + 1rem);
    right: 1rem;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 0.875rem 1.25rem;
    border-radius: var(--border-radius);
    background: var(--white);
    box-shadow: var(--shadow-lg);
    font-size: 0.9rem;
    animation: toastIn 0.3s ease;
    max-width: 350px;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.toast-success { border-left: 4px solid var(--success); }
.toast-danger { border-left: 4px solid var(--danger); }
.toast-info { border-left: 4px solid var(--info); }

/* -----------------------------------------------------------
   Pagination
   ----------------------------------------------------------- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--gray-light);
    color: var(--gray);
    background: var(--white);
}

.pagination a:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.pagination .active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* -----------------------------------------------------------
   Responsive - Tablette
   ----------------------------------------------------------- */
@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        left: -100%;
        top: var(--navbar-height);
        height: calc(100vh - var(--navbar-height));
        z-index: 1500;
        transition: left 0.3s ease;
        box-shadow: var(--shadow-lg);
    }

    .sidebar.open {
        left: 0;
    }

    .main-content.with-sidebar {
        padding: 1.25rem;
        margin-left: 0;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* -----------------------------------------------------------
   Responsive - Mobile
   ----------------------------------------------------------- */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .navbar-toggle {
        display: flex;
    }

    .navbar-menu {
        display: none;
        position: absolute;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow);
        gap: 0.5rem;
        z-index: 999;
    }

    .navbar-menu.open {
        display: flex;
    }

    .navbar-user {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        padding-top: 0.5rem;
        border-top: 1px solid var(--gray-light);
        width: 100%;
        justify-content: space-between;
    }

    .navbar-link {
        width: 100%;
        padding: 0.5rem;
    }

    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }

    .hero h1 { font-size: 1.75rem; }
    .hero { padding: 2.5rem 1rem; }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .table th,
    .table td {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .btn-group {
        width: 100%;
        justify-content: stretch;
    }

    .btn-group .btn {
        flex: 1;
    }
}

/* -----------------------------------------------------------
   Responsive - Petit mobile
   ----------------------------------------------------------- */
@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    .main-content {
        padding: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .score-input-row .form-control {
        max-width: 100%;
    }

    .invite-box {
        flex-direction: column;
    }

    .invite-box .form-control {
        min-width: 100%;
    }
}
