/* ============================================
   Conjugaison - Styles formulaire creation
   Wizard 4 etapes
   ============================================ */

/* --- WIZARD --- */

.wizard-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    padding-bottom: 100px;
}

/* Indicateur d'etapes */
.steps-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    margin-bottom: 30px;
    padding: 20px 0;
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-light);
    background: var(--white);
    border: 2px solid #eee;
    transition: all 0.3s;
    cursor: pointer;
    white-space: nowrap;
}

.step .step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    background: #eee;
    color: var(--text-light);
    flex-shrink: 0;
}

.step.active {
    border-color: var(--primary);
    color: var(--text);
    background: var(--white);
}

.step.active .step-number {
    background: var(--primary);
    color: var(--text);
}

.step.completed {
    border-color: var(--success);
    color: #2e7d32;
    background: var(--success-bg);
}

.step.completed .step-number {
    background: var(--success);
    color: #fff;
}

.step-connector {
    width: 30px;
    height: 2px;
    background: #eee;
    flex-shrink: 0;
}

.step-connector.completed {
    background: var(--success);
}

.step .step-label {
    display: inline;
}

/* Etapes du formulaire */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

.form-step h2 {
    font-size: 1.3rem;
    color: var(--text);
    margin-bottom: 5px;
}

.form-step .step-description {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 25px;
}

/* Footer sticky */
.form-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 15px 25px;
    box-shadow: 0 -2px 10px var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.form-footer .btn-secondary {
    padding: 12px 24px;
    background: var(--white);
    border: 1px solid #ddd;
    border-radius: var(--radius-small);
    color: var(--text);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

.form-footer .btn-secondary:hover {
    background: var(--background);
    border-color: var(--primary);
}

.form-footer .btn-next {
    padding: 12px 28px;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-small);
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.form-footer .btn-next:hover {
    background: var(--primary-dark);
}

.form-footer .btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-footer .btn-publish {
    padding: 12px 28px;
    background: #2e7d32;
    border: none;
    border-radius: var(--radius-small);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.form-footer .btn-publish:hover {
    background: #1b5e20;
}

.form-footer .btn-draft {
    padding: 12px 24px;
    background: var(--white);
    border: 1px solid #f57c00;
    border-radius: var(--radius-small);
    color: #f57c00;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.form-footer .btn-draft:hover {
    background: #fff3e0;
}

/* --- ETAPE 1 : PARAMETRES --- */

.form-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px var(--shadow);
}

.form-section h3 {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 12px;
    font-weight: 600;
}

.form-section .form-hint {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

/* Pills radio (niveau) */
.niveau-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.niveau-selector .pill-radio {
    padding: 10px 20px;
    border: 2px solid #ddd;
    border-radius: 25px;
    background: var(--white);
    color: var(--text);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.niveau-selector .pill-radio:hover {
    border-color: var(--primary);
}

.niveau-selector .pill-radio.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text);
}

/* Grille de cards type */
.type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.type-card {
    padding: 15px;
    border: 2px solid #eee;
    border-radius: var(--radius);
    background: var(--white);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.type-card:hover:not(.disabled) {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px var(--shadow);
}

.type-card.active {
    border-color: var(--primary);
    background: rgba(170, 219, 200, 0.1);
}

.type-card.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f9f9f9;
}

.type-card .type-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
    line-height: 1;
    color: var(--ill-purple);
}
.type-card .type-icon i[data-lucide],
.type-card .type-icon svg {
    width: 32px;
    height: 32px;
    stroke-width: 1.5;
    display: inline-block;
}

.type-card .type-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 4px;
}

