html {
    overflow-y: scroll;
}

/* Scrollbar cachée : elle garde sa largeur */
html.scrollbar-hidden::-webkit-scrollbar {
    width: 15px;
}

html.scrollbar-hidden::-webkit-scrollbar-track {
    background: transparent;
}

html.scrollbar-hidden::-webkit-scrollbar-thumb {
    background: transparent;
    border: 3px solid transparent;
}

/* Scrollbar visible */
html.scrollbar-visible::-webkit-scrollbar {
    width: 15px;
}

html.scrollbar-visible::-webkit-scrollbar-track {
    background: #f1f1f1;
}

html.scrollbar-visible::-webkit-scrollbar-thumb {
    background: #9e9e9e;
    border-radius: 10px;
    border: 3px solid #f1f1f1;
}

html.scrollbar-visible::-webkit-scrollbar-thumb:hover {
    background: #777;
}

body {
    font-family: Arial, sans-serif;
    background: #838faa;
    color: #e2e8f0;
    margin: 0;
    padding: 1px;
}



h1 {
    text-align: center;
    margin-bottom: 2px;
}

form {
    display: block;
}

input {
    padding: 10px;
    border-radius: 8px;
    border: none;
}

.input-used {
    background-color: #FFF5D1;
    border-color: #d39e00;
}

/* Conservation du jaune au focus */
input:focus {
    background-color: #FFF5D1;
}

/* Gestion de l'autocomplétion Chrome */
.input-used:-webkit-autofill,
.input-used:-webkit-autofill:hover,
.input-used:-webkit-autofill:focus {
    -webkit-text-fill-color: #000000;
    -webkit-box-shadow: 0 0 0 1000px #FFF5D1 inset;
    box-shadow: 0 0 0 1000px #FFF5D1 inset;
    border-color: #d39e00;
}

::placeholder {
  color: #d7d5d5;
  font-size: 1.0em;
}



.help-container {
    position: relative;
    display: inline-block;
}

.help-icon {
    cursor: pointer;
    color: #60dbfa;
    font-size: 18px;
	    font-weight: bold;
}

.help-bubble {
    display: none !important;
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-100%);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    z-index: 100;
}

.help-bubble.visible {
    display: block !important;
}

.form-line {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
	align-items: center;
    flex-wrap: wrap;
	white-space: nowrap;
}
.form-line input[type="text"] {
    flex: 1;
    width: 100%;
    min-width: 250px;
}
.form-line input[name="definition"]::placeholder {
    color: #ceaece;
    opacity: 1;
}



.familles-line {
    flex-wrap: nowrap;
}

button {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    background: #3b82f6;
    color: white;
    cursor: pointer;
}

.btn-clear {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    background: #dc2626;
    color: white;
    cursor: pointer;
}

.btn-clear:hover {
    background: #b91c1c;
}


.word {
    font-size: 34px;
    font-weight: bold;
    color: #60a5fa;
}


.word-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}


.card {
    background: #49576d;
 /* border: 1px solid #334155; */
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 12px;
    box-shadow: none;
}

.card:hover {
    border-color: #60a5fa;
}


.card p {
    margin-top: 10px;
    margin-bottom: 0;
    padding-top: 2px;
    border-top: 1px solid #334155;
    font-size: 14px;
    line-height: 1;
}


.meta {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
}

.len {
    min-width: 60px;

    font-size: 32px;
    font-weight: bold;

    color: white;
    background: #2563eb;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;
    padding: 8px 12px;
}

.quick-nav {
    position: sticky;
    top: 0px;

    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;

    padding: 10px;
    margin-bottom: 15px;

    background: #6b7280;
    border-radius: 10px;
    z-index: 1000;
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
}

.quick-btn {
    display: inline-block;

    min-width: 30px;
    padding: 6px 10px;

    text-align: center;
    text-decoration: none;

    color: white;
    background: #2563eb;

    border-radius: 6px;

    font-family: "Trebuchet MS", sans-serif;
    font-style: italic;
    font-weight: bold;
    font-size: 14px;
	letter-spacing: 1px;
}

.quick-btn:hover {
    background: #1d4ed8;
}
.top-btn {
    background: #596bd9;
}

.top-btn:hover {
    background: #4555b6;
}

.group-title {
    position: static;
    top: 0;

    background: #1d4ed8;
    color: white;

    padding: 8px 12px;
    margin-top: 10px; /* ESPACE ENTRE LES GROUPES DE MOTS DE X LETTRES */
    margin-bottom: 10px; /* ESPACE SOUS LE TITRE DU GROUPE DE MOTS ET LES RESULTATS */

    border-radius: 8px;

    font-size: 20px;
    font-weight: bold;
	scroll-margin-top: 0;
    text-align: center;   /* <-- centré */
}

.pattern-container {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 1;          /* prend toute la place disponible */
}
.pattern-input {
    flex: 1;
    min-width: 250px; /* ajuste selon tes goûts */
}
.pattern-input::placeholder {
    color: #ceaece;
	    opacity: 1;
}	
	
	
.len-input {
    width: 90px;      /* plus étroit */
    flex: 0 0 90px;
}
.len-input::placeholder {
    color: #ceaece;
	    opacity: 1;
}



.result-limit {
    text-align: right;
    color: #666;
    font-size: 0.9em;
    margin: 10px 0;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px 10px;
	font-size: 14px;
}


