@font-face {
    font-family: 'Poppins Bold';
    src: url(../font/Poppins-Bold.woff) format('woff');
}

@font-face {
    font-family: 'Poppins';
    src: url(../font/Poppins-Regular.woff) format('woff');
}

:root {
    --auth-blue: #1e4db7;
    --auth-blue-dark: #163d91;
    --auth-text: #1a1a1a;
    --auth-muted: #5f6b7a;
    --auth-line: #d0d5dd;
    --auth-bg: #f5f6f8;
    --auth-white: #ffffff;
}

#auth-entry.users.content,
#signup-page.users.form.content {
    width: min(100%, 1080px);
    margin: 0 auto;
    padding: 16px 20px;
}

#auth-entry .entry-card {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 330px);
    gap: 28px;
    align-items: center;
    background: transparent;
    border: 0;
    box-shadow: none;
}

#auth-entry .entry-hero {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#auth-entry .entry-hero::before {
    content: "";
    display: block;
    width: min(100%, 620px);
    height: 450px;
    background: url("/img/conseil de la semaine (élève).png") center/contain no-repeat;
}

#auth-entry .entry-hero h2,
#signup-page h2 {
    color: var(--auth-blue);
}

#auth-entry .btn,
#signup-page .btn,
#signup-page button.btn,
#signup-page input[type="submit"].btn {
    background: var(--auth-blue);
    border: 1px solid var(--auth-blue);
    color: #fff;
    text-transform: none;
    letter-spacing: 0;
    height: auto;
    line-height: 1.2;
    padding: 12px 16px;
    border-radius: 999px;
    margin-bottom: 10px;
    width: 100%;
}

#auth-entry .btn-outline {
    background: #fff;
    color: var(--auth-text);
    border: 1px solid var(--auth-line);
}

#auth-entry .btn-outline:hover {
    border: 2px solid var(--auth-blue);
    color: var(--auth-blue);
    font-weight: bold;
}

#auth-entry .btn-primary:hover,
#signup-page .btn-primary:hover {
    background: var(--auth-blue-dark);
    border-color: var(--auth-blue-dark);
}

#auth-entry a,
#signup-page a {
    color: var(--auth-blue);
}

#signup-page input[type="email"],
#signup-page input[type="password"],
#signup-page input[type="text"] {
    margin-bottom: 0;
} 


main.main.auth {
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

main.main.auth > .header {
    flex: 0 0 clamp(260px, 30vh, 280px);
    padding: clamp(3rem, 6vh, 5rem) clamp(24px, 4vw, 72px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 90px;
}

main.main.auth:has(#inscription-finish-page) > .header {
    min-height: 90px;
}

main.main.auth > .content {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding: 0 18px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--auth-bg);
}

main.main.auth #auth-entry.users.content,
main.main.auth #signup-page.users.form.content {
    width: min(100%, 1080px);
    height: 100%;
    min-height: 0;
    max-height: 100%;
    margin: 0 auto;
    padding: clamp(8px, 1.4vh, 16px) clamp(10px, 1.8vw, 20px);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* La page d'entrée */
main.main.auth #auth-entry .entry-card {
    width: 100%;
    max-width: 980px;
    height: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 330px);
    align-content: center;
    align-items: center;
    gap: clamp(20px, 2.2vw, 34px);
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

main.main.auth #auth-entry .entry-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    min-width: 0;
}

main.main.auth #auth-entry .entry-hero::before {
    content: "";
    display: block;
    width: min(100%, 420px);
    height: clamp(120px, 17vh, 170px);
    background: url("/img/conseil de la semaine (élève).png") center/contain no-repeat;
}

main.main.auth #auth-entry .entry-hero h2 {
    max-width: 11ch;
    font-size: clamp(30px, 3.2vw, 44px);
    line-height: 1;
    font-weight: 700;
    color: var(--auth-blue);
}

main.main.auth #auth-entry .entry-actions {
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: transparent;
    color: var(--auth-text);
}

main.main.auth #auth-entry .entry-brand {
    margin-top: 14px;
    font-weight: 700;
    color: var(--auth-blue);
    font-size: 20px;
}

/* Boutons d'authentification */
main.main.auth #auth-entry .btn,
main.main.auth #signup-page .btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 10px;
    border-radius: 999px;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

main.main.auth #auth-entry .btn-primary,
main.main.auth #signup-page .btn-primary {
    background: var(--auth-blue);
    color: var(--auth-white);
    border: 1px solid var(--auth-blue);
}

main.main.auth #auth-entry .btn-primary:hover,
main.main.auth #signup-page .btn-primary:hover {
    background: var(--auth-blue-dark);
    border-color: var(--auth-blue-dark);
}