.type-card .type-level {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Pills checkbox temps (colorees) */
.temps-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.temps-grid .pill-check {
    padding: 8px 16px;
    border: 2px solid #ddd;
    border-radius: 20px;
    background: var(--white);
    color: var(--text);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.temps-grid .pill-badge {
    font-size: 0.65rem;
    background: #7b1fa2;
    color: #fff;
    padding: 1px 5px;
    border-radius: 8px;
    margin-left: 5px;
    font-weight: 600;
    vertical-align: middle;
}

.temps-grid .pill-check:hover:not(.disabled) {
    opacity: 0.9;
    transform: scale(1.02);
}

.temps-grid .pill-check.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Temps actifs — reprend couleurs de conjugaison.css */
.temps-grid .pill-check.active[data-temps="present"] { background: #EF9A9A; border-color: #EF9A9A; color: #B71C1C; }
.temps-grid .pill-check.active[data-temps="imperatif"] { background: #E57373; border-color: #E57373; color: #B71C1C; }
.temps-grid .pill-check.active[data-temps="imparfait"] { background: #90CAF9; border-color: #90CAF9; color: #0D47A1; }
.temps-grid .pill-check.active[data-temps="passe_compose"] { background: #7986CB; border-color: #7986CB; color: #1A237E; }
.temps-grid .pill-check.active[data-temps="passe_simple"] { background: #64B5F6; border-color: #64B5F6; color: #0D47A1; }
.temps-grid .pill-check.active[data-temps="plus_que_parfait"] { background: #5C6BC0; border-color: #5C6BC0; color: #fff; }
.temps-grid .pill-check.active[data-temps="futur"] { background: #A5D6A7; border-color: #A5D6A7; color: #1B5E20; }
.temps-grid .pill-check.active[data-temps="futur_proche"] { background: #C8E6C9; border-color: #C8E6C9; color: #1B5E20; }
.temps-grid .pill-check.active[data-temps="conditionnel"] { background: #81C784; border-color: #81C784; color: #1B5E20; }

/* Pills checkbox groupe */
.groupe-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.groupe-selector .pill-check {
    padding: 8px 18px;
    border: 2px solid #ddd;
    border-radius: 20px;
    background: var(--white);
    color: var(--text);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.groupe-selector .pill-check:hover:not(.disabled) {
    border-color: var(--primary);
}

.groupe-selector .pill-check.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text);
}

.groupe-selector .pill-check.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Options mode identification */
.identification-mode-section {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.identification-mode-options {
    display: flex;
    gap: 10px;
}

.identification-mode-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px;
    border: 2px solid #eee;
    border-radius: var(--radius-small);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.identification-mode-option:hover {
    border-color: var(--primary);
}

.identification-mode-option.active {
    border-color: var(--primary);
    background: rgba(170, 219, 200, 0.1);
}

.identification-mode-option input[type="radio"] {
    display: none;
}

.identification-mode-option .mode-icon {
    font-size: 1.4rem;
    line-height: 1;
    color: var(--ill-purple);
}
.identification-mode-option .mode-icon i[data-lucide],
.identification-mode-option .mode-icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.6;
}

.identification-mode-option .mode-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

.identification-mode-option .mode-desc {
    font-size: 0.8rem;
    color: var(--text-light);
}

@media (max-width: 480px) {
    .identification-mode-options {
        flex-direction: column;
    }
}

/* Champs titre / notion */
.form-section input[type="text"],
.form-section textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--radius-small);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: inherit;
}

.form-section input[type="text"]:focus,
.form-section textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(170, 219, 200, 0.3);
}

.form-section textarea {
    resize: vertical;
    min-height: 80px;
}

/* Messages d'erreur inline */
.field-error {
    color: var(--error);
    font-size: 0.85rem;
    margin-top: 4px;
}

/* --- ETAPE 2 : SAISIE DES PHRASES --- */

/* Zone de saisie phrase */
.phrase-input-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.phrase-input-row textarea {
    flex: 1;
    min-height: 50px;
    resize: none;
}

.phrase-input-row .btn-analyser {
    padding: 10px 20px;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-small);
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    align-self: flex-end;
}

.phrase-input-row .btn-analyser:hover {
    background: var(--primary-dark);
}

/* Consigne editable */
.consigne-input {
    margin-bottom: 20px;
}

/* Mots cliquables */
.mots-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 15px;
    background: var(--background);
    border-radius: var(--radius);
    min-height: 50px;
    margin-bottom: 15px;
}

.mot-pill {
    padding: 8px 14px;
    border: 2px solid #ddd;
    border-radius: 20px;
    background: var(--white);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.mot-pill:hover {
    border-color: var(--primary);
    box-shadow: 0 1px 4px var(--shadow);
}

.mot-pill.type-pronom,
.mot-pill.type-pronom_reflechi {
    border-color: #2e7d32;
    background: #e8f5e9;
    color: #2e7d32;
    font-weight: bold;
}

.mot-pill.type-verbe {
    border-color: #f57c00;
    background: #fff3e0;
    color: #e65100;
    font-weight: bold;
}

.mot-pill.type-verbe_autre {
    border-color: #bdbdbd;
    background: #f5f5f5;
    color: #757575;
    font-style: italic;
}

.mot-pill.type-auxiliaire {
    border-color: #7986CB;
    background: #e8eaf6;
    color: #283593;
    font-weight: 500;
}

.mot-pill.type-participe_passe {
    border-color: #f57c00;
    background: #fff3e0;
    color: #e65100;
    font-weight: bold;
}

.mot-pill.type-ponctuation {
    border-color: #ccc;
    background: #f5f5f5;
    color: #999;
    padding: 8px 10px;
}

.mot-pill.type-determinant,
.mot-pill.type-nomCommun,
.mot-pill.type-nomPropre,
.mot-pill.type-adjectif,
.mot-pill.type-adverbe,
.mot-pill.type-preposition,
.mot-pill.type-conjonction {
    border-color: #ccc;
    background: var(--white);
    color: var(--text);
}

.mot-pill.selected {
    box-shadow: 0 0 0 3px rgba(245, 124, 0, 0.3);
}

/* Menu rapide type grammatical */
.mot-menu {
    position: absolute;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 8px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 160px;
}

.mot-menu .menu-item {
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: var(--radius-small);
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text);
    text-align: left;
    transition: background 0.2s;
}

.mot-menu .menu-item:hover {
    background: var(--background);
}

.mot-menu .menu-item.active {
    background: var(--primary);
    font-weight: 600;
}

/* Panneau de configuration du verbe */
.verb-config-panel {
    background: var(--white);
    border: 2px solid #f57c00;
    border-radius: var(--radius);
    padding: 20px;
    margin: 15px 0;
    position: relative;
}

.verb-config-panel h4 {
    color: #e65100;
    margin-bottom: 15px;
    font-size: 1rem;
}

.verb-config-panel .btn-close-panel {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    padding: 5px;
    border-radius: 50%;
}

.verb-config-panel .btn-close-panel:hover {
    background: var(--background);
    color: var(--text);
}

/* Affichage separation radical/terminaison */
.separation-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 15px 0;
    font-size: 1.4rem;
    user-select: none;
}

.separation-display .letter {
    padding: 8px 2px;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.separation-display .letter.radical-part {
    color: #000;
}

.separation-display .letter.terminaison-part {
    color: #f57c00;
}

.separation-display .split-marker {
    width: 3px;
    height: 40px;
    background: #f57c00;
    border-radius: 2px;
    cursor: col-resize;
    flex-shrink: 0;
    margin: 0 1px;
    position: relative;
}

.separation-display .split-zone {
    width: 16px;
    height: 50px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.separation-display .split-zone:hover::after {
    content: '';
    position: absolute;
    width: 3px;
    height: 40px;
    background: rgba(245, 124, 0, 0.3);
    border-radius: 2px;
}

/* Apercu en temps reel */
.verb-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 15px 0;
    padding: 15px;
    background: var(--background);
    border-radius: var(--radius);
}

/* Champs config verbe */
.verb-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 15px;
}

.verb-fields .form-group {
    margin-bottom: 0;
}

.verb-fields label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-light);
}

.verb-fields input,
.verb-fields select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: var(--radius-small);
    font-size: 0.95rem;
}

.verb-fields input:focus,
.verb-fields select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(170, 219, 200, 0.3);
}

