/* ==========================================================
   MEDHELP — SPLASH / FIRST ONBOARDING
========================================================== */


/* ==========================================================
   RESET
========================================================== */

* {
  box-sizing:
    border-box;

  margin:
    0;

  padding:
    0;
}


html,
body {
  width:
    100%;

  min-height:
    100%;
}


body {
  min-height:
    100vh;

  overflow:
    hidden;

  background:
    #ffffff;

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "SF Pro Text",
    "Helvetica Neue",
    Arial,
    sans-serif;

  -webkit-font-smoothing:
    antialiased;

  -webkit-text-size-adjust:
    100%;
}


/* ==========================================================
   SPLASH
========================================================== */

.splash-screen {
  position:
    fixed;

  inset:
    0;

  display:
    flex;

  justify-content:
    center;

  align-items:
    center;

  overflow:
    hidden;

  background:
    #c8154f;
}


.splash-image {
  width:
    100%;

  height:
    100%;

  object-fit:
    contain;

  object-position:
    center center;

  user-select:
    none;

  pointer-events:
    none;

  -webkit-user-drag:
    none;

  transform-origin:
    center center;

  animation:
    splashZoom
    8s
    cubic-bezier(
      0.42,
      0,
      0.58,
      1
    )
    forwards;

  will-change:
    transform,
    opacity;
}


@keyframes splashZoom {

  0% {
    opacity:
      0;

    transform:
      scale(
        1
      );
  }

  8% {
    opacity:
      1;

    transform:
      scale(
        1.02
      );
  }

  55% {
    opacity:
      1;

    transform:
      scale(
        1.18
      );
  }

  82% {
    opacity:
      1;

    transform:
      scale(
        1.10
      );
  }

  92% {
    opacity:
      1;

    transform:
      scale(
        1.13
      );
  }

  100% {
    opacity:
      0;

    transform:
      scale(
        1.16
      );
  }

}

/* ==========================================================
   ONBOARDING FULLSCREEN
========================================================== */

.onboarding-dialog {
  position:
    fixed;

  inset:
    0;

  z-index:
    100;

  display:
    flex;

  align-items:
    center;

  justify-content:
    center;

  padding:
    22px;

  opacity:
    0;

  pointer-events:
    none;

  transition:
    opacity
    240ms
    ease;
}


.onboarding-dialog[hidden] {
  display:
    none;
}


.onboarding-dialog.is-visible {
  opacity:
    1;

  pointer-events:
    auto;
}


/* ==========================================================
   BACKGROUND BEHIND CARD
========================================================== */

.onboarding-dialog__overlay {
  position:
    absolute;

  inset:
    0;

  background:
    rgba(
      255,
      255,
      255,
      0.76
    );

  backdrop-filter:
    blur(
      13px
    );

  -webkit-backdrop-filter:
    blur(
      13px
    );
}


/* ==========================================================
   CARD
========================================================== */

.onboarding-card {
  position:
    relative;

  z-index:
    1;

  width:
    min(
      100%,
      350px
    );

  padding:
    23px
    18px
    20px;

  border:
    0.8px solid
    rgba(
      55,
      55,
      55,
      0.55
    );

  border-radius:
    28px;

  background:
    rgba(
      255,
      255,
      255,
      0.98
    );

  box-shadow:
    0
    18px
    55px
    rgba(
      0,
      0,
      0,
      0.18
    );

  transform:
    translateY(
      18px
    )
    scale(
      0.97
    );

  transition:
    transform
    240ms
    ease;
}


.onboarding-dialog.is-visible
.onboarding-card {
  transform:
    translateY(
      0
    )
    scale(
      1
    );
}


/* ==========================================================
   PROFILE CARD

   Немного выше, потому что полей больше.
========================================================== */

.onboarding-card--profile {
  max-height:
    calc(
      100vh -
      44px
    );

  overflow-y:
    auto;

  scrollbar-width:
    none;
}


.onboarding-card--profile::-webkit-scrollbar {
  display:
    none;
}


/* ==========================================================
   TITLE
========================================================== */

.onboarding-card__title {
  margin:
    0;

  color:
    #202020;

  font-size:
    21px;

  font-weight:
    800;

  line-height:
    1.15;

  text-align:
    center;
}


/* ==========================================================
   SUBTITLE
========================================================== */

