/* =========================
   FONTS & VARIABLES
========================= */
@import url('https://fonts.googleapis.com/css2?family=Anton&family=Inter:wght@300;400;600&display=swap');

:root {
    --bg-color: #000000;
    --text-main: #FFFFFF;
    --text-dim: #888888;
    --border-dim: #333333; /* Bordure grise au repos */
    --border-focus: #FFFFFF; /* Bordure blanche au clic */
    
    --font-title: 'Anton', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* =========================
   RESET & BASE
========================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100dvh; /* S'adapte au mobile */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
}

/* Grain de fond (sans toucher au HTML) */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* =========================
   CONTAINER PRINCIPAL
========================= */
.login-container {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: transparent;
    text-align: center;
}

/* =========================
   LOGO AGON
========================= */
.logo {
    font-family: var(--font-title);
    font-size: clamp(50px, 15vw, 80px); /* Taille responsive */
    line-height: 1;
    text-transform: uppercase;
    color: var(--text-main);
    margin-bottom: 30px;
    letter-spacing: 2px;
}

/* =========================
   INPUTS (DESIGN RECTANGLE)
========================= */
form input[type="text"],
form input[type="email"],
form input[type="password"] {
    width: 100%;
    /* Fond très légèrement gris pour se détacher du noir */
    background: rgba(255, 255, 255, 0.05); 
    border: 1px solid var(--border-dim); /* Bordure fine grise */
    padding: 16px; /* Espace confortable */
    
    /* 16px OBLIGATOIRE pour iPhone (sinon ça zoome) */
    font-size: 16px; 
    font-family: var(--font-body);
    color: var(--text-main);
    border-radius: 0; /* Carré strict */
    
    appearance: none;
    -webkit-appearance: none;
    
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

/* Effet quand on clique dessus */
form input:focus {
    outline: none;
    border-color: var(--border-focus); /* Devient blanc */
    background: black;
}

/* Placeholder (le texte avant d'écrire) */
form input::placeholder {
    color: #555;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}

/* --- HACK POUR ENLEVER LE FOND BLEU/BLANC GOOGLE CHROME --- */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #0a0a0a inset !important; /* Force fond noir */
    -webkit-text-fill-color: white !important; /* Force texte blanc */
    transition: background-color 5000s ease-in-out 0s;
}

/* =========================
   CHECKBOX & LABELS
========================= */
/* Cible la div qui contient la checkbox (celle avec style inline) */
form div[style*="text-align: left"] {
    margin-bottom: 25px !important;
    padding-left: 2px;
}

form label {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-dim) !important;
    font-size: 11px !important;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    font-weight: 600;
}

/* Design de la case à cocher */
form input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    
    width: 18px !important; 
    height: 18px;
    border: 1px solid var(--border-dim);
    background: transparent;
    cursor: pointer;
    display: grid;
    place-content: center;
    margin: 0;
    border-radius: 0;
}

/* Le petit carré blanc quand c'est coché */
form input[type="checkbox"]::before {
    content: "";
    width: 10px;
    height: 10px;
    background-color: var(--text-main);
    transform: scale(0);
    transition: 0.2s transform ease-in-out;
}

form input[type="checkbox"]:checked {
    border-color: var(--text-main);
}

form input[type="checkbox"]:checked::before {
    transform: scale(1);
}

/* =========================
   BOUTON LOGIN
========================= */
button[type="submit"] {
    background: var(--text-main); /* Blanc */
    color: var(--bg-color);       /* Noir */
    font-family: var(--font-title);
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 16px;
    border: 1px solid var(--text-main);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 5px;
    touch-action: manipulation;
}

button[type="submit"]:hover {
    background: black;
    color: white;
    letter-spacing: 3px;
}

/* =========================
   LIENS BAS DE PAGE
========================= */
p {
    margin-top: 25px;
}

a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid transparent;
    transition: 0.3s;
    font-weight: 600;
}

a:hover {
    color: var(--text-main);
    border-bottom-color: var(--text-main);
}

/* =========================
   MESSAGES D'ERREUR
========================= */
.error-msg {
    color: #ff4444;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid #ff4444;
    padding: 12px;
    background: rgba(255, 0, 0, 0.05);
    margin-bottom: 20px;
}