/* ============================================================
   STYLE RÉTRO ANNÉES 80 — World Cup Pronostics
   Polices monospace, couleurs vives sur fond sombre, bordures simples.
   Pas de framework front-end, JS minimal.
   ============================================================ */

/* --- Reset & base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    background-color: #0a0a0a;
    color: #0f0;
    font-family: "Courier New", Courier, monospace;
    font-size: 14px;
    line-height: 1.6;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Liens --- */
a {
    color: #0ff;
    text-decoration: none;
}

a:hover {
    color: #ff0;
    text-decoration: underline;
}

/* --- Header --- */
.site-header {
    background-color: #000;
    border-bottom: 3px double #0f0;
    text-align: center;
    padding: 1rem 1rem 0.75rem;
}

.header-title {
    color: #ff0;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 4px;
    text-transform: uppercase;
    text-shadow: 0 0 8px #ff0, 0 0 2px #f80;
}

.header-subtitle {
    color: #0f0;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 0.25rem;
}

/* --- Navigation --- */
nav {
    background-color: #001a00;
    border-bottom: 2px solid #0f0;
    padding: 0.5rem 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.5rem;
}

nav a {
    color: #0ff;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.2rem 0.4rem;
    border: 1px solid transparent;
}

nav a:hover {
    border-color: #0ff;
    text-decoration: none;
    background-color: #002200;
}

nav .nav-admin-label {
    color: #f80;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-left: 1px solid #0f0;
    padding-left: 1rem;
    margin-left: 0.5rem;
}

nav .nav-admin-label ~ a {
    color: #f80;
}

nav .nav-admin-label ~ a:hover {
    border-color: #f80;
}

nav .nav-user {
    margin-left: auto;
    color: #060;
    font-size: 0.8rem;
}

nav .nav-user a {
    color: #0ff;
    font-size: 0.8rem;
}

/* --- Contenu principal --- */
main {
    max-width: 960px;
    margin: 2rem auto;
    padding: 0 1rem;
    flex: 1;
    width: 100%;
}

/* --- Titres --- */
h1, h2, h3 {
    color: #ff0;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    border-bottom: 1px solid #0f0;
    padding-bottom: 0.3rem;
}

h1 { font-size: 1.4rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: 0.95rem; }

/* --- Messages flash --- */
.flash-messages {
    margin-bottom: 1.5rem;
}

.flash {
    padding: 0.5rem 1rem;
    border: 1px solid;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.flash.success {
    color: #0f0;
    border-color: #0f0;
    background-color: #001a00;
}

.flash.error {
    color: #f00;
    border-color: #f00;
    background-color: #1a0000;
}

.flash.info {
    color: #0ff;
    border-color: #0ff;
    background-color: #001a1a;
}

.flash.warning {
    color: #ff0;
    border-color: #ff0;
    background-color: #1a1a00;
}

/* --- Tableaux --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

th {
    background-color: #001a00;
    color: #ff0;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.5rem 0.75rem;
    border: 1px solid #0f0;
    text-align: left;
    font-size: 0.85rem;
}

td {
    padding: 0.4rem 0.75rem;
    border: 1px solid #030;
    vertical-align: middle;
}

tr:nth-child(even) td {
    background-color: #001000;
}

tr:hover td {
    background-color: #002200;
}

/* --- Formulaires --- */
form {
    max-width: 480px;
}

.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    color: #0ff;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;
    background-color: #001a00;
    color: #0f0;
    border: 1px solid #0f0;
    padding: 0.4rem 0.6rem;
    font-family: "Courier New", Courier, monospace;
    font-size: 0.9rem;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #ff0;
    box-shadow: 0 0 4px #ff0;
}

/* --- Boutons --- */
.btn {
    display: inline-block;
    padding: 0.4rem 1rem;
    font-family: "Courier New", Courier, monospace;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border: 1px solid;
    background: transparent;
    text-decoration: none;
}

.btn-primary {
    color: #000;
    background-color: #0f0;
    border-color: #0f0;
}

.btn-primary:hover {
    background-color: #0c0;
    border-color: #0c0;
    color: #000;
    text-decoration: none;
}

.btn-secondary {
    color: #0ff;
    border-color: #0ff;
}

.btn-secondary:hover {
    background-color: #001a1a;
    text-decoration: none;
}

.btn-danger {
    color: #f00;
    border-color: #f00;
}

.btn-danger:hover {
    background-color: #1a0000;
    text-decoration: none;
}

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

/* --- Boutons sociaux --- */
.btn-social {
    display: block;
    width: 100%;
    max-width: 320px;
    padding: 0.6rem 1.2rem;
    margin-bottom: 0.75rem;
    text-align: center;
    font-size: 0.95rem;
    letter-spacing: 1px;
}

.btn-google {
    color: #f00;
    border-color: #f00;
}

.btn-google:hover {
    background-color: #1a0000;
    color: #f00;
    text-decoration: none;
}

.btn-facebook {
    color: #00f;
    border-color: #00f;
}

.btn-facebook:hover {
    background-color: #00001a;
    color: #00f;
    text-decoration: none;
}

