/*
 * Espace des apporteurs : parcours de formation et Mon activité (D-347, lot 4, 28-09-2026).
 *
 * Chargée APRÈS /css/pro.css par training/gabarit.blade.php : la charte (Spectral,
 * sauge, ivoire, vert forêt, or, barre du haut, barre du bas, cartes, boutons, champs)
 * vient du portail client ; cette feuille ne porte que ce qui n'appartient qu'à cet
 * espace. Même règle que pro.css : l'or n'est jamais du texte sur fond clair
 * (--or-encre à la place).
 */

/* ------ La barre du haut ---------------------------------------------------- */
.marque .surface {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
    font-size: 13px; color: #9DB3A8; margin-left: 4px;
}
/* Cibles au doigt : 44 px, là où le portail client s'arrête à 38. */
.apporteurs .marque { min-height: 44px; }
.apporteurs .menu-bouton { height: 44px; }
.menu-panneau button.active { font-weight: 600; }
.menu-panneau button.active::after { content: "✓"; margin-left: auto; color: var(--foret); }

/* ------ Titres et pièces communes -------------------------------------------- */
.titre-page { font-size: 32px; margin: 0 0 18px; }
.envoi { margin: 20px 0 0; }
.centre { text-align: center; }
.lecture p { font-size: 16px; line-height: 1.65; }

/* Les étiquettes. ⚠️ Chaque variante employée par une vue de l'espace doit être
   définie ICI (TrainingEtiquettesTest) : une étiquette sans règle se rend en blanc. */
