/* ==========================================================================
   FSolver — modernisation (menu, zone de recherche, blocs de l'accueil)
   Chargé après app.css / perso2.css / resultat.css.
   ========================================================================== */

:root {
    --fs-navy: #08304a;
    --fs-navy-2: #0e5480;
    --fs-cyan: #3cd6e7;
    --fs-yellow: #ffc107;
    --fs-yellow-hover: #ffcd38;
    --fs-title: #063d74;
    --fs-text: #334155;
    --fs-muted: #64748b;
    --fs-red: #c0392b;
    --fs-red-bg: #fdecea;
    --fs-border: #e1e8f0;
}

/* --------------------------------------------------------------------------
   Menu du haut
   -------------------------------------------------------------------------- */
.gradient-header {
    background: linear-gradient(180deg, var(--fs-navy-2) 0%, var(--fs-navy) 100%);
    border-bottom: 2px solid var(--fs-cyan);
    box-shadow: 0 2px 14px rgba(4, 30, 60, 0.35) !important;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}

.gradient-header > .container {
    flex-wrap: wrap;
    row-gap: 0.5rem;
}

.fs-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin: 0 0 0 auto;
    padding: 4px;
    list-style: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.fs-nav .nav-item {
    margin: 0;
}

.fs-nav__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 9px;
    color: #ffffff;
    font-size: 17px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color 0.15s, color 0.15s;
}

.fs-nav__link:hover,
.fs-nav__link:focus {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    text-decoration: none;
}

.fs-nav__link:focus-visible {
    outline: 2px solid var(--fs-yellow);
    outline-offset: 2px;
}

.fs-nav__link--accent,
.fs-nav__link--accent:focus {
    background: var(--fs-yellow);
    color: var(--fs-navy);
}

.fs-nav__link--accent:hover {
    background: var(--fs-yellow-hover);
    color: var(--fs-navy);
}

.fs-nav__link--logout:hover {
    background: rgba(227, 52, 47, 0.85);
}

@media (max-width: 767.98px) {
    .fs-nav {
        width: 100%;
        margin-left: 0;
    }

    .fs-nav .nav-item {
        flex: 1 1 0;
    }

    .fs-nav__link {
        width: 100%;
        padding: 0 8px;
        font-size: 14px;
    }
}

/* --------------------------------------------------------------------------
   Zone de recherche
   -------------------------------------------------------------------------- */
.bloc2 {
    padding-top: 1.25rem !important;
    padding-bottom: 1.75rem !important;
}

.bloc2 h1.display-5,
.bloc2 .titrecss {
    font-weight: 700;
    letter-spacing: -0.015em;
}

.bloc2 .soustitre {
    font-weight: 400;
}

.fs-search-hint {
    margin: 0.75rem 0 0.5rem;
    color: var(--fs-yellow);
    font-size: 1.05rem;
    font-weight: 600;
}

.fs-search {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    background: rgba(8, 48, 74, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(3, 30, 60, 0.25);
}

.fs-search__field {
    flex: 1 1 420px;
    min-width: 0;
    margin: 0;
}

.fs-search #champ {
    min-height: 56px;
    padding: 14px 18px;
    border: 0;
    border-radius: 11px;
    color: #0f2133;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 4px;
    resize: none;
    box-shadow: none;
    transition: box-shadow 0.15s;
}

.fs-search #champ:focus {
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.85);
}

.fs-search #champ::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.fs-search__actions {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}

.fs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 56px;
    padding: 0 22px;
    border: 0;
    border-radius: 11px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s, border-color 0.15s, transform 0.1s;
}

.fs-btn:hover,
.fs-btn:focus {
    text-decoration: none;
}

.fs-btn:active {
    transform: translateY(1px);
}

.fs-btn:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.fs-btn--ghost,
.fs-btn--ghost:focus {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #ffffff;
}

.fs-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.7);
    color: #ffffff;
}

.fs-btn--primary,
.fs-btn--primary:focus {
    background: var(--fs-yellow);
    color: var(--fs-navy);
}

.fs-btn--primary:hover {
    background: var(--fs-yellow-hover);
    color: var(--fs-navy);
}

@media (max-width: 767.98px) {
    .fs-search__actions {
        width: 100%;
    }

    .fs-search__actions .fs-btn {
        flex: 1 1 0;
    }

    .fs-search #champ {
        font-size: 18px;
        letter-spacing: 3px;
    }
}

/* --------------------------------------------------------------------------
   Blocs de l'accueil : applications
   -------------------------------------------------------------------------- */
