/* =========================================================
   Aubert AI - Assistant Candidatures
   Header commun propre
   ========================================================= */

#cv-app-header {
  max-width: 1160px;
  margin: 10px auto 10px;
  padding: 0 24px;
  box-sizing: border-box;
}

#cv-app-header .cv-profile-banner {
  display: grid;
  grid-template-columns: 280px 1fr 280px;
  align-items: center;
  column-gap: 18px;

  width: 100%;
  min-height: 118px;
  padding: 18px 24px;
  box-sizing: border-box;

  border: 1px solid rgba(96, 165, 250, 0.34);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.86);
}

#cv-app-header .cv-profile-banner-left {
  justify-self: start;
  width: 280px;
}

#cv-app-header .cv-profile-banner-center {
  justify-self: center;
  width: 100%;
  text-align: center;
}

#cv-app-header .cv-profile-banner-right {
  justify-self: end;
  width: 280px;
  display: flex;
  justify-content: flex-end;
}

/* Carte profil */
#cv-app-header .cv-profile-card {
  width: 280px;
  min-height: 66px;
  padding: 10px 12px;
  box-sizing: border-box;

  display: flex;
  align-items: center;
  gap: 10px;

  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
}

#cv-app-header .user-avatar {
  width: 34px;
  height: 34px;
  min-width: 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #22d3ee);

  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

#cv-app-header .cv-profile-text {
  min-width: 0;
  flex: 1;
}

#cv-app-header .profile-name,
#cv-app-header .profile-meta,
#cv-app-header .profile-role {
  display: block;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#cv-app-header .profile-name {
  margin-bottom: 1px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.15;
}

#cv-app-header .profile-meta {
  margin-bottom: 1px;
  color: #dbeafe;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.15;
}

#cv-app-header .profile-role {
  color: #dbeafe;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
}

/* Titre parfaitement centré dans la colonne centrale */
#cv-app-header .cv-banner-title {
  display: block;
  margin: 0 auto;
  text-align: center;
  white-space: nowrap;

  color: #7aa7ff;
  font-size: 26px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.02em;
}

/* Bouton */
#cv-app-header .cv-profile-logout {
  width: 210px !important;
  height: 46px !important;
  min-height: 46px !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  margin: 0 !important;
  padding: 0 18px !important;
  box-sizing: border-box !important;

  border-radius: 10px !important;
  white-space: nowrap !important;
}

/* Intro de page */
.cv-page-intro {
  max-width: 880px;
  margin: 10px auto 32px;
  text-align: center;
}

.cv-page-intro h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 4vw, 46px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #ffffff;
}

.cv-page-intro p {
  margin: 0 auto;
  max-width: 760px;
  font-size: 17px;
  line-height: 1.65;
  color: #dbeafe;
}

/* Accueil */
.cv-main {
  padding-top: 10px !important;
}

.cv-main h1 {
  margin-top: 0 !important;
}

/* Responsive */
@media (max-width: 920px) {
  #cv-app-header .cv-profile-banner {
    grid-template-columns: 1fr;
    row-gap: 18px;
    justify-items: center;
    padding: 20px;
  }

  #cv-app-header .cv-profile-banner-left,
  #cv-app-header .cv-profile-banner-center,
  #cv-app-header .cv-profile-banner-right {
    width: 100%;
    justify-self: center;
  }

  #cv-app-header .cv-profile-banner-right {
    justify-content: center;
  }

  #cv-app-header .cv-profile-card,
  #cv-app-header .cv-profile-logout {
    width: 100% !important;
    max-width: 420px;
  }

  #cv-app-header .cv-banner-title {
    white-space: normal;
    font-size: 22px;
  }
}

/* =========================================================
   Centrage absolu réel du titre du bandeau
   ========================================================= */

#cv-app-header .cv-profile-banner {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

#cv-app-header .cv-profile-banner-left {
  width: 280px !important;
  flex: 0 0 280px !important;
  z-index: 2 !important;
}

#cv-app-header .cv-profile-banner-center {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: auto !important;
  text-align: center !important;
  z-index: 1 !important;
  pointer-events: none !important;
}

