/* =======================
   Base Styles
======================= */
body {
    font-family: 'Inter', 'Segoe UI', 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #2d3748;
    line-height: 1.6;
    font-size: 16px;
    min-height: 100vh;
}

h1, h2 {
    text-align: center;
    color: #dc2626;
    margin-bottom: 25px;
    font-weight: 700;
    padding: 0 15px;
    text-shadow: 0 2px 4px rgba(220, 38, 38, 0.15);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 30px;
}

h2 {
    font-size: 2rem;
}

.main-title {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 2.8rem;
    margin-bottom: 40px;
}

.page-title {
    position: relative;
    margin-bottom: 35px;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #dc2626, #ef4444);
    border-radius: 2px;
}

.tab-title {
    color: #dc2626;
    font-size: 1.8rem;
    margin-bottom: 25px;
    border-bottom: 2px solid #fecaca;
    padding-bottom: 10px;
}

.tab-subtitle {
    color: #b91c1c;
    font-size: 1.5rem;
    margin: 30px 0 20px 0;
}

/* =======================
   Containers
======================= */
.container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: all 0.3s ease;
}

.container:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.15),
        0 25px 25px -5px rgba(0, 0, 0, 0.04);
}

.form-container {
    background: #ffffff;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #f1f5f9;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
}

/* =======================
   Navigation / Header
======================= */
nav {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #fff;
    padding: 18px 35px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 
        0 4px 6px -1px rgba(220, 38, 38, 0.3),
        0 2px 4px -1px rgba(220, 38, 38, 0.2);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Container interne pour alignement */
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
}

/* Logo ou titre */
nav .logo {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.5px;
}

/* Menu principal */
nav .menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 25px;
}

/* Liens du menu */
nav .menu li a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 12px 24px;
    border-radius: 50px;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

nav .menu li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: width 0.3s ease;
    border-radius: 50px;
}

nav .menu li a:hover::before {
    width: 100%;
}

nav .menu li a:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