/* Bouton valider verbe */
.btn-validate-verb {
    display: block;
    width: 100%;
    margin-top: 15px;
    padding: 12px;
    background: #f57c00;
    border: none;
    border-radius: var(--radius-small);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-validate-verb:hover {
    background: #e65100;
}

/* --- ASSOCIATION (type paires) --- */

.association-section {
    margin-top: 15px;
}

.paire-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    align-items: end;
    padding: 12px;
    background: var(--white);
    border: 1px solid #eee;
    border-radius: var(--radius-small);
    margin-bottom: 8px;
}

.paire-row .paire-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.paire-row .paire-field label {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
}

.paire-row .paire-field input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: var(--radius-small);
    font-size: 0.95rem;
}

.paire-row .paire-field input:focus {
    outline: none;
    border-color: var(--primary);
}

.paire-row .btn-remove-paire {
    padding: 8px;
    background: transparent;
    border: 1px solid var(--error);
    border-radius: var(--radius-small);
    color: var(--error);
    cursor: pointer;
    transition: all 0.2s;
    align-self: center;
}

.paire-row .btn-remove-paire:hover {
    background: var(--error-bg);
}

.btn-add-paire {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: transparent;
    border: 2px dashed #ddd;
    border-radius: var(--radius-small);
    color: var(--text-light);
    cursor: pointer;
    width: 100%;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.2s;
    margin-top: 8px;
}

