    /* Import de la police Noto Sans */
    @import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;500&amp;display=swap');

    /* Reset et styles de base */

    /* Bouton d'ouverture */

    /* Modal Container */
    .modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0);
        justify-content: center;
        align-items: center;
        transition: background-color 0.5s ease;
        z-index: 1000;
    }

    .modal.show {
        display: flex;
        background-color: rgba(0, 0, 0, 0.5);
    }

    /* Modal Content */
    .modal-content {
        background-color: #fff;
        padding: 30px;
        border-radius: 16px;
        width: 90%;
        max-width: 500px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
        transform: scale(0.7);
        opacity: 0;
        transition: transform 0.5s ease, opacity 0.5s ease;
        position: relative;
        margin: 20px;
    }

    .modal.show .modal-content {
        transform: scale(1);
        opacity: 1;
    }

    /* Logo et titre */
    .mod-logo {
        width: 120px;
        height: auto;
        margin-bottom: 15px;
        display: block;
        margin-left: auto;
        margin-right: auto;
    }

    .modal-header {
        text-align: center;
        margin-bottom: 25px;
    }

    /* Grille principale */
    .form-grid-wrapper {
        padding: 0 10px;
    }

    .form-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
        max-height: 400px;
       /* overflow-y: auto; */
        padding-right: 8px;
        margin: 0;
    }

    /* Stylisation de la scrollbar */
    .form-grid::-webkit-scrollbar {
        width: 6px;
    }

    .form-grid::-webkit-scrollbar-thumb {
        background: #ddd;
        border-radius: 10px;
    }

    .form-grid::-webkit-scrollbar-track {
        background: rgba(0,0,0,0.02);
        border-radius: 10px;
    }

    .form-grid-item {
        width: 100%;
        padding: 0;
    }

    /* Style des inputs */
    .form-input-group {
        position: relative;
        display: flex;
        align-items: center;
        border-bottom: 1px solid rgba(0,0,0,0.1);
        transition: all 0.2s ease;
        padding: 3px 0;
    }
.form-input-group.valid {
    border-bottom-color: #4CAF50;  /* Vert clair */
}

/* S'assurer que le hover ne change pas la couleur quand c'est valide */
body:not(.input-focused) .form-input-group.valid:hover {
    border-bottom-color: #4CAF50;
}
    body:not(.input-focused) .form-input-group:hover {
        border-bottom-color: rgba(0,0,0,0.5);
    }

    .form-input-group.focused {
        border-bottom-color: rgba(0,0,0,0.7);
    }

    .form-number {
        color: rgba(0,0,0,0.4);
        padding-right: 8px;
        min-width: 18px;
        font-family: "Noto Sans", monospace;
        font-size: 14px;
    }

    .form-field {
        width: 100%;
        padding: 8px 0;
        border: none;
        background: transparent !important;
        font-family: "Noto Sans", monospace;
        font-size: 14px;
        color: #333;
        position: relative;
        z-index: 2;
    }

    .form-field:focus {
        outline: none;
    }

    .form-field.invalid {
        text-decoration: line-through;
        text-decoration-color: #ff4d4d;
        text-decoration-thickness: 2px;
    }

    /* Style pour le texte de suggestion */
    .suggestion-text {
        position: absolute;
        left: 26px;
        top: 50%;
        transform: translateY(-50%);
        color: rgba(0, 0, 0, 0.2);
        font-family: "Noto Sans", monospace;
        font-size: 14px;
        pointer-events: none;
        z-index: 1;
    }

    /* Suggestions dropdown */
    .autocomplete-suggestions {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border: 1px solid #ddd;
        border-radius: 4px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.15);
        max-height: 150px;
        overflow-y: auto;
        z-index: 1000;
        margin-top: 4px;
    }

    .autocomplete-suggestion {
        padding: 8px 12px;
        cursor: pointer;
        font-size: 14px;
        border-bottom: 1px solid #eee;
    }

    .autocomplete-suggestion:last-child {
        border-bottom: none;
    }

    .autocomplete-suggestion:hover {
        background-color: #f5f5f5;
    }

    /* Sélecteur de nombre de mots */
    .phrase-select {
        display: flex;
        gap: 15px;
        color: #a9a9a9;
        font-size: 15px;
        font-weight: 400;
        margin: 25px auto 15px;
        width: fit-content;
    }

    .phrase-select-option {
        cursor: pointer;
        padding: 8px 16px;
        transition: all 0.2s ease;
        border-radius: 8px;
    }

    .phrase-select-option:hover {
        background: rgba(0,0,0,0.05);
    }

    .phrase-select-selected {
        cursor: default;
        color: #000;
        font-weight: 500;
        background: rgba(0,0,0,0.05);
    }

    /* Bouton de fermeture */
    .close-btn {
        position: absolute;
        top: 20px;
        right: 20px;
        font-size: 24px;
        color: #888;
        cursor: pointer;
        transition: all 0.3s ease;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
    }

    .close-btn:hover {
        color: #333;
        background: rgba(0,0,0,0.05);
    }
.modal-footer {
    margin-top: 25px;
    display: flex;
    justify-content: center;
}

.next-btn {
    padding: 14px 40px;
    font-size: 15px;
    color: #4A4A4A;
    background-color: #F0F0F0;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: "Noto Sans", sans-serif;
    font-weight: 500;
}

.next-btn .arrow {
    transition: transform 0.2s ease;
    position: relative;
    top: -1px;
}

.next-btn:hover {
    background-color: #E8E8E8;
}

.next-btn:hover .arrow {
    transform: translateX(3px);
}
    /* Media queries */
    @media only screen and (max-width: 768px) {
        .modal-content {
            padding: 25px;
        }

        h2 {
            font-size: 18px;
        }

        .form-grid {
            gap: 10px;
        }
    }

    @media only screen and (max-width: 480px) {
        .modal-content {
            width: 95%;
            padding: 20px;
            margin: 10px;
        }
        
        .form-grid {
            gap: 8px;
        }
        
        .phrase-select {
            font-size: 14px;
        }

        .logo {
            width: 100px;
        }

        h2 {
            font-size: 16px;
        }

        .close-btn {
            top: 15px;
            right: 15px;
            width: 28px;
            height: 28px;
        }

        .form-number {
            font-size: 12px;
            min-width: 16px;
            padding-right: 4px;
        }

        .form-field, .suggestion-text {
            font-size: 12px;
            padding: 6px 0;
        }
    }