main.main.auth #auth-entry .btn-outline,
main.main.auth #signup-page .btn-outline {
    background: var(--auth-white);
    color: var(--auth-text);
    border: 1px solid var(--auth-line);
}

main.main.auth #auth-entry .btn-outline:hover,
main.main.auth #signup-page .btn-outline:hover {
    background: #f0f2f5;
}

/* Page d'inscription */
main.main.auth #signup-page {
    width: min(100%, 860px);
    max-width: 860px;
    margin: 0 auto;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

main.main.auth #signup-page h2,
main.main:has(#signup-page) #signup-page h2 {
    font-size: clamp(42px, 4vw, 50px);
    line-height: 1;
    color: var(--auth-blue);
}

main.main.auth #signup-page form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
    align-items: start;
    margin-bottom: 0;
}

main.main.auth #signup-page form > .input,
main.main:has(#signup-page) #signup-page form > .input {
    margin-bottom: 12px;
}

main.main.auth #signup-page .role-group,
main.main.auth #signup-page .sep,
main.main.auth #signup-page .check-row,
main.main.auth #signup-page .submit-wrap {
    grid-column: 1 / -1;
}

main.main.auth #signup-page .role-group,
main.main:has(#signup-page) #signup-page .role-group {
    display: flex;
    flex-wrap: wrap;
    margin: 16px 0 0;
    padding: 0;
    background: transparent;
    border: 0;
}

main.main.auth #signup-page .role-group p {
    width: 100%;
    margin: 0 0 6px;
    margin-bottom: 12px;
    color: var(--auth-text);
} 

main.main.auth #signup-page .role-group label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 6px 10px;
    border: 1px solid var(--auth-line);
    border-radius: 999px;
    background: var(--auth-white);
    font-size: 13px;
    cursor: pointer;
}

main.main.auth #signup-page .sep {
    height: 1px;
    margin: 2px 0 6px;
    background: #e5e7eb;
}

main.main.auth #signup-page input[type="email"],
main.main.auth #signup-page input[type="password"],
main.main.auth #signup-page input[type="text"] {
    width: 100%;
    min-height: 42px;
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px solid var(--auth-line);
    border-radius: 14px;
    background: var(--auth-white);
    color: var(--auth-text);
    font-size: 13px;
    box-shadow: none;
}

main.main.auth #signup-page input:focus {
    outline: none;
    border-color: var(--auth-blue);
    box-shadow: 0 0 0 3px rgba(30, 77, 183, 0.1);
}

#signup-page .check-row:first-of-type {
    margin-top: 30px; 
}

main.main.auth #signup-page .check-row,
main.main:has(#signup-page) #signup-page .check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--auth-muted);
}

main.main.auth #signup-page .check-row a {
    color: var(--auth-blue);
    text-decoration: none;
}

main.main.auth #signup-page .check-row a:hover {
    text-decoration: underline;
}

main.main.auth #signup-page .submit-wrap {
    max-width: 320px;
    margin-top: 4px;
}

main.main.auth #signup-page .submit-wrap button,
main.main.auth #signup-page .submit-wrap input[type="submit"] {
    font-size: 17px;
    padding: 14px 22px;
}

