/*
 * TargetBooking - CSS Principal
 * Design général du site
 */

:root {
    --blue-light: #87CEEB;
    --blue-dark: #2196F3;
    --green: #4CAF50;
    --green-dark: #388E3C;
    --green-light: #66BB6A;
    --row-alt: #daedf5;
    --bg: #f5f5f5;
    --bg-white: #ffffff;
    --text: #333333;
    --text-light: #666666;
    --border: #dddddd;
    --success: #28a745;
    --danger: #dc3545;
    --orange: #ff846a;
    --radius: 6px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* === Header === */
.site-header {
    background: linear-gradient(135deg, var(--blue-light) 0%, var(--green) 100%);
    color: white;
    padding: 0.8rem 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.header-content h1 {
    font-size: 1.3rem;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.logo {
    height: 50px;
    width: auto;
    border-radius: 4px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.main-nav a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.main-nav a:hover {
    color: white;
    background: rgba(255,255,255,0.15);
}

.lang-switch {
    display: flex;
    gap: 0.3rem;
    margin-left: 0.5rem;
    padding-left: 0.5rem;
    border-left: 1px solid rgba(255,255,255,0.3);
}

.lang-switch a {
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    font-weight: bold;
}

.lang-switch a.active {
    background: rgba(255,255,255,0.25);
    color: white;
}

/* Déconnexion du tireur : icône « porte et flèche », grise, au bout de la barre (le mot n'apparaît que dans le menu ☰) */
.main-nav a.nav-logout {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-left: 0.5rem;
    padding: 0.3rem 0.5rem 0.3rem 0.8rem;
    border-left: 1px solid rgba(255,255,255,0.3);
    border-radius: 0 4px 4px 0;
    color: rgba(255,255,255,0.8);
}
.main-nav a.nav-logout .nav-logout-lbl { display: none; }

/* === Main === */
main { padding: 1.5rem 0 3rem; }

h2 {
    color: var(--green-dark);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

h3 {
    color: var(--green);
    margin: 1.5rem 0 0.8rem;
}

/* === Event cards grid === */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.2rem;
}

.event-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.event-card-header {
    background: linear-gradient(135deg, var(--blue-light) 0%, var(--green) 100%);
    padding: 0.8rem 1rem 0.4rem;
}

.event-card-sub {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    padding: 0 1rem 0.6rem;
    background: linear-gradient(135deg, var(--blue-light) 0%, var(--green) 100%);
    border-bottom: 1px solid #eee;
}

.event-card-date {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}

.event-status-badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.event-status-badge.status-past { background: rgba(158,158,158,0.8); color: white; }
.event-status-badge.status-today { background: rgba(244,67,54,0.8); color: white; }
.event-status-badge.status-current { background: rgba(40,167,69,0.8); color: white; }
.event-status-badge.status-soon { background: rgba(255,193,7,0.85); color: #333; }
.event-status-badge.status-future { background: rgba(255,255,255,0.25); color: white; }

.event-card-body {
    padding: 1rem;
    flex: 1;
}

.event-card-title {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.3;
}

.event-card-title a {
    color: white;
    text-decoration: none;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.event-card-title a:hover {
    color: white;
    text-decoration: underline;
}

.event-card-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.event-info-item {
    font-size: 0.85rem;
    color: var(--text-light);
}

.event-info-icon {
    display: inline-block;
    width: 1.4em;
    text-align: center;
}

.event-card-footer {
    padding: 0.6rem 1rem;
    border-top: 1px solid #eee;
    text-align: right;
}

/* === Event detail === */
.event-info {
    background: var(--bg-white);
    padding: 1.2rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    border-top: 3px solid var(--blue-light);
}

.event-info p {
    margin-bottom: 0.4rem;
}

.event-info strong {
    color: var(--green-dark);
}

/* === Data table === */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.data-table thead th {
    background: var(--blue-light);
    color: #333;
    padding: 0.7rem 0.8rem;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 600;
    border-bottom: 2px solid #6bb8d6;
}

.data-table thead th:first-child {
    border-top-left-radius: var(--radius);
}

.data-table thead th:last-child {
    border-top-right-radius: var(--radius);
}

.data-table td {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.data-table tbody tr:nth-child(even) td {
    background: var(--row-alt);
}

.data-table tbody tr:last-child td { border-bottom: none; }

.data-table tbody tr:hover td {
    background: #c8e0ed;
}

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.btn-primary:hover {
    /* Au survol le bouton FONCE (texte blanc bien contrasté) et se soulève : l'ancien dégradé plus clair se voyait à peine. */
    background: linear-gradient(135deg, var(--green-dark) 0%, #1b5e20 100%);
    box-shadow: 0 5px 14px rgba(27, 94, 32, 0.55);
    transform: translateY(-2px);
}

/* Un bouton-LIEN garde la couleur de son texte au survol : sans cela, la règle générale a:hover (vert) rendait le texte vert sur fond vert,
   donc invisible (« Suivant » de l'assistant, 14.11.2026). */
a.btn-primary:hover, a.btn-cancel:hover, a.btn-danger:hover { color: white; }
a.btn-outline:hover { color: white; }

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

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

.btn-cancel:hover {
    background: #c82333;
}

/* === Badges === */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-full { background: var(--danger); color: white; }
.text-success { color: var(--success); font-weight: 600; }
.text-danger { color: var(--danger); font-weight: 600; }

/* === Status indicators === */
.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-active { background: var(--success); }
.status-inactive { background: #6c757d; }
.status-upcoming { background: var(--orange); }
.status-future { background: #ff8c00; }
.status-current { background: #28a745; }
.status-past { background: #dc3545; }

/* === Status legend === */
.status-legend {
    margin: 20px auto;
    max-width: 600px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.status-legend-title {
    text-align: center;
    margin-bottom: 10px;
    font-weight: bold;
    color: #333;
}

.status-legend-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 12px;
}

.status-legend-group {
    flex: 1;
    min-width: 140px;
}

/* === No data === */
.no-data {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    font-style: italic;
}

/* === Forms === */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: Arial, sans-serif;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--blue-light);
    outline: none;
    box-shadow: 0 0 0 3px rgba(135, 206, 235, 0.3);
}

/* Case à cocher + son texte, sur une seule ligne. Sans cette règle, `.form-group input` (largeur 100 %)
   étire la case sur toute la ligne et pousse le texte ailleurs. */
.form-group .checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
    cursor: pointer;
}

.form-group .checkbox-label input[type="checkbox"] {
    width: auto;
    padding: 0;
    margin: 0;
    flex: none;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

/* Téléphone : 15 caractères au plus courants (« +39 02 3031 24228 »), pas toute la largeur de la page. */
.form-group.tel-court { max-width: 13rem; }

/* Rue / NPA / Localité : le NPA (4 ou 5 chiffres) est étroit, la rue et la localité prennent la place (retour de David, 02.11.2026). */
.form-row.adresse-ligne > .adr-rue { flex: 3 1 14rem; }
.form-row.adresse-ligne > .adr-npa { flex: 0 0 6.5rem; }
.form-row.adresse-ligne > .adr-ort { flex: 2 1 10rem; }

/* === Register name form (step 1) === */
.register-name-form {
    max-width: 500px;
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-top: 3px solid var(--blue-light);
}

.register-name-form .form-group {
    position: relative;
}

.register-name-form input[type="text"] {
    font-size: 1.1rem;
    padding: 0.7rem;
}

/* === Autocomplete === */
.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
}

.autocomplete-list:empty {
    display: none;
}

.autocomplete-item {
    padding: 0.5rem 0.7rem;
    cursor: pointer;
    font-size: 0.9rem;
    border-bottom: 1px solid #f0f0f0;
}

.autocomplete-item:hover {
    background: var(--blue-light);
    color: #333;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

/* === Verein search autocomplete (personalien) === */
.verein-ac-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
}
.verein-ac-list:empty { display: none; }
.verein-ac-item {
    padding: 0.5rem 0.7rem;
    cursor: pointer;
    font-size: 0.9rem;
    border-bottom: 1px solid #f0f0f0;
}
.verein-ac-item:hover { background: var(--blue-light); }
.verein-ac-item:last-child { border-bottom: none; }
.verein-clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(25%);
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #999;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.verein-clear-btn:hover { color: #333; }

/* === Form actions === */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* === Dev badge === */
.dev-badge {
    display: inline-block;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* === Shooter choice list (login multi-step) === */
.shooter-choice-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.shooter-choice-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 1rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: border-color 0.2s;
}

.shooter-choice-item:hover {
    border-color: #87CEEB;
}

.shooter-choice-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.shooter-choice-info strong {
    font-size: 0.95rem;
}

.shooter-choice-detail {
    font-size: 0.8rem;
    color: #666;
}

.btn-small {
    padding: 0.3rem 0.8rem;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* === Messages === */
.msg-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 0.8rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.msg-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 0.8rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.msg-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 0.8rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.msg-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
    padding: 0.8rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

/* === Main content flex grow (push footer to bottom) === */
main.container, .admin-wrapper {
    flex: 1;
}

/* === Footer === */
.site-footer {
    background: #2c3e50;
    color: rgba(255,255,255,0.7);
    padding: 1rem 0;
    text-align: center;
    font-size: 0.8rem;
    margin-top: auto;
}

.site-footer a {
    color: var(--blue-light);
    text-decoration: none;
}

.site-footer a:hover { color: white; }

/* === Landing page === */
.landing {
    background: #FCF7F7;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing-container {
    text-align: center;
    padding: 2rem;
    width: 100%;
    max-width: 900px;
}

.landing-content {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.landing-logo {
    max-width: 300px;
    margin-bottom: 2rem;
}

.clients-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.client-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    padding: 1rem 0.75rem 0.75rem;
    width: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    text-decoration: none;
    color: #222;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

.client-card:hover {
    background: #f8f9fa;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: #bbb;
}

.client-card img { max-width: 100px; max-height: 70px; }

.landing-footer {
    margin-top: 3rem;
    color: #888;
    font-size: 0.8rem;
}

/* === Progress bar (for series occupancy) === */
.progress-bar {
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    height: 8px;
}

.progress-fill {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--green) 0%, var(--blue-dark) 100%);
    transition: width 0.3s;
}

/* === Event header info === */
.event-header-info {
    margin-bottom: 1.5rem;
}

.event-meta-bar {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: var(--text-light);
    font-size: 0.95rem;
    margin-top: 0.3rem;
}

/* === Day list (anlass) === */
.daylist-container {
    max-width: 1200px;
}

.day-block {
    margin-bottom: 1rem;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.day-header {
    background: linear-gradient(135deg, #4ade80 0%, #3b82f6 100%);
    color: white;
    padding: 0.7rem 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    user-select: none;
}

.day-header:hover {
    filter: brightness(1.05);
}

.day-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.day-toggle {
    font-size: 0.8rem;
    width: 1.2rem;
}

.day-series-count {
    font-size: 0.85rem;
    opacity: 0.85;
}

.day-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.day-stats {
    font-size: 0.85rem;
}

.day-header .progress-bar {
    width: 100px;
    height: 6px;
    background: rgba(255,255,255,0.3);
}

.day-header .progress-fill {
    background: #e74c3c;
}

.day-content {
    background: var(--bg-white);
    padding: 0.8rem;
}

.text-free { color: #15803d; font-weight: 600; }
.text-full { color: var(--danger); font-weight: 600; }

/* === Series block === */
.series-block {
    margin-bottom: 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.series-block:last-child {
    margin-bottom: 0;
}

.series-header {
    background: linear-gradient(135deg, var(--green) 0%, var(--blue-dark) 100%);
    color: white;
    padding: 0.5rem 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.series-title {
    font-weight: 600;
}

.series-stats {
    font-size: 0.85rem;
}

/* === Target grid === */
.targets-grid {
    display: grid;
    gap: 4px;
    padding: 0.5rem;
    grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
}

/* Optimized grid columns per target count */
.targets-grid.targets-5 { grid-template-columns: repeat(5, 1fr); }
.targets-grid.targets-6 { grid-template-columns: repeat(6, 1fr); }
.targets-grid.targets-8 { grid-template-columns: repeat(8, 1fr); }
.targets-grid.targets-10 { grid-template-columns: repeat(10, 1fr); }
.targets-grid.targets-12 { grid-template-columns: repeat(6, 1fr); }
.targets-grid.targets-15 { grid-template-columns: repeat(5, 1fr); }
.targets-grid.targets-20 { grid-template-columns: repeat(10, 1fr); }
.targets-grid.targets-25 { grid-template-columns: repeat(5, 1fr); }
.targets-grid.targets-30 { grid-template-columns: repeat(10, 1fr); }
.targets-grid.targets-40 { grid-template-columns: repeat(10, 1fr); }
.targets-grid.targets-50 { grid-template-columns: repeat(10, 1fr); }
.targets-grid.targets-60 { grid-template-columns: repeat(10, 1fr); }

/* === Target cards === */
.target-card {
    border-radius: 4px;
    text-align: center;
    min-height: 65px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: transform 0.15s;
}

.target-card:hover {
    transform: scale(1.05);
}

.target-free {
    border: 2px solid var(--green);
    background: #e8f5e9;
    color: var(--green-dark);
    cursor: pointer;
}

.target-free:hover {
    background: #c8e6c9;
}

.target-occupied {
    border: 2px solid var(--danger);
    background: #ffebee;
    color: #333;
}

.target-reserved {
    border: 2px dashed #ffc107;
    background: #fff8e1;
    color: #666;
    cursor: default;
}

.target-reserved:hover {
    transform: none;
}

.target-club-reserved {
    border: 2px solid #87CEEB;
    background: #e8f4fc;
    color: #333;
    cursor: pointer;
}

.target-club-reserved:hover {
    border-color: #2196F3;
    background: #d4ecfa;
}

.target-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 4px;
    font-size: 0.7rem;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.target-number {
    font-weight: 700;
    font-size: 0.75rem;
}

.target-cat {
    font-size: 0.65rem;
    opacity: 0.7;
}

.target-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2px 3px;
    overflow: hidden;
}

.target-name {
    font-weight: 600;
    font-size: 0.7rem;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.target-firstname {
    font-size: 0.65rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.target-score {
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--blue-dark);
    margin-top: 1px;
}

.target-plus {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--green);
}

/* === Login box === */
.login-box {
    max-width: 400px;
    margin: 3rem auto;
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-top: 3px solid var(--blue-light);
}

.login-box h2 { text-align: center; margin-bottom: 1.5rem; }
.login-box .btn { width: 100%; text-align: center; margin-top: 0.5rem; }
.login-reset-conseil {
    background: #fff8e1;
    border: 1px solid #f0c36d;
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.25rem;
    color: var(--text);
}
.login-reset-conseil p { margin: 0 0 0.5rem; }

/* === Admin layout === */
.admin-badge {
    font-size: 0.65rem;
    background: rgba(255,255,255,0.25);
    padding: 2px 8px;
    border-radius: 10px;
    vertical-align: middle;
    margin-left: 0.3rem;
}

/* Legacy admin-wrapper kept for compatibility */
.admin-wrapper {
    display: flex;
    min-height: calc(100vh - 120px);
}

.admin-content {
    flex: 1;
    padding: 1.5rem 2rem;
    overflow-x: auto;
}

/* === Admin header bar (title + button) === */
.admin-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* === Stats grid === */
.stats-grid, .stats-cards {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.stat-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    border-left: 3px solid var(--blue-light);
}

.stat-number {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--green-dark);
}

.stat-label {
    color: var(--text-light);
    font-size: 0.85rem;
}

.stat-link {
    font-size: 0.8rem;
    color: var(--blue-dark);
    text-decoration: none;
}

.stat-link:hover { text-decoration: underline; }

/* === Admin table actions === */
.actions {
    white-space: nowrap;
}

.actions .btn { margin-left: 0.3rem; }

.inactive-row { opacity: 0.6; }

/* === Admin inline form === */
.admin-form-inline {
    background: var(--bg-white);
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.admin-form-inline .form-row {
    align-items: flex-end;
}

/* === Modal / Popup === */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-box {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    min-width: 320px;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border);
    background: var(--blue-light);
    border-radius: var(--radius) var(--radius) 0 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
    line-height: 1;
    padding: 0 0.3rem;
}

.modal-close:hover { color: var(--danger); }

.modal-body {
    padding: 1rem;
    overflow-y: auto;
}

.modal-footer {
    padding: 0.6rem 1rem;
    border-top: 1px solid var(--border);
    text-align: right;
}

/* === Checkbox fieldset / grid === */
.checkbox-fieldset {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
}

.checkbox-fieldset legend {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--green-dark);
    padding: 0 0.3rem;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.2rem 0;
}

.checkbox-item input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* === Categories selector === */
.categories-selector {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.selected-cats-display {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* === Button outline === */
.btn-outline:focus-visible, .btn-primary:focus-visible { outline: 3px solid #1b5e20; outline-offset: 2px; }
.btn-outline {
    background: var(--bg-white);
    color: var(--green-dark);
    border: 1px solid var(--green);
}

.btn-outline:hover {
    /* Au survol le contour se remplit de vert : l'état « sous la souris » est évident. */
    background: var(--green);
    color: white;                       /* boutons ET liens : le texte clair suit le fond vert */
    border-color: var(--green-dark);
    box-shadow: 0 3px 9px rgba(56, 142, 60, 0.35);
}

/* === Category tags === */
.cat-tag {
    display: inline-block;
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.85rem;
    margin: 2px;
}

/* === Inline inputs for tables === */
.input-inline {
    width: 100%;
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 3px;
    font-size: 0.85rem;
    font-family: Arial, sans-serif;
}

.input-inline:focus {
    border-color: var(--blue-light);
    outline: none;
    box-shadow: 0 0 0 2px rgba(135, 206, 235, 0.3);
}

/* === Danger button === */
.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

/* === Position picker (edit mode personalien) === */
.btn-position-picker {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.5rem 0.7rem;
    border: 2px solid var(--blue-light);
    border-radius: var(--radius);
    background: #f0f8ff;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: Arial, sans-serif;
    transition: border-color 0.2s, background 0.2s;
}

.btn-position-picker:hover {
    border-color: var(--blue-dark);
    background: #e3f2fd;
}

.pick-icon {
    font-size: 1.1rem;
    color: var(--blue-dark);
}

/* Target current (in position modal) */
.target-current {
    border: 2px solid var(--blue-dark);
    background: #bbdefb;
    color: var(--text);
    cursor: pointer;
}

.target-current:hover {
    background: #90caf9;
}

.target-current-marker {
    font-size: 1.2rem;
    color: var(--blue-dark);
    font-weight: bold;
}

/* === Popup layout (page autonome, formulaire de données personnelles) === */
.popup-body {
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
}

.popup-card {
    background: var(--bg-white);
    border: 1px solid #bbb;
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 620px;
    overflow: hidden;
}

.popup-header {
    background: var(--blue-light);
    display: flex;
    align-items: center;
    padding: 0.7rem 1rem;
    gap: 0.8rem;
}

.popup-header-left {
    flex-shrink: 0;
}

.popup-logo {
    height: 35px;
    width: auto;
    border-radius: 3px;
}

.popup-header-title {
    flex: 1;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 700;
    color: #333;
    white-space: nowrap;
}

.popup-close {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    font-size: 1.4rem;
    line-height: 1;
    color: #555;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.15s;
}

.popup-close:hover {
    background: rgba(0,0,0,0.1);
    color: var(--danger);
}

.popup-content {
    padding: 1.2rem 1.5rem;
}

.popup-event-info {
    text-align: center;
    padding: 0.6rem;
    margin-bottom: 1rem;
    background: #f8f9fa;
    border-radius: var(--radius);
    border: 1px solid #e9ecef;
    font-size: 0.9rem;
    color: var(--text);
}

.popup-event-info span {
    color: var(--text-light);
    font-size: 0.85rem;
}

.popup-footer {
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    font-size: 0.75rem;
    color: var(--text-light);
    text-align: center;
}

.popup-footer-contact {
    padding-bottom: 0.4rem;
    margin-bottom: 0.4rem;
    border-bottom: 1px solid #e9ecef;
}

.popup-footer-contact a {
    color: var(--blue-dark);
    text-decoration: none;
    font-size: 0.75rem;
}

.popup-footer-contact a:hover {
    text-decoration: underline;
}

.popup-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-powered a {
    color: var(--blue-dark);
    text-decoration: none;
}

.popup-powered a:hover {
    text-decoration: underline;
}

.popup-lang {
    display: flex;
    gap: 0.4rem;
}

.popup-lang a {
    color: var(--text-light);
    text-decoration: none;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
}

.popup-lang a.active {
    background: var(--blue-light);
    color: #333;
}

.popup-lang a:hover {
    background: #e9ecef;
}

.popup-powered {
    color: #999;
}

/* === Tableau de saisie (inscription, étape 1) — classes historiques « asp-* », conservées telles quelles === */
.asp-form-info {
    text-align: center;
    padding: 0.8rem;
    font-size: 1.1rem;
}

.asp-form-table {
    width: 100%;
    border-collapse: collapse;
}

.asp-form-table td {
    padding: 0.6rem 0.5rem;
    vertical-align: middle;
}

.asp-label {
    text-align: right;
    white-space: nowrap;
    font-size: 0.95rem;
    width: 40%;
}

.asp-input {
    text-align: left;
}

.asp-input input[type="text"] {
    width: 100%;
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: Arial, sans-serif;
}

.asp-input input[type="text"]:focus {
    border-color: var(--blue-light);
    outline: none;
    box-shadow: 0 0 0 3px rgba(135, 206, 235, 0.3);
}

.asp-required {
    color: var(--danger);
    font-weight: bold;
}

.asp-action-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.asp-countdown {
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--text);
}

.asp-countdown-label {
    font-size: 0.8rem;
    color: var(--text-light);
}

.asp-form-back {
    text-align: center;
    padding: 1rem 0 0.5rem;
}

.asp-form-back a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
}

.asp-form-back a:hover {
    color: var(--blue-dark);
}

/* Popup inner components - fill card width, no double-card look */
.popup-content .login-box {
    max-width: none;
    margin: 0;
    box-shadow: none;
    border-top: none;
}



.popup-content .form-actions {
    justify-content: center;
}

/* === Links / QR Code === */
.links-url-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.links-url-row label {
    font-weight: 600;
    font-size: 0.85rem;
    min-width: 100px;
    flex-shrink: 0;
}

.links-url-input {
    flex: 1;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-family: monospace;
    background: #f8f9fa;
    color: var(--text);
    cursor: text;
}

.btn-copy {
    background: var(--blue-light);
    color: #333;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius);
    font-size: 0.8rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.btn-copy:hover {
    background: #6bb8d6;
}

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

.links-qr-section {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.links-qr-section canvas,
.links-qr-section img {
    padding: 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.links-qr-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.35rem 0.6rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text);
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-icon:hover {
    background: #f0f0f0;
    border-color: #bbb;
}

.detail-table { width: 100%; border-collapse: collapse; }
.detail-table td { padding: 4px 8px; border-bottom: 1px solid #eee; font-size: 0.9rem; vertical-align: top; }
.detail-table td:first-child { white-space: nowrap; width: 1%; color: #666; }
.target-change-section { background: #f0f7ff; padding: 12px; border-radius: 6px; border: 1px solid #cce0ff; }

.links-info-box {
    background: #f8f9fa;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.links-info-box h4 {
    margin: 0 0 0.8rem;
    color: var(--green-dark);
    font-size: 0.95rem;
}

/* === Event Hub === */
.hub-back {
    margin-bottom: 1rem;
}

.hub-back a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
}

.hub-back a:hover {
    color: var(--blue-dark);
}

.hub-header {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 1.2rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-top: 3px solid var(--blue-light);
}

.hub-title {
    margin-bottom: 0.3rem;
    font-size: 1.5rem;
}

.hub-meta {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 0.6rem;
}

.hub-dates {
    color: var(--text-light);
    font-size: 0.95rem;
}

.hub-occupation {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.6rem;
}

.hub-occupation-bar {
    flex: 1;
    max-width: 200px;
    height: 8px;
    background: #dfe5e9;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
}

/* La barre SE REMPLIT : le vert, à gauche, est ce qui est pris ; le gris, ce qui reste libre
   (le rouge « occupé » se lisait comme une alerte — testeur organisateur, 25.10.2026). */
.hub-occ-free {
    height: 100%;
    background: #dfe5e9;
}

.hub-occ-used {
    height: 100%;
    background: #2e9e5b;
}

.hub-occupation-text {
    font-size: 0.85rem;
    color: var(--text-light);
}

.hub-public-link {
    margin-top: 0.3rem;
}

.hub-public-link a {
    font-size: 0.9rem;
    text-decoration: none;
}

.hub-public-link a:hover {
    text-decoration: underline;
}

/* Hub action dropdowns */
.hub-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.hub-dropdown {
    position: relative;
}

.hub-dropdown-btn {
    min-width: 140px;
}

.hub-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 220px;
    margin-top: 4px;
}

.hub-dropdown-menu.open {
    display: block;
}

.hub-dropdown-menu a,
.hub-dropdown-menu span {
    display: block;
    padding: 0.55rem 1rem;
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid #f0f0f0;
}

.hub-dropdown-menu a:hover {
    background: #e8f5e9;
    color: var(--green-dark);
}

.hub-dropdown-menu a:last-child,
.hub-dropdown-menu span:last-child {
    border-bottom: none;
}

.hub-dropdown-disabled {
    color: #aaa !important;
    cursor: default;
}

.hub-dropdown-disabled em {
    font-size: 0.8rem;
}

/* Hub search */
.hub-search {
    margin-bottom: 1.5rem;
}

/* Barre de recherche de la page d'une manifestation : tous les champs et boutons ont la MÊME hauteur et le même style, alignés sur une seule
   rangée tant que la place le permet (David, 29.10.2026 : les listes déroulantes d'origine, noires et décalées, cassaient l'alignement). */
.hub-search .hub-search-form { max-width: none; }
.hub-search .hub-search-input, .hub-search select, .hub-search .btn {
    height: 2.4rem; box-sizing: border-box; display: inline-flex; align-items: center; font-size: 0.9rem; line-height: 1.2;
}
.hub-search .hub-search-input { display: block; }
.hub-search select {
    padding: 0 0.6rem; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; color: inherit;
    font-family: Arial, sans-serif; max-width: 15rem;
}
.hub-search .btn { padding-top: 0; padding-bottom: 0; }
@media (min-width: 1100px) { .hub-search .hub-search-form { flex-wrap: nowrap !important; } }

.hub-search-form {
    display: flex;
    gap: 0.5rem;
    max-width: 400px;
}

.hub-search-input {
    flex: 1;
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: Arial, sans-serif;
}

.hub-search-input:focus {
    border-color: var(--blue-light);
    outline: none;
    box-shadow: 0 0 0 3px rgba(135, 206, 235, 0.3);
}

.hub-search-results {
    margin-bottom: 1.5rem;
}

.hub-search-results h4 {
    color: var(--green-dark);
    margin-bottom: 0.5rem;
}

/* Hub danger zone */
.hub-danger-zone {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* === Hamburger (public - mobile only) === */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    line-height: 1;
}

.hamburger:hover {
    background: rgba(255,255,255,0.15);
}

/* === Admin hamburger menu (always visible) === */
.menu-container {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.menu-container .hdr-lang a { color: inherit; }

.menu-container .hamburger {
    display: flex;
    width: 30px;
    height: 22px;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
    font-size: inherit;
    color: inherit;
    border-radius: 0;
    line-height: normal;
}

.hamburger-line {
    height: 3px;
    background: white;
    width: 100%;
    border-radius: 2px;
    transition: background 0.2s;
}

.menu-container .hamburger:hover {
    background: none;
}

.menu-container .hamburger:hover .hamburger-line {
    background: rgba(255,255,255,0.7);
}

.admin-menu {
    display: none;
    position: absolute;
    top: 32px;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    z-index: 1000;
    min-width: 200px;
}

.admin-menu.show {
    display: block;
}

.admin-menu a {
    display: block;
    padding: 8px 16px;
    text-decoration: none;
    color: #333;
    font-size: 0.9rem;
    white-space: nowrap;
}

.admin-menu a:hover {
    background: #f0f0f0;
}

.admin-menu a.active {
    background: #e8f5e9;
    color: var(--green-dark);
    font-weight: 600;
}

.menu-separator {
    height: 1px;
    background: #ddd;
    margin: 4px 0;
}

.menu-lang {
    display: flex;
    gap: 4px;
    padding: 6px 16px;
}

.menu-lang .lang-btn {
    display: inline-block;
    padding: 3px 8px;
    font-size: 0.8rem;
    color: #666;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.menu-lang .lang-btn:hover {
    background: #f0f0f0;
}

.menu-lang .lang-btn.active {
    background: var(--green);
    color: white;
    border-color: var(--green);
    font-weight: 600;
}

/* Admin content full width (no sidebar) */
.admin-content-full {
    padding: 1.5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Alphabet bar */
.alphabet-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin: 0.8rem 0;
}

.alpha-link {
    display: inline-block;
    padding: 4px 7px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text);
    border: 1px solid #ddd;
    border-radius: 3px;
    text-align: center;
    min-width: 28px;
    line-height: 1.2;
}

.alpha-link sup {
    font-size: 0.6rem;
    font-weight: 400;
    color: #888;
}

.alpha-link:hover {
    background: #e8f5e9;
    border-color: var(--green);
}

.alpha-link.active {
    background: var(--green);
    color: white;
    border-color: var(--green);
}

.alpha-link.active sup {
    color: rgba(255,255,255,0.8);
}

.alpha-link.disabled {
    color: #ccc;
    border-color: #eee;
    cursor: default;
}

/* Shooter search bar */
.shooter-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0.5rem 0;
}

.shooter-search .input-search {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
    width: 250px;
}

/* === Responsive === */
@media (max-width: 1024px) {
    .container { max-width: 960px; }
    .logo { height: 40px; }
}

@media (max-width: 768px) {
    /* Show public hamburger on mobile */
    .hamburger {
        display: block;
    }

    .site-header .container {
        flex-wrap: nowrap;
    }

    /* Public pages: hide nav on mobile, show hamburger */
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: rgba(40, 60, 80, 0.97);
        flex-direction: column;
        padding: 0.5rem 0;
        z-index: 200;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }

    .main-nav.nav-open {
        display: flex;
    }

    .main-nav a {
        padding: 0.6rem 1.2rem;
        border-radius: 0;
        font-size: 0.95rem;
    }

    .main-nav a:hover {
        background: rgba(255,255,255,0.1);
    }

    .lang-switch {
        margin: 0;
        padding: 0.5rem 1.2rem;
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.15);
    }

    .main-nav a.nav-logout {
        margin: 0;
        padding: 0.7rem 1.2rem;
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.15);
        border-radius: 0;
        color: rgba(255,255,255,0.9);
    }
    .main-nav a.nav-logout .nav-logout-lbl { display: inline; }

    .site-header {
        position: relative;
    }

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

    .data-table { font-size: 0.8rem; }
    .data-table th, .data-table td { padding: 0.4rem 0.5rem; }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
    /* En colonne, la largeur « flex:0 0 160px » posée sur un champ devient sa HAUTEUR : des trous de 150 à 300 px entre les champs (David, 15.11.2026). */
    .form-row > .form-group { flex-basis: auto !important; }
    .form-row.adresse-ligne > .adr-rue, .form-row.adresse-ligne > .adr-npa, .form-row.adresse-ligne > .adr-ort { flex: none; }

    .logo { height: 35px; }
    .landing-logo { max-width: 200px; }

    .admin-content-full {
        padding: 1rem;
    }

    .admin-header-bar {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    /* Status legend responsive */
    .status-legend-content {
        flex-direction: column;
    }

    /* Target grid mobile */
    .targets-grid {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)) !important;
        gap: 3px;
    }

    .target-card { min-height: 50px; }
    .target-firstname { display: none; }
    .target-name { font-size: 0.6rem; }
    .target-score { font-size: 0.65rem; }
    .target-plus { font-size: 1.2rem; }

    .day-header { flex-direction: column; align-items: flex-start; }
    .series-header { flex-direction: column; align-items: flex-start; gap: 0.2rem; }

    /* Hub responsive */
    .hub-actions { flex-direction: column; }
    .hub-dropdown-menu { position: static; box-shadow: none; border: 1px solid var(--border); }
}

@media (max-width: 640px) {
    /* Un tableau large ne doit jamais élargir la PAGE : c'est lui qui défile,
       dans son cadre. Sans ça, tout le corps se décale et la lecture devient
       impraticable au pouce. */
    .data-table { font-size: 0.85rem; }
    .data-table td, .data-table thead th { padding: 0.45rem 0.5rem; }
    /* Les cartes de chiffres passent en pleine largeur plutôt que de se tasser. */
    .stats-grid .stat-card, .stats-cards .stat-card { flex: 1 1 100%; }
}

@media (max-width: 480px) {
    body { font-size: 14px; }

    .header-content h1 { font-size: 1.1rem; }

    .event-meta {
        flex-direction: column;
        gap: 0.3rem;
    }

    .client-card {
        width: 120px;
        padding: 0.5rem;
    }

    .client-card img { max-width: 80px; max-height: 55px; }
    .landing-logo { max-width: 150px; }

    /* Popup mobile */
    .popup-body { padding: 0; }
    .popup-card { border-radius: 0; border: none; max-width: none; min-height: 100vh; }
    .popup-content { padding: 1rem; }
    .popup-header-title { font-size: 1rem; }
}

/* === Dialogues personnalisés (alerterPerso / confirmerPerso / promptPerso, app.js) — 23.10.2026 === */
.tb-dialog-overlay {
    position: fixed; inset: 0; z-index: 3000;
    background: rgba(18, 28, 38, 0.55);
    display: flex; align-items: center; justify-content: center; padding: 1rem;
    animation: tb-dialog-fond .12s ease-out;
}
.tb-dialog {
    background: var(--bg-white, #fff); color: #1c2530;
    width: 100%; max-width: 28rem; border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
    animation: tb-dialog-entree .14s ease-out;
}
.tb-dialog-main { display: flex; gap: 14px; padding: 22px 22px 14px 22px; align-items: flex-start; }
.tb-dialog-icon {
    flex: 0 0 auto; width: 2.4rem; height: 2.4rem; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.25rem; background: #e3f0ff; color: #1565c0;
}
.tb-dialog-danger .tb-dialog-icon, .tb-dialog-erreur .tb-dialog-icon { background: #fdecea; color: #c62828; }
.tb-dialog-attention .tb-dialog-icon { background: #fff4e0; color: #b26a00; }
.tb-dialog-body { flex: 1 1 auto; min-width: 0; }
.tb-dialog-text { font-size: 1.02rem; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.tb-dialog-input { width: 100%; margin-top: 12px; padding: 8px 10px; border: 1px solid #b0bec5; border-radius: 6px; font-size: 1rem; }
.tb-dialog-actions { display: flex; gap: 8px; justify-content: flex-end; padding: 4px 22px 18px 22px; }
.tb-dialog-actions .btn { min-width: 5.5rem; padding: 0.55rem 1.1rem; font-size: 0.95rem; }
@media (max-width: 30rem) {
    .tb-dialog-actions { flex-direction: column-reverse; }
    .tb-dialog-actions .btn { width: 100%; padding: 0.75rem 1rem; }
}
@keyframes tb-dialog-fond { from { opacity: 0; } to { opacity: 1; } }
@keyframes tb-dialog-entree { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tb-dialog-overlay, .tb-dialog { animation: none; } }

/* Fenêtre « Tampon de cibles » : une case sur la même ligne que son libellé (testeur organisateur, 23.10.2026) */
#tamponModal .batch-row label, #tamponModal .res-series-list label { display: flex; align-items: center; gap: .5rem; font-weight: normal; margin: 2px 0; }
#tamponModal .batch-row label input, #tamponModal .res-series-list label input { flex: 0 0 auto; width: auto; margin: 0; }
#tamponModal .tp-cell { display: block; }

.hub-danger-zone { margin-top: 3.5rem; border-top: 2px dashed #e6b3b3; }


/* Choix de la manifestation (« Mes inscriptions ») : étiquette au-dessus, liste large, coins arrondis, flèche dessinée */
.filtre-manif { display: flex; flex-direction: column; gap: 0.3rem; margin: 0; width: min(100%, 34rem); }
.filtre-manif label { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #5b6672; }
.filtre-manif select {
    -webkit-appearance: none; appearance: none; width: 100%; min-height: 2.8rem; box-sizing: border-box;
    font: inherit; font-size: 1rem; color: #1c2530; cursor: pointer;
    padding: 0.6rem 2.6rem 0.6rem 0.9rem; border: 1px solid #b9c4cf; border-radius: 8px;
    background-color: #fff;
    background-image: linear-gradient(45deg, transparent 50%, #5b6672 50%), linear-gradient(135deg, #5b6672 50%, transparent 50%);
    background-position: calc(100% - 1.25rem) 50%, calc(100% - 0.9rem) 50%;
    background-size: 0.4rem 0.4rem; background-repeat: no-repeat;
    text-overflow: ellipsis;
}
.filtre-manif select:hover { border-color: #8a99a8; }
.filtre-manif select:focus { outline: 3px solid rgba(46,158,91,0.35); outline-offset: 1px; border-color: #2e9e5b; }

/* « Mes inscriptions » : une carte par manifestation (titre, état, actions, puis ses inscriptions) */
.mr-barre { margin: 0 0 1.2rem 0; }
.mr-carte { background: #fff; border: 1px solid #d5dde5; border-radius: 12px; box-shadow: 0 1px 6px rgba(28,37,48,0.07); margin: 0 0 1.4rem 0; overflow: hidden; }
.mr-tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem 1.2rem; padding: 0.9rem 1.2rem; background: #eef6f1; border-bottom: 1px solid #d5e4da; border-left: 6px solid #2e9e5b; }
.mr-titre h3 { margin: 0 0 0.2rem 0; font-size: 1.15rem; line-height: 1.25; }
.mr-titre h3 a { color: #1c2530; text-decoration: none; }
.mr-titre h3 a:hover { color: #1b6e3f; text-decoration: underline; }
.mr-meta { color: #5b6672; font-size: 0.92rem; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.mr-pastille { display: inline-block; padding: 0.1rem 0.6rem; border-radius: 999px; font-size: 0.8rem; font-weight: 600; border: 1px solid transparent; }
.mr-pastille.ok { background: #d9f0e2; color: #1b6e3f; border-color: #a9d9bb; }
.mr-pastille.ouvert { background: #e5f0fb; color: #1d5a97; border-color: #b6d3ef; }
.mr-pastille.clos { background: #eceff1; color: #5b6672; border-color: #cfd8dc; }
.mr-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.mr-corps { padding: 0; }
.mr-corps .data-table { margin: 0; box-shadow: none; border-radius: 0; }
.mr-vide { margin: 0; padding: 1rem 1.2rem; color: #78909c; font-style: italic; }
@media (max-width: 640px) {
    .mr-tete { padding: 0.8rem 0.9rem; }
    .mr-actions { width: 100%; }
    .mr-actions .btn { flex: 1 1 auto; text-align: center; }
    .mr-corps { padding: 0.6rem; background: #f6f8f9; }
}


/* === Accueil : carte entièrement cliquable, pastille « inscrit » (12e passage, 26.10.2026) === */
.event-card { position: relative; }
.event-card-title a::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.event-card-footer .btn { position: relative; z-index: 1; }
.event-mine { display: inline-block; margin-left: .4rem; padding: 1px 8px; border-radius: 10px; background: #e6f4ea; color: #1e6b3a; font-size: .8rem; font-weight: 600; }

/* Ma cible sur la grille (13e passage) */
.target-card.target-mine { outline: 3px solid #1d5a97; outline-offset: -1px; box-shadow: 0 0 0 3px rgba(29,90,151,.25); }

/* Tableau de bord du tireur : manifestations passées rangées par année (02.11.2026) */
.mr-zone { margin: 1.6rem 0 0.6rem; font-size: 1rem; color: #5b6672; text-transform: uppercase; letter-spacing: 0.04em; }
.mr-annee { margin: 0 0 0.8rem; }
.mr-annee > summary { cursor: pointer; font-weight: 600; padding: 0.5rem 0.2rem; color: #1c2530; }
.mr-passee { border: 1px solid #d5dde5; border-radius: 10px; background: #fff; margin: 0 0 0.5rem; }
.mr-passee > summary { cursor: pointer; padding: 0.55rem 0.9rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.8rem; }
.mr-passee[open] > summary { border-bottom: 1px solid #e6ebf0; }
.mr-passee > .mr-carte { border: 0; box-shadow: none; margin: 0; border-radius: 0 0 10px 10px; }
.mr-pl-date { color: #5b6672; font-variant-numeric: tabular-nums; }
.mr-pl-titre { font-weight: 600; }
.mr-fm-limite { flex-basis: 100%; font-size: 0.85rem; color: #5b6672; }
.mr-pl-fm { font-size: 0.85rem; margin-left: auto; }
.mr-passee .mr-tete .mr-titre { display: none; }
.mr-passee .mr-tete:not(:has(.mr-actions)) { display: none; }
.mr-passee .mr-tete { justify-content: flex-end; }
