/* ─────────────────────────────────────────────────────────────
   LC-Questionnaire — style minimal
   ───────────────────────────────────────────────────────────── */

.lcf-main {
    display: block;
    font-family: inherit;
    font-size: 14px;
    color: #1f1f1f;
}

/* #region ── Item ─────────────────────────────────────────────────── */
.lcf-item {
    padding: 10px 12px;
    margin: 8px 0;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    background: #fff;
    transition: border-color .15s, background-color .15s;
}
.lcf-item.focused { border-color: #888; }
.lcf-item.invalid { border-color: #d33; background: #fff5f5; }

.lcf-item[data-required="true"] > .lcf-label::after {
    content: " *";
    color: #d33;
}

.lcf-label {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 10px;
}
.lcf-description {
    font-size: 0.875rem;
    color: #555;
    margin-bottom: 12px;
}
.lcf-footer{
    font-size:0.75rem;
    color: #666;
    font-style: italic;
    display: block;
    margin-left:auto;
}

.lcf-control { outline: none; }



.lcf-item.-col30 .lcf-item-head{ --label-col:30%; }
.lcf-item.-col40 .lcf-item-head{ --label-col:40%; }
.lcf-item.-col50 .lcf-item-head{ --label-col:50%; }
.lcf-item.-col60 .lcf-item-head{ --label-col:60%; }


.lcf-item.inline{
    --label-col:40%;
    display:flex;
    flex-direction:row;
    align-items:center;
    gap: 12px;
}
.lcf-item.inline .lcf-item-head{
    flex:0 0 var(--label-col);
    max-width: var(--label-col);
}
.lcf-item.inline .lcf-label{
    margin-bottom:0;
}
.lcf-item.inline .lcf-control{
    flex:auto;
}
/* #endregion */

/* #region ── Section ──────────────────────────────────────────────── */
.lcf-is-section,
.lcf-is-page {
    display:flex;
    flex-direction: column;
    border: none;
    background: transparent;
    padding: 0;
    margin: 12px 0;
}
.lcf-is-section > .lcf-label,
.lcf-is-page    > .lcf-label {
    font-size: 18px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 4px;
    margin-bottom: 10px;
}
.lcf-section-body,
.lcf-page-body {
    padding-left: 4px;
}
/* #endregion */

/* #region ── Inputs natifs ────────────────────────────────────────── */
.lcf-input,
.lcf-textarea,
.lcf-select {
    width: 100%;
    padding: 6px 8px;
    font-size: 14px;
    border: 1.5px solid #d0d0d0;
    border-radius: 6px;
    background: #fff;
    box-sizing: border-box;
    font-family: inherit;
}
.lcf-input:focus,
.lcf-textarea:focus,
.lcf-select:focus { border-color: #888; outline: none; }

/* #endregion */

/* #region ── Boutons (options) ─────────────────────────────────────── */
.lcf-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
/*.lcf-btn {
    padding: 6px 14px;
    font-size: 14px;
    border: 1.5px solid #d0d0d0;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
}
.lcf-btn:hover { border-color: #888; }
.lcf-btn.selected {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}*/

/* #endregion */

/* #region ── Pages (fragments rendus dans une étape) ──────────────── */
.lcf-is-page { display: flex; flex-direction: column; }

/* breakPage : séparateur invisible */
.lcf-breakpage { display: none !important; }

/* #endregion */

/* #region ── Scène & étapes (pagination interne) ──────────────────── */
.lcf-stage {
    position: relative;
    /* overflow:clip clippe les transitions sans bloquer position:sticky dans les items */
    overflow: clip;
}
.lcf-step {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}
.lcf-step[hidden] { display: none; }
.lcf-step.is-leaving {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    pointer-events: none;
}
.lcf-fragment { display: flex; flex-direction: column; }
.lcf-frag-count { font-weight: 400; color: #9aa0a6; font-size: 0.8em; }

/* #endregion */

/* #region ── Onglets / menu d'étapes ──────────────────────────────── */
.lcf-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
    border-bottom: 1px solid #e3e3e3;
    padding-bottom: 8px;
}
.lcf-tab {
    padding: 6px 12px;
    border: 1px solid transparent;
    border-radius: 6px 6px 0 0;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    transition: background-color .15s, color .15s;
}
.lcf-tab:hover { background: #f0f0f0; color: #222; }
.lcf-tab.is-active { background: #2563eb; color: #fff; }
.lcf-tab.is-visited:not(.is-active) { color: #2563eb; }
.lcf-tab[hidden] { display: none; }

/* onglets latéraux */
.lcf-has-side-tabs { display: grid; grid-template-columns: minmax(140px, 200px) 1fr; gap: 18px; align-items: start; }
.lcf-has-side-tabs .lcf-tabs[data-position="left"] {
    flex-direction: column;
    border-bottom: none;
    border-right: 1px solid #e3e3e3;
    padding-bottom: 0;
    padding-right: 8px;
    margin-bottom: 0;
}
.lcf-has-side-tabs .lcf-tabs[data-position="left"] .lcf-tab { border-radius: 6px; text-align: left; }

@media (max-width: 720px) {
    .lcf-has-side-tabs { grid-template-columns: 1fr; }
    .lcf-has-side-tabs .lcf-tabs[data-position="left"] {
        flex-direction: row;
        border-right: none;
        border-bottom: 1px solid #e3e3e3;
        padding-right: 0;
        padding-bottom: 8px;
        margin-bottom: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lcf-step { transition: none !important; }
}

/* #endregion */


/* #region ── Navigation externe ───────────────────────────────────── */
.lcf-nav {
    display: flex;
    gap: 8px;
    margin-top: 26px;
    margin-bottom: 15px;
    align-items: center;
    justify-content: center;
}

.lcf-btn-nav {
    display: none;
}
.lcf-btn-nav.show{
    display: inline-block;
}

.lcf-nav #prev{ 
    min-width: 0;
    border-radius: 10px 0 0 10px;
    margin-right: 0;
}
.lcf-nav #next{ 
    border-radius: 0 10px 10px 0;
    margin-left: -9px;
}

.lcf-nav #prev:disabled{display:none;}
.lcf-nav button:disabled {
    opacity: .4;
    cursor: not-allowed;
}


/*
.lcf-nav .primary {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}
    */
.lcf-nav .progress { margin-left: auto; color: #666; font-size: 0.8rem; }


/* #endregion */


/* #region ── En-tête collant (clone fixe) ─────────────────────────── */

/* position:relative nécessaire pour le sentinel absolu de détection */
.lcf-item:not(.lcf-is-section):not(.lcf-is-page):not(.lcf-breakpage):not(.inline) {
    position: relative;
}

/* En-tête regroupant icon/header + label + description.
   Le comportement collant est géré par un clone fixe (JS) :
   l'original garde sa place (visibility:hidden) pour éviter tout saut de page. */
.lcf-item:not(.lcf-is-section):not(.lcf-is-page):not(.lcf-breakpage):not(.inline) > .lcf-item-head {
    padding-bottom: 10px;
    background: inherit;
}

/* Supprime la marge basse du dernier enfant (couverte par le padding-bottom du wrapper) */
.lcf-item-head > :last-child {
    margin-bottom: 0;
}

/* Clone fixe affiché par JS quand l'en-tête original sort du viewport par le haut.
   Resté enfant de .lcf-item pour hériter du fond et des couleurs.
   left, width, top sont calculés dynamiquement. */
.lcf-item-head--fixed {
    padding: 8px 30px 8px 30px;   /* visuel élargi */
    margin-top: 8px;
    border-radius: 0 0 12px 12px;
    position: fixed;
    z-index: 100;
    box-sizing: border-box;
    box-shadow: 0 3px 10px rgba(0,0,0,.25);
    border-bottom: 1px solid rgba(0,0,0,.2);
}

/* Bouton « remonter en haut de la question » — bas droite du clone fixe */
.lcf-sticky-scroll-top {
    position: absolute;
    top: -5px;
    right: -2px;
    min-width: 0;
    width: 25px;
    height: 25px;
    padding: 3px;
    border: none;
    padding: 5px 5px 6px 6px;
    border-radius: 0 0 0 20px;
    background: rgba(255, 255, 255, 0);
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    line-height: 1;
    flex-shrink: 0;
}
.lcf-sticky-scroll-top:hover  { background: rgba(50,50,50,.04); }
.lcf-sticky-scroll-top:active { background: rgba(50,50,50,.10); }
.lcf-sticky-scroll-top svg {
    width: 16px;
    height: 16px;
    display: block;
    pointer-events: none;
}

/* Sentinel invisible pour la détection via IntersectionObserver */
.lcf-sticky-sentinel {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
    visibility: hidden;
}

/* #endregion */