label {
    display: flex;
    align-items: center;
    gap: 2px;
	font-size: 14px;
}	
.composed-line {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: nowrap;
}

.composed-grid {
    display: flex;
    align-items: center;
    gap: 20px;
}

.composed-title {
    white-space: nowrap;
}

.composed-grid label {
    white-space: nowrap;
}
.filters-title {
    font-size: 18px;
    font-weight: bold;
	color: #3F597B;
}


.container {
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
    box-sizing: border-box;
}



.word {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
    box-sizing: border-box;
}

.quick-nav,
.quick-nav a,
.group-title {
    user-select: none;
    -webkit-user-select: none;
}

.word,
.card,
.group-title,
#results-area,
h1 {
    caret-color: transparent;
}

/* Réafficher les boutons + et - du nombre de lettres */

input[type="number"] {
    appearance: auto;
    -moz-appearance: auto;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: inner-spin-button;
    opacity: 1;
    margin: 0;
}

#results-area {
/* padding-bottom: 550px; */
    padding-bottom: 20px;*/
}

.don-message {
    background: #fff8e8;
    border: 1px solid #ead6a5;
    border-radius: 8px;
    padding: 12px 15px;
    margin: 15px 0;
    text-align: center;
}

.don-message p {
    margin: 0 0 12px;
    font-size: 15px;
    color: #59451c;
}

.don-button {
    display: inline-block;
    background: #e5a832;
    color: white;
    text-decoration: none;
    padding: 9px 22px;
    border-radius: 5px;
    font-weight: bold;
}

.don-button:hover {
    background: #cc901c;
}


/* ---------------------------------------
   PAGE D'ACCUEIL SEO
--------------------------------------- */

.seo-home {
    margin-top: 20px;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    text-align: left;
    line-height: 1.65;
    color: #333;
}

.seo-home h2 {
    font-size: 19px;
    color: #245477;
    margin: 25px 0 10px;
}

.seo-home h2:first-child {
    margin-top: 0;
}

.seo-home h3 {
    font-size: 16px;
    color: #333;
    margin: 18px 0 5px;
}

.seo-home p {
    margin: 4px 0 8px;
    line-height: 1.35;
}

.seo-home ul {
	    margin: 4px 0 8px;
    padding-left: 25px;
    margin: 10px 0 18px;
}

.seo-home li {
    margin-bottom: 2px;
    line-height: 1.35;
}

@media (max-width: 600px) {
    .seo-home {
        padding: 14px;
    }

    .seo-home h2 {
        font-size: 18px;
    }
}

.len-input:read-only {
    background-color: #FFF5D1;
    color: #333;
    opacity: 1;
}


.input-flash {
    animation: flashInput 0.6s ease-in-out 3;
}

@keyframes flashInput {

    0%, 100% {
        background-color: white;
    }

    50% {
        background-color: #FFD133;
    }

}


/* --------------------------------
   PIED DE PAGE
-------------------------------- */

.site-footer {
    width: 100%;
    margin-top: 25px;
    padding: 18px 10px;
    box-sizing: border-box;

    text-align: center;

    background: #f5f6f8;
    border-top: 1px solid #dddddd;

    color: #666;
    font-size: 13px;
    line-height: 1.6;
}

.site-footer p {
    margin: 4px 0;
}

.site-footer a {
    color: #35658a;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

.engagements {
    text-align: center;
    padding: 5px 15px;
    margin: 0 auto 20px;
}

.engagements-description {
    margin: 0 0 8px;
    font-size: 15px;
    color: #3F597B;
    line-height: 1.4;
}

.engagements h2 {
    margin: 0 0 5px;
}

.engagements-avantages {
    margin: 0;
}





/* Version mobile / toggle */
@media screen and (max-width: 600px) {


    .form-line button {
        display: inline-block;
    }
	
    .form-line:has(.len-input) {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center;
        gap: 5px;
        width: 100%;
    }

    .form-line .len-input {
        flex: 0 0 75px !important;
        width: 75px !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }

    .form-line .pattern-input {
        flex: 1 1 0 !important;
        width: 0 !important;
        min-width: 0 !important;
        box-sizing: border-box;
        font-size: 12px;
    }

    .form-line .help-container {
        flex: 0 0 auto;
        display: inline-block;
    }

    .form-line .help-icon {
        display: inline-block;
    }

.mobile-break {
    display: none;
}

    .form-line:has(.len-input) .mobile-break {
        display: block;
        flex-basis: 100%;
        height: 0;
    }

    .filters-grid {
        grid-template-columns: repeat(2, 1fr);
	}
    .container h1 {
        font-size: 18px;
        line-height: 1.3;
        margin-top: 5px;
        margin-bottom: 3px;
    }



.avantages {
    margin: 12px 0 20px;
    font-size: 15px;
    color: #267345;
}

.avantages strong {
    font-weight: 600;
}

    .composed-line {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .composed-title {
        width: 100%;
        margin-bottom: 0;
    }

    .composed-grid {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
        width: 100%;
    }

    /* mot */
    .word {
        font-size: 15px;
    }

    /* Définitions */
    .card p {
        font-size: 10px;
        line-height: 1.4;
		margin-top: 2px;
    }

@media screen and (max-width: 600px) {

    .form-line:has(button[type="submit"]) {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .form-line:has(button[type="submit"]) button {
        display: inline-block !important;
        flex: 0 0 auto !important;
        margin: 0 !important;
    }
}