.fs-apps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 16px;
    width: 100%;
    max-width: 1000px;
    margin: 1.25rem auto 1.5rem;
}

.fs-app {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    background: #ffffff;
    border: 1px solid var(--fs-border);
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(6, 61, 116, 0.05), 0 8px 24px rgba(6, 61, 116, 0.06);
}

.fs-app__badge {
    flex: 0 0 auto;
}

.fs-app__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.fs-app__text {
    margin: 0;
    color: var(--fs-text);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

.fs-app__text .fs-f {
    color: #e74d3c;
}

.fs-btn-navy,
.fs-btn-navy:focus {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 10px;
    background: var(--fs-navy-2);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.15s;
}

.fs-btn-navy:hover {
    background: var(--fs-navy);
    color: #ffffff;
    text-decoration: none;
}

@media (max-width: 420px) {
    .fs-app {
        flex-direction: column;
        text-align: center;
    }

    .fs-app__body {
        align-items: center;
    }
}

/* --------------------------------------------------------------------------
   Blocs de l'accueil : mode d'emploi
   -------------------------------------------------------------------------- */
.fs-hp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1000px;
    margin: 1.25rem auto 0.5rem;
}

.fs-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100%;
    padding: 22px 24px;
    background: #ffffff;
    border: 1px solid var(--fs-border);
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(6, 61, 116, 0.05), 0 8px 24px rgba(6, 61, 116, 0.06);
}

.fs-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fs-card__icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 40px;
    height: 40px;
    background: #eaf4fb;
    border-radius: 10px;
}

.fs-card__title {
    margin: 0;
    color: var(--fs-title);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.fs-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: fs-step;
    color: var(--fs-text);
    font-size: 1rem;
    line-height: 1.55;
}

.fs-steps > li {
    position: relative;
    padding-left: 34px;
    counter-increment: fs-step;
}

.fs-steps > li::before {
    content: counter(fs-step);
    position: absolute;
    top: 1px;
    left: 0;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    background: var(--fs-navy-2);
    border-radius: 50%;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
}

.fs-chip,
.fs-chip:focus {
    display: inline-block;
    padding: 0 8px;
    background: var(--fs-red-bg);
    border-radius: 7px;
    color: var(--fs-red);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-decoration: none;
    word-break: break-word;
}

.fs-chip:hover {
    color: #922b21;
    text-decoration: underline;
}

.fs-f {
    color: #e74d3c;
}

.fs-demo-btn {
    display: inline-block;
    margin: 6px 0 2px;
    padding: 6px 14px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.95rem;
    line-height: 1.3;
}

.fs-demo-btn--no {
    background: #e3342f;
}

.fs-demo-btn--yes {
    background: #38c172;
}

.fs-card__note {
    margin: auto 0 0;
    padding-top: 12px;
    border-top: 1px dashed var(--fs-border);
    color: var(--fs-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

.fs-card__note .bleu,
.fs-card__note .rouge {
    font-weight: 600;
}

.pt-1 > .fs-app {
    margin: 1rem 0 0.5rem;
}

/* --------------------------------------------------------------------------
   Page de résultats : bloc des solutions
   -------------------------------------------------------------------------- */
#solutions {
    margin: 1rem 0;
    background: #fffdf2;
    border: 1px solid #f1e7b4;
    border-radius: 16px;
}

@media (min-width: 971px) {
    #solutions {
        background: transparent;
        border: 0;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

#res_syn > .petitcaractere,
#synonymes #res_syn > .petitcaractere {
    display: inline-block;
    margin-bottom: 6px;
    color: var(--fs-muted);
    font-size: 0.95rem;
    font-style: normal;
    font-weight: 600;
}

#res_syn > button {
    min-width: 44px;
    height: 40px;
    margin: 0 2px 6px 0;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.2);
    font-size: 1.1rem;
    line-height: 40px;
    transition: transform 0.12s, filter 0.12s;
}

#res_syn > button:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

#res_syn > button:focus-visible {
    outline: 3px solid var(--fs-yellow);
    outline-offset: 2px;
}

#solutions h3 {
    margin: 0.5rem 0 0.75rem;
    color: var(--fs-title);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.5;
}

#solutions h3 > .petitcaractere:first-child {
    display: inline-block;
    min-width: 2rem;
    margin-right: 4px;
    padding: 0 10px;
    background: var(--fs-navy-2);
    border-radius: 999px;
    color: #ffffff;
    font-style: normal;
    text-align: center;
}