.tag {
    display: inline-block; padding: 3px 11px; border-radius: 999px;
    font-size: 12.5px; font-weight: 600; line-height: 1.5;
    background: transparent; border: 1px solid var(--trait-fort); color: var(--encre-douce);
}
.tag.ok { background: #DDEBE1; border-color: #DDEBE1; color: #1C5C38; }
.tag.todo { background: #F1E8CF; border-color: #F1E8CF; color: #6B5417; }
.tag.no { background: #F2E1DF; border-color: #F2E1DF; color: var(--danger); }
.tag.warn { background: #F5ECD6; border-color: var(--or-profond); color: #6B5417; }

.pill { display: inline-flex; align-items: center; gap: 6px; }
.pill.signee { background: var(--or); color: #1F1A08; font-weight: 700; }

/* D-185 : ce qui a changé dans un module déjà réussi. */
.revision { display: block; border-left: 3px solid var(--or-profond); padding-left: 14px; margin: 12px 0; }
.revision h3, .revision > b { display: block; margin: 0 0 2px; font-family: var(--serif); font-weight: 500; font-size: 16px; color: var(--foret-profond); }
.revision p { margin: 0 0 12px; }

/* ------ Le héros ---------------------------------------------------------------- */
.heros .acquis {
    position: relative; flex: none; width: 340px; padding: 22px 24px; border-radius: 18px;
    background: rgba(245, 240, 230, .06); border: 1px solid rgba(245, 240, 230, .16);
    display: flex; flex-direction: column; gap: 8px;
}
.heros .acquis .libelle, .heros .acquis .note { font-size: 13.5px; line-height: 1.5; color: #C8D6CE; }
.heros .acquis b {
    font-family: var(--serif); font-weight: 400; font-size: 40px; line-height: 1.05; color: var(--ivoire);
    font-variant-numeric: lining-nums; overflow-wrap: anywhere;
}
.anneau .centre b small { font-size: 24px; color: #C8D6CE; }
.heros .progression { width: 190px; display: flex; flex-direction: column; gap: 8px; }
.heros .progression p { font-size: 14px; color: #E4EBE2; }

/* Sur téléphone, déclarer remonte en tête (maquette 11). */
.raccourci { display: none; }

/* ------ Mon activité ------------------------------------------------------------ */
.activite { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 22px; align-items: start; margin-bottom: 22px; }
.activite > .card { margin-bottom: 0; }
.apporteurs .grille-2 { margin-bottom: 22px; }

.reservations { list-style: none; margin: 8px 0 0; padding: 0; }
.reservation {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px; align-items: center;
    padding: 18px 0; border-top: 1px solid var(--trait);
}
.reservation .corps { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.reservation .org { font-family: var(--serif); font-weight: 400; font-size: 21px; color: var(--foret-profond); overflow-wrap: anywhere; }
.reservation.close .org { font-size: 19px; color: var(--encre-douce); }
.reservation .pill.active { align-self: flex-start; white-space: normal; }

.gestes-resa { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; margin-top: 6px; }
.gestes-resa form { margin: 0; }
details.geste > summary { list-style: none; }
details.geste > summary::-webkit-details-marker { display: none; }
details.geste[open] { flex-basis: 100%; }
details.geste[open] > summary { opacity: .7; }
details.geste form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
details.geste form input { flex: 1 1 220px; width: auto; min-width: 0; }
.btn.discret {
    background: none; color: var(--encre-douce); padding: 0 10px; font-weight: 500;
    text-decoration: underline; text-underline-offset: 3px;
}
.btn.discret:hover { color: var(--danger); }

.rebours { display: flex; align-items: center; gap: 14px; justify-self: end; }
.rebours .cadran { position: relative; width: 72px; height: 72px; flex: none; }
.rebours .cadran svg { display: block; }
.rebours .arc { stroke: var(--foret); }
.rebours.urgent .arc { stroke: #B8742F; }
.rebours .valeur { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.rebours .valeur b { font-family: var(--serif); font-weight: 400; font-size: 22px; line-height: 1; color: var(--foret-profond); }
.rebours.urgent .valeur b { color: #8A4B14; }
.rebours .valeur span { font-size: 10.5px; color: var(--encre-douce); }
.rebours .etat { width: 86px; font-size: 12.5px; line-height: 1.4; color: var(--encre-douce); }
.rebours.urgent .etat { color: #6B5417; font-weight: 600; }

.prospects .conseil { margin: 8px 0 0; }

.declarer label:first-of-type { margin-top: 4px; }
.declarer .btn.grand { margin-top: 18px; }
.declarer .centre { margin: 10px 0 0; }

.lignes { list-style: none; margin: 4px 0 12px; padding: 0; }
.lignes li { padding: 14px 0; border-top: 1px solid var(--trait); display: grid; gap: 14px; align-items: center; }
/* Les lignes d'une meme liste partagent leurs colonnes (sous-grille) : chaque ligne etait sa
   propre grille, et des colonnes « auto » glissaient d'une ligne a l'autre selon la longueur
   du montant (capture du 01-11). */
.lignes:has(> .ligne-client) { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; column-gap: 14px; }
.ligne-client { grid-column: 1 / -1; grid-template-columns: subgrid; }
.ligne-versement { grid-template-columns: minmax(0, 1fr) auto auto; }
.lignes .qui { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lignes .qui b { font-weight: 500; font-size: 15.5px; color: var(--foret-profond); overflow-wrap: anywhere; }
.lignes .chiffre { display: flex; flex-direction: column; gap: 1px; text-align: right; }
.lignes .chiffre span { font-size: 12px; color: var(--encre-douce); }
.lignes .chiffre b { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lignes .montant { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lignes .etats { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* Le releve, l'acceptation et le depot de facture, sous la ligne du trimestre (2026-11-01). */
.gestes-versement { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.gestes-versement form { margin: 0; }
.gestes-versement > p { flex-basis: 100%; margin: 0; }
.coordonnees { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--trait); }
.coordonnees summary { cursor: pointer; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.coordonnees form { display: grid; gap: 6px; margin-top: 10px; }
.coordonnees textarea { width: 100%; font: inherit; }
.coordonnees .btn { justify-self: start; margin-top: 10px; }

/* Le chemin d'un versement (art. 6.2 du contrat d'apport). */
.frise-versement { list-style: none; margin: 4px 0 14px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.frise-versement li {
    display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 12px;
    background: #FFFFFF; border: 1px solid var(--trait); min-width: 0;
}
.frise-versement .numero { font-size: 12px; font-weight: 700; color: var(--or-encre); }
.frise-versement b { font-size: 14px; font-weight: 600; color: var(--foret-profond); overflow-wrap: anywhere; }
.frise-versement li > span:last-child { font-size: 13px; line-height: 1.45; color: var(--encre-douce); }

.entete-section { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; margin-bottom: 14px; }
.entete-section h2, .entete-section p { margin: 0; }
.tuiles-docs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tuile-doc {
    height: 100%; display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 14px;
    background: #FFFFFF; border: 1px solid var(--trait); color: var(--encre); text-decoration: none;
}
a.tuile-doc:hover { border-color: var(--or-profond); color: var(--encre); }
.tuile-doc .haut { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--or-encre); }
.tuile-doc .ext { font-size: 12px; font-weight: 700; color: var(--encre-douce); }
.tuile-doc .titre { font-size: 14.5px; line-height: 1.45; }
.tuile-doc .tag { align-self: flex-start; }
.tuile-doc.indisponible { background: transparent; border-style: dashed; color: var(--encre-douce); }

/* ------ Le parcours --------------------------------------------------------------- */
ol.modules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.module {
    display: grid; grid-template-columns: 44px minmax(0, 1fr) 190px auto; gap: 20px; align-items: center;
    padding: 18px 24px; border-radius: 16px; background: var(--ivoire); border: 1px solid var(--trait);
}
.module .rang {
    width: 40px; height: 40px; border-radius: 999px; border: 2px solid var(--trait-fort); color: var(--encre-douce);
    font-family: var(--serif); font-size: 18px; display: flex; align-items: center; justify-content: center;
}
.module.reussi .rang { background: var(--foret); border-color: var(--foret); color: var(--ivoire); }
.module .quoi { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.module .titre { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.module .titre b { font-family: var(--serif); font-weight: 400; font-size: 20px; color: var(--foret-profond); }
.module .exigence {
    padding: 1px 9px; border-radius: 999px; border: 1px solid var(--or-profond);
    color: var(--or-encre); font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.module .quoi .tag { align-self: flex-start; margin-top: 4px; }
.module .btn { justify-self: end; }
.module.prochain { background: #FFFFFF; border: 1.5px solid var(--or-profond); box-shadow: 0 10px 30px rgba(14, 42, 30, .08); padding: 24px; }
.module.prochain .rang { background: var(--or); border-color: var(--or); color: #1F1A08; }
.module.prochain .titre b { font-size: 22px; }
.module.autorisation { grid-template-columns: 44px minmax(0, 1fr); background: transparent; border: 1.5px dashed var(--trait-fort); }
.module.autorisation .rang { background: var(--sauge-profonde); border-color: transparent; }
.module.autorisation.reussi .rang { background: var(--foret); color: var(--ivoire); }

/* ------ Le module et son quiz ------------------------------------------------------- */
.qbloc { border-top: 1px solid var(--trait); padding-top: 16px; margin-top: 16px; }
.qbloc:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.choice { display: block; padding: 8px 0; }

/* ------ Connexion ------------------------------------------------------------------ */
.connexion { max-width: 440px; margin: 32px auto 0; }
.connexion h1 { font-size: 32px; margin-bottom: 4px; }
.connexion .card { margin-top: 18px; }
.connexion label { margin-top: 0; }

/* ------ Ma journée et l'appel guidé ------------------------------------------------ */
.journee-intro { margin: -8px 0 22px; max-width: 62ch; }
.journee-colonne { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.journee-colonne > .card { margin-bottom: 0; }
.ligne-journee { grid-template-columns: minmax(0, 1fr) auto; }
.relais { border-left: 4px solid var(--or-profond); }
.laisser { padding: 14px 0 0; border-top: 1px solid var(--trait); }
.laisser > b { display: block; font-weight: 500; font-size: 15.5px; color: var(--foret-profond); overflow-wrap: anywhere; }
.laisser .gestes-resa { margin-top: 10px; }
.interdits { margin: 4px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.5; }
.interdits li + li { margin-top: 6px; }


/* ------ Grand écran d'abord, puis tablette, puis téléphone ---------------------------- */
@media (max-width: 1080px) {
    .activite { grid-template-columns: minmax(0, 1fr); }
    .module { grid-template-columns: 44px minmax(0, 1fr) auto; }
    .module .tentatives { grid-column: 2; grid-row: 2; }
    .module .btn { grid-column: 3; grid-row: 1 / span 2; }
}

@media (max-width: 899px) {
    .heros .acquis { width: 100%; }
    .heros .progression { width: auto; }
    .raccourci {
        display: flex; align-items: center; gap: 14px; margin: 0 0 22px; padding: 16px 18px;
        border-radius: 18px; background: var(--ivoire); border: 1px solid var(--trait);
        box-shadow: 0 12px 30px rgba(14, 42, 30, .12); text-decoration: none; color: var(--encre);
    }
    .raccourci .rond {
        width: 44px; height: 44px; flex: none; border-radius: 999px; background: var(--foret); color: #FFFFFF;
        display: flex; align-items: center; justify-content: center;
    }
    .raccourci b { display: block; font-size: 16px; color: var(--foret-profond); }
    .raccourci span span { font-size: 13px; color: var(--encre-douce); }
}

@media (max-width: 640px) {
    .marque .surface { display: none; }
    .titre-page { font-size: 26px; }
    .heros .acquis b { font-size: 30px; }
    .reservation { grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; }
    .reservation .rebours { order: -1; flex-direction: column; gap: 6px; justify-self: start; }
    .rebours .cadran, .rebours .cadran svg { width: 60px; height: 60px; }
    .rebours .etat { width: 72px; text-align: center; font-size: 11.5px; }
    .reservation.close { grid-template-columns: minmax(0, 1fr) auto; }
    .reservation .gestes-resa > * { flex: 1 1 auto; }
    .ligne-client { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ligne-client .qui { grid-column: 1 / -1; }
    .ligne-client .chiffre { text-align: left; }
    .ligne-versement { grid-template-columns: minmax(0, 1fr) auto; }
    .ligne-versement .etats { grid-column: 1 / -1; justify-content: flex-start; }
    .frise-versement { grid-template-columns: minmax(0, 1fr); }
    .module, .module.prochain { grid-template-columns: 40px minmax(0, 1fr); gap: 12px 14px; padding: 16px; }
    .module .tentatives { grid-column: 2; grid-row: auto; }
    .module .btn { grid-column: 1 / -1; grid-row: auto; justify-self: stretch; }
    .module .titre b, .module.prochain .titre b { font-size: 18px; }
    .module .rang { align-self: start; }
}

/* Le lien personnel (D-388) : le champ prend la place, le bouton garde sa taille,
   et sur telephone l'adresse passe a la ligne plutot que de deborder. */
.lien-perso .lien-ligne { display: flex; gap: 10px; align-items: center; margin: 10px 0; padding: 0; border: 0; }
.lien-perso .lien-ligne input { flex: 1 1 auto; min-width: 0; font-variant-numeric: tabular-nums; }
.lien-perso .lien-ligne .btn { flex: 0 0 auto; }
.lien-perso .lien-ligne .langue { flex: 0 0 2.2em; font-size: 12px; color: var(--encre-douce); letter-spacing: .06em; }
.lien-perso details summary { cursor: pointer; color: var(--encre-douce); }
/* Les 3 textes prets a publier de l'affilie : lisibles en entier, copiables d'un geste. */
.textes-affilie .texte-pret { display: grid; gap: 6px; margin: 14px 0 0; }
.textes-affilie .texte-pret label { font-size: 13px; color: var(--encre-douce); }
.textes-affilie .texte-pret textarea { width: 100%; resize: vertical; font: inherit; line-height: 1.5; }
.textes-affilie .texte-pret .btn { justify-self: start; }
@media (max-width: 560px) {
    .lien-perso .lien-ligne { flex-wrap: wrap; }
    .lien-perso .lien-ligne .btn { flex: 1 1 100%; }
}
