.moyenne-nationale {
    background: linear-gradient(90deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 10px;
    font-size: 1.1em;
    font-weight: bold;
    box-shadow: 0 1px 3px rgba(100,181,246,0.08);
    display: flex;
    align-items: center;
    gap: 10px;
}
.moyenne-nationale .icon-moyenne {
    font-size: 1.3em;
    margin-right: 6px;
}
.moyenne-nationale .label {
    color: #1976d2;
    font-weight: bold;
    margin-right: 8px;
}
.moyenne-nationale .valeur-moyenne {
    color: #1565c0;
    background: #fff;
    border-radius: 4px;
    padding: 2px 10px;
    font-size: 1.15em;
    margin-left: 8px;
    box-shadow: 0 1px 2px rgba(21,101,192,0.07);
}
.badge-beursault {
    background: #fff;
    color: #111;
    border: 2px solid #111;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
    display: inline-block;
    min-width: 70px;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
/* Badges pour les types de concours (compatibilité historique_archer.php) */
.badge-salle {
    background-color: #64B5F6;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
    display: inline-block;
    min-width: 70px;
    text-align: center;
}
.badge-taedn {
    background-color: #4CAF50;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
    display: inline-block;
    min-width: 70px;
    text-align: center;
}
.badge-taedi {
    background-color: #FF9800;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
    display: inline-block;
    min-width: 70px;
    text-align: center;
}
.badge-campagne {
    background-color: #eaed29;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
    display: inline-block;
    min-width: 70px;
    text-align: center;
}
.badge-nature {
    background-color: #8d6e63;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
    display: inline-block;
    min-width: 70px;
    text-align: center;
}
.badge-3d {
    background-color: #f57c00;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
    display: inline-block;
    min-width: 70px;
    text-align: center;
}
.btn-generic {
    background-color: #bdbdbd;
    color: #333;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-generic:hover {
    background-color: #9e9e9e;
}
body {
    font-family: Arial, sans-serif;
    margin: 20px;
    background-color: #f5f5f5;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
h1 {
    color: #333;
    border-bottom: 3px solid #64B5F6;
    padding-bottom: 10px;
}
.btn {
    background-color: #64B5F6;
    color: black;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 20px;
}
.btn:hover {
    background-color: #42A5F5;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}
th {
    background-color: #64B5F6;
    color: white;
}
tr:hover {
    background-color: #f5f5f5;
}
.score {
    font-weight: bold;
    font-size: 1.1em;
    color: #64B5F6;
}
.actions {
    white-space: nowrap;
}
.actions a {
    margin-right: 10px;
    color: black;
    text-decoration: none;
    font-size: 1.2em;
}
.actions a:hover {
    text-decoration: none;
    opacity: 0.7;
}
.no-data {
    text-align: center;
    padding: 40px;
    color: #999;
}
.type-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
}
.type-salle {
    background-color: #64B5F6;
    color: white;
}
.type-taedn {
    background-color: #4CAF50;
    color: white;
}
.type-taedi {
    background-color: #FF9800;
    color: white;
}
.type-campagne {
    background-color: #388e3c !important;
    color: #fff !important;
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
    text-align: center;
    min-width: 70px;
}
.type-nature {
    background-color: #8d6e63;
    color: white;
}
.type-3d {
    background-color: #f57c00;
    color: white;
}
.classements-section {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 2px solid #64B5F6;
}
.classements-section h2 {
    margin-top: 0;
    color: #333;
    font-size: 1.5em;
    border-bottom: 2px solid #64B5F6;
    padding-bottom: 10px;
}
.classements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
}
.classement-item {
    background-color: white;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.classement-item .discipline {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 10px;
    color: #64B5F6;
}
.classement-item .rang {
    display: flex;
    align-items: center;
    margin: 5px 0;
    font-size: 0.95em;
}
.classement-item .rang img {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}
.classement-item .rang strong {
    color: #333;
    margin-right: 5px;
}
.classement-item .rang .label {
    color: #666;
    margin-right: 5px;
}
.classement-item .rang .total {
    color: #999;
    font-size: 0.9em;
}


.form-group {
margin-bottom: 20px;
}
label {
display: block;
margin-bottom: 5px;
font-weight: bold;
color: #555;
}
input[type="text"],
input[type="email"],
input[type="password"] {
width: 100%;
padding: 10px;
border: 1px solid #ddd;
border-radius: 4px;
box-sizing: border-box;
font-size: 14px;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
outline: none;
border-color: #4CAF50;
}

.btn-secondary {
background-color: #9E9E9E;
}
.btn-secondary:hover {
background-color: #757575;
}
.buttons {
display: flex;
gap: 10px;
margin-top: 30px;
}
.error {
background-color: #ffebee;
border: 1px solid #f44336;
color: #c62828;
padding: 12px;
border-radius: 4px;
margin-bottom: 20px;
}
.success {
background-color: #e8f5e9;
border: 1px solid #4caf50;
color: #2e7d32;
padding: 12px;
border-radius: 4px;
margin-bottom: 20px;
}
.info-box {
background-color: #e3f2fd;
border-left: 4px solid #2196F3;
padding: 15px;
margin-bottom: 20px;
border-radius: 4px;
}
.help-text {
font-size: 0.85em;
color: #666;
margin-top: 5px;
}

input[type="text"],
        input[type="number"],
        select {
            width: 100%;
            padding: 8px;
            border: 1px solid #ddd;
            border-radius: 4px;
            box-sizing: border-box;
        }
        .fleches-grid {
            display: table;
            width: 100%;
            border-collapse: collapse;
        }
        .volee-row {
            display: table-row;
            border-bottom: 1px solid #ddd;
        }
        .volee-row:hover {
            background-color: #f9f9f9;
        }
        .volee-cell {
            display: table-cell;
            padding: 8px;
            text-align: center;
            border: 1px solid #ddd;
            vertical-align: middle;
        }
        .volee-cell.num-volee {
            font-weight: bold;
            background-color: #f5f5f5;
            width: 60px;
        }
        .volee-cell.fleche-input {
            width: 60px;
            padding: 2px;
        }
        .volee-cell.total-volee {
            font-weight: bold;
            background-color: #e8f5e9;
            width: 70px;
            font-size: 1.1em;
        }
        .volee-cell.cumul-volee {
            font-weight: bold;
            background-color: #fff3e0;
            width: 80px;
            font-size: 1.1em;
        }
        .fleche-input input {
            width: 55px;
            height: 40px;
            text-align: center;
            padding: 5px 2px;
            font-size: 1.2em;
            font-weight: bold;
            border: 2px solid #4CAF50;
            border-radius: 4px;
        }
        .fleche-input input::-webkit-inner-spin-button,
        .fleche-input input::-webkit-outer-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }
        .fleche-input input:focus {
            outline: none;
            border-color: #2196F3;
            background-color: #e3f2fd;
        }
        .volee-section {
            margin-bottom: 30px;
            padding: 15px;
            background-color: white;
            border: 2px solid #4CAF50;
            border-radius: 4px;
        }
        .volee-title {
            font-weight: bold;
            color: #4CAF50;
            margin-bottom: 10px;
            font-size: 1.1em;
        }
        .vague-section {
            margin-top: 20px;
            padding: 15px;
            background-color: white;
            border-radius: 4px;
            border: 2px solid #2e7d32;
        }
        .vague-title {
            font-weight: bold;
            color: #2e7d32;
            margin-bottom: 15px;
            font-size: 1.2em;
            text-align: center;
            background-color: #e8f5e9;
            padding: 10px;
            border-radius: 4px;
        }
        .vague-header {
            display: table-row;
            font-weight: bold;
            background-color: #4CAF50;
            color: white;
        }
        .vague-header .volee-cell {
            padding: 10px 8px;
            font-size: 0.9em;
        }
        .score-total {
            font-size: 1.5em;
            font-weight: bold;
            color: #4CAF50;
            text-align: center;
            padding: 20px;
            background-color: #f1f1f1;
            border-radius: 4px;
            margin-top: 20px;
            border: 3px solid #4CAF50;
        }
       
        .buttons {
            margin-top: 30px;
            text-align: center;
        }
        #flechesContainer {
            display: none;
        }
        .info-box {
            background-color: #e3f2fd;
            border-left: 4px solid #2196F3;
            padding: 15px;
            margin-bottom: 20px;
        }
        @media print {
            .btn, .buttons, .form-section {
                display: none;
            }
            body {
                background-color: white;
            }
            .container {
                box-shadow: none;
            }
        }

         .register-container {
            background-color: white;
            padding: 40px;
            border-radius: 10px;
            box-shadow: 0 10px 25px rgba(0,0,0,0.2);
            width: 100%;
            max-width: 500px;
        }

        input[type="text"],
        input[type="email"],
        input[type="password"] {
            width: 100%;
            padding: 12px;
            border: 2px solid #ddd;
            border-radius: 5px;
            box-sizing: border-box;
            font-size: 1em;
            transition: border-color 0.3s;
        }
        input[type="text"]:focus,
        input[type="email"]:focus,
        input[type="password"]:focus {
            outline: none;
            border-color: #667eea;
        }

        .error {
            background-color: #fee;
            color: #c33;
            padding: 10px;
            border-radius: 5px;
            margin-bottom: 20px;
            border-left: 4px solid #c33;
        }
        .success {
            background-color: #efe;
            color: #3c3;
            padding: 10px;
            border-radius: 5px;
            margin-bottom: 20px;
            border-left: 4px solid #3c3;
        }
        .help-text {
            font-size: 0.85em;
            color: #666;
            margin-top: 3px;
        }
        .password-match {
            font-size: 0.85em;
            margin-top: 5px;
            font-weight: bold;
        }
        .password-match.valid {
            color: #3c3;
        }
        .password-match.invalid {
            color: #c33;
        }
        .links {
            text-align: center;
            margin-top: 20px;
        }
        .links a {
            color: #667eea;
            text-decoration: none;
        }
        .links a:hover {
            text-decoration: underline;
        }

        .login-container {
            background-color: white;
            padding: 40px;
            border-radius: 10px;
            box-shadow: 0 10px 25px rgba(0,0,0,0.1);
            width: 100%;
            max-width: 400px;
        }
        .logo {
            text-align: center;
            margin-bottom: 30px;
        }
        .logo h1 {
            color: #64B5F6;
            margin: 0;
            font-size: 2.5em;
        }
        .logo p {
            color: #666;
            margin: 5px 0 0 0;
            font-size: 0.9em;
        }
 .info-box {
            background-color: #e3f2fd;
            border-left: 4px solid #2196F3;
            padding: 15px;
            margin-bottom: 20px;
            border-radius: 4px;
        }
        .warning-box {
            background-color: #fff3cd;
            border-left: 4px solid #ffc107;
            padding: 15px;
            margin-bottom: 20px;
            border-radius: 4px;
        }
        
        .checkbox-cell {
            text-align: center;
            width: 50px;
        }
        #selectAll {
            cursor: pointer;
        }
        .buttons {
            margin-top: 20px;
            text-align: center;
        }
        .info-box {
            background-color: #f9f9f9;
            border-left: 4px solid #64B5F6;
            padding: 15px;
            margin-bottom: 20px;
            border-radius: 8px;
        }
        .readonly-field {
            background-color: #e9ecef;
            color: #6c757d;
        }
