/* =========================================================
   Eurovision Auth Theme — Login/Register (Responsive)
   ========================================================= */

/* Reset minimal + base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

:root {
    --bg-0: #070815;
    --bg-1: #0b0d22;

    --text: rgba(255, 255, 255, 0.92);
    --muted: rgba(255, 255, 255, 0.70);

    --card: rgba(255, 255, 255, 0.08);
    --card-border: rgba(255, 255, 255, 0.14);

    --shadow: 0 18px 60px rgba(0, 0, 0, 0.55);

    --accent-a: #ff2bd6; /* magenta néon */
    --accent-b: #6d5cff; /* violet/bleu */
    --accent-c: #00d4ff; /* cyan */
    --accent-d: #ffd36e; /* or */

    --ok: #2ee59d;
    --err: #ff4d6d;

    --radius: 18px;
    --radius-sm: 12px;

    --pad: 22px;
    --maxw: 420px;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text);
}

/* Background Eurovision (neon + stars vibe) */
.auth-body {
    background:
        radial-gradient(1200px 700px at 15% 10%, rgba(255, 43, 214, 0.28), transparent 60%),
        radial-gradient(900px 600px at 90% 18%, rgba(109, 92, 255, 0.30), transparent 58%),
        radial-gradient(900px 700px at 60% 95%, rgba(0, 212, 255, 0.18), transparent 60%),
        radial-gradient(700px 500px at 10% 90%, rgba(255, 211, 110, 0.16), transparent 55%),
        linear-gradient(180deg, var(--bg-0), var(--bg-1));
    position: relative;
    overflow-x: hidden;
}

/* Grain subtle */
.auth-body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px);
    background-size: 36px 36px;
    opacity: 0.10;
    filter: blur(0.2px);
}

/* Shell */
.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 18px;
}

/* Card glass */
.auth-card {
    width: 100%;
    max-width: var(--maxw);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.06));
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    overflow: hidden;
    position: relative;
}

/* Neon top line */
.auth-card::before {
    content: "";
    position: absolute;
    inset: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-a), var(--accent-b), var(--accent-c), var(--accent-d));
    opacity: 0.95;
}

/* Header */
.auth-header {
    padding: calc(var(--pad) + 10px) var(--pad) 12px var(--pad);
    text-align: left;
}

.auth-badge {
    width: 56px;
    height: 56px;
    border-radius: 16px;

    background-image:
        radial-gradient(18px 18px at 30% 30%, rgba(255,255,255,0.70), transparent 60%),
        url("./images/icon.png"),
        linear-gradient(135deg, rgba(255, 43, 214, 0.95), rgba(109, 92, 255, 0.90), rgba(0, 212, 255, 0.75));
    background-repeat: no-repeat, no-repeat, no-repeat;
    background-position: center, center, center;
    background-size: auto, 70% 70%, cover;

    box-shadow:
        0 16px 40px rgba(0,0,0,0.35),
        0 0 0 1px rgba(255,255,255,0.20) inset;
    margin-bottom: 14px;
}

.auth-title {
    margin: 0;
    font-size: 28px;
    letter-spacing: 0.3px;
    line-height: 1.1;
}

.auth-subtitle {
    margin: 8px 0 0 0;
    color: var(--muted);
    font-size: 14px;
}

/* Form */
.auth-form {
    padding: 8px var(--pad) var(--pad) var(--pad);
    display: grid;
    gap: 14px;
}

.field {
    display: grid;
    gap: 8px;
}

label {
    font-size: 13px;
    color: rgba(255,255,255,0.82);
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 12px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(10, 12, 28, 0.55);
    color: var(--text);
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

input::placeholder {
    color: rgba(255,255,255,0.50);
}

input:focus {
    border-color: rgba(0, 212, 255, 0.55);
    box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.16);
}

input:active {
    transform: translateY(0.5px);
}

/* Button */
.btn {
    appearance: none;
    border: 0;
    border-radius: 14px;
    padding: 12px 14px;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

.btn-primary {
    background: linear-gradient(90deg, var(--accent-a), var(--accent-b), var(--accent-c));
    color: rgba(255,255,255,0.95);
    box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}

.btn-primary:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0px);
}

/* Alerts */
.alert {
    border-radius: 14px;
    padding: 12px 12px;
    font-size: 14px;
    line-height: 1.35;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(10, 12, 28, 0.45);
}

