/* Comptes, authentification, profils (Phase 2) — mêmes tokens que style.css */

.auth-wrap { min-height: 65vh; display: flex; align-items: center; justify-content: center; padding: 60px 24px; background: var(--jc-light); }
.auth-card { background: var(--jc-white); border: 1px solid var(--jc-border); border-radius: 16px; padding: 40px; max-width: 480px; width: 100%; box-shadow: 0 10px 30px rgba(6,18,46,.06); }
.auth-card h1 { font-size: 24px; margin-bottom: 8px; }
.auth-subtitle { color: var(--jc-gray); margin-bottom: 26px; font-size: 14px; line-height: 1.5; }

.auth-type-choice { display: flex; gap: 10px; margin-bottom: 24px; }
.auth-type-choice label { flex: 1; margin: 0; }
.auth-type-choice input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.auth-type-choice span { display: block; text-align: center; padding: 14px 8px; border: 1.5px solid var(--jc-border); border-radius: 10px; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .3px; cursor: pointer; transition: all .15s ease; }
.auth-type-choice input:checked + span { border-color: var(--jc-blue); background: rgba(0,56,168,.06); color: var(--jc-blue); }

.auth-field { margin-bottom: 18px; }
.auth-field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.auth-field input[type="text"], .auth-field input[type="email"], .auth-field input[type="password"], .auth-field input[type="url"], .auth-field input[type="number"], .auth-field input[type="date"], .auth-field select, .auth-field textarea {
  width: 100%; border: 1px solid var(--jc-border); border-radius: var(--jc-radius); padding: 12px 14px; font-family: var(--font-body); font-size: 14px; background: var(--jc-white);
}
.auth-field textarea { resize: vertical; min-height: 90px; }
.auth-field .description { font-size: 12px; color: var(--jc-gray); margin-top: 6px; }
.auth-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .auth-field-row { grid-template-columns: 1fr; } }

.auth-checkbox { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px; font-size: 13px; color: var(--jc-gray); }
.auth-checkbox input { margin-top: 3px; }
.auth-checkbox a { color: var(--jc-blue); font-weight: 600; }

.auth-remember { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 22px; color: var(--jc-gray); }

.auth-submit { width: 100%; border: none; cursor: pointer; font-size: 14px; }

.auth-links { margin-top: 22px; font-size: 13px; text-align: center; color: var(--jc-gray); }
.auth-links a { font-weight: 700; }
.auth-links-row { display: flex; justify-content: space-between; margin-top: 4px; }

.auth-error, .auth-success { padding: 12px 16px; border-radius: var(--jc-radius); font-size: 13px; margin-bottom: 22px; line-height: 1.5; }
.auth-error { background: #FDECEC; color: #B3261E; border: 1px solid #F4C9C6; }
.auth-success { background: #E8F5E9; color: #1E7B34; border: 1px solid #C7E8CB; }

/* Espace compte */
.account-shell { display: grid; grid-template-columns: 230px 1fr; gap: 32px; padding: 48px 0 80px; align-items: start; }
.account-nav { background: var(--jc-white); border: 1px solid var(--jc-border); border-radius: 14px; padding: 10px; position: sticky; top: 96px; }
.account-nav a { display: block; padding: 12px 14px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--jc-navy); margin-bottom: 2px; }
.account-nav a.is-active, .account-nav a:hover { background: var(--jc-light); color: var(--jc-blue); text-decoration: none; }
.account-panel { background: var(--jc-white); border: 1px solid var(--jc-border); border-radius: 16px; padding: 36px; }
.account-panel h1 { font-size: 22px; margin-bottom: 6px; }
.account-panel > .auth-subtitle { margin-bottom: 30px; }

.account-overview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin: 24px 0 32px; }
.account-stat { background: var(--jc-light); border-radius: 12px; padding: 20px; min-width: 0; overflow: hidden; }
.account-stat .value { font-family: var(--font-title); font-size: 20px; color: var(--jc-blue); text-transform: uppercase; overflow-wrap: break-word; word-break: break-word; }
.account-stat .label { font-size: 12px; color: var(--jc-gray); margin-top: 4px; }

