/* Talaria — WebApp : profil (6.1) et paramètres (6.2) */

.profil-carte { overflow: hidden; border-radius: var(--rayon-xl); background: #fff; border: 1px solid var(--color-bordure-subtile); box-shadow: var(--ombre-legere); }
.profil-couv { position: relative; height: 220px; overflow: hidden; isolation: isolate; }
.profil-couv > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.profil-couv::after { content: ''; position: absolute; inset: 0; z-index: -1; background: rgba(79, 32, 62, 0.5); }
/* Pas de couverture : bandeau uni de la couleur foncée de Talaria, sans image ni voile */
.profil-couv--vide { background: var(--color-fond-marque); }
.profil-couv--vide::after { content: none; }
.profil-couv__tags { position: absolute; left: var(--espace-lg); top: var(--espace-lg); display: flex; gap: var(--espace-xs); }
.profil-infos { display: flex; align-items: flex-end; gap: var(--espace-lg); padding: var(--espace-lg) var(--espace-xl); }
.profil-avatar { position: relative; flex: none; width: 148px; height: 96px; }
/* Compte sans photo : initiales à la place de la photo, même emplacement */
.profil-avatar .avatar--init { position: absolute; left: 0; top: -70px; border: 4px solid #fff; box-shadow: 0 6px 18px rgba(79, 32, 62, 0.2); }
.profil-avatar img { position: absolute; left: 0; top: -70px; width: 148px; height: 148px; border-radius: 50%; object-fit: cover; border: 4px solid #fff; box-shadow: 0 6px 18px rgba(79, 32, 62, 0.2); background: var(--color-fond-accent-lavande); }
.profil-identite { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--espace-xs); }
.profil-meta { display: flex; align-items: center; gap: var(--espace-xs); flex-wrap: wrap; }
.profil-boutons { display: flex; gap: var(--espace-sm); flex: none; }
/* Grand écran : quand le nom et les 5 boutons ne tiennent pas sur une ligne, les boutons passent en dessous (alignés à droite) au lieu d'écraser le nom et les étiquettes */
@media (min-width: 1181px) {
    .profil-infos { flex-wrap: wrap; }
    .profil-identite { flex: 1 1 360px; }
    .profil-boutons { flex: 0 1 auto; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
}
.profil-stats { display: flex; gap: var(--espace-md); padding: 0 var(--espace-xl) var(--espace-lg); }
.stat { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--espace-sm); padding: var(--espace-md); border-radius: var(--rayon-lg); background: var(--color-fond-marque-tres-leger); }
.stat .pastille { width: 52px; height: 52px; }
.stat .pastille .icon { width: 22px; height: 22px; }
.stat b { display: block; font: 600 32px/1.05 var(--font-titre); letter-spacing: -0.48px; }
.stat span.l { font: 400 14px/1.2 var(--font-corps); color: var(--color-texte-secondaire); }
.profil-cols { display: flex; gap: var(--espace-lg); align-items: flex-start; }
.profil-gauche { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--espace-lg); }
.profil-droite { width: 360px; flex: none; display: flex; flex-direction: column; gap: var(--espace-lg); }
.profil-onglets { display: flex; gap: var(--espace-xs); flex-wrap: wrap; }
.grille-voy-p { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--espace-md); }
.voy-p { display: flex; flex-direction: column; gap: var(--espace-sm); text-align: left; }
.voy-p__photo { position: relative; height: 160px; border-radius: var(--rayon-md); overflow: hidden; }
.voy-p__photo img { width: 100%; height: 100%; object-fit: cover; }
.voy-p__photo .tag { position: absolute; left: 10px; top: 10px; }
.voy-p b { font: 500 16px/1.2 var(--font-titre); }
.voy-p small { display: block; font: 500 13px/1.4 var(--font-corps); color: var(--color-texte-secondaire); }
.voy-p .avatars > * { margin-right: -6px; }
.article { display: flex; align-items: center; gap: var(--espace-md); padding-top: var(--espace-md); border-top: 1px solid var(--color-bordure-subtile); }
.article:first-of-type { border-top: 0; padding-top: 0; }
.article img { width: 96px; height: 72px; flex: none; border-radius: var(--rayon-md); object-fit: cover; }
.article > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--espace-2xs); }
.article b { font: 500 16px/1.2 var(--font-titre); }
.article small { font: 500 13px/1.4 var(--font-corps); color: var(--color-texte-secondaire); }
.profil-voyageur { display: flex; flex-direction: column; gap: var(--espace-md); padding: var(--espace-lg); border-radius: var(--rayon-lg); background: var(--color-fond-marque); color: var(--color-texte-sur-marque); }
.profil-voyageur__haut { display: flex; align-items: center; gap: var(--espace-sm); }
.profil-voyageur__haut > div:last-child { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.profil-voyageur .pastille { width: 44px; height: 44px; background: var(--color-fond-sur-marque); color: var(--color-texte-sur-marque); }
.profil-voyageur h2 { font: 600 28px/1.1 var(--font-titre); letter-spacing: -0.28px; }
.tags-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.prochain-depart { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: space-between; height: 230px; padding: var(--espace-lg); overflow: hidden; border-radius: var(--rayon-lg); color: var(--color-texte-sur-marque); }
.prochain-depart > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -3; }
.prochain-depart::before { content: ''; position: absolute; inset: 0; z-index: -2; background: rgba(79, 32, 62, 0.5); }
.prochain-depart::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, rgba(31, 10, 23, 0), rgba(31, 10, 23, 0.92)); }
.prochain-depart > .tag { align-self: flex-start; }
.prochain-depart__bas { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--espace-md); }
.prochain-depart__bas h2 { font: 600 28px/1.1 var(--font-titre); letter-spacing: -0.28px; }
.prochain-depart__bas p { font: 400 14px/1.2 var(--font-corps); }
.prochain-depart .btn-rond { width: 48px; height: 48px; background: var(--color-fond-sur-marque); border-color: var(--color-texte-sur-marque); color: var(--color-texte-sur-marque); }
.compagnon-l { display: flex; align-items: center; gap: var(--espace-sm); }
.compagnon-l > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.compagnon-l b { font: 500 16px/1.2 var(--font-titre); }
.compagnon-l small { font: 500 13px/1.4 var(--font-corps); color: var(--color-texte-secondaire); }
.avis { display: flex; flex-direction: column; gap: var(--espace-xs); padding-top: var(--espace-md); border-top: 1px solid var(--color-bordure-subtile); }
.avis:first-of-type { border-top: 0; padding-top: 0; }
.avis__haut { display: flex; align-items: center; gap: var(--espace-sm); }
.avis__haut > div { flex: 1; display: flex; flex-direction: column; }