.onboarding-card__subtitle {
  margin:
    7px
    0
    18px;

  color:
    #686868;

  font-size:
    12px;

  font-weight:
    500;

  line-height:
    1.3;

  text-align:
    center;
}


/* ==========================================================
   LANGUAGE GRID

   Grille de boutons circulaires (drapeau) + libellé, 3 par
   ligne. flex-wrap + justify-content:center centre
   automatiquement la dernière ligne incomplète (ex. 8 langues
   -> 3+3+2, la ligne de 2 est centrée sans hack nth-child) —
   ce même mécanisme fonctionnera sans modification pour
   15 langues (3 x 5, dernière ligne toujours complète).
========================================================== */

.language-grid {
  width:
    100%;

  display:
    flex;

  flex-wrap:
    wrap;

  justify-content:
    center;

  gap:
    8px;
}


/* ==========================================================
   LANGUAGE ITEM (grille — visuellement transparent)

   L'élément <button> reste l'unique contrôle interactif
   (data-language + aria-label), mais ne porte plus aucun
   habillage de carte rectangulaire : ni fond, ni bordure,
   ni ombre. Seul le rond du drapeau (.language-card__circle)
   porte l'aspect bouton convexe.
========================================================== */

.language-card {
  flex:
    0
    0
    calc(
      (100% - 16px) / 3
    );

  display:
    flex;

  flex-direction:
    column;

  align-items:
    center;

  justify-content:
    flex-start;

  gap:
    5px;

  padding:
    0;

  border:
    none;

  border-radius:
    0;

  background:
    transparent;

  color:
    #222222;

  font:
    inherit;

  cursor:
    pointer;

  box-shadow:
    none;

  -webkit-tap-highlight-color:
    transparent;
}


.language-card:active
.language-card__circle {
  transform:
    scale(
      0.96
    );

  box-shadow:
    inset -5px -5px 10px rgba(255, 255, 255, 0.9),
    inset  5px  5px 10px rgba(13, 39, 80, 0.17);
}


/* ==========================================================
   RAISED LANGUAGE FLAG BUTTON — TROIS COUCHES

   1. .language-card__circle — cadre EXTÉRIEUR, CONVEXE/
      SURÉLEVÉ. Porte le relief : highlight haut-gauche +
      ombre bas-droite. Rim fin (padding: 2px).

   2. .language-card__flag-face — puits INTÉRIEUR. Ne porte
      PLUS l'ombre inset lui-même : il sert uniquement de
      conteneur positionné (position:relative) pour l'image
      (absolue, inset:0) ET pour le pseudo-élément ::after
      ci-dessous.

   3. .language-card__flag-img — le drapeau, en position
      absolute/inset:0 à l'intérieur du puits, remplit
      entièrement la face (aucun espace gris visible autour).

   4. .language-card__flag-face::after — PAR-DESSUS l'image
      (z-index:2), porte les ombres inset. C'est ce qui rend
      l'effet "enfoncé" réellement visible : un box-shadow
      inset posé sur le MÊME élément qu'un enfant en flux
      normal est peint SOUS cet enfant (l'enfant recouvre
      le fond/ombre de son parent) — d'où l'invisibilité de
      l'ancien essai. En passant l'ombre sur un ::after
      indépendant, positionné par-dessus l'image, l'ombre
      inset redevient visible.

   Même encombrement global (54×54) que la version précédente.
========================================================== */

.language-card__circle {
  position:
    relative;

  width:
    54px;

  height:
    54px;

  flex-shrink:
    0;

  box-sizing:
    border-box;

  display:
    flex;

  align-items:
    center;

  justify-content:
    center;

  padding:
    2px;

  border:
    0;

  border-radius:
    16px;

  background:
    #e8eaec;

  overflow:
    visible;

  box-shadow:
    -8px -8px 16px rgba(255, 255, 255, 1),
     9px  9px 18px rgba(13, 39, 80, 0.34);

  cursor:
    pointer;

  transition:
    transform
    120ms
    ease,
    box-shadow
    120ms
    ease;
}


.language-card__flag-face {
  position:
    relative;

  display:
    block;

  width:
    100%;

  height:
    100%;

  overflow:
    hidden;

  border-radius:
    14px;

  background:
    #e8eaec;
}


.language-card__flag-img {
  position:
    absolute;

  inset:
    0;

  display:
    block;

  width:
    100%;

  height:
    100%;

  object-fit:
    cover;

  border:
    0;

  margin:
    0;

  padding:
    0;

  pointer-events:
    none;
}