#solutions h3 > a.petitcaractere {
    color: var(--fs-muted);
    font-style: normal;
    text-decoration: none;
}

#commentaireCollapse {
    margin-bottom: 0.75rem;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid var(--fs-border);
    border-radius: 10px;
    font-size: 0.95rem;
}

#solutions .elemTable {
    margin: 0 6px 8px 0;
    padding: 12px 14px;
    border: 1px solid #cfd8e3;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(6, 61, 116, 0.05), 0 4px 12px rgba(6, 61, 116, 0.06);
    font-size: 19px;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

#solutions .elemTable:hover {
    background: #f0f9ff !important;
    border-color: #227297;
    box-shadow: 0 6px 16px rgba(34, 114, 151, 0.16);
    transform: translateY(-1px);
}

#solutions .elemTable a {
    color: var(--fs-title);
    text-decoration: none;
}

#solutions > .petitcaractere {
    margin-top: 0.5rem;
    color: var(--fs-muted);
    font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   Boutons Non / Oui
   -------------------------------------------------------------------------- */
#dialog {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    /* padding (les marges fusionneraient) + 50 px de marge de la pub suivante : au moins 100 px entre les boutons et une pub */
    margin: 0.5rem 0 1rem !important;
    padding: 0 0 50px !important;
}

#dialog > .col-xl {
    flex: 1 1 260px;
    max-width: 100%;
    padding: 0;
}

#dialog .btn-lg {
    width: 100%;
    min-height: 52px;
    padding: 10px 18px;
    border: 0 !important;
    border-radius: 12px;
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18);
    font-size: 1.05rem;
    line-height: 1.3;
    white-space: normal;
}

#dialog .btn-success {
    background: #2ea866;
}

#messageConnexion .h5 {
    font-size: 1rem;
}

/* --------------------------------------------------------------------------
   Fenêtres « Demander de l'aide » / « Proposer une réponse »
   -------------------------------------------------------------------------- */
#no-modal .modal-content,
#yes-modal .modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(3, 30, 60, 0.35);
}

#no-modal .modal-header,
#yes-modal .modal-header {
    padding: 14px 20px;
    border: 0;
}

#no-modal .modal-header h3,
#yes-modal .modal-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
}

#no-modal .modal-header img,
#yes-modal .modal-header img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

#no-modal .modal-body,
#yes-modal .modal-body {
    padding: 20px;
}

#no-modal .modal-body .form-control,
#yes-modal .modal-body .form-control {
    min-height: 52px;
    border: 1px solid #cfd8e3;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 4px;
}

#no-modal .modal-body .form-control:focus {
    border-color: #e3342f;
    box-shadow: 0 0 0 3px rgba(227, 52, 47, 0.25);
}

#yes-modal .modal-body .form-control:focus {
    border-color: #2ea866;
    box-shadow: 0 0 0 3px rgba(46, 168, 102, 0.25);
}

#no-modal .modal-footer,
#yes-modal .modal-footer {
    gap: 8px;
    padding: 12px 20px 16px;
    background: #f8fafc;
    border-top: 1px solid var(--fs-border);
}

#no-modal .modal-footer .btn,
#yes-modal .modal-footer .btn {
    min-height: 44px;
    padding: 0 18px;
    border-radius: 10px;
    font-weight: 600;
}

#no-modal .modal-footer .btn-default,
#yes-modal .modal-footer .btn-default {
    background: #ffffff;
    border: 1px solid #cfd8e3;
    color: var(--fs-text);
}

/* --------------------------------------------------------------------------
   Listes de définitions (« D'autres définitions », « Définitions du moment »)
   -------------------------------------------------------------------------- */
.res_def_bdd .h3,
.bloc4 .text-justify {
    margin: 0.5rem 0 0.75rem;
    color: var(--fs-title);
    font-size: 1.2rem;
    font-weight: 700;
}

.res_def_bdd .h3 .petitcaractere,
.bloc4 .text-justify .petitcaractere {
    color: var(--fs-muted);
}

.ul-def {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 8px;
    margin: 0 0 1rem;
    padding: 0;
}

.ul-def .li-def {
    margin: 0 !important;
    background: #ffffff;
    border-top: 1px solid var(--fs-border);
    border-right: 1px solid var(--fs-border);
    border-bottom: 1px solid var(--fs-border);
    border-left-width: 5px;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(6, 61, 116, 0.04);
    transition: box-shadow 0.15s, transform 0.15s;
}

.ul-def .li-def:hover {
    box-shadow: 0 6px 14px rgba(6, 61, 116, 0.1);
    transform: translateY(-1px);
}

