
/* ============================================================
   ANDRÉ – STYLE FINAL (2025)
   Version propre, claire, lisible, pop & premium
============================================================ */

/* ------------------------------------------------------------
   GLOBAL
------------------------------------------------------------ */
#andre-app {
    background: linear-gradient(180deg, #3F48FB 0%, #0a1e64 100%) !important;
    padding: 40px;
    border-radius: 32px;
    color: #111827;
    font-family: system-ui, -apple-system, sans-serif;
    max-width: 1200px;
    margin: auto;
}

/* Texte global lisible */
#andre-app,
#andre-app p,
#andre-app span,
#andre-app strong,
#andre-app li {
    color: #111827 !important;
}

/* ------------------------------------------------------------
   LAYOUT : Texte à gauche / André à droite
------------------------------------------------------------ */
.andre-main-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 32px;
}

@media (max-width: 900px) {
    .andre-main-layout {
        grid-template-columns: 1fr;
    }
}

/* ------------------------------------------------------------
   CARTES PRINCIPALES
------------------------------------------------------------ */
.andre-section {
    padding: 32px;
    border-radius: 28px;
    background: #F7F5EF;
    box-shadow: 0 18px 38px rgba(0,0,0,0.18);
}

/* Section André = vanille */
.andre-section.andre-chat {
    background: #F4F3C0;
}

/* Bilans en bas = fond bleu et cartes blanches */
.andre-section.andre-bilans {
    background: #112b72;
    color: #ffffff !important;
}

/* ------------------------------------------------------------
   EN-TÊTES
------------------------------------------------------------ */
.andre-kicker {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #5C6BB0;
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.andre-section-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 4px;
}

.andre-section-subtitle {
    margin-top: 6px;
    font-size: 1rem;
    color: #374151;
}

/* ------------------------------------------------------------
   TEXTE À ÉTUDIER
------------------------------------------------------------ */
.andre-paratexte {
    color: #444;
    margin-bottom: 16px;
}

.andre-poeme {
    background: #ffffff;
    padding: 24px;
    border-radius: 24px;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 10px 26px rgba(0,0,0,0.1);
}

.andre-vers {
    margin: 0;
    color: #111827;
    line-height: 1.5;
}

.andre-source {
    font-size: 0.85rem;
    margin-top: 12px;
    color: #6b7280;
}

/* ------------------------------------------------------------
   ANDRÉ — MENTOR
------------------------------------------------------------ */
.andre-mentor-block {
    display: flex;
    align-items: center;
    gap: 12px;
}

.andre-avatar-img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
}

/* XP pill */
.andre-mentor-xp-pill {
    background: #ffffff;
    color: #111827;
    border-radius: 999px;
    padding: 6px 12px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.andre-mentor-xp-value {
    font-weight: 700;
}

/* ------------------------------------------------------------
   STEPS (1–7)
------------------------------------------------------------ */



.andre-steps-row {
    display: flex !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    gap: 4px !important;
    padding: 6px 0;
}


.andre-step-chip {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-weight: 600 !important;
    border: 1px solid #ddd !important;
    background: #fff !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    font-size: 16px !important;
}

.andre-step-chip--active {
    background: linear-gradient(135deg, #38f9d7 0%, #4facfe 100%) !important;
    color: white !important;
    transform: scale(1.15) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}



.andre-step-chip {
    background: #ffffff;
    color: #111;
    border: 1px solid rgba(0,0,0,0.15);
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
}

.andre-step-chip:hover {
    transform: translateY(-2px);
}

.andre-step-chip--active {
    background: linear-gradient(90deg, #2563eb, #6EE7B7, #FFE770);
    color: #ffffff !important;
    border: none;
    box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

/* Progress bar */
.andre-progress-track {
    height: 7px;
    background: rgba(0,0,0,0.1);
    border-radius: 999px;
    overflow: hidden;
    margin: 16px 0;
}

.andre-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4F46E5, #22C55E, #FACC15);
    transition: width 0.25s ease;
}

/* ------------------------------------------------------------
   FORMULAIRE
------------------------------------------------------------ */
textarea#andre-question {
    width: 100%;
    background: #ffffff;
    color: #111827;
    border-radius: 20px;
    padding: 16px;
    font-size: 1rem;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 8px 22px rgba(0,0,0,0.08);
}

textarea#andre-question::placeholder {
    color: #9ca3af;
}

/* ------------------------------------------------------------
   BOUTONS
------------------------------------------------------------ */
#andre-send.btn-primary {
    background: #C5FFBC;
    color: #111827;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 999px;
    border: none;
    box-shadow: 0 12px 28px rgba(0,0,0,0.14);
    transition: 0.2s;
}

#andre-send.btn-primary:hover {
    transform: translateY(-2px);
}