main.main:has(#signup-page) #signup-page .submit-wrap button,
main.main:has(#signup-page) #signup-page .submit-wrap input[type="submit"] {
    font-size: 17px;
    padding: 14px 22px;
}

/* Desktop  */
@media (min-width: 768px) {
    main.main.auth,
    main.main:has(#auth-entry),
    main.main:has(#signup-page),
    main.main:has(#teacher-profile-page) {
        height: 100dvh;
        min-height: 100dvh;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    main.main.auth > .header,
    main.main:has(#auth-entry) > .header,
    main.main:has(#signup-page) > .header,
    main.main:has(#select-level-page) > .header,
    main.main:has(#club-readers-page) > .header,
    main.main:has(#teacher-profile-page) > .header,
    main.main:has(#inscription-finish-page) > .header {
        flex: 0 0 clamp(90px, 11vh, 125px);
        padding: clamp(0.8rem, 1.6vh, 1.3rem) clamp(14px, 1.8vw, 30px);
    }



    main.main.auth > .content,
    main.main:has(#auth-entry) > .content,
    main.main:has(#signup-page) > .content,
    main.main:has(#select-level-page) > .content,
    main.main:has(#club-readers-page) > .content {
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
        padding: 6px 18px 12px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    main.main.auth:has(#signup-page) > .content,
    main.main:has(#signup-page) > .content {
        overflow-y: auto;
        overflow-x: hidden;
        align-items: flex-start;
        justify-content: center;
        padding: 0 18px 84px;
        scroll-padding-top: 8px;
        scroll-padding-bottom: 88px;
    }

    #auth-entry.users.content,
    #signup-page.users.form.content {
        width: 100%;
        max-width: 1400px;
        height: 100%;
        min-height: 0;
        margin: 0 auto;
        padding: 8px 14px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    main.main.auth #signup-page.users.form.content,
    main.main:has(#signup-page) #signup-page.users.form.content {
        height: auto;
        max-height: none;
        min-height: 0;
        padding: 0 14px 28px;
        align-items: flex-start;
        justify-content: center;
    }

    main.main.auth #auth-entry .entry-card,
    main.main:has(#auth-entry) #auth-entry .entry-card {
        width: 100%;
        max-width: 700px;
        height: 100%;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-between;
        gap: 0;
        grid-template-columns: unset;
        padding: clamp(16px, 2vh, 24px) 0;
    }

    main.main.auth #auth-entry .entry-hero,
    main.main:has(#auth-entry) #auth-entry .entry-hero {
        width: 100%;
        max-width: 500px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: clamp(12px, 1.4vh, 18px);
        flex-shrink: 0;
        margin-top: 0;
        margin-bottom: auto;
        min-height: clamp(160px, 35vh, 330px);
    }

    main.main.auth #auth-entry .entry-hero::before,
    main.main:has(#auth-entry) #auth-entry .entry-hero::before {
        width: 100%;
        min-height: clamp(160px, 35vh, 350px);
        height: clamp(160px, 35vh, 350px);
        background: url("/img/conseil de la semaine (élève).png") center/contain no-repeat;
        background-size: contain;
    }

    #auth-entry .entry-card h2 {
        font-size: clamp(32px, 4.5vw, 52px);
        line-height: 1.1;
        white-space: normal;
        margin: 0;
        text-align: center;
        width: 100%;
        color: var(--auth-blue);
        font-weight: 700;
    }

    #auth-entry .entry-actions {
        width: 100%;
        max-width: 500px;
        margin: 30px auto auto auto;
        display: flex;
        flex-direction: column;
        gap: clamp(15px, 0.9vh, 12px);
        flex-shrink: 0;
    }

    #auth-entry .btn {
        width: 100%;
        padding: clamp(10px, 1vh, 14px) clamp(16px, 1.5vw, 30px);
        font-size: clamp(13px, 1.1vw, 24px);
        margin-bottom: 0;
    }

    #auth-entry .entry-brand {
        margin-top: auto;
        margin-bottom: 0;
        padding-top: 0;
        text-align: center;
        font-size: clamp(18px, 2.2vw, 28px);
        font-weight: 700;
        letter-spacing: 0;
        text-transform: none;
        color: var(--auth-blue);
        text-shadow: none;
    }

    #signup-page {
        width: min(100%, 760px);
        max-width: 760px;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding-top: 12px;
        padding-bottom: 16px;
    }

    #signup-page h2 {
        width: 100%;
        display: block;
        margin: 0 0 10px;
        font-size: clamp(32px, 3.6vw, 44px);
        text-align: center;
        color: var(--auth-blue);
        font-weight: 700;
        margin-top: 20px;
    }

    #signup-page form {
        grid-template-columns: 1fr;
        gap: 16px;
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
    }

    #signup-page form > .input {
        margin-bottom: 12px;
    }

    #signup-page .role-group {
        display: grid;
        grid-template-columns: 1fr;
        padding-left: 0;
    }

    #signup-page .role-group p {
        margin: 0 0 16px;
        font-size: 20px;
    }

    #signup-page .role-group label {
        width: 100%;
        font-size: 16px;
        justify-content: flex-start;
        padding-left : 20px;
    }

    #signup-page input[type="email"],
    #signup-page input[type="password"],
    #signup-page input[type="text"] {
        min-height: 46px;
        margin-bottom: 10px;
        padding: 10px 12px;
        font-size: 14px;
    }

    #signup-page .check-row {
        gap: 8px;
        font-size: 13px;
        line-height: 1.4;
        margin-top: 14px;
    }

    #signup-page .check-row span {
        font-size: 14px;
    }

    #signup-page .submit-wrap {
        max-width: 100%;
        margin-top: 6px;
    }

    #signup-page .submit-wrap button,
    #signup-page .submit-wrap input[type="submit"] {
        font-size: 17px !important;
        padding: 14px 22px !important;
    }

    main.main.auth > footer,
    main.main:has(#signup-page) > footer,
    main.main:has(#auth-entry) > footer {
        width: min(100%, 760px) !important;
        margin-left: auto;
    }
}