nav .menu li a.active {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

/* Hamburger menu button - mobile */
.menu-toggle {
    display: none;
    font-size: 26px;
    cursor: pointer;
    background: none;
    border: none;
    color: #fff;
    z-index: 1100;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* =======================
   Responsive Navigation
======================= */

/* Tablettes et plus petites */
@media (max-width: 992px) {
    nav { 
        padding: 16px 25px; 
    }
    nav .menu { 
        gap: 18px; 
    }
    nav .menu li a {
        padding: 10px 18px;
        font-size: 15px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    /* Hamburger visible */
    .menu-toggle {
        display: block;
    }

    /* Menu masqué et vertical */
    nav .menu {
        display: none;
        flex-direction: column;
        gap: 12px;
        background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
        position: absolute;
        top: 70px;
        right: 20px;
        left: 20px;
        padding: 20px;
        border-radius: 16px;
        box-shadow: 
            0 20px 25px -5px rgba(220, 38, 38, 0.2),
            0 10px 10px -5px rgba(220, 38, 38, 0.1);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.18);
        z-index: 1000;
        animation: slideDown 0.3s ease-out;
    }

    /* Menu visible après clic */
    nav .menu.show {
        display: flex;
    }

    nav .menu li a {
        padding: 14px 20px;
        border-radius: 12px;
        width: 100%;
        text-align: center;
    }
}

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



/* =======================
   Tabs
======================= */
.tabs, .tabs-container {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    border-bottom: 3px solid #e2e8f0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0;
}

.tab, .tab-link {
    padding: 16px 28px;
    font-size: 16px;
    font-weight: 600;
    color: #64748b;
    border-radius: 12px 12px 0 0;
    border: none;
    background: linear-gradient(145deg, #f8fafc, #e2e8f0);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid transparent;
}

.tab::before, .tab-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.tab:hover::before, .tab-link:hover::before {
    left: 100%;
}

.tab:hover, .tab-link:hover {
    background: linear-gradient(145deg, #ffffff, #f1f5f9);
    color: #374151;
    transform: translateY(-3px);
    box-shadow: 
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.tab.active, .tab-link.active {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #ffffff;
    font-weight: 700;
    border-bottom: 3px solid #991b1b;
    box-shadow: 
        0 10px 15px -3px rgba(220, 38, 38, 0.4),
        0 4px 6px -2px rgba(220, 38, 38, 0.2);
    transform: translateY(-2px);
}

.tabs-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.tab-content { 
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}
.tab-content.active { 
    display: block; 
}

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

.subcategory {
    margin-bottom: 25px;
}

.subcategory-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #dc2626;
    border-bottom: 2px solid #fecaca;
    padding-bottom: 8px;
    position: relative;
}

.subcategory-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, #dc2626, #b91c1c);
}

.options {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.options label {
    display: flex;
    align-items: center;
    font-size: 15px;
    margin-bottom: 0;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.options label:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.option-checkbox {
    margin-right: 10px;
    accent-color: #dc2626;
    transform: scale(1.1);
}

/* =======================
   Buttons
======================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: #fff;
    text-transform: none;
    border: none;
    user-select: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    min-width: 120px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-edit { 
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}
.btn-edit:hover { 
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-2px); 
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-delete { 
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}
.btn-delete:hover { 
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px); 
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.btn-add {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}
.btn-add:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.btn-submit { 
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}
.btn-submit:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.btn-cancel { 
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}
.btn-cancel:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.btn-delete-suboption { 
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
    padding: 8px 16px;
    font-size: 13px;
    min-width: auto;
}

/* Option Buttons */
.option-btn, .pl-option-btn {
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.option-btn::before, .pl-option-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.option-btn:hover::before, .pl-option-btn:hover::before {
    left: 100%;
}

.option-btn:hover, .pl-option-btn:hover { 
    transform: translateY(-2px) scale(1.05); 
    box-shadow: 0 8px 25px rgba(230, 0, 0, 0.3);
}

.option-btn { 
    background: linear-gradient(135deg, #e60000 0%, #b91c1c 100%);
    box-shadow: 0 4px 15px rgba(230, 0, 0, 0.2);
}

.pl-option-btn { 
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    font-size: 11px;
    padding: 6px 12px;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}

/* =======================
   Styles spécifiques pour edit_match_actions - Players réduits
======================= */
.players-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 10px;
    width: 100%;
}

.players-row .player {
    flex: 1 1 auto;
    min-width: 180px;
    max-width: calc(25% - 6px);
    margin: 0;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.1);
    border: 1px solid #fecaca;
    text-align: center;
    transition: all 0.3s ease;
}

.players-row .player:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
    border-color: #dc2626;
}

.players-row .player .player-name {
    font-weight: 700;
    margin-bottom: 6px;
    color: #dc2626;
    font-size: 13px;
    line-height: 1.2;
}

.players-row .player .player-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
}

.players-row .player .option-btn {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: None;
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(220, 38, 38, 0.2);
    min-width: 30px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.players-row .player .option-btn:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 3px 8px rgba(220, 38, 38, 0.3);
}

.players-row .player .option-btn:active {
    transform: translateY(0) scale(1);
}

/* Responsive pour les players réduits */
@media (max-width: 1400px) {
    .players-row .player {
        max-width: calc(33.333% - 6px);
        min-width: 160px;
    }
}

@media (max-width: 1200px) {
    .players-row .player {
        max-width: calc(33.333% - 6px);
        min-width: 150px;
        padding: 8px;
    }
    
    .players-row .player .player-name {
        font-size: 12px;
    }
}

@media (max-width: 992px) {
    .players-row {
        justify-content: center;
        gap: 6px;
    }
    
    .players-row .player {
        max-width: calc(50% - 3px);
        min-width: 140px;
        padding: 7px 8px;
    }
    
    .players-row .player .player-name {
        font-size: 12px;
        margin-bottom: 5px;
    }
    
    .players-row .player .option-btn {
        font-size: 9px;
        padding: 4px 7px;
        min-width: 28px;
    }
}

@media (max-width: 768px) {
    .players-row {
        justify-content: space-between;
        gap: 6px;
        margin-bottom: 8px;
    }
    
    .players-row .player {
        max-width: calc(50% - 3px);
        min-width: auto;
        flex: 0 0 calc(50% - 3px);
        padding: 8px;
    }
    
    .players-row .player .player-name {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .players-row .player .option-btn {
        font-size: 9px;
        padding: 5px 7px;
        min-width: 28px;
        gap: 3px;
    }
}

@media (max-width: 480px) {
    .players-row {
        justify-content: space-between;
        gap: 4px;
    }
    
    .players-row .player {
        max-width: calc(50% - 2px);
        min-width: auto;
        flex: 0 0 calc(50% - 2px);
        padding: 6px 8px;
    }
    
    .players-row .player .player-name {
        font-size: 11px;
        margin-bottom: 5px;
        line-height: 1.1;
    }
    
    .players-row .player .player-actions {
        gap: 3px;
    }
    
    .players-row .player .option-btn {
        font-size: 8px;
        padding: 4px 6px;
        min-width: 26px;
        letter-spacing: 0.2px;
    }
}

@media (max-width: 380px) {
    .players-row {
        gap: 4px;
    }
    
    .players-row .player {
        max-width: calc(50% - 2px);
        flex: 0 0 calc(50% - 2px);
        padding: 7px;
    }
    
    .players-row .player .player-name {
        font-size: 10px;
        margin-bottom: 5px;
    }
    
    .players-row .player .option-btn {
        font-size: 8px;
        padding: 4px 5px;
        min-width: 24px;
    }
}

/* Actions buttons container */
.actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.actions .btn {
    padding: 8px 16px;
    font-size: 13px;
    min-width: auto;
}

/* =======================
   Forms
======================= */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
select,
.dropdown {
    width: 100%;
    max-width: 450px;
    min-width: 200px;
    padding: 14px 18px;
    margin-bottom: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    color: #374151;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    box-sizing: border-box;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
select:focus,
.dropdown:focus {
    border-color: #dc2626;
    background: #ffffff;
    outline: none;
    box-shadow: 
        0 0 0 3px rgba(220, 38, 38, 0.1),
        0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="date"]:hover,
input[type="number"]:hover,
select:hover,
.dropdown:hover {
    border-color: #cbd5e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Style pour les selects */
select,
.dropdown {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
}

/* Placeholder styling */
input::placeholder {
    color: #9ca3af;
    font-style: italic;
}

/* Labels améliorés */
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    letter-spacing: 0.025em;
}

/* Style pour les groupes de formulaires */
.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

/* Style pour les champs requis */
input:required,
select:required {
    border-left: 4px solid #f59e0b;
}

input:required:valid,
select:required:valid {
    border-left: 4px solid #10b981;
}

/* Style pour les champs d'erreur */
input:invalid:not(:placeholder-shown),
select:invalid:not(:placeholder-shown) {
    border-color: #dc2626;
    background: linear-gradient(145deg, #fef2f2, #ffffff);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Amélioration pour les champs de date */
input[type="date"] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 20px;
    padding-right: 45px;
}

/* Style responsive pour les formulaires */
@media (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="date"],
    input[type="number"],
    select,
    .dropdown {
        max-width: 100%;
        min-width: 100%;
    }
}

/* =======================
   Tables
======================= */
table, .styled-table {
    width: 100%;
    border-collapse: collapse;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.18);
    margin-bottom: 25px;
}

table th,
table td,
.styled-table th,
.styled-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    word-wrap: break-word;
    font-size: 14px;
}

table th, 
.styled-table th { 
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #ffffff; 
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    position: relative;
}

table th::after,
.styled-table th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.3), transparent);
}