#cv-app-header .cv-profile-banner-right {
  width: 280px !important;
  flex: 0 0 280px !important;
  display: flex !important;
  justify-content: flex-end !important;
  z-index: 2 !important;
}

#cv-app-header .cv-banner-title {
  white-space: nowrap !important;
  text-align: center !important;
}

/* =========================================================
   Centrage définitif du titre : couche centrale pleine largeur
   ========================================================= */

#cv-app-header .cv-profile-banner {
  position: relative !important;
}

/* Profil à gauche au-dessus de la couche titre */
#cv-app-header .cv-profile-banner-left {
  position: relative !important;
  z-index: 3 !important;
}

/* Bouton à droite au-dessus de la couche titre */
#cv-app-header .cv-profile-banner-right {
  position: relative !important;
  z-index: 3 !important;
}

/* Le centre devient une couche qui couvre tout le bandeau */
#cv-app-header .cv-profile-banner-center {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  transform: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

/* Titre parfaitement centré */
#cv-app-header .cv-banner-title {
  display: inline-block !important;
  margin: 0 auto !important;
  padding: 0 !important;
  text-align: center !important;
  white-space: nowrap !important;
}

/* =========================================================
   Navigation commune Assistant Candidatures
   ========================================================= */

#cv-app-header .cv-assistant-nav {
  max-width: 1160px;
  margin: 18px auto 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

#cv-app-header .cv-assistant-nav a {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 980px) {
  #cv-app-header .cv-assistant-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  #cv-app-header .cv-assistant-nav {
    grid-template-columns: 1fr;
  }
}

/* Navigation Assistant plus compacte et mieux espacée */
#cv-app-header .cv-assistant-nav {
  margin-top: 18px !important;
  margin-bottom: 34px !important;
  gap: 12px !important;
}

#cv-app-header .cv-assistant-nav a {
  min-height: 42px !important;
  height: 42px !important;
  padding: 0 14px !important;
  border-radius: 9px !important;
  font-size: 15px !important;
  line-height: 1 !important;
}

/* Evite que l'intro de page colle trop à la navigation */
.cv-page-intro {
  margin-top: 0 !important;
}

/* Navigation Assistant plus compacte et mieux espacée */
#cv-app-header .cv-assistant-nav {
  margin-top: 18px !important;
  margin-bottom: 34px !important;
  gap: 12px !important;
}

#cv-app-header .cv-assistant-nav a {
  min-height: 42px !important;
  height: 42px !important;
  padding: 0 14px !important;
  border-radius: 9px !important;
  font-size: 15px !important;
  line-height: 1 !important;
}

/* Evite que l'intro de page colle trop à la navigation */
.cv-page-intro {
  margin-top: 0 !important;
}

/* =========================================================
   Centrage réel du titre du bandeau
   ========================================================= */

#cv-app-header .cv-profile-banner {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

/* Profil à gauche */
#cv-app-header .cv-profile-banner-left {
  position: relative !important;
  z-index: 2 !important;
  flex: 0 0 280px !important;
}

/* Titre centré sur toute la largeur du bandeau */
#cv-app-header .cv-profile-banner-center {
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: none !important;
  text-align: center !important;
}

/* Bouton à droite */
#cv-app-header .cv-profile-banner-right {
  position: relative !important;
  z-index: 2 !important;
  flex: 0 0 280px !important;
  display: flex !important;
  justify-content: flex-end !important;
}

/* Titre */
#cv-app-header .cv-banner-title {
  margin: 0 !important;
  text-align: center !important;
  white-space: nowrap !important;
}

/* Réglage manuel du titre central du bandeau */
#cv-app-header .cv-profile-banner-center {
  transform: translateX(28px) !important;
}

#cv-app-header .cv-banner-title {
  text-align: center !important;
  white-space: nowrap !important;
}

/* Réduction espace entre H1 de page et contenu */
.cv-page-intro {
  margin-top: 8px !important;
  margin-bottom: 18px !important;
}

.cv-page-intro h1 {
  margin-bottom: 0 !important;
}

/* Si une section arrive juste après l'intro, on réduit son espace haut */
.cv-page-intro + section,
.cv-page-intro + .home-grid-section,
.cv-page-intro + .cv-analysis-section,
.cv-page-intro + .cv-profile-section,
.cv-page-intro + .cv-detail-section {
  margin-top: 0 !important;
  padding-top: 12px !important;
}