@media (max-width: 767px) {
    main.main.auth,
    main.main:has(#auth-entry),
    main.main:has(#signup-page),
    main.main:has(#teacher-profile-page) {
        height: auto;
        min-height: 100dvh;
        overflow: visible;
    }

    .header {
        flex: none;
        padding: 0.5rem 0.6rem 0.4rem;
        min-height: 80px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .header h1 {
        font-size: 1.5rem;
        line-height: 1.2;
        margin: 0;
        padding: 0;
    }

    .content {
        overflow: auto;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 12px 12px 80px;
        display: block;
    }

    #auth-entry.users.content,
    #signup-page.users.form.content {
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: none;
        padding: 12px 0 20px;
        display: block;
    }

    #auth-entry .entry-card {
        height: 100%;
        display: flex;
        flex-direction: column;
        flex: 1; 
    }

    #auth-entry .entry-brand {
        margin-top: auto; 
        margin-bottom: 0;
    }

    #auth-entry .entry-card {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        gap: 18px;
        margin: 0 auto;
    }

    #auth-entry .entry-hero {
        align-items: center;
        text-align: center;
        gap: 14px;
    }

    #auth-entry .entry-hero {
        width: 100%;
        max-width: 100%;
        height: 250px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #auth-entry .entry-hero::before {
        width: 100%;
        height: 100%;
        background: url("/img/conseil de la semaine (élève).png") center/contain no-repeat;
        background-size: contain;
        margin: 0 auto;
    }

    #auth-entry .entry-card h2 {
        font-size: clamp(30px, 9vw, 38px);
        line-height: 1.05;
        white-space: normal;
        max-width: 100%;
        margin: 0 0 12px;
        text-align: center;
        color: var(--auth-blue);
        font-weight: 600;
    }

    #auth-entry .entry-actions {
        width: 100%;
        max-width: 100%;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 16px;
        flex-grow: 1;
    }

    #auth-entry .btn,
    #signup-page .btn {
        width: 100%;
        font-size: 16px;
        padding: 15px 16px;
        line-height: 1.25;
        white-space: normal;
    }

    #auth-entry .entry-brand {
        margin-bottom: 0;
        text-align: center;
        font-size: 22px;
        font-weight: 800;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: #0f3f9f;
        margin-top: auto;
    }

    #signup-page {
        width: 100%;
        max-width: 100%;
    }

    #signup-page h2 {
        font-size: clamp(40px, 10vw, 50px);
        line-height: 1.05;
        font-weight: bold;
        margin-bottom: 20px;
    }
    
    #signup-page form {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    #signup-page form > .input {
        margin-bottom: 12px;
    }

    #signup-page .role-group p {
        margin-bottom: 14px;
    }

    #signup-page .role-group {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 16px;
    }

    #signup-page .role-group label {
        width: 100%;
        justify-content: flex-start;
        padding-left: 12px;
        font-size: 14px;
    }

    #signup-page input[type="email"],
    #signup-page input[type="password"],
    #signup-page input[type="text"] {
        min-height: 52px;
        margin-bottom: 10px;
        padding: 12px 14px;
        font-size: 15px;
    }

    #signup-page .check-row {
        font-size: 13px;
        line-height: 1.45;
        gap: 9px;
        margin-top: 14px;
    }

    #signup-page .submit-wrap {
        max-width: 100%;
        margin-top: 8px;
    }

    #signup-page .submit-wrap button,
    #signup-page .submit-wrap input[type="submit"] {
        font-size: 17px;
        padding: 14px 22px;
    }

    #signup-page .submit-wrap button,
    #signup-page .submit-wrap input[type="submit"] {
        font-size: 16px;
        padding: 14px 20px;
    }
}



@media (max-width: 520px) {
    #auth-entry .entry-card,
    #signup-page form {
        grid-template-columns: 1fr;
    }

    #auth-entry .entry-hero {
        align-items: center;
        text-align: center;
    }

    #auth-entry .entry-hero::before {
        margin: 0 auto;
    }

    #auth-entry .entry-brand {
        text-align: center;
    }
}

/* Page de sélection du niveau */
#select-level-page.users.content,
main.main.auth #select-level-page.users.content {
    width: min(100%, 640px);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(8px, 2vh, 24px) clamp(10px, 2vw, 20px);
}

#select-level-page h2 {
    font-size: clamp(26px, 4vw, 40px);
    color: var(--auth-blue);
    font-weight: 700;
    margin: 0 0 16px;
    line-height: 1.2;
    margin-bottom: 30px;
}

#select-level-page .role-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

#select-level-page .role-group .role-level {
    display: block;
    width: 100%;
}

#select-level-page .role-group .role-level input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

#select-level-page .role-group .role-level span {
    position: relative;
    display: block;
    width: 100%;
    padding: 11px 40px 11px 14px;
    border: 1px solid #c9c9c9;
    border-bottom: 4px solid #c9c9c9;
    border-radius: 4px;
    color: #222;
    font-size: 30px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px #e2e2e2;
}

#select-level-page .role-group .role-level span::after {
    content: "›";
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9a9a9a;
    font-size: 22px;
    font-weight: 700;
}