table tr:nth-child(even),
.styled-table tr:nth-child(even) { 
    background: linear-gradient(145deg, #f8fafc, #ffffff);
}

table tr:hover,
.styled-table tr:hover { 
    background: linear-gradient(145deg, #e2e8f0, #f1f5f9);
    transform: scale(1.01);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

table tbody tr,
.styled-table tbody tr {
    transition: all 0.3s ease;
}

/* Première colonne en gras */
table td:first-child,
.styled-table td:first-child {
    font-weight: 600;
    color: #374151;
}

.table-container {
    display: flex;
    gap: 25px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.table { 
    flex: 1 1 100%; 
    background: rgba(255, 255, 255, 0.95);
    padding: 20px; 
    border-radius: 16px; 
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow-x: auto;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Style pour les liens dans les tableaux */
table a,
.styled-table a {
    color: #dc2626;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

table a:hover,
.styled-table a:hover {
    color: #b91c1c;
    text-decoration: underline;
}

/* Style pour les cellules d'actions */
.actions {
    white-space: nowrap;
}

/* Responsive tables */
@media (max-width: 768px) {
    table, .styled-table {
        font-size: 13px;
    }
    
    table th,
    table td,
    .styled-table th,
    .styled-table td {
        padding: 12px 16px;
    }
    
    .table-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* =======================
   Login / Flash Messages
======================= */
.login-container {
    max-width: 450px;
    margin: 80px auto;
    padding: 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.login-container h2 { 
    font-size: 28px; 
    margin-bottom: 30px; 
    color: #374151;
    font-weight: 700;
}

.login-form {
    text-align: left;
}

.login-form .form-group {
    margin-bottom: 25px;
}

.login-form input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.login-form input:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.login-form .btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    margin-top: 10px;
}

/* Flash Messages Container */
.flash-container {
    position: fixed;
    top: 100px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
}

.flash-message {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    box-shadow: 
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
    margin: 0;
    animation: slideInRight 0.4s ease-out;
    word-break: break-word;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    position: relative;
    overflow: hidden;
}

.flash-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
}

.flash-icon {
    margin-right: 12px;
    display: flex;
    align-items: center;
}

.flash-icon i {
    font-size: 20px;
}

.flash-text {
    flex: 1;
    line-height: 1.5;
}

.flash-message.success { 
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}
.flash-message.error { 
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}
.flash-message.warning { 
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}
.flash-message.info { 
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

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

/* Responsive flash messages */
@media (max-width: 768px) {
    .flash-container {
        top: 80px;
        right: 15px;
        left: 15px;
        max-width: none;
    }
    
    .flash-message {
        padding: 14px 18px;
        font-size: 13px;
    }
    
    .flash-icon i {
        font-size: 18px;
    }
}

/* =======================
   Modals & Sidebar
======================= */
.modal, #micModal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; 
    top: 0; 
    right: 0; 
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.modal.active, #micModal.active { 
    display: flex; 
}

.modal-content, #micModalContent {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px 50px;
    border-radius: 20px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-content .close, #micModalContent .close {
    position: absolute;
    right: 25px; 
    top: 20px;
    font-size: 28px; 
    font-weight: bold; 
    color: #64748b;
    cursor: pointer; 
    background: transparent; 
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-content .close:hover, #micModalContent .close:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    transform: rotate(90deg);
}

#phraseSidebar {
    position: fixed; 
    top: 0; 
    right: -500px;
    width: 400px; 
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-left: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: -10px 0 25px rgba(0, 0, 0, 0.1);
    padding: 30px; 
    overflow-y: auto;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
}

#phraseSidebar.active { 
    right: 0; 
}

/* Responsive modals */
@media (max-width: 768px) {
    .modal-content, #micModalContent {
        padding: 25px 30px;
        margin: 10px;
        width: calc(100% - 20px);
        max-height: calc(100vh - 20px);
    }
    
    .modal-content .close, #micModalContent .close {
        right: 15px;
        top: 15px;
        font-size: 24px;
        width: 35px;
        height: 35px;
    }
    
    #phraseSidebar {
        width: 100%;
        right: -100%;
        padding: 20px;
    }
}