.btn-add-paire:hover {
    border-color: var(--primary);
    color: var(--text);
}

/* --- SERIE DE PHRASES --- */

.phrases-serie-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.phrase-serie-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: var(--white);
    border: 1px solid #eee;
    border-radius: var(--radius-small);
    transition: all 0.2s;
}

.phrase-serie-item:hover {
    border-color: var(--primary);
}

.phrase-serie-item .phrase-numero {
    background: var(--primary);
    color: var(--text);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.phrase-serie-item .phrase-texte {
    flex: 1;
    font-size: 0.95rem;
    color: var(--text);
}

.phrase-serie-item .phrase-mini-preview {
    display: flex;
    gap: 2px;
    align-items: center;
}

.phrase-serie-item .btn-edit-phrase,
.phrase-serie-item .btn-remove-phrase {
    padding: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    border-radius: var(--radius-small);
    transition: all 0.2s;
}

.phrase-serie-item .btn-edit-phrase:hover {
    background: var(--background);
    color: var(--text);
}

.phrase-serie-item .btn-remove-phrase:hover {
    background: var(--error-bg);
    color: var(--error);
}

.btn-add-phrase {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: transparent;
    border: 2px dashed #ddd;
    border-radius: var(--radius-small);
    color: var(--text-light);
    cursor: pointer;
    width: 100%;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-add-phrase:hover {
    border-color: var(--primary);
    color: var(--text);
}

/* --- SECTION IA --- */

.ia-section {
    background: #f3e5f5;
    border: 1px solid #ce93d8;
    border-radius: var(--radius);
    padding: 20px;
    margin-top: 20px;
}

.ia-section h4 {
    color: #7b1fa2;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ia-options {
    display: flex;
    gap: 12px;
    align-items: end;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.ia-options .form-group {
    margin-bottom: 0;
}

.ia-options label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #7b1fa2;
    margin-bottom: 4px;
}

.ia-options select,
.ia-options input {
    padding: 10px 12px;
    border: 1px solid #ce93d8;
    border-radius: var(--radius-small);
    font-size: 0.95rem;
    background: var(--white);
}

.ia-options select:focus,
.ia-options input:focus {
    outline: none;
    border-color: #7b1fa2;
}

.btn-generer-ia {
    padding: 10px 20px;
    background: #7b1fa2;
    border: none;
    border-radius: var(--radius-small);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-generer-ia:hover {
    background: #6a1b9a;
}

.btn-generer-ia:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ia-loading {
    text-align: center;
    padding: 20px;
    color: #7b1fa2;
}

.ia-loading .spinner {
    border-top-color: #7b1fa2;
    margin: 0 auto 10px;
}

/* Suggestions IA */
.ia-suggestions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.ia-suggestion-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: var(--white);
    border: 1px solid #ce93d8;
    border-radius: var(--radius-small);
}

.ia-suggestion-card .suggestion-texte {
    flex: 1;
    font-size: 0.95rem;
}

.ia-suggestion-card .suggestion-actions {
    display: flex;
    gap: 8px;
}

.ia-suggestion-card .btn-accept {
    padding: 6px 14px;
    background: var(--success);
    border: none;
    border-radius: var(--radius-small);
    color: #fff;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.85rem;
}

.ia-suggestion-card .btn-reject {
    padding: 6px 14px;
    background: var(--error);
    border: none;
    border-radius: var(--radius-small);
    color: #fff;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.85rem;
}

/* --- GRILLE FORMES ACCORD PP --- */

.pp-formes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 8px;
}

.pp-forme-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pp-forme-item label {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
}

.pp-forme-item input {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: var(--radius-small);
    font-size: 0.95rem;
}

.pp-forme-item input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(170, 219, 200, 0.3);
}