.language-card__flag-face::after {
  content:
    "";

  position:
    absolute;

  inset:
    0;

  z-index:
    2;

  border-radius:
    inherit;

  pointer-events:
    none;

  box-shadow:
    inset  5px  5px 9px rgba(13, 39, 80, 0.38),
    inset -5px -5px 9px rgba(255, 255, 255, 0.72);
}


.language-card__label {
  max-width:
    100%;

  font-size:
    12px;

  font-weight:
    700;

  line-height:
    1.2;

  text-align:
    center;

  white-space:
    nowrap;

  overflow:
    hidden;

  text-overflow:
    ellipsis;
}


/* ==========================================================
   PROFILE FIELD
========================================================== */

.profile-field {
  width:
    100%;

  display:
    block;

  margin-bottom:
    11px;
}


.profile-field__label {
  display:
    block;

  margin:
    0
    0
    5px
    4px;

  color:
    #454545;

  font-size:
    11px;

  font-weight:
    700;
}


/* ==========================================================
   PROFILE INPUT
========================================================== */

.profile-field__input {
  width:
    100%;

  height:
    44px;

  padding:
    0
    14px;

  border:
    0.8px solid
    #aaaaaa;

  border-radius:
    16px;

  outline:
    none;

  background:
    #ffffff;

  color:
    #222222;

  font:
    inherit;

  font-size:
    14px;

  font-weight:
    500;

  box-shadow:
    inset
    0
    2px
    5px
    rgba(
      0,
      0,
      0,
      0.07
    );
}


.profile-field__input::placeholder {
  color:
    #a0a0a0;
}


/* ==========================================================
   SELECT
========================================================== */

.profile-field__select {
  appearance:
    none;

  -webkit-appearance:
    none;

  padding-right:
    36px;

  background-image:
    linear-gradient(
      45deg,
      transparent
      50%,
      #555555
      50%
    ),
    linear-gradient(
      135deg,
      #555555
      50%,
      transparent
      50%
    );

  background-position:
    calc(
      100% -
      17px
    )
    18px,
    calc(
      100% -
      12px
    )
    18px;

  background-size:
    5px
    5px,
    5px
    5px;

  background-repeat:
    no-repeat;
}


/* ==========================================================
   PROFILE ACTIONS
========================================================== */

.profile-actions {
  width:
    100%;

  display:
    grid;

  grid-template-columns:
    1fr
    1fr;

  gap:
    9px;

  margin-top:
    16px;
}


/* ==========================================================
   ACTION BUTTON
========================================================== */

.profile-action {
  height:
    46px;

  border-radius:
    18px;

  font:
    inherit;

  font-size:
    14px;

  font-weight:
    800;

  cursor:
    pointer;

  -webkit-tap-highlight-color:
    transparent;
}


.profile-action--secondary {
  border:
    0.8px solid
    #8e8e8e;

  background:
    #ffffff;

  color:
    #333333;
}


/*
  Ombre extérieure harmonisée avec la matière du bouton
  drapeau approuvé (.language-card__circle, plus haut dans
  ce même fichier) : même direction/couleurs, décalage/flou
  réduits au prorata de la hauteur compacte de ce bouton
  (46px vs 54px de référence).
*/
.profile-action--primary {
  border:
    0;

  background:
    #343434;

  color:
    #ffffff;

  box-shadow:
    -7px -7px 14px rgba(255, 255, 255, 1),
     8px  8px 15px rgba(13, 39, 80, 0.34);
}


.profile-action:active {
  transform:
    scale(
      0.98
    );
}


/* ==========================================================
   SMALL SCREENS
========================================================== */

@media (
  max-height:
  650px
) {

  .onboarding-dialog {
    align-items:
      flex-start;

    overflow-y:
      auto;

    padding-top:
      18px;

    padding-bottom:
      18px;
  }


  .onboarding-card {
    margin:
      auto
      0;
  }


  .onboarding-card__title {
    font-size:
      19px;
  }


  .onboarding-card__subtitle {
    margin-bottom:
      13px;
  }


  .profile-field {
    margin-bottom:
      8px;
  }


  .profile-field__input {
    height:
      40px;
  }

}


/* ==========================================================
   REDUCED MOTION
========================================================== */

@media (
  prefers-reduced-motion:
  reduce
) {

  .onboarding-dialog,
  .onboarding-card {
    transition:
      none;
  }

}