.ul-def .li-def a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 44px;
    margin: 0;
    padding: 8px 14px;
    color: #0f2133;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.35;
    text-decoration: none;
}

.ul-def .li-def a::after {
    content: "›";
    flex: 0 0 auto;
    color: #94a3b8;
    font-size: 1.4rem;
    line-height: 1;
}

.ul-def .li-def a:hover {
    color: var(--fs-title);
    text-decoration: none;
}

.ul-def .li-def a .h5,
.ul-def .li-def a .text-dark {
    margin: 0;
    color: inherit !important;
    font-size: inherit;
    font-weight: inherit;
}

.bloc4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* --------------------------------------------------------------------------
   Pied de page
   -------------------------------------------------------------------------- */
footer.bloc6 {
    background: linear-gradient(180deg, var(--fs-navy-2) 0%, var(--fs-navy) 100%);
    border-top: 2px solid var(--fs-cyan);
    color: #d5e9f6;
}

footer.bloc6 .list-inline-item {
    margin-right: 0.35rem;
}

footer.bloc6 .h6 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
}

footer.bloc6 a {
    color: #d5e9f6;
    text-decoration: none;
    transition: color 0.15s;
}

footer.bloc6 a:hover {
    color: var(--fs-yellow);
    text-decoration: none;
}

footer.bloc6 .text-primary {
    color: rgba(255, 255, 255, 0.35) !important;
}

footer.bloc6 .text-muted {
    color: #9fb7cc !important;
}

footer.bloc6 img[src*="/flags/"] {
    border-radius: 6px;
    transition: transform 0.15s;
}

footer.bloc6 a:hover img[src*="/flags/"] {
    transform: translateY(-2px);
}

footer.bloc6 img[src*="/apps/"] {
    border-radius: 8px;
}

/* --------------------------------------------------------------------------
   Bloc des synonymes (même traitement que les solutions)
   -------------------------------------------------------------------------- */
#synonymes h1.title {
    margin: 0.5rem 0 0.25rem;
    color: var(--fs-title);
    font-size: 1.4rem;
    font-weight: 700;
}

#synonymes h3 {
    margin: 0.25rem 0 0.75rem;
    color: var(--fs-title);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

#synonymes h3 > .petitcaractere:first-child {
    display: inline-block;
    min-width: 2rem;
    margin-right: 4px;
    padding: 0 10px;
    background: var(--fs-navy-2);
    border-radius: 999px;
    color: #ffffff;
    font-style: normal;
    text-align: center;
}

#synonymes .elemSyn {
    margin: 0 6px 8px 0;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid #cfd8e3;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(6, 61, 116, 0.05), 0 4px 12px rgba(6, 61, 116, 0.06);
    font-size: 19px;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

#synonymes .elemSyn:hover {
    background: #f0f9ff;
    border-color: #227297;
    box-shadow: 0 6px 16px rgba(34, 114, 151, 0.16);
    transform: translateY(-1px);
}

#synonymes .elemSyn a {
    color: var(--fs-title);
    text-decoration: none;
}

@media (max-width: 640px) {
    #solutions .elemTable,
    #synonymes .elemSyn {
        width: 100% !important;
        margin-right: 0;
    }
}

/* --------------------------------------------------------------------------
   Bloc des anagrammes
   -------------------------------------------------------------------------- */
#anagramme #res_ortho > p {
    color: var(--fs-title);
    font-size: 1.1rem;
    letter-spacing: 0.02em;
}

#anagramme #res_ortho > p > .petitcaractere:first-child {
    display: inline-block;
    min-width: 2rem;
    margin-right: 4px;
    padding: 0 10px;
    background: var(--fs-navy-2);
    border-radius: 999px;
    color: #ffffff;
    font-style: normal;
    text-align: center;
}

#anagramme .elemTable,
#anagramme .elemMobile {
    margin: 0 6px 8px 0;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid #cfd8e3;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(6, 61, 116, 0.05), 0 4px 12px rgba(6, 61, 116, 0.06);
    font-size: 19px;
}

#anagramme .elemTable a,
#anagramme .elemMobile a {
    color: var(--fs-title);
    text-decoration: none;
}

@media (max-width: 640px) {
    #anagramme .elemTable,
    #anagramme .elemMobile {
        width: 100% !important;
        margin-right: 0;
    }
}

/* --------------------------------------------------------------------------
   « Définitions du moment » : étiquettes (fond bleu ciel conservé)
   -------------------------------------------------------------------------- */