#select-level-page .role-group .role-level span:hover {
    background-color: #d1f1ff;
    border-color: #4d96b6;
    box-shadow: inset 0 0 0 1px #4d96b6;
    scale: 1.02;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

#select-level-page .level-dev-note {
    margin: 14px 0 0;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #ead4b2;
    background: #fff4e5;
    color: #8a4b00;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

@media (max-width: 767px) {
    #select-level-page .role-group .role-level span {
        font-size: 20px;
        padding: 10px 36px 10px 12px;
    }

    #select-level-page .role-group .role-level span::after {
        right: 12px;
        font-size: 18px;
    }

    #level-selector-block {
        width: 100%;
    }
}
#select-level-page .primary-screen,
#club-readers-page .primary-screen {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 18px 14px 16px;
    border-radius: 14px;
    background: #2db6c7;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

#select-level-page .primary-illustration,
#club-readers-page .primary-illustration {
    width: 100%;
    height: clamp(180px, 40vh, 280px);
    margin: 4px 0 14px;
    background: url("/img/espace QDL (prof).png") center/contain no-repeat;
}

#select-level-page .primary-screen h3,
#club-readers-page .primary-screen h3 {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: clamp(32px, 3.6vw, 38px);
    line-height: 1.05;
    font-weight: 700;
    text-transform: uppercase;
}

#select-level-page .primary-screen p,
#club-readers-page .primary-screen p {
    margin: 0 0 20px;
    color: #ffffff;
    font-size: clamp(18px, 1.7vw, 22px);
    line-height: 1.25;
}

#select-level-page .primary-cta,
#club-readers-page .primary-cta {
    display: block;
    width: 100%;
    text-align: center;
    text-decoration: none;
    border-radius: 9px;
    background: #f3f3f3;
    color: #1bb4c6;
    font-weight: 700;
    font-size: clamp(16px, 1.8vw, 24px);
    padding: 12px 14px;
    margin-bottom: 10px;
}

#select-level-page .primary-later,
#club-readers-page .primary-later {
    display: block;
    text-align: center;
    text-decoration: none;
    color: #ffffff;
    font-weight: 700;
    font-size: clamp(15px, 1.6vw, 22px);
    padding: 2px 0 4px;
}

/* Page de profil enseignant */
#teacher-profile-page.users.content,
main.main.auth #teacher-profile-page.users.content {
    width: min(100%, 720px);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(8px, 2vh, 24px) clamp(10px, 2vw, 20px);
}
/* Supprime le padding du spinner entre le bandeau et le formulaire */
main.main:has(#teacher-profile-page) .center.centree {
    padding: 0;
}

#teacher-profile-page .profile-container {
    width: 100%;
    max-width: 720px;
    margin-top: -20px;
}

#teacher-profile-page h2 {
    font-size: clamp(30px, 4vw, 40px);
    color: #24a0b0;
    font-weight: 700;
    margin: 0 0 24px;
    line-height: 1.2;
    text-align: center;
}

#teacher-profile-page .form-section {
    margin-bottom: 16px;
}

#teacher-profile-page .avatar-section {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
}

#teacher-profile-page .avatar-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
}

#teacher-profile-page .avatar-circle {
    position: relative;
    border: 0;
    outline: 0;
    box-shadow: none;
    background: transparent; 
    overflow: hidden;
    border-radius: 50%;
}

.avatar-circle1 {
    border-radius: 50%;
    border: 3px solid #28b5c6;
}

#teacher-profile-page .avatar-placeholder {
    width: 100px;
    height: 100px;
    display: block;
}

#teacher-profile-page .avatar-img {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#teacher-profile-page .avatar-edit-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    background: #888;
    border-radius: 50%;
    border: 2px solid #fff;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: normal;
    margin-bottom: 0;
}

#teacher-profile-page .avatar-edit-btn:hover {
    background: #666;
}

#teacher-profile-page input[type="file"]#avatar-upload {
    display: none;
}

/* Desktop only: on veut un avatar plus grand */
@media (min-width: 768px) {
    #teacher-profile-page .avatar-wrapper {
        width: 150px;
        height: 150px;
    }

    #teacher-profile-page .avatar-circle {
        width: 150px;
        height: 150px;
    }

    #teacher-profile-page .avatar-placeholder {
        width: 150px;
        height: 150px;
    }

    #teacher-profile-page .avatar-edit-btn {
        width: 50px;
        height: 50px;
    }
} 

#teacher-profile-page .pub-mode-group {
    margin-top: 4px;
}

#teacher-profile-page .pub-mode-option {
    display: flex !important;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 0;
    border-bottom: 1px solid #e8e8e8;
    cursor: pointer;
    font-weight: normal;
    margin-bottom: 0;
    color: #1a1a1a;
}

