html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}












/* Styles généraux optimisés */
.planning-container {
    overflow-x: auto;
    overflow-y: visible;
    max-width: 100vw;
    margin: 0 -15px; /* Compense le padding du container Bootstrap */
}

.planning-table {
    min-width: 800px;
    margin-bottom: 0;
    font-size: 0.875rem;
}

/* En-tête sticky optimisé */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: var(--header-bg);
    box-shadow: var(--sticky-shadow);
}

/* Colonne des archers sticky */
.archer-column {
    position: sticky;
    left: 0;
    z-index: 1010;
    background: white;
    min-width: 180px;
    max-width: 180px;
    box-shadow: 2px 0 4px rgba(0,0,0,0.1);
    font-weight: 500;
}

.archer-header {
    position: sticky;
    left: 0;
    top: 0;
    z-index: 1030;
    background: var(--header-bg);
}

/* Styles des compétitions */
.competition-header {
    background: var(--header-bg);
    padding: 0.5rem;
    text-align: center;
    vertical-align: middle;
    min-width: 120px;
}

.competition-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 0.25rem;
}

.competition-dates {
    font-size: 0.75rem;
    margin: 0.25rem 0;
    color: #6c757d;
}

.competition-actions {
    margin-top: 0.5rem;
}

    .competition-actions a {
        color: #495057;
        text-decoration: none;
        margin: 0 0.25rem;
        font-size: 1.1em;
    }

        .competition-actions a:hover {
            color: #007bff;
        }

/* Styles des départements */
.depart-header {
    writing-mode: vertical-lr;
    text-orientation: mixed;
    min-width: 40px;
    max-width: 40px;
    padding: 0.25rem;
    font-size: 0.75rem;
    text-align: center;
    cursor: pointer;
    background: transparent;
    border: none;
    height: 120px;
    white-space: nowrap;
}

.depart-complet {
    background-color: #ffe6e6;
    border-left: 3px solid #dc3545;
    color: #dc3545;
    font-weight: bold;
}

/* Cellules d'inscription */
.inscription-cell {
    text-align: center;
    vertical-align: middle;
    padding: 0.5rem 0.25rem;
    min-width: 40px;
    max-width: 40px;
    position: relative;
}

.inscription-code {
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    color: #495057;
}

.inscription-canceled {
    text-decoration: line-through;
    color: #6c757d;
    opacity: 0.7;
}

.inscription-code:hover {
    color: #007bff;
    text-decoration: none;
}

/* Séparateurs visuels */
.competition-separator {
    width: 3px;
    background-color: var(--border-color);
    min-width: 3px;
    max-width: 3px;
    padding: 0;
}

/* Modal/Tooltip pour les détails */
.detail-popup {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 0.75rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    z-index: 1050;
    min-width: 200px;
    font-size: 0.875rem;
    display: none;
}

.detail-trigger:hover .detail-popup {
    display: block;
}

/* Légende des statuts */
.status-legend {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
}

    .status-legend .badge {
        margin-right: 0.5rem;
        margin-bottom: 0.25rem;
    }

/* Responsive Design */
@media (max-width: 768px) {
    .planning-container {
        margin: 0 -15px;
    }

    .planning-table {
        font-size: 0.75rem;
        min-width: 600px;
    }

    .archer-column {
        min-width: 140px;
        max-width: 140px;
    }

    .competition-header {
        padding: 0.25rem;
        min-width: 100px;
        font-size: 0.75rem;
    }

    .depart-header {
        min-width: 35px;
        max-width: 35px;
        height: 100px;
        font-size: 0.7rem;
    }

    .inscription-cell {
        min-width: 35px;
        max-width: 35px;
        padding: 0.25rem;
    }

    .inscription-code {
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .status-legend {
        padding: 0.5rem;
    }

        .status-legend .badge {
            font-size: 0.7rem;
            padding: 0.2rem 0.4rem;
        }
}

/* Mode sombre (optionnel) */
@media (prefers-color-scheme: dark) {
    :root {
        --header-bg: #343a40;
        --border-color: #495057;
    }

    .archer-column, .archer-header {
        background: #212529;
        color: white;
    }

    .detail-popup {
        background: #343a40;
        color: white;
        border-color: #495057;
    }
}

/* Améliorations d'accessibilité */
.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;
}

/* Animations subtiles */
.inscription-code, .competition-actions a {
    transition: color 0.2s ease;
}

.detail-popup {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}




