/* ==========================================================================
   1. LAYOUT PRINCIPAL & ÉTAPES (Tunnel)
   ========================================================================== */
.main {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 32px 16px 48px;
}

.step { 
    display: none; 
    width: 100%; 
    max-width: 480px; 
    animation: fadeUp 0.3s ease; 
}

.step.active { 
    display: block; 
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   2. FORMULAIRES SPÉCIFIQUES (Login Parent)
   ========================================================================== */
.field { 
    margin-bottom: 18px; 
}

.field label {
    display: block; 
    font-size: 11px; 
    font-weight: 700;
    color: var(--text-soft); 
    text-transform: uppercase;
    letter-spacing: 0.06em; 
    margin-bottom: 7px;
}

/* On cible spécifiquement les inputs de cette page s'ils n'ont pas la classe .form-input */
.field input[type="email"], 
.field input[type="password"], 
.field input[type="text"] {
    width: 100%; 
    border: 1.5px solid var(--border); 
    border-radius: 8px;
    padding: 11px 14px; 
    font-size: 14px; 
    font-family: 'Inter', sans-serif;
    color: var(--text); 
    outline: none; 
    transition: border-color 0.2s;
    background: var(--white);
}

.field input:focus { 
    border-color: var(--teal); 
}

/* Wrapper pour le bouton 'œil' du mot de passe */
.pwd-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.pwd-wrapper input {
    padding-right: 44px; /* Laisse de la place pour l'icône */
}

.btn-eye {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 42px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-soft);
    font-size: 16px;
    border-radius: 0 8px 8px 0;
    transition: color 0.2s;
    padding: 0;
    flex-shrink: 0;
}

.btn-eye:hover { color: var(--teal); }
.btn-eye svg { width: 18px; height: 18px; pointer-events: none; }

.pwd-hint { 
    font-size: 11px; 
    color: var(--text-soft); 
    margin-top: 4px; 
}

/* ==========================================================================
   3. SÉLECTION DES ENFANTS
   ========================================================================== */
.children-list { 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
    margin-top: 8px; 
}

.child-card {
    border: 1.5px solid var(--border); 
    border-radius: 10px;
    padding: 14px 16px; 
    cursor: pointer;
    display: flex; 
    align-items: center; 
    gap: 14px;
    transition: all 0.15s; 
    background: var(--white);
}

.child-card:hover { 
    border-color: var(--teal); 
    background: var(--teal-light); 
}

.child-avatar {
    width: 42px; 
    height: 42px; 
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal-dark), var(--teal));
    color: white; 
    font-weight: 700; 
    font-size: 16px;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    flex-shrink: 0;
}

.child-name { font-weight: 700; font-size: 15px; color: var(--text); }
.child-meta { font-size: 12px; color: var(--text-soft); margin-top: 2px; }

.child-status {
    margin-left: auto; 
    font-size: 11px; 
    font-weight: 600;
    padding: 3px 9px; 
    border-radius: 10px;
}