#teacher-profile-page .pub-mode-option:last-child {
    border-bottom: none;
}

#teacher-profile-page .pub-mode-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

#teacher-profile-page .pub-mode-radio-circle {
    position: relative;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #24a0b0;
    margin-top: 1px;
    box-sizing: border-box;
}

#teacher-profile-page .pub-mode-radio-circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #1bb4c6;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.2s;
}

#teacher-profile-page .pub-mode-option input:checked + .pub-mode-radio-circle::after {
    opacity: 1;
}

#teacher-profile-page .pub-mode-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#teacher-profile-page .pub-mode-name {
    font-family: 'Poppins Bold', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #111;
    line-height: 1.2;
}

#teacher-profile-page .pub-mode-desc {
    font-size: 12px;
    font-weight: normal;
    color: #333;
    line-height: 1.55;
}
#teacher-profile-page label {
    display: block;
    font-weight: 600;
    color: #1f1f1f;
    margin-bottom: 6px;
    font-size: 15px;
}

#teacher-profile-page input[type="text"],
#teacher-profile-page input[type="email"],
#teacher-profile-page select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    font-size: 14px;
    background: #f9f9f9;
    box-sizing: border-box;
}

#teacher-profile-page input[type="text"]:focus,
#teacher-profile-page select:focus {
    outline: none;
    border-color: var(--auth-blue);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(30,77,183,0.1);
}

#teacher-profile-page .school-search {
    position: relative;
}

#teacher-profile-page .school-dropdown li {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

#teacher-profile-page .school-dropdown li:hover {
    background: #f4f8ff;
    color: var(--auth-blue);
}

#teacher-profile-page .classes-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#teacher-profile-page .class-badge {
    display: inline-block;
    position: relative;
}

#teacher-profile-page .class-badge input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

#teacher-profile-page .class-badge span {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid #d0d5dd;
    border-radius: 24px;
    background: #fff;
    color: #1a1a1a;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

#teacher-profile-page .class-badge input:checked + span {
    background: #2db6c7;
    color: #fff;
    border-color: #2db6c7;
}

#teacher-profile-page .toggle-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#teacher-profile-page .toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

#teacher-profile-page .toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

#teacher-profile-page .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 34px;
}

#teacher-profile-page .toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

#teacher-profile-page input:checked + .toggle-slider {
    background-color: #2db6c7;
}

#teacher-profile-page input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

#teacher-profile-page .space-disabled-message {
    color: #111;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
}

#teacher-profile-page .submit-btn {
    width: 100%;
    min-height: 52px;
    padding: 0 22px;
    font-family: 'Poppins Bold', sans-serif;
    background: #2db6c7;
    border: none;
    border-bottom: 4px solid #1f8e9a;
    color: #fff;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-top: 12px;
    transition: background 0.2s ease;
}

#teacher-profile-page .submit-btn:hover {
    background: #24a0b0;
}

#teacher-profile-page .school-dropdown {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 12px;
    max-height: min(42vh, 420px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#teacher-profile-page .school-item:last-child {
    border-bottom: 0;
}

#teacher-profile-page .school-item:hover {
    background: #f7f7f7;
}