/* Analyse : carte formulaire plus proche du titre */
.cv-analysis-section {
  padding-top: 12px !important;
}

/* Texte d’introduction dans les cartes formulaire */
.cv-card-intro {
  margin: 0 0 22px !important;
  color: #dbeafe !important;
  font-size: 16px !important;
  line-height: 1.6 !important;
  font-weight: 600 !important;
}

/* Intro dans la carte candidatures */
.candidates-card-intro {
  margin: 0 0 24px !important;
}

.candidates-card-intro p {
  margin: 0 0 6px !important;
  color: #67e8f9 !important;
  font-size: 24px !important;
  line-height: 1.2 !important;
  font-weight: 900 !important;
}

.candidates-card-intro h2 {
  margin: 0 !important;
  color: #ffffff !important;
  font-size: 26px !important;
  line-height: 1.2 !important;
  font-weight: 900 !important;
}

/* =========================================================
   Mes candidatures - actions compactes sur 2 lignes
   ========================================================= */

.cv-function-section table td:last-child,
.cv-function-section table th:last-child {
  width: 360px !important;
}

.cv-function-section table td:last-child {
  vertical-align: top !important;
}

.cv-function-section table td:last-child .offer-btn,
.cv-function-section table td:last-child .cv-secondary-action,
.cv-function-section table td:last-child .btn-primary,
.cv-function-section table td:last-child .danger,
.cv-function-section table td:last-child button {
  width: auto !important;
  min-width: 108px !important;
  height: 38px !important;
  min-height: 38px !important;
  margin: 0 !important;
  padding: 0 12px !important;
  font-size: 14px !important;
  line-height: 1 !important;
  border-radius: 9px !important;
  white-space: nowrap !important;
}

/* Transforme la cellule Actions en grille compacte */
.cv-function-section table td:last-child {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(108px, 1fr)) !important;
  gap: 8px !important;
  align-items: center !important;
}

/* Les boutons remplissent leur case */
.cv-function-section table td:last-child > * {
  width: 100% !important;
}

/* Réduit l'épaisseur des lignes du tableau */
.cv-function-section table td {
  padding-top: 14px !important;
  padding-bottom: 14px !important;
}

/* Statuts plus lisibles dans la grille */
.cv-function-section table td:last-child button,
.cv-function-section table td:last-child a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

/* Correction boutons actions candidatures : éviter débordement texte */
.cv-function-section table td:last-child {
  width: 390px !important;
  min-width: 390px !important;
  grid-template-columns: repeat(3, minmax(118px, 1fr)) !important;
  gap: 8px !important;
}