/* Bouton pour bilans */
.generate-bilan {
    background: linear-gradient(135deg, #22c55e, #0ea5e9);
    color: #fff;
    border-radius: 999px;
    padding: 10px 20px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}

.generate-bilan:hover {
    transform: translateY(-2px);
}

/* ------------------------------------------------------------
   RÉPONSE D’ANDRÉ
------------------------------------------------------------ */
#andre-response,
.andre-reponse {
    background: #ffffff !important;
    color: #111827 !important;
    border-radius: 22px;
    padding: 20px;
    border: 1px solid rgba(0,0,0,0.12);
    box-shadow: 0 8px 22px rgba(0,0,0,0.08);
    font-size: 1rem;
}

.andre-placeholder {
    color: #6b7280 !important;
    font-style: italic;
}

/* ------------------------------------------------------------
   HISTORIQUE
------------------------------------------------------------ */
.andre-history {
    background: #ffffff;
    border-radius: 18px;
    padding: 16px;
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 8px 22px rgba(0,0,0,0.08);
}

.history-bubble.user {
    background: #DCFCE7;
    padding: 8px 12px;
    border-radius: 12px;
    margin-bottom: 6px;
}

.history-bubble.assistant {
    background: #E0E7FF;
    padding: 8px 12px;
    border-radius: 12px;
    margin-bottom: 6px;
}

/* ------------------------------------------------------------
   BADGE MISSION ACCOMPLIE
------------------------------------------------------------ */
.andre-badge-mission {
    background: #C5FFBC;
    color: #111827;
    padding: 8px 18px;
    border-radius: 999px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

/* ------------------------------------------------------------
   BILANS
------------------------------------------------------------ */
.andre-bilans .andre-bilan-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 22px;
    box-shadow: 0 10px 26px rgba(0,0,0,0.1);
    color: #111827;
}

.andre-bilan-placeholder {
    color: #6b7280;
}

/* ------------------------------------------------------------
   RESPONSIVE
------------------------------------------------------------ */
@media (max-width: 600px) {
    #andre-app {
        padding: 24px;
    }
}

/* Separate card for history */
.andre-history-card {
    background: #ffffff;
    padding: 24px;
    border-radius: 24px;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 10px 26px rgba(0,0,0,0.1);
    margin-top: 24px;
}


.andre-step-chip {transform:scale(0.8); margin:4px;}
.andre-steps {width:100%;}


/* Force steps left and single line */
.andre-steps { display:flex !important; flex-wrap:nowrap !important; gap:6px; overflow-x:auto; }
.andre-step-chip { transform:scale(0.75); }

/* Prevent overflow of step select */
#andre-step-select { max-width:100%; box-sizing:border-box; }



/* Smaller title */
.andre-response-title { font-size:1rem; margin-top:12px; margin-bottom:8px; }

/* Medium height for André response */
.andre-reponse { min-height:150px; }

/* Space between dialogue blocks */
.andre-reponse-wrapper { margin-bottom:24px; }


/* Bouton reset André : discret, sous la réponse élève */
.andre-reset-wrapper {
    margin-top: 24px;
}
.andre-reset-button {
    background: transparent;
    color: #7a0c0c;
    border-radius: 999px;
    border: 1px solid rgba(255, 180, 180, 0.9);
    font-weight: 500;
    font-size: 0.9rem;
    padding-inline: 24px;
}
.andre-reset-button:hover {
    background: rgba(255, 210, 210, 0.4);
}


/* ------------------------------------------------------------
   GAMIFICATION ÉTAPES
------------------------------------------------------------ */

#andre-app {
    position: relative;
}

/* Animation pop sur la pastille active */
.andre-step-chip--pop {
    animation: andre-step-pop 0.22s ease-out;
}

@keyframes andre-step-pop {
    0% { transform: scale(1); }
    40% { transform: scale(1.12); }
    100% { transform: scale(1); }
}

/* Toast de validation d'étape */
.andre-step-toast {
    position: absolute;
    top: 8px;
    right: 24px;
    background: #ffffff;
    border-radius: 999px;
    padding: 6px 16px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.25);
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
    z-index: 20;
}

.andre-step-toast--visible {
    opacity: 1;
    transform: translateY(0);
}

.andre-step-toast-icon {
    font-size: 1rem;
}

.andre-step-toast-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111827;
}

/* Toast styles */
.andre-step-toast {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(4px);
    border-radius: 14px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(-8px);
    transition: all 0.25s ease;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
    z-index: 999;
}
.andre-step-toast--visible {
    opacity: 1;
    transform: translateY(0);
}
.andre-step-toast-icon { font-size: 17px; }
.andre-step-toast-text { font-size: 15px; font-weight: 600; }




.andre-steps-row {
    display: flex !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    gap: 4px !important;
    padding: 6px 0;
}


.andre-step-chip {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-weight: 600 !important;
    border: 1px solid #ddd !important;
    background: #fff !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    font-size: 16px !important;
}

.andre-step-chip--active {
    background: linear-gradient(135deg, #38f9d7 0%, #4facfe 100%) !important;
    color: white !important;
    transform: scale(1.15) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}



.andre-steps-row {
    display: flex !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    gap: 4px !important;
    padding: 6px 0;
}