/* ===== PAGES DE SÉLECTION DE NIVEAU D'ENSEIGNEMENT ===== */
.level-overlay-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    display: none;
    align-items: flex-start;
    justify-content: center;
    background: linear-gradient(135deg, #2ab7c9 0%, #24a0a6 100%);
    z-index: 1000;
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.level-overlay-page.show {
    display: flex;
}

.level-overlay-card {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 100vh;
    max-width: none;
    margin: 0;
    padding: 60px 16px 32px;
    border-radius: 0;
    background: transparent;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.back-arrow-btn {
    position: fixed;
    top: 24px;
    left: 24px;
    width: 80px;
    height: 80px;
    color: #ffffff;
    font-size: 32px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.level-overlay-hero {
    width: 100%;
    height: auto;
    min-height: 100px;
    max-width: 80vw;
    margin: 30px auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.level-overlay-image {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    background: url("/img/bad_selected.png") center/contain no-repeat;
}

.club-lecteurs-image {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    background: url("/img/espace QDL (prof).png") center/contain no-repeat;
}

.level-overlay-title {
    margin: 0 auto 24px;
    max-width: 90vw;
    color: #ffffff;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
    font-weight: 700;
    text-align: center;
    padding: 0 16px;
}

.level-overlay-content {
    margin: 0 auto;
    width: 90vw;
    max-width: 500px;
    color: #ffffff;
    font-size: clamp(16px, 2vw, 30px);
    line-height: 1.5;
    flex: 1;
    overflow-y: auto;
}

.level-overlay-content p {
    margin: 0 0 14px;
}

.level-overlay-content p:last-child {
    margin-bottom: 0;
}

.level-overlay-content ul {
    padding-left: 24px;
    list-style: disc;
    text-align: left;
    display: inline-block;
}

.level-overlay-content li {
    margin: 10px 0;
}

.level-overlay-link {
    color: #ffffff;
    text-decoration: underline;
    font-weight: 600;
}

.level-overlay-link:hover {
    opacity: 0.8;
}


#select-level-page .primary-cta,
#club-readers-page .primary-cta,
.level-overlay-close {
    display: block;
    width: 90vw;
    max-width: 600px;
    margin: 0 auto 16px;
    font-family: 'Poppins Bold', sans-serif;
    transition: all 0.2s ease;
    border-radius: 12px;
    text-align: center;
    padding: 16px 20px;
    font-size: clamp(17px, 2vw, 24px);
    background: #f3f3f3;
    color: #1bb4c6;
    border: none;
    cursor: pointer;
    border-bottom: 5px solid #adadad;
}

#select-level-page .primary-cta:hover,
#club-readers-page .primary-cta:hover,
.level-overlay-close:hover {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(45, 182, 199, 0.2);
    transform: translateY(-2px);
}

#select-level-page .primary-later,
#club-readers-page .primary-later {
    display: block;
    width: 90vw;
    max-width: 600px;
    margin: 0 auto 32px;
    font-family: 'Poppins Bold', sans-serif;
    transition: all 0.2s ease;
    border: 2px solid #ffffff;
    border-radius: 8px;
    padding: 12px 20px;
    cursor: pointer;
    background: transparent;
    text-align: center;
    font-size: clamp(16px, 1.8vw, 22px);
    color: #ffffff;
    font-weight: 700;
}

#select-level-page .primary-later:hover,
#club-readers-page .primary-later:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Responsive: Mobile */
@media (max-width: 1024px) {
    .level-overlay-card {
        justify-content: center;
        padding: 52px 16px 24px;
        min-height: auto;
    }
}

@media (max-width: 768px) {
    .level-overlay-card {
        padding: 48px 14px 20px;
        min-height: auto;
    }

    .back-arrow-btn {
        width: 80px;
        height: 80px;
        font-size: 32px;
        top: 24px;
        left: 24px;
    }

    .level-overlay-hero {
        min-height: 80px;
        margin: 20px auto 15px;
        width: clamp(200px, 80vw, 400px); 
    }

    .level-overlay-image,
    .club-lecteurs-image {
        aspect-ratio: 16 / 8;
    }

    .level-overlay-title {
        font-size: clamp(26px, 3.5vw, 36px);
        margin-bottom: 20px;
        max-width: 88vw;
    }

    .level-overlay-content {
        width: 90vw;
        max-width: 600px;
        font-size: clamp(15px, 1.8vw, 20px);
        margin-bottom: 28px;
    }
}

@media (max-width: 480px) {
    .level-overlay-card {
        padding: 44px 12px 16px;
        min-height: auto;
    }

    .back-arrow-btn {
        width: 80px;
        height: 80px;
        font-size: 32px;
        top: 24px;
        left: 24px;
    }

    .level-overlay-hero {
        margin: 32px auto 20px;
        width: clamp(240px, 90vw, 480px);
        height: auto;
        min-height: 160px;
        max-width: 90vw;
    }

    .level-overlay-image,
    .club-lecteurs-image {
        aspect-ratio: 16 / 10;
    }

    .level-overlay-title {
        font-size: 24px;
        margin-bottom: 18px;
        max-width: 90vw;
    }

    .level-overlay-content {
        width: 90vw;
        max-width: 600px;
        font-size: 18px;
        margin-bottom: 24px;
    }

    .level-overlay-content ul {
        padding-left: 20px;
    }

    .level-overlay-content li {
        margin: 6px 0;
    }
}

/* Desktop*/
@media (min-width: 1025px) {
    .level-overlay-card {
        justify-content: center;
        padding: 0;
    }

    .level-overlay-hero {
        min-height: 150px;
        max-width: 400px;
        margin: 60px auto 40px;
    }

    .level-overlay-image,
    .club-lecteurs-image {
        aspect-ratio: 16 / 9;
    }

    .level-overlay-title {
        font-size: clamp(36px, 4vw, 40px);
        margin-bottom: 50px;
        max-width: 50vw;
    }

    .level-overlay-content {
        font-size: clamp(18px, 2.5vw, 30px);
        padding-left: 20px;
        max-width: 60vw;
    }

    #select-level-page .primary-screen,
    #club-readers-page .primary-screen {
        max-width: 700px;
        padding: 40px 40px 36px;
    }
}

#teacher-profile-page .school-item-name {
    font-family: 'Poppins Bold', sans-serif;
    font-size: 1.05rem;
    line-height: 1.2;
    color: #111;
    margin-bottom: 4px;
}

#teacher-profile-page .school-item-address {
    font-family: 'Poppins', sans-serif;
    font-size: 0.98rem;
    line-height: 1.3;
    color: #222;
}