/* Parrainage : médaille de galaxie */
.profil-medaille { align-items: center; text-align: center; }
.profil-medaille .section-titre { width: 100%; align-items: center; flex-wrap: nowrap; }
.profil-medaille .section-titre h2 { white-space: nowrap; }
.profil-medaille .section-titre .btn { flex: none; min-width: 44px; justify-content: center; }
.medaille-bloc { display: flex; justify-content: center; padding: var(--espace-xs) 0; }
.medaille-bloc .medaille { filter: drop-shadow(0 12px 24px rgba(79, 32, 62, 0.28)); }
.medaille-nom { display: flex; align-items: center; justify-content: center; gap: var(--espace-xs); flex-wrap: wrap; }
.medaille-nom b { font: 600 22px/1.1 var(--font-titre); letter-spacing: -0.2px; }
.medaille-stats { display: flex; gap: var(--espace-xl); justify-content: center; }
.medaille-stats > div { display: flex; flex-direction: column; gap: 2px; }
.medaille-stats b { font: 600 28px/1.05 var(--font-titre); letter-spacing: -0.4px; }
.medaille-stats span { font: 500 13px/1.4 var(--font-corps); color: var(--color-texte-secondaire); }
.profil-medaille .progress { width: 100%; }
.profil-medaille .t-corps-s { text-align: center; }
.medaille-ruban { display: inline-flex; align-items: center; gap: 6px; font: 500 13px/1.4 var(--font-corps); color: var(--color-texte-secondaire); }
.medaille-ruban .icon { width: 16px; height: 16px; }

/* Médaillon compact du profil public */
.medaille-pub { display: flex; align-items: center; gap: var(--espace-md); }
.medaille-pub .medaille { flex: none; filter: drop-shadow(0 8px 18px rgba(79, 32, 62, 0.22)); }
.medaille-pub > div { display: flex; flex-direction: column; gap: 2px; }
.medaille-pub b { font: 600 20px/1.1 var(--font-titre); }
.profil-medaille--pub { align-items: stretch; text-align: left; }
.profil-medaille--pub > h2 { text-align: left; }

/* Légende des médailles (dialogue) */
.legende { display: flex; flex-direction: column; gap: var(--espace-lg); }
.legende-rubrique { display: flex; flex-direction: column; gap: var(--espace-sm); }
.legende-grille { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--espace-md); }
.legende-item { display: flex; flex-direction: column; align-items: center; gap: var(--espace-xs); padding: var(--espace-md); border-radius: var(--rayon-lg); background: var(--color-fond-marque-tres-leger); text-align: center; }
.legende-item .medaille { filter: drop-shadow(0 6px 14px rgba(79, 32, 62, 0.18)); }
.legende-item b { font: 500 14px/1.2 var(--font-titre); }
.legende-item small { font: 500 12px/1.3 var(--font-corps); color: var(--color-texte-secondaire); }
.legende-regles { display: flex; flex-wrap: wrap; gap: var(--espace-xs); }

