/* =========================================
   SPEED CHESS ACADEMY
   Main Style Sheet
   ========================================= */


/* ---------- GENERAL ---------- */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


html {
    scroll-behavior: smooth;
}


body {
    font-family: Arial, Helvetica, sans-serif;

    background:
        radial-gradient(circle at top, #182848 0%, #0b1020 45%, #05070d 100%);

    color: #f5f5f5;

    line-height: 1.6;

    min-height: 100vh;
}


/* ---------- HEADER ---------- */

header {
    text-align: center;

    padding: 50px 20px 35px;

    background:
        linear-gradient(
            180deg,
            rgba(20, 30, 55, 0.98),
            rgba(8, 12, 24, 0.92)
        );

    border-bottom: 2px solid rgba(100, 180, 255, 0.25);

    box-shadow:
        0 5px 30px rgba(0, 0, 0, 0.45);
}


header h1 {
    font-size: 42px;

    letter-spacing: 3px;

    margin-bottom: 12px;

    color: #ffffff;

    text-shadow:
        0 0 10px rgba(90, 180, 255, 0.7),
        0 0 25px rgba(90, 180, 255, 0.35);
}


header p {
    max-width: 750px;

    margin: auto;

    color: #c9d6e8;

    font-size: 17px;
}


/* ---------- NAVIGATION ---------- */

.navigation {
    display: flex;

    justify-content: center;

    align-items: center;

    flex-wrap: wrap;

    gap: 12px;

    margin-top: 30px;
}


.button {
    display: inline-block;

    text-decoration: none;

    color: white;

    background:
        linear-gradient(
            135deg,
            #16233d,
            #203b65
        );

    border: 1px solid rgba(100, 190, 255, 0.45);

    border-radius: 10px;

    padding: 11px 18px;

    font-weight: bold;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;

    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.3);
}


.button:hover {
    transform: translateY(-3px);

    background:
        linear-gradient(
            135deg,
            #234d80,
            #2e69a8
        );

    box-shadow:
        0 0 18px rgba(70, 170, 255, 0.5);
}


.button:active {
    transform: translateY(0);
}


/* ---------- MAIN ---------- */

main {
    width: min(1100px, 92%);

    margin: auto;

    padding: 25px 0 50px;
}


/* ---------- SECTIONS ---------- */

section {
    margin: 35px 0;
}


section h2 {
    font-size: 28px;

    margin-bottom: 18px;

    padding-left: 12px;

    border-left: 4px solid #4da6ff;

    color: #ffffff;

    text-shadow:
        0 0 10px rgba(70, 160, 255, 0.3);
}


/* ---------- CARDS ---------- */

.card {
    background:
        linear-gradient(
            145deg,
            rgba(23, 34, 57, 0.95),
            rgba(10, 16, 30, 0.95)
        );

    border: 1px solid rgba(120, 190, 255, 0.18);

    border-radius: 16px;

    padding: 25px;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.35);

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}


.card:hover {
    transform: translateY(-3px);

    border-color:
        rgba(100, 190, 255, 0.4);

    box-shadow:
        0 12px 35px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(50, 150, 255, 0.08);
}


.card p {
    color: #d8e1ed;
}


.card strong {
    color: #ffffff;
}


/* ---------- LISTS ---------- */

ul {
    padding-left: 25px;
}


li {
    margin: 9px 0;

    color: #dce5f0;
}


li strong {
    color: white;
}


/* ---------- LINKS ---------- */

.study-link {
    color: #69b7ff;

    text-decoration: none;

    font-weight: bold;

    transition:
        color 0.2s ease,
        text-shadow 0.2s ease;
}


.study-link:hover {
    color: #a7d8ff;

    text-shadow:
        0 0 10px rgba(80, 180, 255, 0.7);

    text-decoration: underline;
}


/* ---------- MEMBERS ---------- */

.members {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(220px, 1fr));

    gap: 18px;
}


.member {
    background:
        linear-gradient(
            145deg,
            rgba(27, 41, 67, 0.95),
            rgba(11, 18, 33, 0.95)
        );

    border: 1px solid rgba(100, 180, 255, 0.2);

    border-radius: 14px;

    padding: 22px;

    text-align: center;

    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.3);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


.member:hover {
    transform: translateY(-5px);

    box-shadow:
        0 12px 25px rgba(0, 0, 0, 0.45),
        0 0 18px rgba(70, 160, 255, 0.15);
}


.member h3 {
    margin-bottom: 10px;

    color: #ffffff;
}


/* ---------- MEMBER COUNTER ---------- */

#memberCounter {
    font-size: 22px;

    font-weight: bold;

    text-align: center;

    padding: 15px;

    border-radius: 12px;

    background:
        rgba(60, 150, 255, 0.08);

    border: 1px solid
        rgba(80, 170, 255, 0.2);

    color: #ffffff;
}


/* ---------- FOOTER ---------- */

footer {
    text-align: center;

    padding: 40px 20px;

    margin-top: 30px;

    background:
        rgba(4, 7, 14, 0.95);

    border-top:
        1px solid rgba(100, 180, 255, 0.2);
}


footer h2 {
    font-size: 25px;

    margin-bottom: 10px;

    color: #ffffff;

    text-shadow:
        0 0 12px rgba(70, 170, 255, 0.45);
}