.cv-function-section table td:last-child .offer-btn,
.cv-function-section table td:last-child .cv-secondary-action,
.cv-function-section table td:last-child .btn-primary,
.cv-function-section table td:last-child .danger,
.cv-function-section table td:last-child button,
.cv-function-section table td:last-child a {
  min-width: 118px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 10px !important;
  font-size: 13px !important;
  line-height: 1.05 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Colonne actions un peu plus large */
.cv-function-section table th:last-child {
  width: 390px !important;
  min-width: 390px !important;
}

/* =========================================================
   Corrections finales espace H1 -> carte : profil + mes-cv
   ========================================================= */

body.cv-page-profil .cv-page-intro,
body.cv-page-mes-cv .cv-page-intro {
  margin-top: 10px !important;
  margin-bottom: 18px !important;
}

body.cv-page-profil .cv-page-intro h1,
body.cv-page-mes-cv .cv-page-intro h1 {
  margin-bottom: 0 !important;
}

body.cv-page-profil #profil-cv,
body.cv-page-profil .home-grid-section,
body.cv-page-profil .cv-profile-section,
body.cv-page-mes-cv .home-grid-section,
body.cv-page-mes-cv .cv-profile-section,
body.cv-page-mes-cv .cv-function-section {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body.cv-page-profil #profileEditCard,
body.cv-page-profil .cv-function-card,
body.cv-page-mes-cv .cv-function-card,
body.cv-page-mes-cv .trust-card {
  margin-top: 0 !important;
}

/* =========================================================
   Alignement vertical profil.html avec analyse.html
   ========================================================= */

/* Même espace entre le titre de page et la première carte */
.cv-page-intro {
  margin-bottom: 42px !important;
}

/* Profil : neutralise les marges/paddings qui font descendre/remonter la carte */
.cv-profile-section {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.cv-profile-section > .container {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Carte principale profil : même logique visuelle que les cartes analyse */
#profileEditCard,
.profile-edit-card {
  margin-top: 0 !important;
}

/* Évite que l'ancien titre interne CV crée un décalage trop fort */
#profileEditCard .section-title,
.profile-edit-card .section-title {
  margin-top: 0 !important;
}

/* =========================================================
   Harmonisation titres pages CV : profil / analyse / autres
   ========================================================= */

/* Même placement du titre après la navigation */
.cv-page-intro {
  margin-top: 34px !important;
  margin-bottom: 58px !important;
  text-align: center !important;
}

/* H1 homogène */
.cv-page-intro h1 {
  margin: 0 !important;
}

/* Si une page garde un sous-titre, il reste compact */
.cv-page-intro p {
  margin-top: 16px !important;
  margin-bottom: 0 !important;
}

/* Profil : la première carte démarre comme sur analyse */
.cv-profile-section,
.cv-profile-section > .container,
#profileEditCard,
.profile-edit-card {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* =========================================================
   Harmonisation titres pages CV : profil / analyse / autres
   ========================================================= */

/* Même placement du titre après la navigation */
.cv-page-intro {
  margin-top: 34px !important;
  margin-bottom: 58px !important;
  text-align: center !important;
}

/* H1 homogène */
.cv-page-intro h1 {
  margin: 0 !important;
}

/* Si une page garde un sous-titre, il reste compact */
.cv-page-intro p {
  margin-top: 16px !important;
  margin-bottom: 0 !important;
}

/* Profil : la première carte démarre comme sur analyse */
.cv-profile-section,
.cv-profile-section > .container,
#profileEditCard,
.profile-edit-card {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Réduction espace entre titre H1 et première carte */
.cv-page-intro {
  margin-bottom: 24px !important;
}

/* Cas des pages candidatures / analyse / comparaison / détail */
.cv-page-intro + section,
.cv-page-intro + .home-grid-section,
.cv-page-intro + .cv-detail-section,
.cv-page-intro + .cv-profile-section {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* =========================================================
   Alignement final profil.html avec les autres pages
   ========================================================= */

/* Même espace sous le H1 pour toutes les pages */
.cv-page-intro {
  margin-bottom: 24px !important;
}

/* Profil : neutralise les espaces propres à l’ancienne page */
#profil-cv.cv-profile-section,
.cv-profile-section,
section#profil-cv {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Container profil au même niveau que les autres cartes */
#profil-cv > .container,
.cv-profile-section > .container {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Carte profil : aucun décalage supplémentaire */
#profileEditCard,
.profile-edit-card {
  margin-top: 0 !important;
  padding-top: 32px !important;
}

/* Titre interne "CV" : alignement comme les titres de carte des autres pages */
#profileEditCard .section-title,
.profile-edit-card .section-title {
  margin-top: 0 !important;
  margin-bottom: 24px !important;
}

/* =========================================================
   Alignement final profil.html avec les autres pages
   ========================================================= */

/* Même espace sous le H1 pour toutes les pages */
.cv-page-intro {
  margin-bottom: 24px !important;
}

/* Profil : neutralise les espaces propres à l’ancienne page */
#profil-cv.cv-profile-section,
.cv-profile-section,
section#profil-cv {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Container profil au même niveau que les autres cartes */
#profil-cv > .container,
.cv-profile-section > .container {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Carte profil : aucun décalage supplémentaire */
#profileEditCard,
.profile-edit-card {
  margin-top: 0 !important;
  padding-top: 32px !important;
}

/* Titre interne "CV" : alignement comme les titres de carte des autres pages */
#profileEditCard .section-title,
.profile-edit-card .section-title {
  margin-top: 0 !important;
  margin-bottom: 24px !important;
}

/* =========================================================
   Ajustement profil.html : carte un peu plus basse
   ========================================================= */

#profil-cv.cv-profile-section {
  margin-top: 24px !important;
  padding-top: 0 !important;
}

#profil-cv > .container {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

#profileEditCard,
.profile-edit-card {
  margin-top: 0 !important;
}

/* =========================================================
   Harmonisation finale navigation / H1 / première carte
   ========================================================= */

/* Même espace entre navigation et titre H1 */
.cv-page-intro {
  margin-top: 34px !important;
  margin-bottom: 28px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* H1 homogène */
.cv-page-intro h1 {
  margin: 0 !important;
  padding: 0 !important;
}

/* Supprime les décalages propres aux sections après le H1 */
.cv-page-intro + section,
.cv-page-intro + .home-grid-section,
.cv-page-intro + .cv-profile-section,
.cv-page-intro + .cv-detail-section {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Toutes les sections principales CV démarrent pareil */
.home-grid-section,
.cv-profile-section,
.cv-detail-section,
.cv-analysis-section,
.cv-candidatures-section {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Containers internes sans décalage vertical additionnel */
.home-grid-section > .container,
.cv-profile-section > .container,
.cv-detail-section > .container {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Première carte métier : même niveau partout */
.cv-function-card,
.trust-card,
.profile-edit-card,
#profileEditCard {
  margin-top: 0 !important;
}

/* =========================================================
   Alignement final strict H1 -> première carte
   ========================================================= */

/* Zone titre identique sur toutes les pages */
.cv-page-intro {
  height: 96px !important;
  min-height: 96px !important;
  max-height: 96px !important;

  margin-top: 34px !important;
  margin-bottom: 24px !important;

  padding: 0 !important;

  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;

  text-align: center !important;
  box-sizing: border-box !important;
}

/* H1 strictement identique */
.cv-page-intro h1 {
  margin: 0 !important;
  padding: 0 !important;

  font-size: clamp(34px, 4vw, 46px) !important;
  line-height: 1.1 !important;
  font-weight: 900 !important;
  letter-spacing: -0.04em !important;
}

/* On neutralise les sous-titres pour éviter les différences de hauteur */
.cv-page-intro p {
  display: none !important;
}

/* La section suivante démarre toujours au même niveau */
.cv-page-intro + section,
.cv-page-intro + .home-grid-section,
.cv-page-intro + .cv-profile-section,
.cv-page-intro + .cv-detail-section {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Containers sans décalage */
.home-grid-section > .container,
.cv-profile-section > .container,
.cv-detail-section > .container {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Première carte sans marge parasite */
.cv-function-card,
.trust-card,
.profile-edit-card,
#profileEditCard {
  margin-top: 0 !important;
}

/* =========================================================
   Alignement strict profil.html sur analyse.html
   ========================================================= */

.cv-profile-section {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.cv-profile-section > .container {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.cv-profile-section .cv-function-card,
.cv-profile-section .profile-edit-card,
.cv-profile-section #profileEditCard {
  margin-top: 0 !important;
  transform: none !important;
  position: relative !important;
  top: 0 !important;
}

#profileEditCard {
  margin-top: 0 !important;
}

/* =========================================================
   Alignement final absolu première carte toutes pages
   ========================================================= */

/* Après le H1, toutes les sections fonctionnelles démarrent pareil */
.cv-page-intro + section {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Toutes les sections fonctionnelles ont la même origine */
.cv-function-section,
.impact-proof,
.cv-profile-section,
.cv-detail-section,
.home-grid-section {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Tous les containers directs démarrent pareil */
.cv-function-section > .container,
.impact-proof > .container,
.cv-profile-section > .container,
.cv-detail-section > .container,
.home-grid-section > .container {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Première carte : zéro décalage externe */
.cv-function-section > .container > .cv-function-card:first-child,
.impact-proof > .container > .cv-function-card:first-child,
.cv-profile-section > .container > .cv-function-card:first-child,
.cv-detail-section > .container > .trust-card:first-child,
.home-grid-section > .container > .cv-function-card:first-child,
#profileEditCard {
  margin-top: 0 !important;
  position: relative !important;
  top: 0 !important;
  transform: none !important;
}

/* Neutralisation définitive de l'ancienne classe si elle existe encore ailleurs */
.profile-edit-card {
  margin-top: 0 !important;
  position: relative !important;
  top: 0 !important;
  transform: none !important;
}

/* =========================================================
   Micro-alignement final : haut externe des premières cartes
   ========================================================= */

/* Même hauteur et même respiration de zone H1 */
.cv-page-intro {
  height: 96px !important;
  min-height: 96px !important;
  max-height: 96px !important;
  margin-top: 34px !important;
  margin-bottom: 24px !important;
  padding: 0 !important;
}

/* Même départ immédiat de la section après le H1 */
.cv-page-intro + section {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Même départ du container */
.cv-page-intro + section > .container {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Même origine pour la première carte */
.cv-page-intro + section > .container > .cv-function-card,
.cv-page-intro + section > .container > .trust-card,
#profileEditCard {
  margin-top: 0 !important;
  top: 0 !important;
  transform: translateY(0) !important;
}

/* Correction spécifique profil : neutralisation du micro-décalage restant */
#profil-cv {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

#profil-cv > .container {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

#profil-cv > .container > #profileEditCard {
  margin-top: 0 !important;
  top: 0 !important;
  transform: translateY(0) !important;
}

/* Ajustement visuel final profil.html */
#profil-cv > .container > #profileEditCard {
  transform: translateY(-2px) !important;
}

/* =========================================================
   Anti-flash profil.html réel
   ========================================================= */

/* Masque uniquement la zone dynamique pendant l'initialisation */
body.cv-page-profil.is-loading #cv-app-header,
body.cv-page-profil.is-loading main {
  opacity: 0 !important;
}

/* Affichage propre après chargement */
body.cv-page-profil #cv-app-header,
body.cv-page-profil main {
  transition: opacity 0.12s ease-out;
}

/* =========================================================
   Ajustement final niveau carte profil.html
   ========================================================= */

/* Remonte uniquement la première carte de profil.html */
body.cv-page-profil #profil-cv > .container > #profileEditCard {
  transform: translateY(-2px) !important;
}

/* =========================================================
   Alignement propre profil.html sur analyse.html
   Référence : analyse.html / #analyse-offres
   ========================================================= */

/* La page profil doit utiliser le même départ vertical que analyse.html */
html body.cv-page-profil main section#profil-cv {
  margin-top: 0 !important;
  padding-top: 0 !important;
  transform: none !important;
}

/* Le container profil doit se comporter comme celui d'analyse.html */
html body.cv-page-profil main section#profil-cv > .container {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* La carte profil doit démarrer comme une .cv-function-card standard */
html body.cv-page-profil main section#profil-cv > .container > #profileEditCard.cv-function-card {
  margin-top: 0 !important;
  top: auto !important;
  transform: none !important;
}

/* On aligne explicitement les deux sections de référence */
#analyse-offres,
#profil-cv {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

#analyse-offres > .container,
#profil-cv > .container {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* =========================================================
   Référence unique : analyse.html et profil.html
   ========================================================= */

#analyse-offres,
body.cv-page-profil #profil-cv {
  margin-top: 0 !important;
  padding-top: 0 !important;
  transform: none !important;
}

#analyse-offres > .container,
body.cv-page-profil #profil-cv > .container {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

#analyse-offres > .container > .cv-function-card,
body.cv-page-profil #profil-cv > .container > #profileEditCard {
  margin-top: 0 !important;
  top: auto !important;
  transform: none !important;
}

/* =========================================================
   Alignement définitif profil.html sur analyse.html
   ========================================================= */

/* profil.html utilise maintenant la même structure de section qu'analyse.html */
body.cv-page-profil #profil-cv {
  margin-top: 0 !important;
  padding-top: 0 !important;
  transform: none !important;
}

/* Même container que #analyse-offres */
body.cv-page-profil #profil-cv > .container {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Même comportement de première carte */
body.cv-page-profil #profil-cv > .container > #profileEditCard.cv-function-card {
  margin-top: 0 !important;
  padding-top: inherit;
  top: auto !important;
  transform: none !important;
}

/* =========================================================
   Correction mesurée profil.html
   Référence analyse.html : gap intro -> carte = 24px
   Profil mesuré : 18px
   Correction : +6px
   ========================================================= */

html body.cv-page-profil main section#profil-cv {
  margin-top: 6px !important;
  padding-top: 0 !important;
  transform: none !important;
}

html body.cv-page-profil main section#profil-cv > .container {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

html body.cv-page-profil main section#profil-cv > .container > #profileEditCard.cv-function-card {
  margin-top: 0 !important;
  top: auto !important;
  transform: none !important;
}

/* =========================================================
   Anti-flash analyse.html
   ========================================================= */

body.cv-page-analyse.is-loading #cv-app-header,
body.cv-page-analyse.is-loading main {
  opacity: 0 !important;
}

body.cv-page-analyse #cv-app-header,
body.cv-page-analyse main {
  transition: opacity 0.12s ease-out;
}

/* =========================================================
   Anti-flash comparaison.html
   ========================================================= */

body.cv-page-comparaison.is-loading #cv-app-header,
body.cv-page-comparaison.is-loading main {
  opacity: 0 !important;
}

body.cv-page-comparaison #cv-app-header,
body.cv-page-comparaison main {
  transition: opacity 0.12s ease-out;
}

/* =========================================================
   Anti-flash candidatures.html
   ========================================================= */

body.cv-page-candidatures.is-loading #cv-app-header,
body.cv-page-candidatures.is-loading main {
  opacity: 0 !important;
}

body.cv-page-candidatures #cv-app-header,
body.cv-page-candidatures main {
  transition: opacity 0.12s ease-out;
}

/* =========================================================
   Anti-flash mes-cv.html
   ========================================================= */

body.cv-page-mes-cv.is-loading #cv-app-header,
body.cv-page-mes-cv.is-loading main {
  opacity: 0 !important;
}

body.cv-page-mes-cv #cv-app-header,
body.cv-page-mes-cv main {
  transition: opacity 0.12s ease-out;
}

/* =========================================================
   Anti-flash mes-cv.html
   ========================================================= */

body.cv-page-mes-cv.is-loading #cv-app-header,
body.cv-page-mes-cv.is-loading main {
  opacity: 0 !important;
}

body.cv-page-mes-cv #cv-app-header,
body.cv-page-mes-cv main {
  transition: opacity 0.12s ease-out;
}

/* =========================================================
   Micro-alignement final : haut externe des premières cartes
   ========================================================= */

/* Même hauteur et même respiration de zone H1 */
.cv-page-intro {
  height: 96px !important;
  min-height: 96px !important;
  max-height: 96px !important;
  margin-top: 34px !important;
  margin-bottom: 24px !important;
  padding: 0 !important;
}

/* Même départ immédiat de la section après le H1 */
.cv-page-intro + section {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Même départ du container */
.cv-page-intro + section > .container {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Même origine pour la première carte */
.cv-page-intro + section > .container > .cv-function-card,
.cv-page-intro + section > .container > .trust-card,
#profileEditCard {
  margin-top: 0 !important;
  top: 0 !important;
  transform: translateY(0) !important;
}

/* Correction spécifique profil : neutralisation du micro-décalage restant */
#profil-cv {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

#profil-cv > .container {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

#profil-cv > .container > #profileEditCard {
  margin-top: 0 !important;
  top: 0 !important;
  transform: translateY(0) !important;
}

/* Candidatures : action IA sous le statut */
.status-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  min-width: 130px;
}

.relancer-ia-inline {
  margin-top: 0.15rem;
  white-space: nowrap;
}

button.warning,
.small.warning {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.12);
}

button.warning:hover,
.small.warning:hover {
  background: rgba(245, 158, 11, 0.2);
}

/* Candidatures : action IA sous le statut */
.status-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  min-width: 130px;
}

.relancer-ia-inline {
  margin-top: 0.15rem;
  white-space: nowrap;
}

button.warning,
.small.warning {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.12);
}

button.warning:hover,
.small.warning:hover {
  background: rgba(245, 158, 11, 0.2);
}

/* Candidatures : action IA sous le statut */
.status-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  min-width: 130px;
}

.relancer-ia-inline {
  margin-top: 0.15rem;
  white-space: nowrap;
}

button.warning,
.small.warning {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.12);
}

button.warning:hover,
.small.warning:hover {
  background: rgba(245, 158, 11, 0.2);
}