/* Paramètres */
.params-cols { display: flex; gap: var(--espace-lg); align-items: flex-start; }
.params-menu { width: 340px; flex: none; display: flex; flex-direction: column; gap: var(--espace-2xs); padding: var(--espace-md); border-radius: var(--rayon-lg); background: #fff; border: 1px solid var(--color-bordure-subtile); }
.params-user { display: flex; align-items: center; gap: var(--espace-sm); padding: var(--espace-sm); }
.params-user > div { display: flex; flex-direction: column; min-width: 0; }
.params-user b { font: 500 16px/1.2 var(--font-titre); }
.params-user small { font: 500 13px/1.4 var(--font-corps); color: var(--color-texte-secondaire); }
.params-groupe { padding: var(--espace-md) var(--espace-sm) var(--espace-sm); }
.params-entree { display: flex; align-items: center; gap: var(--espace-sm); height: 48px; padding: 0 var(--espace-sm); border-radius: var(--rayon-md); width: 100%; text-align: left; font: 500 16px/1.2 var(--font-titre); transition: background 0.15s ease; }
.params-entree:hover { background: var(--color-fond-marque-tres-leger); }
.params-entree[aria-current='true'] { background: var(--color-fond-accent-lavande); }
.params-entree > span { flex: 1; min-width: 0; }
.params-entree > small { font: 500 13px/1.4 var(--font-corps); color: var(--color-texte-secondaire); }
.params-entree .icon--md { width: 18px; height: 18px; }
.params-menu hr { width: 100%; height: 1px; margin: var(--espace-xs) 0; border: 0; background: var(--color-bordure-subtile); }
.params-entree--danger { color: var(--color-texte-danger); }
.params-panneau { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--espace-lg); padding: var(--espace-xl); border-radius: var(--rayon-lg); background: #fff; border: 1px solid var(--color-bordure-subtile); }
.params-panneau > h2 { font: 600 32px/1.05 var(--font-titre); letter-spacing: -0.48px; }
.params-section { display: flex; flex-direction: column; gap: var(--espace-xs); }
.params-liste { overflow: hidden; border-radius: var(--rayon-lg); border: 1px solid var(--color-bordure-subtile); }
.params-ligne { display: flex; align-items: center; gap: var(--espace-md); padding: var(--espace-md) var(--espace-lg); border-top: 1px solid var(--color-bordure-subtile); }
.params-ligne:first-child { border-top: 0; }
.params-ligne > .icon { color: var(--color-texte-principal); }
.params-ligne > div { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.params-ligne b { font: 500 16px/1.2 var(--font-titre); }
.params-ligne span.sub { font: 400 14px/1.2 var(--font-corps); color: var(--color-texte-secondaire); }
.params-ligne--danger b { color: var(--color-texte-danger); }
.params-ligne select { height: 36px; padding: 0 var(--espace-sm); border-radius: var(--rayon-pilule); border: 1px solid var(--color-bordure-defaut); background: #fff; font: 500 13px/1.4 var(--font-corps); }
.etoiles { display: flex; gap: var(--espace-xs); }
.etoiles button { color: var(--color-bordure-controle); }
.etoiles button[aria-pressed='true'] { color: var(--color-fond-marque); }
.etoiles .icon { width: 32px; height: 32px; }

/* Grades (6.1 · Profil - Grade) */
.profil-grade .section-titre { margin-bottom: var(--espace-md); }
.profil-grade .section-titre .lien-action { background: none; border: 0; padding: 0; color: var(--color-texte-principal); cursor: pointer; font: 500 16px/1.2 var(--font-titre); }
.profil-grade .section-titre__actions { display: flex; align-items: center; gap: var(--espace-sm); flex: none; }
.grade-metal { flex: none; width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(circle at 35% 28%, #fff 0%, var(--metal) 55%, rgba(79, 32, 62, 0.45) 100%); box-shadow: inset 0 -3px 7px rgba(79, 32, 62, 0.22), 0 2px 5px rgba(79, 32, 62, 0.12); }
.grade-embleme { display: block; height: auto; }
.grade-bloc { display: flex; align-items: center; gap: var(--espace-lg); padding: var(--espace-lg) var(--espace-xl); border-radius: var(--rayon-lg); background: var(--color-fond-marque); color: var(--color-texte-sur-marque); }
.grade-bloc__embleme { position: relative; flex: none; display: grid; place-items: center; padding: var(--espace-sm); }
.grade-bloc__embleme::before { content: ''; position: absolute; width: 148px; height: 148px; border-radius: 50%; background: rgba(255, 255, 255, 0.07); }
.grade-bloc__embleme .grade-embleme { position: relative; width: 108px; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.25)); }
.grade-bloc__texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.grade-eyebrow { font: 600 12px/1.2 var(--font-titre); letter-spacing: 0.72px; text-transform: uppercase; color: var(--color-fond-accent-lavande); }
.grade-nom { font: 600 40px/1.05 var(--font-titre); letter-spacing: -0.6px; color: var(--color-texte-sur-marque); }
.grade-desc { font: 400 15px/1.4 var(--font-corps); color: rgba(253, 250, 241, 0.8); }
.grade-points { display: flex; align-items: baseline; justify-content: space-between; gap: var(--espace-md); margin-top: 4px; }
.grade-points b { font: 600 18px/1.2 var(--font-titre); }
.grade-points span { font: 500 14px/1.2 var(--font-corps); color: var(--color-fond-accent-lavande); }
.grade-bloc .progress { width: 100%; background: rgba(253, 250, 241, 0.22); }
.grade-bloc .progress > i { background: var(--color-fond-accent-lavande); }
.grade-aide { font: 400 14px/1.35 var(--font-corps); color: rgba(253, 250, 241, 0.78); }
.grade-echelle { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--espace-md); align-items: end; margin-top: var(--espace-lg); }
.grade-palier { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.grade-palier .grade-embleme { width: 46px; margin-bottom: var(--espace-2xs); }
.grade-palier--actuel .grade-embleme { width: 62px; }
.grade-palier b { font: 500 14px/1.2 var(--font-titre); color: var(--color-texte-principal); }
.grade-palier--actuel b { font-weight: 600; }
.grade-palier small { font: 500 12px/1.3 var(--font-corps); color: var(--color-texte-secondaire); }
.grade-palier small.est-actuel { color: var(--color-texte-succes); font-weight: 600; }
.grade-gains { display: flex; flex-direction: column; gap: var(--espace-sm); margin-top: var(--espace-lg); padding-top: var(--espace-md); border-top: 1px solid var(--color-bordure-subtile); }
.grade-gains__pills { display: flex; flex-wrap: wrap; gap: var(--espace-xs); }
.grade-pill { display: inline-flex; align-items: center; height: 30px; padding: 0 var(--espace-sm); border-radius: var(--rayon-pilule); background: var(--color-fond-marque-subtil); color: var(--color-texte-principal); font: 500 13px/1.2 var(--font-corps); }

/* Modale « Les grades » */
.grades-modale { display: flex; flex-direction: column; gap: var(--espace-lg); }
.grade-rubrique { display: flex; flex-direction: column; gap: var(--espace-sm); }
.grade-actions { display: flex; flex-direction: column; gap: var(--espace-xs); }
.grade-action { display: flex; align-items: center; gap: var(--espace-sm); padding: var(--espace-md); border-radius: var(--rayon-lg); background: var(--color-fond-marque-tres-leger); }
.grade-action > .icon { flex: none; width: 44px; height: 44px; padding: 11px; border-radius: 50%; background: var(--color-fond-surface-pleine); color: var(--color-fond-marque); box-shadow: var(--ombre-legere); }
.grade-action__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.grade-action__txt b { font: 500 16px/1.2 var(--font-titre); }
.grade-action__txt small { font: 500 13px/1.4 var(--font-corps); color: var(--color-texte-secondaire); }
.grade-action__pts { font: 600 15px/1.2 var(--font-titre); color: var(--color-texte-principal); white-space: nowrap; }
.grade-liste { display: flex; flex-direction: column; gap: var(--espace-xs); }
.grade-ligne { display: flex; align-items: center; gap: var(--espace-md); padding: var(--espace-sm) var(--espace-md); border-radius: var(--rayon-lg); background: var(--color-fond-marque-tres-leger); }
.grade-ligne .grade-embleme { flex: none; width: 40px; }
.grade-ligne__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.grade-ligne__txt b { font: 500 16px/1.2 var(--font-titre); }
.grade-ligne__txt small { font: 500 13px/1.4 var(--font-corps); color: var(--color-texte-secondaire); }
.grade-etat { flex: none; font: 500 13px/1.4 var(--font-corps); color: var(--color-texte-secondaire); white-space: nowrap; }
.grade-etat.est-actuel { color: var(--color-texte-succes); font-weight: 600; }