.alert strong {
    font-weight: 800;
}

.alert-error {
    border-color: rgba(255, 77, 109, 0.45);
    box-shadow: 0 0 0 4px rgba(255, 77, 109, 0.10);
}

.alert-success {
    border-color: rgba(46, 229, 157, 0.45);
    box-shadow: 0 0 0 4px rgba(46, 229, 157, 0.10);
}

/* Links */
.helper {
    text-align: center;
    padding-top: 4px;
}

.link {
    color: rgba(255,255,255,0.92);
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.06);
    transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.link:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,0.10);
    border-color: rgba(255,255,255,0.20);
}

/* Footer */
.auth-footer {
    padding: 0 var(--pad) var(--pad) var(--pad);
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.62);
    font-size: 12px;
}

.footer-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent-a), var(--accent-c));
    box-shadow: 0 0 18px rgba(0, 212, 255, 0.35);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 420px) {
    :root {
        --pad: 18px;
    }

    .auth-title {
        font-size: 24px;
    }

    .auth-badge {
        width: 50px;
        height: 50px;
        border-radius: 14px;
    }
}

@media (min-width: 900px) {
    .auth-shell {
        padding: 28px;
    }

    .auth-card {
        max-width: 460px;
    }
}

/* Accessibilité : focus visible clavier */
:focus-visible {
    outline: 3px solid rgba(255, 211, 110, 0.35);
    outline-offset: 2px;
}

/* =========================================================
   Home (index.php)
   ========================================================= */

.home-body {
    overflow-x: hidden;
}

/* Video background */
.home-video {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -3;
}

/* Overlay (plus premium que le simple noir) */
.home-overlay {
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(1200px 700px at 10% 10%, rgba(255, 43, 214, 0.22), transparent 60%),
        radial-gradient(900px 700px at 90% 20%, rgba(109, 92, 255, 0.22), transparent 58%),
        radial-gradient(900px 700px at 60% 95%, rgba(0, 212, 255, 0.14), transparent 60%),
        linear-gradient(180deg, rgba(0,0,0,0.70), rgba(0,0,0,0.78));
}

/* Topbar */
.home-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 14px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 5;
}

.home-pill {
    text-decoration: none;
    color: rgba(255,255,255,0.92);
    font-weight: 800;
    letter-spacing: 0.2px;
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.home-pill:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.22);
}

/* Layout */
.home-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 78px 18px 22px 18px; /* topbar space */
}

/* Main card (grand + centré) */
.home-card {
    width: 100%;
    max-width: 860px;
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.06));
    border: 1px solid rgba(255,255,255,0.14);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 26px;
    position: relative;
    overflow: hidden;
}

.home-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-a), var(--accent-b), var(--accent-c), var(--accent-d));
    opacity: 0.95;
}

/* Title */
.home-title {
    text-align: center;
    padding-top: 10px;
    padding-bottom: 14px;
}

.home-title h1 {
    margin: 0;
    font-size: clamp(40px, 6vw, 76px);
    line-height: 0.95;
    letter-spacing: 0.6px;
}

/* Dates */
.home-dates {
    display: grid;
    gap: 10px;
    margin: 10px auto 18px auto;
    max-width: 640px;
}

.home-date {
    font-size: clamp(14px, 2.2vw, 18px);
    color: rgba(255,255,255,0.88);
    text-align: center;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(10, 12, 28, 0.40);
}

/* Actions */
.home-actions {
    display: grid;
    gap: 12px;
    max-width: 520px;
    margin: 0 auto;
    padding-top: 6px;
}

.home-btn {
    width: 100%;
    text-align: center;
}

/* Admin button (badge en bas à droite de la card) */
.home-admin {
    position: absolute;
    right: 18px;
    bottom: 16px;
    text-decoration: none;
    font-weight: 900;
    color: rgba(0,0,0,0.85);
    padding: 10px 12px;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--accent-d), rgba(255,255,255,0.85));
    border: 1px solid rgba(255,255,255,0.20);
    box-shadow: 0 16px 40px rgba(0,0,0,0.30);
    transition: transform 140ms ease, filter 140ms ease;
}

.home-admin:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
}