/* Responsive adjustments for mobile */
@media screen and (max-width: 768px) {
    .container {
        padding: 10px;
    }

    h1 {
        font-size: 1.5em;
    }

    .btn, .btn-generic {
        display: block;
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
        box-sizing: border-box;
    }
    
    .actions .btn, .actions .btn-secondary {
        width: 100%;
        text-align: center;
        margin-right: 0;
        margin-left: 0;
        box-sizing: border-box;
    }

    .btn-generic {
        margin-bottom: 20px; /* More space after the import button */
    }

    /* Adjustments for the rankings section */
    .classements-grid {
        grid-template-columns: 1fr;
    }

    /* Responsive table for score sheets */
    .table-feuilles-perso, .table-feuilles-archer,
    .table-feuilles-perso thead, .table-feuilles-archer thead,
    .table-feuilles-perso tbody, .table-feuilles-archer tbody,
    .table-feuilles-perso th, .table-feuilles-archer th,
    .table-feuilles-perso td, .table-feuilles-archer td,
    .table-feuilles-perso tr, .table-feuilles-archer tr {
        display: block;
    }

    .table-feuilles-perso thead tr, .table-feuilles-archer thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .table-feuilles-perso tr, .table-feuilles-archer tr {
        border: 1px solid #ccc;
        margin-bottom: 10px;
    }

    .table-feuilles-perso td, .table-feuilles-archer td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 50%;
        text-align: right;
    }

    .table-feuilles-perso td:before, .table-feuilles-archer td:before {
        position: absolute;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
    }

    /* Labeling for Personal Score Sheet table */
    .table-feuilles-perso td:nth-of-type(1):before { content: "Date"; }
    .table-feuilles-perso td:nth-of-type(2):before { content: "Concours"; }
    .table-feuilles-perso td:nth-of-type(3):before { content: "Ville"; }
    .table-feuilles-perso td:nth-of-type(4):before { content: "Type"; }
    .table-feuilles-perso td:nth-of-type(5):before { content: "Arme"; }
    .table-feuilles-perso td:nth-of-type(6):before { content: "Blason"; }
    .table-feuilles-perso td:nth-of-type(7):before { content: "Score"; }
    .table-feuilles-perso td:nth-of-type(8):before { content: "Classt."; }
    .table-feuilles-perso td:nth-of-type(9):before { content: "Zone"; }
    .table-feuilles-perso td:nth-of-type(10):before { content: "Actions"; }

    /* Labeling for Archer's Score Sheet table */
    .table-feuilles-archer td:nth-of-type(1):before { content: "Concours"; }
    .table-feuilles-archer td:nth-of-type(2):before { content: "Ville"; }
    .table-feuilles-archer td:nth-of-type(3):before { content: "Date"; }
    .table-feuilles-archer td:nth-of-type(4):before { content: "Type"; }
    .table-feuilles-archer td:nth-of-type(5):before { content: "Arme"; }
    .table-feuilles-archer td:nth-of-type(6):before { content: "Blason"; }
    .table-feuilles-archer td:nth-of-type(7):before { content: "Score"; }
    .table-feuilles-archer td:nth-of-type(8):before { content: "Zone"; }
    .table-feuilles-archer td:nth-of-type(9):before { content: "Classement"; }
    .table-feuilles-archer td:nth-of-type(10):before { content: "Actions"; }

    .actions {
        white-space: normal;
        text-align: center;
    }
    
    td .actions a {
        font-size: 1em; /* Adjust icon size for mobile */
    }

    td.score {
        font-size: 1.2em; /* Make score stand out more */
    }

    /* Responsive adjustments for ajouter_feuille_marque.php */
    .fleches-grid {
        display: block;
        width: 100%;
    }
    .vague-header {
        display: none;
    }
    .volee-row {
        display: flex;
        flex-wrap: wrap;
        border: 1px solid #ccc;
        margin-bottom: 10px;
        padding: 5px;
        border-radius: 4px;
    }
    .volee-cell {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        border: none;
        padding: 2px;
    }
    .volee-cell.num-volee {
        width: 100%;
        background-color: #f5f5f5;
        font-weight: bold;
        padding: 5px;
        margin-bottom: 5px;
        border-radius: 4px;
        text-align: center;
    }
    .volee-cell.fleche-input {
        flex-grow: 1;
        min-width: 45px;
    }
    .fleche-input input {
        width: 100%;
        height: 40px;
        font-size: 1em;
    }
    .volee-cell.total-volee, .volee-cell.cumul-volee {
        width: 50%;
        box-sizing: border-box;
        padding: 8px;
        margin-top: 5px;
        font-size: 1em;
    }
    .volee-cell.total-volee:before {
        content: "Total Volée";
        font-size: 0.8em;
        color: #666;
    }
    .volee-cell.cumul-volee:before {
        content: "Cumul";
        font-size: 0.8em;
        color: #666;
    }
    .score-total {
        font-size: 1.2em;
    }
    .buttons {
        flex-direction: column;
        gap: 0;
    }
    .buttons .btn, .buttons .btn-secondary {
        width: 100%;
        box-sizing: border-box;
        margin: 5px 0;
    }

    /* Responsive adjustments for statistiques_archer.php */
    .stats-container {
        padding: 0;
    }
    .records-grid {
        grid-template-columns: 1fr; /* Force single column on mobile */
    }
    .record-card {
        padding: 15px;
    }
    .record-score {
        font-size: 2em;
        gap: 10px;
        flex-direction: column;
        align-items: flex-start;
    }
    .badge-ffta {
        width: 60px;
    }
    .chart-container {
        padding: 10px;
    }
}