.account-photo-row { display: flex; align-items: center; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.account-photo-preview { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; background: var(--jc-light); border: 1px solid var(--jc-border); }

@media (max-width: 780px) {
  .account-shell { grid-template-columns: 1fr; padding-top: 28px; }
  /* Sans min-width:0, un item de grille CSS garde par défaut min-width:auto
     (= largeur de son contenu), ce qui forcerait toute la grille
     .account-shell (donc toute la page) à s'élargir au-delà du viewport.
     min-width:0 reste nécessaire quelle que soit la disposition choisie
     ci-dessous. */
  .account-nav { position: static; min-width: 0; }
  .account-panel { padding: 24px; min-width: 0; }

  /* Phase 5, audit ergonomique explicite à 390px (item 13 du cahier des
     charges) : avec l'ajout de Favoris/Alertes/Notifications, la nav compte
     désormais 8 onglets. Un défilement horizontal seul (overflow-x:auto,
     white-space:nowrap) les rendait ergonomiquement pénibles : la plupart
     restaient hors champ sans indice visuel de défilement, et le membre
     devait deviner qu'il fallait faire glisser la barre pour atteindre
     Notifications ou Paramètres. Passage à flex-wrap:wrap : tous les onglets
     restent visibles et directement accessibles au toucher, en plusieurs
     lignes courtes, sans changer l'architecture fonctionnelle (toujours les
     mêmes 8 onglets, à plat, aucun regroupement/sous-menu introduit). */
  .account-nav { display: flex; flex-wrap: wrap; gap: 6px; }
  .account-nav a { flex: 1 1 auto; text-align: center; white-space: nowrap; margin-bottom: 0; }
  .account-nav a:last-child { flex-basis: 100%; }
}

/* Profil public */
.profil-public-hero { background: var(--jc-navy); color: var(--jc-white); padding: 56px 0; }
.profil-public-header { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.profil-public-photo { width: 116px; height: 116px; border-radius: 50%; object-fit: cover; border: 4px solid rgba(255,255,255,.15); background: rgba(255,255,255,.08); flex-shrink: 0; }
.profil-public-badge { display: inline-block; background: var(--jc-blue-bright); color: #fff; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 4px 12px; border-radius: 999px; margin-bottom: 10px; }
.profil-public-name { font-size: 30px; margin: 0; }
.profil-public-meta { color: rgba(255,255,255,.72); font-size: 14px; margin-top: 8px; }

.profil-public-body { padding: 44px 0 90px; }
.profil-public-section { margin-bottom: 34px; }
.profil-public-section h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 16px; color: var(--jc-gray); }
.profil-public-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.profil-fact { background: var(--jc-light); border-radius: 12px; padding: 16px; }
.profil-fact .label { font-size: 11px; text-transform: uppercase; color: var(--jc-gray); font-weight: 700; letter-spacing: .4px; }
.profil-fact .val { font-size: 15px; font-weight: 700; margin-top: 4px; color: var(--jc-navy); }
.profil-public-presentation { font-size: 15px; line-height: 1.7; color: var(--jc-navy); white-space: pre-line; }
.profil-not-found { text-align: center; padding: 80px 24px; color: var(--jc-gray); }

/* Publication / édition d'annonce (Phase 3) */
.annonce-form-wizard { max-width: 720px; margin: 0 auto; padding: 48px 0 90px; }
.annonce-form-wizard h1 { font-size: 26px; margin-bottom: 8px; }
.annonce-form-wizard .auth-subtitle { margin-bottom: 24px; }

/* .search-bar-guided / .search-select-wrap sont partagés avec la barre de
   recherche horizontale de la homepage (voir style.css) : on les réinitialise
   ici en disposition verticale, propre à un formulaire de saisie classique. */
.annonce-form-wizard .search-bar-guided {
  display: block; max-width: none; margin: 0; background: none;
  border: none; border-radius: 0; overflow: visible; box-shadow: none;
}
.annonce-form-wizard .search-select-wrap {
  flex: none; display: block; padding: 0; border-right: none; margin-bottom: 18px;
}
.annonce-form-wizard .search-select-wrap.is-hidden { display: none; }
.annonce-form-wizard .search-select-wrap:focus-within { background: none; }
.annonce-form-wizard .search-block-label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.annonce-form-wizard .search-block-select,
.annonce-form-wizard .search-block-row {
  width: 100%; border: 1px solid var(--jc-border); border-radius: var(--jc-radius); padding: 12px 14px;
  font-family: var(--font-body); font-size: 14px; background: var(--jc-white); display: block;
}
.annonce-form-wizard .search-block-row { display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.annonce-form-wizard .search-block-chevron { color: var(--jc-gray); }
.annonce-form-wizard .jc-multi-panel { border: 1px solid var(--jc-border); border-radius: var(--jc-radius); margin-top: 8px; padding: 10px 14px; background: var(--jc-white); max-height: 220px; overflow-y: auto; }
.annonce-form-wizard .jc-multi-panel.is-hidden { display: none; }
.annonce-form-wizard .jc-multi-option { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; margin: 0; }
.annonce-form-wizard .jc-multi-option-all { border-bottom: 1px solid var(--jc-border); margin-bottom: 4px; padding-bottom: 10px; }

.annonce-preview-card { background: var(--jc-white); border: 1px solid var(--jc-border); border-radius: 16px; padding: 32px; box-shadow: 0 10px 30px rgba(6,18,46,.06); }
.annonce-preview-row { padding: 10px 0; border-bottom: 1px solid var(--jc-border); font-size: 14px; color: var(--jc-navy); }
.annonce-preview-row:last-child { border-bottom: none; }
.annonce-preview-row strong { margin-right: 6px; }
.annonce-preview-description p { white-space: pre-line; margin: 8px 0 0; }
.annonce-preview-title { margin: 12px 0; }
.annonce-preview-actions { display: flex; gap: 14px; margin-top: 26px; }
.annonce-preview-actions .btn { flex: 1; text-align: center; }

.is-hidden { display: none !important; }

/* Parcours judoka enrichi : formulaire "wizard" en 4 étapes (Phase suivante).
   "Je recherche" (cible) n'a jamais qu'un seul choix possible pour un judoka
   (un club) : le champ existe dans le DOM pour la cascade JS partagée
   (initGuidedFields(), voir assets/js/main.js) mais reste TOUJOURS masqué à
   l'écran, quoi que fasse ce script — d'où !important plutôt qu'une classe
   is-hidden que la cascade retire elle-même dès qu'une option existe. */
.jc-judoka-wizard .search-select-wrap[data-field="cible"] { display: none !important; }

.jc-wizard-indicator { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.jc-wizard-indicator-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: var(--jc-light); color: var(--jc-gray); font-size: 12.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .3px;
}
.jc-wizard-indicator-num {
  display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px;
  border-radius: 50%; background: var(--jc-white); color: var(--jc-gray); font-size: 11px;
}
.jc-wizard-indicator-item.is-active { background: rgba(0,56,168,.08); color: var(--jc-blue); }
.jc-wizard-indicator-item.is-active .jc-wizard-indicator-num { background: var(--jc-blue); color: var(--jc-white); }
.jc-wizard-indicator-item.is-done { background: #E8F5E9; color: #1E7B34; }
.jc-wizard-indicator-item.is-done .jc-wizard-indicator-num { background: #1E7B34; color: var(--jc-white); }

.jc-wizard-step { padding-top: 4px; }
.jc-wizard-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.jc-wizard-actions .btn { flex: none; }
.jc-wizard-actions-final { flex-wrap: wrap; justify-content: flex-end; }
.jc-wizard-actions-final .btn { flex: 1 1 auto; text-align: center; min-width: 160px; }

.jc-photo-current-preview { display: block; width: 96px; height: 96px; object-fit: cover; border-radius: 10px; margin-bottom: 10px; border: 1px solid var(--jc-border); background: var(--jc-light); }
.jc-gallery-current { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.jc-gallery-current-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--jc-border); }

/* Aperçu "carte réelle" (parcours judoka enrichi) : reprend le format des
   fiches de l'archive / de la page annonce, jamais un simple listing
   label/valeur — voir initAnnoncePreview() / renderJudokaCardPreview() dans
   assets/js/main.js. */
.jc-card-preview-line1 { font-family: var(--font-title); font-size: 17px; font-weight: 700; color: var(--jc-navy); margin-bottom: 6px; }
.jc-card-preview-line2 { font-size: 14px; color: var(--jc-gray); margin-bottom: 4px; }
.jc-card-preview-line3 { font-size: 13px; color: var(--jc-blue); font-weight: 600; margin-bottom: 4px; }
.jc-card-preview-line4 { font-size: 13px; color: var(--jc-navy); }
.jc-card-preview-line1:empty, .jc-card-preview-line2:empty, .jc-card-preview-line3:empty, .jc-card-preview-line4:empty { display: none; }

/* Onglet "Mes annonces" (/compte/) */
.annonce-group-title { font-size: 14px; text-transform: uppercase; letter-spacing: .4px; color: var(--jc-gray); margin: 30px 0 12px; }
.annonce-group-title:first-of-type { margin-top: 6px; }
.annonce-row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.annonce-row-date { font-size: 12px; color: var(--jc-gray); }
.annonce-row-title { font-size: 17px; margin: 0 0 6px; }
.annonce-row-meta { font-size: 13px; color: var(--jc-gray); margin: 0 0 16px; }
.annonce-row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.annonce-row-form { margin: 0; display: inline-block; }
.annonce-row-actions button { border: none; cursor: pointer; font-family: var(--font-title); background: transparent; }
.annonce-row-actions .btn-outline-dark { border: 1.5px solid var(--jc-border); }
.annonce-row-actions .btn-primary { background: var(--jc-blue); color: var(--jc-white); }
.annonce-row-actions .annonce-row-delete { background: transparent; color: #B3261E; border: 1.5px solid #F4C9C6; }
.annonce-row-actions .annonce-row-delete:hover { background: #FDECEC; }

@media (max-width: 560px) {
  /* Phase 3, correctif mobile : 28px de marge supérieure suffisait pour un
     visiteur déconnecté, mais un membre connecté voit un en-tête plus haut
     (liens "Mon compte" / "Déconnexion" en plus), qui passe alors sur 3
     lignes à cette largeur — 28px n'était plus assez pour éviter que le
     bouton ☰ ne chevauche le titre "Publier une annonce". Alignée sur la
     marge mobile déjà utilisée par .section (voir plus haut) pour rester
     sûre quel que soit le nombre de lignes de l'en-tête. */
  .annonce-form-wizard { padding: 64px 0 60px; }
  .annonce-preview-card { padding: 22px; }
  .annonce-preview-actions { flex-direction: column; }
}