.bloc4 .ul-def {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bloc4 .ul-def .li-def {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding-left: 12px;
    border-top: 0;
    border-right: 0;
    border-bottom: 0;
    border-left-width: 0;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px #cfe3f2;
}

.bloc4 .ul-def .li-def::before {
    content: "";
    flex: 0 0 auto;
    width: 0;
    height: 9px;
    border-left: 9px solid;
    border-left-color: inherit;
    border-radius: 50%;
}

.bloc4 .ul-def .li-def:hover {
    box-shadow: inset 0 0 0 1px #227297, 0 4px 10px rgba(6, 61, 116, 0.1);
}

.bloc4 .ul-def .li-def a {
    min-height: 36px;
    padding: 6px 14px 6px 0;
    font-size: 14px;
}

.bloc4 .ul-def .li-def a::after {
    content: none;
}

.bloc4 .ul-def .li-def,
.bloc4 .ul-def .li-def:hover {
    background: transparent;
}

/* --------------------------------------------------------------------------
   Grille des réponses (solutions, synonymes, anagrammes) — js/fs-grid.js
   - Une colonne (par défaut) : un mot trop long revient à la ligne.
   - .fs-grid-multi : plusieurs colonnes, toutes de la largeur du mot le plus
     long (--fs-cell), aucun mot coupé.
   Les listes masquées par le filtre (style="display: none") restent masquées.
   -------------------------------------------------------------------------- */
#solutions div.table0:has(> .elemTable):not([style*="none"]),
#solutions div[class^="table"]:has(> .elemTable)[style*="block"],
#synonymes div.syn0:has(> .elemSyn):not([style*="none"]),
#synonymes div[class^="syn"]:has(> .elemSyn)[style*="block"],
#anagramme #res_ortho:has(> .elemTable, > .elemMobile) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin-bottom: 0.5rem;
}

#solutions div.fs-grid-multi[class^="table"],
#synonymes div.fs-grid-multi[class^="syn"],
#anagramme #res_ortho.fs-grid-multi {
    grid-template-columns: repeat(auto-fill, minmax(var(--fs-cell), 1fr)) !important;
}

#anagramme #res_ortho > p,
#synonymes div[class^="syn"] > h1,
#synonymes div[class^="syn"] > h3 {
    grid-column: 1 / -1;
}

#solutions div[class^="table"] > .elemTable,
#synonymes div[class^="syn"] > .elemSyn,
#anagramme #res_ortho > .elemTable,
#anagramme #res_ortho > .elemMobile {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0 6px;
    width: auto !important;
    min-width: 0;
    margin: 0;
    padding-right: 12px;
    padding-left: 12px;
    white-space: normal;
    text-align: center;
}

#solutions .elemTable .letter2px a,
#synonymes .elemSyn .letter2px a,
#anagramme .elemTable a,
#anagramme .elemMobile a {
    overflow-wrap: anywhere;
}

#solutions div.fs-grid-multi > .elemTable,
#synonymes div.fs-grid-multi > .elemSyn,
#anagramme #res_ortho.fs-grid-multi > .elemTable,
#anagramme #res_ortho.fs-grid-multi > .elemMobile {
    flex-wrap: nowrap;
    white-space: nowrap;
}

#solutions div.fs-grid-multi > .elemTable .letter2px a,
#synonymes div.fs-grid-multi > .elemSyn .letter2px a,
#anagramme #res_ortho.fs-grid-multi a {
    overflow-wrap: normal;
}

/* --------------------------------------------------------------------------
   Recherche (option B) : champ sur toute la largeur, boutons dessous
   occupant la largeur — Annuler 1/3, Chercher 2/3.
   -------------------------------------------------------------------------- */
.fs-search__field {
    flex: 1 1 100%;
}

.fs-search__actions {
    flex: 1 1 100%;
    width: 100%;
}

.fs-search__actions .fs-btn--ghost {
    flex: 1 1 0;
}

.fs-search__actions .fs-btn--primary {
    flex: 2 1 0;
}

/* --------------------------------------------------------------------------
   Bloc application (option A) : centré, badge / texte / bouton empilés.
   -------------------------------------------------------------------------- */
.fs-app {
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 22px 20px;
    text-align: center;
}

.fs-app__body {
    align-items: center;
    gap: 14px;
}

.fs-apps {
    max-width: 760px;
}

.pt-1 > .fs-app {
    max-width: 420px;
    margin-right: auto;
    margin-left: auto;
}

.fs-apps:has(> .fs-app:only-child) {
    max-width: 420px;
}