/* Glitch (reprise, mais adapté au thème sombre) */
.glitch {
    position: relative;
    display: inline-block;
    color: rgba(255,255,255,0.92);
    text-shadow:
        0 0 18px rgba(0, 212, 255, 0.14),
        0 0 28px rgba(255, 43, 214, 0.10);
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    clip: rect(0, 9999px, 0, 0);
    opacity: 0.95;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 rgba(255, 43, 214, 0.85);
    animation: glitch 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: 2px 0 rgba(0, 212, 255, 0.75);
    animation: glitch 2.2s infinite linear alternate-reverse;
}

@keyframes glitch {
    0%   { clip: rect(10px, 9999px, 90px, 0); }
    10%  { clip: rect(55px, 9999px, 30px, 0); }
    20%  { clip: rect(25px, 9999px, 70px, 0); }
    30%  { clip: rect(70px, 9999px, 22px, 0); }
    40%  { clip: rect(18px, 9999px, 62px, 0); }
    50%  { clip: rect(82px, 9999px, 45px, 0); }
    65%  { clip: rect(36px, 9999px, 78px, 0); }
    80%  { clip: rect(62px, 9999px, 34px, 0); }
    100% { clip: rect(10px, 9999px, 18px, 0); }
}

/* Responsive: passer sur une card moins “large” et plus lisible */
@media (max-width: 520px) {
    .home-card {
        padding: 18px;
    }

    .home-admin {
        position: static;
        display: inline-block;
        margin: 14px auto 0 auto;
        text-align: center;
    }

    .home-topbar {
        padding: 12px 12px;
    }
}

/* =========================================================
   Profile (profile.php)
   ========================================================= */

.profile-body {
    overflow-x: hidden;
}

.profile-nav {
    background: rgba(8, 10, 24, 0.82) !important;
    border-bottom: 1px solid rgba(255,255,255,0.10);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.profile-brand {
    font-weight: 900;
    letter-spacing: 0.2px;
}

.profile-shell {
    min-height: calc(100vh - 56px);
    display: grid;
    place-items: center;
    padding: 22px 18px;
}

.profile-card {
    width: 100%;
    max-width: 980px;
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.06));
    border: 1px solid rgba(255,255,255,0.14);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 22px;
    position: relative;
    overflow: hidden;
}

.profile-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-a), var(--accent-b), var(--accent-c), var(--accent-d));
    opacity: 0.95;
}

.profile-header {
    display: flex;
    gap: 14px;
    align-items: center;
    padding-top: 10px;
    padding-bottom: 18px;
}

.profile-badge {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background-image:
        radial-gradient(18px 18px at 30% 30%, rgba(255,255,255,0.70), transparent 60%),
        url("./images/icon.png"),
        linear-gradient(135deg, rgba(255, 43, 214, 0.95), rgba(109, 92, 255, 0.90), rgba(0, 212, 255, 0.75));
    background-repeat: no-repeat, no-repeat, no-repeat;
    background-position: center, center, center;
    background-size: auto, 72% 72%, cover;
    box-shadow:
        0 16px 40px rgba(0,0,0,0.35),
        0 0 0 1px rgba(255,255,255,0.20) inset;
    flex: 0 0 auto;
}

.profile-title {
    margin: 0;
    font-size: 28px;
    letter-spacing: 0.3px;
    line-height: 1.1;
}

.profile-subtitle {
    margin: 6px 0 0 0;
    color: var(--muted);
    font-size: 14px;
}

.profile-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: 320px 1fr;
    align-items: start;
}

.profile-avatar {
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(10, 12, 28, 0.40);
    padding: 14px;
}

.profile-img {
    width: 100%;
    max-width: 260px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 18px;
    display: block;
    margin: 0 auto;
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow: 0 18px 60px rgba(0,0,0,0.45);
}

.profile-empty {
    padding: 14px;
    color: rgba(255,255,255,0.75);
    text-align: center;
    border-radius: 14px;
    border: 1px dashed rgba(255,255,255,0.22);
}

.profile-hint {
    margin-top: 12px;
    text-align: center;
    font-size: 12px;
    color: rgba(255,255,255,0.65);
}

.profile-form {
    display: grid;
    gap: 14px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(10, 12, 28, 0.30);
    padding: 16px;
}

.profile-field {
    display: grid;
    gap: 8px;
}