.login-buttons {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* --- Actions dans les tableaux --- */
.table-actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

/* --- Pied de page --- */
footer {
    text-align: center;
    padding: 1.5rem 1rem;
    color: #060;
    font-size: 0.75rem;
    margin-top: 3rem;
}

.footer-border {
    border-top: 2px solid #030;
    margin-bottom: 0.75rem;
}

.footer-ascii {
    color: #030;
    font-size: 0.7rem;
    letter-spacing: 2px;
    margin-top: 0.5rem;
}

/* --- Utilitaires --- */
.text-muted {
    color: #060;
}

.text-danger {
    color: #f00;
}

.text-success {
    color: #0f0;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }

/* --- Badges (type de match) --- */
.badge {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid #0f0;
    color: #0f0;
    background-color: #001a00;
}

.badge-elim {
    border-color: #f80;
    color: #f80;
    background-color: #1a0800;
}

/* --- Page d'accueil --- */
.accueil-section {
    margin-bottom: 2.5rem;
}

.accueil-section h2 {
    margin-bottom: 0.75rem;
}

.match-equipes {
    color: #ff0;
    font-weight: bold;
}

.match-vs {
    color: #0f0;
    font-style: normal;
    font-size: 0.85rem;
    margin: 0 0.3rem;
}

.col-date {
    color: #0ff;
    white-space: nowrap;
    font-size: 0.85rem;
}

/* --- Page pronostics --- */
.prono-journee {
    margin-bottom: 2rem;
}

.prono-journee h2 {
    margin-bottom: 0.75rem;
}

.prono-match {
    border: 1px solid #0f0;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    background-color: #000d00;
}

.prono-match--passe {
    border-color: #030;
    background-color: #000;
    opacity: 0.8;
}

.prono-match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.prono-equipes {
    font-size: 1rem;
    color: #ff0;
    font-weight: bold;
}

.prono-equipes em {
    color: #0f0;
    font-style: normal;
    font-size: 0.85rem;
    margin: 0 0.3rem;
}

.prono-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
}

.prono-date {
    color: #060;
}

/* Formulaire de saisie de pronostic */
.prono-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    max-width: none;
    margin-top: 0.25rem;
}

.prono-form label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #0ff;
    font-size: 0.85rem;
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 0;
}

.prono-score-input {
    width: 4rem;
    background-color: #001a00;
    color: #0f0;
    border: 1px solid #0f0;
    padding: 0.3rem 0.4rem;
    font-family: "Courier New", Courier, monospace;
    font-size: 0.9rem;
    text-align: center;
    outline: none;
}

.prono-score-input:focus {
    border-color: #ff0;
    box-shadow: 0 0 4px #ff0;
}

.prono-sep {
    color: #060;
    margin: 0 0.2rem;
}

/* Affichage lecture seule */
.prono-readonly {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.prono-label {
    color: #060;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.prono-points {
    color: #0ff;
    font-size: 0.85rem;
    margin-left: 0.25rem;
}

/* Navigation par journée */
.prono-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid #0f0;
    background-color: #000d00;
}

.prono-nav-btn {
    white-space: nowrap;
}

.prono-nav-btn--disabled {
    opacity: 0.4;
    pointer-events: none;
    cursor: default;
}

.prono-completion {
    text-align: center;
    color: #ff0;
    font-size: 0.95rem;
}

.prono-progress {
    color: #0ff;
    margin-left: 0.75rem;
    font-size: 0.85rem;
}

.prono-completion-badge {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.1rem 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid #0f0;
    color: #0f0;
    background-color: #001a00;
}

/* --- Classement --- */
.table-retro {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.table-retro th {
    background-color: #001a00;
    color: #ff0;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.5rem 0.75rem;
    border: 1px solid #0f0;
    text-align: left;
    font-size: 0.85rem;
}

.table-retro td {
    padding: 0.4rem 0.75rem;
    border: 1px solid #030;
    vertical-align: middle;
}

.table-retro tr:nth-child(even) td {
    background-color: #001000;
}

.table-retro tr:hover td {
    background-color: #002200;
}

.table-retro .row-highlight td {
    background-color: #0a1a00;
    border-color: #0f0;
    color: #ff0;
    font-weight: bold;
}

.table-retro .col-pos {
    text-align: center;
    color: #ff0;
    font-weight: bold;
    width: 3rem;
}

.table-retro .col-num {
    text-align: center;
    width: 5rem;
}

.table-retro .col-variation {
    width: 6rem;
}

/* Variations de position */
.variation-up {
    color: #0f0;
    font-weight: bold;
}

.variation-down {
    color: #f00;
    font-weight: bold;
}

.variation-stable {
    color: #060;
}

/* --- Pages d'erreur --- */
.error-page {
    text-align: center;
    padding: 3rem 1rem;
}

.error-code {
    font-size: 4rem;
    color: #f00;
    text-shadow: 0 0 10px #f00, 0 0 4px #800;
    border-bottom: none;
    margin-bottom: 0.5rem;
    padding-bottom: 0;
}

.error-title {
    font-size: 1.4rem;
    color: #ff0;
    border-bottom: none;
    margin-bottom: 1rem;
    padding-bottom: 0;
}

.error-message {
    color: #0f0;
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.error-link {
    display: inline-block;
    color: #0ff;
    border: 1px solid #0ff;
    padding: 0.5rem 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.error-link:hover {
    background-color: #001a1a;
    color: #ff0;
    border-color: #ff0;
    text-decoration: none;
}