/* Panneau auxiliaire : bordure bleue */
#aux-config-panel {
    border-color: #7986CB;
}

#aux-config-panel h4 {
    color: #283593;
}

/* Indication genre/nombre pour PP avec auxiliaire etre */
.indication-genre {
    font-size: 0.75rem;
    color: #888;
    font-style: italic;
    margin-left: 4px;
}

/* --- ETAPE 3 : CONFIGURATION + APERCU --- */

.config-card {
    background: var(--white);
    border: 1px solid #eee;
    border-radius: var(--radius);
    padding: 15px;
    margin-bottom: 12px;
}

.config-card h4 {
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.config-card .config-field {
    margin-bottom: 10px;
}

.config-card .config-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 4px;
}

.config-card .config-field .config-value {
    padding: 8px 12px;
    background: var(--background);
    border-radius: var(--radius-small);
    font-size: 0.95rem;
    color: var(--text);
}

.config-distractors-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: var(--radius-small);
    font-size: 0.95rem;
}

.config-distractors-input:focus {
    outline: none;
    border-color: var(--primary);
}

.config-distractors-hint {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 4px;
}

/* Apercu */
.preview-section {
    margin-top: 25px;
}

.preview-section h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.preview-container {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 2px 10px var(--shadow);
    overflow: hidden;
}

.preview-container .bande-temps {
    border-radius: var(--radius) var(--radius) 0 0;
}

.preview-body {
    padding: 25px;
}

.preview-phrase {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 1.2rem;
    line-height: 2;
    margin-bottom: 15px;
}

.preview-phrase .mot-normal {
    color: var(--text);
}

.preview-reservoir {
    margin-top: 20px;
}

/* --- ETAPE 4 : RECAPITULATIF --- */

.recap-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 1px 4px var(--shadow);
    margin-bottom: 20px;
}

.recap-card h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.recap-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.recap-item {
    padding: 10px;
}

.recap-item .recap-label {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.recap-item .recap-value {
    font-size: 1rem;
    color: var(--text);
    font-weight: 500;
}

/* Options de visibilite */
.visibility-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.visibility-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 15px;
    border: 2px solid #eee;
    border-radius: var(--radius-small);
    cursor: pointer;
    transition: all 0.2s;
}

.visibility-option:hover {
    border-color: var(--primary);
}

.visibility-option.active {
    border-color: var(--primary);
    background: rgba(170, 219, 200, 0.1);
}

.visibility-option input[type="radio"] {
    margin-top: 3px;
    accent-color: var(--primary-dark);
}

.visibility-option .option-content {
    flex: 1;
}

.visibility-option .option-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 2px;
}