footer p {
    color: #8fa1b8;

    margin: 5px 0;
}


/* ---------- SPECIAL BUTTON ---------- */

#memberCounter + br + p {
    text-align: center;
}


/* ---------- MOBILE ---------- */

@media (max-width: 700px) {

    header {
        padding: 35px 15px 25px;
    }


    header h1 {
        font-size: 29px;

        letter-spacing: 1px;
    }


    header p {
        font-size: 15px;
    }


    .navigation {
        flex-direction: column;

        width: 100%;
    }


    .navigation .button {
        width: 100%;

        max-width: 320px;

        text-align: center;
    }


    main {
        width: 94%;
    }


    section {
        margin: 28px 0;
    }


    section h2 {
        font-size: 23px;
    }


    .card {
        padding: 20px;

        border-radius: 13px;
    }


    .members {
        grid-template-columns: 1fr;
    }


    footer h2 {
        font-size: 21px;
    }

}


/* ---------- SMALL PHONES ---------- */

@media (max-width: 400px) {

    header h1 {
        font-size: 24px;
    }


    section h2 {
        font-size: 21px;
    }


    .card {
        padding: 16px;
    }


    .button {
        font-size: 14px;

        padding: 10px 14px;
    }

}

.discord-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: #5865F2; /* Couleur officielle Discord */
  color: #ffffff !important;
  font-family: 'Arial', sans-serif;
  font-weight: bold;
  font-size: 16px;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-top: 15px;
}

.discord-btn:hover {
  background-color: #4752C4; /* Violet plus foncé au survol */
  transform: translateY(-2px); /* Léger effet de soulèvement */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* =========================================
   LICHESS MEMBERS
   ========================================= */

#membersList .members-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(240px, 1fr)
    );
    gap: 22px;
    margin-top: 25px;
}


/* =========================================
   MEMBER CARD
   ========================================= */

#membersList .member-card {
    position: relative;

    min-height: 210px;

    padding: 28px 20px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;

    background:
        linear-gradient(
            145deg,
            rgba(27, 41, 67, 0.98),
            rgba(8, 14, 28, 0.98)
        );

    border: 1px solid rgba(100, 180, 255, 0.25);

    border-radius: 18px;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.35);

    overflow: hidden;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}


/* Ligne lumineuse en haut */

#membersList .member-card::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 4px;

    background:
        linear-gradient(
            90deg,
            #4da6ff,
            #69b7ff,
            #8b5cf6
        );
}


/* Effet au survol */

#membersList .member-card:hover {
    transform: translateY(-7px);

    border-color:
        rgba(100, 190, 255, 0.55);

    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(70, 160, 255, 0.12);
}


/* =========================================
   AVATAR
   ========================================= */

#membersList .member-avatar {
    width: 72px;
    height: 72px;

    margin-bottom: 15px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            #2878c7,
            #4da6ff
        );

    color: #ffffff;

    font-size: 28px;

    font-weight: bold;

    box-shadow:
        0 0 20px rgba(70, 170, 255, 0.3);

    border: 2px solid rgba(150, 220, 255, 0.35);
}


/* =========================================
   USERNAME
   ========================================= */

#membersList .member-name {
    margin: 5px 0 12px;

    color: #ffffff !important;

    font-size: 20px;

    font-weight: bold;

    word-break: break-word;

    text-shadow:
        0 0 8px rgba(100, 190, 255, 0.2);
}


/* =========================================
   LICHESS TITLE
   ========================================= */

#membersList .member-title {
    display: inline-block;

    margin-bottom: 14px;

    padding: 4px 10px;

    border-radius: 7px;

    background:
        rgba(100, 180, 255, 0.12);

    border:
        1px solid rgba(100, 180, 255, 0.25);

    color: #69b7ff;

    font-size: 12px;

    font-weight: bold;
}


/* =========================================
   PROFILE BUTTON
   ========================================= */

#membersList .member-profile {
    display: inline-block;

    padding: 9px 17px;

    border-radius: 9px;

    background:
        linear-gradient(
            135deg,
            #1769aa,
            #2878c7
        );

    color: #ffffff !important;

    text-decoration: none !important;

    font-size: 14px;

    font-weight: bold;

    border:
        1px solid rgba(120, 200, 255, 0.3);

    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.25);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


#membersList .member-profile:hover {
    transform: translateY(-2px);

    background:
        linear-gradient(
            135deg,
            #2587d1,
            #3b9bea
        );

    box-shadow:
        0 0 18px rgba(70, 170, 255, 0.35);
}


/* =========================================
   LOADING
   ========================================= */

#membersList .loading-card {
    text-align: center;
}


#membersList .loading-icon {
    font-size: 42px;

    margin-bottom: 10px;

    animation: chess-loading 1s infinite alternate;
}


@keyframes chess-loading {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-8px);
    }
}


/* =========================================
   ERROR
   ========================================= */

#membersList .error-card {
    border-left:
        4px solid #ff5c5c;

    color: #ffb0b0;
}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 600px) {

    #membersList .members-grid {
        grid-template-columns: 1fr;
    }

    #membersList .member-card {
        min-height: 190px;
    }
}