.status-done { background: #d1fae5; color: #065f46; }
.status-pending { background: #fef3c7; color: #92400e; }

/* ==========================================================================
   4. PAGE DE RÉSULTAT (Les 3 Talents)
   ========================================================================== */
.talent-page {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 32px;
    animation: fadeUp 0.3s ease;
}

.talent-header {
    text-align: center; 
    margin-bottom: 28px;
}

.talent-header .prenom {
    font-family: 'GFS Didot', serif;
    font-size: 26px; 
    color: var(--text); 
    margin-bottom: 4px;
}

.talent-header .meta { 
    font-size: 13px; 
    color: var(--text-soft); 
}

/* Grille pour les 3 talents */
.talents-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

/* Carte Talent individuelle */
.talent-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.2s;
}

.talent-card:hover { 
    transform: translateY(-2px); 
}

.talent-card-top {
    padding: 22px 24px 18px;
    display: flex; 
    align-items: flex-start; 
    gap: 16px;
}

.rank-badge {
    font-size: 28px; 
    flex-shrink: 0; 
    margin-top: 2px;
}

.talent-info { flex: 1; }

.talent-label {
    font-size: 11px; 
    font-weight: 700; 
    text-transform: uppercase;
    letter-spacing: 0.08em; 
    opacity: 0.7; 
    margin-bottom: 4px;
}

.talent-emoji { 
    font-size: 32px; 
    margin-bottom: 6px; 
    display: block; 
}

.talent-nom-fr {
    font-family: 'GFS Didot', serif;
    font-size: 26px; 
    font-weight: 400;
    color: var(--text); 
    line-height: 1.2; 
    margin-bottom: 3px;
}

.talent-bar { 
    height: 4px; 
    width: 100%; 
}

.talent-card-body { 
    padding: 20px 24px 24px; 
}

.talent-desc {
    font-size: 13px; 
    color: var(--text); 
    line-height: 1.7;
    margin-bottom: 14px;
}

/* Centrage des blocs additionnels sous les talents */
#parentIntroBlock, 
#parentVideoBlock,
#parentPodcastBlock,
#parentPlusLoinBlock {
    max-width: 720px;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ==========================================================================
   5. BOUTONS RESSOURCES (Fiche, Livret, Orientation)
   ========================================================================== */
.btn-livret {
    display: inline-flex; 
    align-items: center; 
    gap: 8px;
    padding: 9px 18px; 
    border-radius: 8px; 
    font-size: 13px;
    font-weight: 600; 
    text-decoration: none; 
    font-family: 'Inter', sans-serif;
    transition: opacity 0.2s; 
    color: var(--white);
}

.btn-livret-filled {
    background: var(--btn-color, var(--teal));
    color: var(--white);
}

.btn-livret:hover { opacity: 0.85; }

.btn-livret-outline {
 background: transparent;
 border: none; /* On supprime l'encadré */
 color: var(--btn-color, var(--teal));
 text-decoration: underline; /* On souligne le texte */
 text-underline-offset: 4px; /* Espace élégant sous le texte */
 padding: 4px 0; /* On réduit l'espace autour puisqu'il n'y a plus de bordure */
}

.btn-livret-outline:hover {
 background: transparent;
 opacity: 0.7; /* Petit effet au survol */
}

.btn-back-children {
    display: inline-flex; 
    align-items: center; 
    gap: 6px;
    font-size: 13px; 
    color: var(--text-soft); 
    text-decoration: none;
    margin-bottom: 20px; 
    cursor: pointer; 
    background: none; 
    border: none;
    font-family: 'Inter', sans-serif;
}

.btn-back-children:hover { color: var(--teal); }

/* Écran de chargement local */
.loading-screen {
    text-align: center; 
    padding: 60px 20px; 
    color: var(--text-soft);
}

/* ==========================================================================
   6. RESPONSIVE DESIGN
   ========================================================================== */

/* Tablette */
@media (max-width: 768px) {
    .main { padding: 20px 14px 40px; align-items: stretch; }
    .step { max-width: 100%; }
    
    .talent-page { padding: 0 16px; }
    
    /* On empile les talents de haut en bas sur une seule colonne */
    .talents-row { 
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    
    .talent-card { width: 100%; }
    .talent-nom-fr { font-size: 22px; }
}

/* Mobile Large */
@media (max-width: 600px) {
    .talent-card-top { padding: 16px 16px 12px; }
    .talent-card-body { padding: 12px 16px 16px; }
}

/* Mobile Standard */
@media (max-width: 480px) {
    .main { padding: 14px 10px 32px; }
    
    .field input[type="email"],
    .field input[type="password"],
    .field input[type="text"] { 
        font-size: 15px; 
        padding: 10px 12px; 
    }
    
    .child-card { padding: 10px 12px; flex-wrap: wrap; }
    .child-avatar { width: 34px; height: 34px; font-size: 13px; }
    .child-name { font-size: 13px; }
    .child-status { font-size: 10px; padding: 2px 7px; white-space: nowrap; }
    
    .talent-header { margin-bottom: 20px; }
    .talent-header .prenom { font-size: 20px; }
    .talent-header .meta { font-size: 11px; }
    
    .talent-card-top { padding: 14px 14px 10px; gap: 10px; }
    .talent-card-body { padding: 10px 14px 14px; }
    .rank-badge { font-size: 22px; }
    .talent-emoji { font-size: 24px; margin-bottom: 4px; }
    .talent-nom-fr { font-size: 20px; }
    .talent-desc { font-size: 12px; line-height: 1.6; margin-bottom: 10px; }
    
    .btn-livret { font-size: 12px; padding: 8px 14px; gap: 6px; }
}