.visibility-option .option-desc {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Bouton tester */
.test-section {
    text-align: center;
    padding: 30px;
    background: var(--background);
    border-radius: var(--radius);
    margin-bottom: 25px;
}

.btn-tester {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-tester:hover {
    background: #43A047;
}

.test-hint {
    margin-top: 10px;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* --- RESPONSIVE --- */

@media (max-width: 768px) {
    .wizard-container {
        padding: 10px;
        padding-bottom: 90px;
    }

    /* Steps: masquer les labels */
    .step .step-label {
        display: none;
    }

    .step {
        padding: 8px 12px;
    }

    .step-connector {
        width: 15px;
    }

    /* Type grid */
    .type-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .type-card {
        padding: 10px;
    }

    .type-card .type-icon {
        font-size: 1.4rem;
        margin-bottom: 4px;
    }
    .type-card .type-icon i[data-lucide],
    .type-card .type-icon svg {
        width: 24px;
        height: 24px;
    }

    .type-card .type-name {
        font-size: 0.8rem;
    }

    /* Phrase input */
    .phrase-input-row {
        flex-direction: column;
    }

    .phrase-input-row .btn-analyser {
        align-self: stretch;
    }

    /* Verb fields */
    .verb-fields {
        grid-template-columns: 1fr;
    }

    /* Paire row */
    .paire-row {
        grid-template-columns: 1fr;
    }

    /* IA options */
    .ia-options {
        flex-direction: column;
    }

    /* Recap grid */
    .recap-grid {
        grid-template-columns: 1fr;
    }

    /* Form footer compact */
    .form-footer {
        padding: 10px 15px;
    }

    .form-footer .btn-secondary,
    .form-footer .btn-next,
    .form-footer .btn-publish,
    .form-footer .btn-draft {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    /* Preview phrase */
    .preview-phrase {
        font-size: 1rem;
    }

    /* Separation display */
    .separation-display {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .type-grid {
        grid-template-columns: 1fr;
    }

    .steps-indicator {
        padding: 10px 0;
        margin-bottom: 15px;
    }

    .step {
        padding: 6px 8px;
    }

    .step .step-number {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }
}

/* ============================================
   Bulle d'information (tooltip)
   ============================================ */
.info-bubble {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--purple, #6c63ff);
    color: #fff;
    font-size: 0.75rem;
    font-weight: bold;
    font-style: italic;
    cursor: help;
    margin-left: 6px;
    vertical-align: middle;
    position: relative;
    user-select: none;
}
.info-bubble:focus { outline: 2px solid var(--purple, #6c63ff); outline-offset: 2px; }
.info-bubble::after {
    content: attr(data-tip);
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    background: #2d2d2d;
    color: #fff;
    font-size: 0.8rem;
    font-style: normal;
    font-weight: normal;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: normal;
    width: 260px;
    text-align: left;
    line-height: 1.4;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.info-bubble:hover::after,
.info-bubble:focus::after {
    opacity: 1;
}

/* ============================================
   Chips (critères de réussite)
   ============================================ */
.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
    min-height: 0;
}
.chips-container:empty { margin-bottom: 0; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eef2ff;
    color: #3730a3;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.875rem;
    line-height: 1.4;
}
.chip-text { white-space: normal; }
.chip-remove {
    background: none;
    border: none;
    color: #6366f1;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.chip-remove:hover { color: #1e1b4b; }
.chips-input-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.chips-input-row input {
    flex: 1;
}
.btn-add-chip {
    background: var(--purple, #6c63ff);
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}
.btn-add-chip:hover { filter: brightness(1.1); }
.chip-recap {
    background: #f3f4f6;
    color: #374151;
}

/* Badge "Écosystème" (champ série) */
.badge-ecosysteme {
    display: inline-block;
    background: linear-gradient(135deg, #6c63ff, #8e7cff);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    vertical-align: middle;
    margin-left: 8px;
    letter-spacing: 0.02em;
}

/* Sélecteur de série (combobox custom, calqué sur lego1) */
.serie-picker { position: relative; }
.serie-selected {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #eef2ff;
    border-radius: 6px;
    margin-bottom: 8px;
}
.serie-selected-title { flex: 1; font-size: 0.95rem; color: #1f2937; }
.serie-selected-meta { font-size: 0.8rem; color: #6b7280; }
.serie-selected-clear {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0 4px;
}
.serie-selected-clear:hover { color: #dc2626; }
.serie-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #1f2937;
    background: #fff;
    box-sizing: border-box;
}
.serie-input:focus { outline: none; border-color: var(--purple, #6c63ff); }
.serie-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    max-height: 280px;
    overflow-y: auto;
    z-index: 30;
}
.serie-suggestion {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}
.serie-suggestion:last-child { border-bottom: none; }
.serie-suggestion:hover,
.serie-suggestion.is-active { background: #f5f3ff; }
.serie-suggestion-title { font-size: 0.95rem; color: #1f2937; margin-bottom: 2px; }
.serie-suggestion-meta { font-size: 0.8rem; color: #6b7280; }
.serie-suggestion-empty {
    padding: 14px;
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
    font-style: italic;
}