.profile-field label {
    font-size: 13px;
    color: rgba(255,255,255,0.82);
}

.profile-form input[type="text"],
.profile-form input[type="password"],
.profile-form input[type="file"] {
    width: 100%;
    padding: 12px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(10, 12, 28, 0.55);
    color: var(--text);
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.profile-form input[type="file"] {
    padding: 10px 12px;
    cursor: pointer;
}

.profile-form input:focus {
    border-color: rgba(0, 212, 255, 0.55);
    box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.16);
}

.profile-submit {
    width: 100%;
    text-align: center;
}

.profile-alert {
    margin-top: 6px;
}

/* Responsive */
@media (max-width: 900px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }

    .profile-avatar {
        max-width: 520px;
        margin: 0 auto;
    }

    .profile-form {
        max-width: 680px;
        margin: 0 auto;
    }
}

@media (max-width: 420px) {
    .profile-card {
        padding: 18px;
    }

    .profile-title {
        font-size: 24px;
    }

    .profile-badge {
        width: 50px;
        height: 50px;
        border-radius: 14px;
    }
}

/* =========================================================
   Eurovision Navbar (Bootstrap)
   ========================================================= */

.euro-nav {
    position: sticky;
    top: 0;
    z-index: 50;

    background: rgba(8, 10, 24, 0.82);
    border-bottom: 1px solid rgba(255,255,255,0.10);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.euro-nav::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-a), var(--accent-b), var(--accent-c), var(--accent-d));
    opacity: 0.95;
}

.euro-nav-inner {
    position: relative;
    padding: 10px 14px;
}

.euro-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 900;
    letter-spacing: 0.2px;
}

.euro-brand-text {
    color: rgba(255,255,255,0.95);
    font-size: 16px;
}

.euro-brand-badge {
    width: 38px;
    height: 38px;
    border-radius: 12px;

    background-image:
        radial-gradient(14px 14px at 30% 30%, rgba(255,255,255,0.70), transparent 60%),
        url("./images/icon.png"),
        linear-gradient(135deg, rgba(255, 43, 214, 0.95), rgba(109, 92, 255, 0.90), rgba(0, 212, 255, 0.75));
    background-repeat: no-repeat, no-repeat, no-repeat;
    background-position: center, center, center;
    background-size: auto, 70% 70%, cover;

    box-shadow:
        0 14px 34px rgba(0,0,0,0.35),
        0 0 0 1px rgba(255,255,255,0.20) inset;
}

/* Center links */
.euro-nav-links {
    gap: 6px;
}

.euro-link {
    color: rgba(255,255,255,0.80) !important;
    font-weight: 800;
    letter-spacing: 0.15px;

    padding: 10px 12px !important;
    border-radius: 999px;

    border: 1px solid transparent;
    transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.euro-link:hover {
    color: rgba(255,255,255,0.95) !important;
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.14);
    transform: translateY(-1px);
}

/* Active state (Bootstrap adds .active sometimes) */
.euro-link.active,
.euro-link[aria-current="page"] {
    color: rgba(255,255,255,0.95) !important;
    background: rgba(255,255,255,0.10);
    border-color: rgba(255,255,255,0.18);
}

/* Right actions */
.euro-nav-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.euro-action {
    text-decoration: none;
    font-weight: 900;
    letter-spacing: 0.2px;
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.92);
    transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.euro-action:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,0.10);
    border-color: rgba(255,255,255,0.20);
}

.euro-action-profile {
    box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.10) inset;
}

.euro-action-logout {
    box-shadow: 0 0 0 1px rgba(255, 77, 109, 0.12) inset;
}

/* Toggler */
.euro-toggler {
    border: 1px solid rgba(255,255,255,0.16) !important;
    border-radius: 12px !important;
    padding: 8px 10px !important;
}

.euro-toggler:focus {
    box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.16) !important;
}

/* Mobile: menu becomes a card */
@media (max-width: 991.98px) {
    .euro-nav-links {
        margin-top: 12px;
        margin-bottom: 10px;
    }

    .euro-nav-actions {
        padding-top: 8px;
        padding-bottom: 10px;
        border-top: 1px solid rgba(255,255,255,0.10);
    }

    .euro-action {
        width: 100%;
        text-align: center;
    }

    .euro-nav-actions {
        flex-direction: column;
        gap: 8px;
    }
}