/* Page de fin d'inscription enseignant */
#inscription-finish-page.users.content,
main.main.auth #inscription-finish-page.users.content {
    width: min(100%, 680px);
    margin: 0 auto;
    padding: clamp(8px, 2vh, 24px) clamp(8px, 2.2vw, 20px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

#inscription-finish-page .finish-card {
    width: 100%;
    max-width: 640px;
    background: transparent;
    color: #1f1f1f;
}

#inscription-finish-page h2 {
    margin: 20px auto;
    font-size: clamp(30px, 4.3vw, 40px);
    line-height: 1.15;
    color: #1a1a1a;
    text-align: left;
    font-family: 'Poppins Bold', sans-serif;
}

#inscription-finish-page p {
    margin: 0 0 14px;
    font-size: 16px;
    line-height: 1.45;
    color: #202020;
    font-family: 'Poppins', sans-serif;
}

.share-code-box {
    margin-top: 10px;
    margin-bottom: 18px;
    border-radius: 9px;
    background: #28b5c6;
    color: #ffffff;
    padding: 14px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.share-code-label {
    font-size: 16px;
    line-height: 1.2;
    margin-bottom: 2px;
}

.share-code-value {
    font-size: 34px;
    line-height: 1;
    font-family: 'Poppins Bold', sans-serif;
}

/* Bouton Copier avec animation */
.copy-icon-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}
.copy-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: inherit;
    stroke-dasharray: 50;
    transition: stroke-dashoffset 300ms ease-in-out;
}
 .copy-icon.clippy {
    stroke-dashoffset: 0;
}

.copy-icon.check {
    stroke-dashoffset: -50;
    color: white;
}

.copy-btn {
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 200ms ease, transform 200ms ease;
    flex-shrink: 0;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.copy-btn:active {
    transform: scale(0.95);
}

.copy-btn.is-copied {
    background: rgba(255, 255, 255, 0.18);
}

.copy-btn.is-copied .copy-icon.clippy {
    stroke-dashoffset: -50;
}

.copy-btn.is-copied .copy-icon.check {
    stroke-dashoffset: 0;
}

#inscription-finish-page .mail-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
    color: #1f1f1f;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 600;
    cursor: pointer;
}

#inscription-finish-page .mail-consent input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

#inscription-finish-page .mail-consent-check {
    width: 22px;
    height: 22px;
    margin-top: 1px;
    border-radius: 50%;
    background: #2cb8c8;
    color: #ffffff;
    font-size: 12px;
    line-height: 22px;
    text-align: center;
    flex-shrink: 0;
}

#inscription-finish-page .mail-consent input:not(:checked) + .mail-consent-check {
    background: #c8d4d7;
    color: transparent;
}

#inscription-finish-page .finish-cta {
    width: 100%;
    min-height: 50px;
    border-radius: 8px;
    background: #28b5c6;
    border-bottom: 4px solid #1f8e9a;
    color: #ffffff;
    text-decoration: none;
    font-family: 'Poppins Bold', sans-serif;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
}

#inscription-finish-page .finish-cta:hover {
    background: #24a4b5;
}

@media (max-width: 767px) {
    #inscription-finish-page.users.content,
    main.main.auth #inscription-finish-page.users.content {
        padding: 8px 8px 18px;
    }

    #inscription-finish-page .share-code-value {
        font-size: 30px;
    }                                                   

    #inscription-finish-page .finish-cta {
        font-size: 17px;
    }
}

/* Success Modal Styling */
.clublecteurs-success-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1001;
    padding: 0;
}

.clublecteurs-success-page.show {
    display: flex;
}

.clublecteurs-success-card {
    position: relative;
    width: 90vw;
    max-width: 500px;
    background: #ffffff;
    border-radius: 16px;
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-content {
    text-align: center;
}

.clublecteurs-success-card p {
    color: #1a1a1a;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.5;
    font-weight: 600;
    margin: 0;
    font-family: 'Poppins', sans-serif;
}

.clublecteurs-success-btn {
    width: 100%;
    max-width: 400px;
    padding: 14px 20px;
    border: none;
    border-radius: 999px;
    background: #0066cc;
    color: #ffffff;
    font-family: 'Poppins Bold', sans-serif;
    font-size: clamp(16px, 1.8vw, 20px);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clublecteurs-success-btn:hover {
    background: #0052a3;
    transform: translateY(-2px);
}

.clublecteurs-success-btn:active {
    transform: translateY(0);
}