/* =======================
   Section Collapse
======================= */
.section-title {
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 600;
    color: #374151;
    transition: all 0.3s ease;
    user-select: none;
    padding: 12px 16px;
    border-radius: 10px;
    background: linear-gradient(145deg, #f8fafc, #ffffff);
    border: 1px solid #e2e8f0;
    margin-bottom: 15px;
}

.section-title:hover { 
    color: #dc2626;
    background: linear-gradient(145deg, #ffffff, #f1f5f9);
    transform: translateX(5px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.section-title .chevron { 
    margin-left: auto; 
    font-size: 18px; 
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #9ca3af;
}

.section-title.collapsed .chevron { 
    transform: rotate(-90deg); 
}

.section-content {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: 
        max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.5s ease,
        padding 0.5s ease;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 0 20px;
    margin-bottom: 20px;
}

.section-content.expanded { 
    max-height: 2000px; 
    opacity: 1;
    padding: 20px;
    border: 1px solid #e2e8f0;
}

/* =======================
   Animations
======================= */
@keyframes fadeOut { 
    from { opacity: 1; } 
    to { opacity: 0; } 
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

/* Loading animation */
.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

/* Smooth transitions for all interactive elements */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

/* Focus animations */
@keyframes focusRing {
    0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

/* =======================
   Players
======================= */
.players-row { 
    display: flex; 
    justify-content: space-between; 
    width: 100%; 
    margin-bottom: 15px;
    gap: 10px;
}

.player { 
    flex: 1;
    margin: 0 5px;
    padding: 15px;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    text-align: center;
    transition: all 0.3s ease;
}

.player:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.player-name { 
    font-weight: 700; 
    margin-bottom: 10px;
    color: #374151;
    font-size: 16px;
}

.pl-options { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px;
    justify-content: center;
}

.pl-option-btn { 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.pl-option-btn:hover { 
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Responsive players */
@media (max-width: 768px) {
    .players-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .player {
        margin: 0;
        padding: 12px;
    }
    
    .player-name {
        font-size: 15px;
        margin-bottom: 8px;
    }
    
    .pl-option-btn {
        font-size: 10px;
        padding: 5px 10px;
    }
}

/* =======================
   Accessibility Focus
======================= */
a:focus, 
button:focus, 
input:focus, 
select:focus { 
    outline: 3px solid #dc2626; 
    outline-offset: 2px;
    animation: focusRing 0.6s ease-out;
}

/* Focus visible pour les navigateurs modernes */
a:focus-visible, 
button:focus-visible, 
input:focus-visible, 
select:focus-visible {
    outline: 3px solid #dc2626;
    outline-offset: 2px;
}

/* Supprime l'outline par défaut pour les clics souris */
a:focus:not(:focus-visible), 
button:focus:not(:focus-visible), 
input:focus:not(:focus-visible), 
select:focus:not(:focus-visible) {
    outline: none;
}

/* Amélioration du contraste pour l'accessibilité */
.high-contrast {
    filter: contrast(150%);
}

/* Texte alternatif pour les éléments décoratifs */
.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;
}

/* =======================
   Responsive Enhancements
======================= */
@media (max-width: 1200px) {
    .container {
        max-width: 95%;
        margin: 20px auto;
        padding: 25px;
    }
    
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
}

@media (max-width: 992px) {
    .container {
        padding: 20px;
        margin: 15px auto;
    }
    
    .main-title { font-size: 2.4rem; }
    .page-title { font-size: 1.8rem; }
    
    .tabs, .tabs-container { 
        gap: 6px; 
        margin-bottom: 20px; 
    }
    
    .tab, .tab-link { 
        padding: 12px 20px; 
        font-size: 15px; 
    }
}

@media (max-width: 768px) {
    body { 
        font-size: 15px; 
        background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    }
    
    main {
        padding: 15px;
    }
    
    h1 { 
        font-size: 2rem; 
        margin-bottom: 20px;
    }
    
    h2 { 
        font-size: 1.6rem; 
        margin-bottom: 18px;
    }
    
    .main-title { 
        font-size: 2rem; 
        margin-bottom: 25px;
    }
    
    .container {
        margin: 10px;
        padding: 15px;
        border-radius: 16px;
    }
    
    .form-container {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .btn { 
        font-size: 13px; 
        padding: 10px 18px;
        min-width: 100px;
    }
    
    .tabs, .tabs-container { 
        gap: 4px; 
        margin-bottom: 15px;
        padding: 0 5px;
    }
    
    .tab, .tab-link { 
        padding: 10px 16px; 
        font-size: 14px;
        border-radius: 8px 8px 0 0;
    }
    
    .subcategory-title { 
        font-size: 18px; 
        margin-bottom: 12px;
    }
    
    .btn-add { 
        width: 100%; 
        font-size: 15px;
        padding: 14px;
        margin-top: 10px;
    }
    
    .modal-content, #micModalContent { 
        padding: 20px 25px;
        border-radius: 16px;
    }
    
    .options {
        gap: 12px;
    }
    
    .options label {
        padding: 10px 14px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    body { 
        font-size: 14px; 
    }
    
    main {
        padding: 10px;
    }
    
    h1 { 
        font-size: 1.8rem; 
        margin-bottom: 15px;
    }
    
    h2 { 
        font-size: 1.4rem; 
        margin-bottom: 15px;
    }
    
    .main-title { 
        font-size: 1.8rem; 
        margin-bottom: 20px;
    }
    
    .container {
        margin: 5px;
        padding: 12px;
        border-radius: 12px;
    }
    
    .form-container {
        padding: 15px;
    }
    
    .btn { 
        font-size: 12px; 
        padding: 8px 16px;
        min-width: 90px;
    }
    
    .tabs, .tabs-container { 
        gap: 3px; 
        margin-bottom: 12px;
    }
    
    .tab, .tab-link { 
        padding: 8px 12px; 
        font-size: 13px;
    }
    
    .subcategory-title { 
        font-size: 16px; 
        margin-bottom: 10px;
    }
    
    .btn-add { 
        width: 100%; 
        font-size: 14px;
        padding: 12px;
    }
    
    .modal-content, #micModalContent { 
        padding: 15px 20px;
        border-radius: 12px;
    }
    
    .login-container {
        margin: 20px auto;
        padding: 25px;
    }
    
    .login-container h2 {
        font-size: 24px;
        margin-bottom: 25px;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="date"],
    input[type="number"],
    select,
    .dropdown {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .options {
        gap: 10px;
    }
    
    .options label {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* Ultra-wide screens */
@media (min-width: 1600px) {
    .container {
        max-width: 1500px;
    }
    
    .main-title { 
        font-size: 3.2rem; 
    }
    
    h1 { 
        font-size: 2.8rem; 
    }
    
    h2 { 
        font-size: 2.2rem; 
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .btn, .tab, .tab-link {
        border: 0.5px solid transparent;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
