* { box-sizing: border-box; }
body { font-family: system-ui, sans-serif; margin: 0; padding: 20px; background: #f5f5f5; }
.container { max-width: 900px; margin: 0 auto; }
h1 { margin-top: 0; }
nav { margin-top: 24px; }
nav a { display: inline-block; margin-right: 16px; padding: 10px 16px; background: #1a73e8; color: #fff; text-decoration: none; border-radius: 8px; }
nav a:hover { background: #1557b0; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #eee; }
th { background: #f8f9fa; font-weight: 600; }
tr:hover { background: #f8f9fa; }
a.edit { color: #1a73e8; text-decoration: none; }
a.edit:hover { text-decoration: underline; }
a.delete { color: #c5221f; margin-left: 12px; }
.btn { display: inline-block; padding: 10px 16px; border-radius: 8px; border: none; cursor: pointer; font-size: 14px; text-decoration: none; }
.btn-primary { background: #1a73e8; color: #fff; }
.btn-primary:hover { background: #1557b0; }
.btn-secondary { background: #5f6368; color: #fff; }
.btn-danger { background: #c5221f; color: #fff; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 4px; font-weight: 500; }
.form-group input[type="text"], .form-group input[type="number"], .form-group input[type="email"], .form-group input[type="password"], .form-group textarea, .form-group select { width: 100%; padding: 8px 12px; border: 1px solid #dadce0; border-radius: 6px; font-size: 14px; }
.form-group textarea { min-height: 80px; resize: vertical; }
.form-group input[type="checkbox"] { margin-right: 8px; }
.form-actions { margin-top: 24px; }
.form-actions .btn { margin-right: 8px; }
.error { color: #c5221f; margin-top: 8px; }
.loading { color: #5f6368; }
.sport-chks { display: flex; gap: 16px; flex-wrap: wrap; }
.sport-chks label { display: flex; align-items: center; font-weight: normal; }
.filter { margin-bottom: 16px; }
.filter select { padding: 8px 12px; border-radius: 6px; border: 1px solid #dadce0; }
.image-upload { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.file-label { color: #5f6368; font-size: 14px; }
.form-hint { margin: 8px 0 4px; font-size: 13px; color: #5f6368; }
.login-box { max-width: 400px; margin: 40px auto; padding: 24px; background: #fff; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.login-box h1 { margin-bottom: 16px; }
.logout { margin-left: auto; color: #5f6368; font-size: 14px; }
.dashboard-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.dashboard-header h1 { margin: 0; }

/* ——— Page formulaire stade (sans scroll, UI compacte) ——— */
.stade-form-page { margin: 0; padding: 0; min-height: 100vh; background: #e8eaed; display: flex; flex-direction: column; }
.stade-form-wrap { flex: 1; display: flex; flex-direction: column; max-width: 1100px; margin: 0 auto; width: 100%; padding: 14px 20px; box-sizing: border-box; }
.stade-form-header { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.stade-form-header .back-link { color: #1a73e8; text-decoration: none; font-size: 14px; }
.stade-form-header .back-link:hover { text-decoration: underline; }
.stade-form-header h1 { margin: 0; font-size: 1.35rem; font-weight: 600; color: #1a1a2e; }
.stade-form-header .error { margin: 0; font-size: 13px; }
.stade-form-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px 20px; align-content: start; flex: 1; min-height: 0; background: #fff; padding: 20px; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.stade-form-grid .form-group { margin: 0; }
.stade-form-grid .form-group label { margin-bottom: 4px; font-size: 12px; font-weight: 600; color: #5f6368; text-transform: uppercase; letter-spacing: 0.02em; }
.stade-form-grid input[type="text"], .stade-form-grid input[type="number"], .stade-form-grid textarea { padding: 8px 10px; font-size: 14px; border: 1px solid #e0e0e0; border-radius: 8px; width: 100%; transition: border-color 0.15s; }
.stade-form-grid input:focus, .stade-form-grid textarea:focus { outline: none; border-color: #1a73e8; box-shadow: 0 0 0 2px rgba(26,115,232,0.15); }
.stade-form-grid textarea { min-height: auto; resize: none; }
.stade-form-grid .fg-nom { grid-column: 1; }
.stade-form-grid .fg-capacite { grid-column: 2; }
.stade-form-grid .fg-ville { grid-column: 1; }
.stade-form-grid .fg-pays { grid-column: 2; }
.stade-form-grid .fg-club { grid-column: 3; }
.stade-form-grid .fg-coords { grid-column: 1 / -1; }
.stade-form-grid .fg-coords .input-row { display: flex; gap: 12px; }
.stade-form-grid .fg-coords .input-row input { flex: 1; }
.stade-form-grid .fg-descriptif { grid-column: 1 / -1; }
.stade-form-grid .fg-descriptif textarea { rows: 2; }
.stade-form-grid .fg-images { grid-column: 1 / -1; }
.stade-form-grid .fg-images .image-upload { margin-bottom: 6px; }
.stade-form-grid .fg-sports { grid-column: 1; }
.stade-form-grid .fg-options { grid-column: 2; display: flex; align-items: flex-end; }
.stade-form-grid .fg-options .checkbox-label { font-weight: normal; text-transform: none; font-size: 13px; color: #333; }
.stade-form-grid .fg-actions { grid-column: 1 / -1; display: flex; gap: 10px; padding-top: 8px; border-top: 1px solid #eee; margin-top: 4px; }
.stade-form-grid .sport-chks { display: flex; gap: 12px 20px; flex-wrap: wrap; }
.stade-form-grid .sport-chks label { font-weight: normal; text-transform: none; font-size: 13px; color: #333; }
@media (max-width: 768px) {
  .stade-form-grid { grid-template-columns: 1fr 1fr; }
  .stade-form-grid .fg-club { grid-column: 1 / -1; }
}

/* ——— Liste stades éditable (stades.html) ——— */
/* Même élément a .container.stades-list-page : il faut surcharger .container ici */
.stades-list-page { overflow-x: auto; }
.container.stades-list-page { width: 100%; max-width: none; margin: 0; padding: 12px 16px; box-sizing: border-box; }
.stades-list-page .table-wrap { width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.stades-header { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.stades-header h1 { margin: 0; font-size: 1.35rem; }
.stades-header .btn { margin-left: auto; }
.table-wrap { background: #fff; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
/* 100 % de l'écran ; min 2000px pour garder les colonnes lisibles et le scroll sur petit écran */
.stades-editable-table { width: max(100%, 2000px); min-width: 2000px; border-collapse: collapse; font-size: 14px; table-layout: fixed; overflow: visible; }
/* Largeurs en % pour répartir l'espace ; min en px pour ne pas compresser le contenu */
.stades-editable-table th:nth-child(1), .stades-editable-table td:nth-child(1) { width: 11%; min-width: 220px; }   /* Nom */
.stades-editable-table th:nth-child(2), .stades-editable-table td:nth-child(2) { width: 7%; min-width: 140px; }   /* Ville */
.stades-editable-table th:nth-child(3), .stades-editable-table td:nth-child(3) { width: 6%; min-width: 120px; }   /* Pays */
.stades-editable-table th:nth-child(4), .stades-editable-table td:nth-child(4) { width: 4%; min-width: 80px; }    /* Cap. */
.stades-editable-table th:nth-child(5), .stades-editable-table td:nth-child(5) { width: 8%; min-width: 160px; }   /* Club */
.stades-editable-table th:nth-child(6), .stades-editable-table td:nth-child(6) { width: 5%; min-width: 100px; }   /* Lat */
.stades-editable-table th:nth-child(7), .stades-editable-table td:nth-child(7) { width: 5%; min-width: 100px; }   /* Long */
.stades-editable-table th:nth-child(8), .stades-editable-table td:nth-child(8) { width: 7%; min-width: 140px; }   /* Image */
.stades-editable-table th:nth-child(9), .stades-editable-table td:nth-child(9) { width: 13%; min-width: 260px; }   /* Descriptif */
.stades-editable-table th:nth-child(10), .stades-editable-table td:nth-child(10) { width: 8%; min-width: 160px; } /* Sports */
.stades-editable-table th:nth-child(11), .stades-editable-table td:nth-child(11) { width: 4%; min-width: 80px; }  /* isSystem */
.stades-editable-table th:nth-child(12), .stades-editable-table td:nth-child(12) { width: 12%; min-width: 240px; }  /* Actions */
.stades-editable-table th { text-align: left; padding: 10px 8px; background: #f8f9fa; font-weight: 600; color: #5f6368; font-size: 12px; text-transform: uppercase; letter-spacing: 0.02em; border-bottom: 1px solid #eee; overflow: visible; }
.stades-editable-table td { padding: 6px 8px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; overflow: visible; }
.stades-editable-table tr:hover td { background: #fafafa; }
/* Champs lisibles : fond, couleur du texte, pas de clip du contenu */
.stades-editable-table input[type="text"], .stades-editable-table input[type="number"] { width: 100%; min-width: 0; padding: 6px 8px; border: 1px solid #e0e0e0; border-radius: 6px; font-size: 13px; box-sizing: border-box; color: #202124; background: #fff; overflow: visible; }
.stades-editable-table input::placeholder { color: #80868b; }
.stades-editable-table input:focus { outline: none; border-color: #1a73e8; }
.stades-editable-table .cell-image { white-space: nowrap; }
.stades-editable-table .cell-image .btn-browse-row { margin-right: 6px; padding: 6px 10px; font-size: 12px; }
.stades-editable-table .row-file-label { font-size: 12px; color: #5f6368; }
.stades-editable-table .cell-sports { white-space: nowrap; }
.stades-editable-table .cell-sports label { margin-right: 8px; font-weight: normal; font-size: 12px; cursor: pointer; }
.stades-editable-table .chk-label { font-weight: normal; font-size: 12px; cursor: pointer; }
.stades-editable-table .cell-actions { white-space: nowrap; }
.stades-editable-table .btn-row-save { padding: 6px 12px; font-size: 12px; }
.stades-editable-table .link-edit { font-size: 12px; color: #1a73e8; text-decoration: none; margin-left: 4px; }
.stades-editable-table .link-edit:hover { text-decoration: underline; }
.stades-editable-table .btn-row-delete { padding: 6px 12px; font-size: 12px; margin-left: 6px; }
.stades-editable-table .row-descriptif { min-width: 0; }
