/**
 * Famille — thème « ludique »
 * Fond crème, cartes pastel bien arrondies, police ronde, pilules.
 * Couleurs : app/style/theme/{clair,sombre}.css — police : app/style/font/classique.css
 */

* {
  --border-radius: 28px;
  --radius-petit: 18px;
  --nav-border-radius: 999px;
}

/* Fond crème uni, plus de fond d'écran */
body,
body[data-theme] {
  background: rgb(var(--background-secondary));
  background-image: none;
  color: rgb(var(--text-primary));
  font-family: var(--font-family), system-ui, sans-serif;
}

a {
  color: rgb(var(--red-primary));
  text-underline-offset: 3px;

  &:hover {
    color: rgb(var(--red-secondary));
  }
}

h1,
.h1 {
  font-weight: 800;
}

h2,
h3,
h4,
.h2,
.h3 {
  font-weight: 700;
}

::selection {
  background: rgb(var(--yellow-primary));
  color: #2a2340;
}

.text-muted {
  color: rgb(var(--text-tertiary)) !important;
}

hr {
  border-top: 2px solid rgb(var(--background-tertiary));
  opacity: 1;
}

/* Cartes : blocs arrondis, sans ombre lourde */
.card {
  background-color: rgb(var(--background-primary));
  border-radius: var(--border-radius);
  box-shadow: none; /* taste-skill-ignore : retire une ombre du framework */
  padding: 24px;

  & h3,
  & > .row h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: rgb(var(--text-primary));
    margin-bottom: 0.9rem;
  }
}

.card.zoomable:hover {
  transform: translateY(-3px);
  box-shadow: none; /* taste-skill-ignore : retire une ombre du framework */
}

/* Boutons : pilules */
.btn {
  border-radius: 999px;
  font-weight: 700;
  padding-inline: 1.1rem;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;

  &:active {
    transform: scale(0.97);
  }
}

.btn-round {
  padding-inline: 0;
}

.btn-primary,
.btn-primary:focus {
  background-color: rgb(var(--blue-primary));
  color: rgb(var(--background-secondary));

  &:hover,
  &:active {
    background-color: rgb(var(--blue-secondary)) !important;
    color: rgb(var(--background-secondary)) !important;
  }
}

.btn-secondary {
  background-color: rgb(var(--background-tertiary));
  color: rgb(var(--text-primary));

  &:hover {
    background-color: rgb(var(--background-quaternary));
    color: rgb(var(--text-primary));
  }
}

.btn-danger,
.bg-danger {
  background-color: rgb(var(--red-primary)) !important;
  color: rgb(var(--background-secondary)) !important;
}

.btn:focus-visible,
a:focus-visible {
  outline: 3px solid rgb(var(--yellow-primary));
  outline-offset: 2px;
  box-shadow: none; /* taste-skill-ignore : retire une ombre du framework */
}

/* Formulaires */
.form-control,
.form-select {
  background-color: rgb(var(--background-primary));
  border: 2px solid transparent;
  border-radius: var(--radius-petit);
  color: rgb(var(--text-primary));

  &::placeholder {
    color: rgb(var(--text-tertiary));
  }

  &:focus {
    background-color: rgb(var(--background-primary));
    border-color: rgb(var(--text-primary));
    box-shadow: none; /* taste-skill-ignore : retire une ombre du framework */
    color: rgb(var(--text-primary));
  }
}

.form-check-input:checked {
  background-color: rgb(var(--blue-primary));
  border-color: rgb(var(--blue-primary));
}

/* Onglets (connexion / inscription…) */
.tabs_glider {
  background-color: rgb(var(--background-tertiary));
  padding: 4px;
}

.tab_glider {
  font-weight: 700;
}

.glider {
  background-color: rgb(var(--background-primary));
}

/* Barre de navigation : liens en pilules */
.navbar {
  background-color: rgba(var(--background-secondary), 0.9);
}

.navbar.scrolled {
  border: none;
  box-shadow: 0 6px 20px -10px rgba(42, 35, 64, 0.35); /* taste-skill-ignore : élément flottant (menu, fenêtre, barre) */
}

.navbar .main-title {
  font-family: var(--font-family-main-title), sans-serif;
  font-weight: 800;
  color: rgb(var(--text-primary));
}

.navbar .nav-link {
  font-weight: 500;
  color: rgb(var(--text-primary));
  background-color: rgb(var(--background-primary));
  border-radius: 999px;
  padding: 0.5rem 1.1rem !important;
  margin-inline: 3px;
  transition: background-color 0.15s ease, color 0.15s ease;

  &:hover {
    background-color: rgb(var(--background-tertiary));
    color: rgb(var(--text-primary));
  }
}

/* Page courante : pilule foncée */
#page-mots_denfants .nav-link[href$="/mots_denfants"],
#page-liste_des_enfants .nav-link[href$="/mots_denfants"],
#page-calendrier .nav-link[href$="/calendrier"],
#page-donnees .nav-link[href="#"],
#page-informations_sur_un_membre .nav-link[href="#"],
#page-arbre_familial .nav-link[href="#"] {
  background-color: rgb(var(--blue-primary));
  color: rgb(var(--background-secondary));
}

@media (max-width: 1199px) {
  .navbar-collapse {
    background-color: rgba(var(--background-secondary), 0.97);
  }

  .navbar .nav-link {
    display: inline-block;
    font-size: 1.2rem;
    margin-block: 4px;
  }
}

/* Menus déroulants et fenêtres */
.dropdown-menu {
  background-color: rgb(var(--background-primary));
  border: none;
  border-radius: 22px;
  box-shadow: 0 16px 40px -16px rgba(42, 35, 64, 0.4); /* taste-skill-ignore : élément flottant (menu, fenêtre, barre) */
  padding: 0.5rem;
}

.dropdown-item {
  border-radius: 14px;

  &:hover,
  &:focus {
    background-color: rgb(var(--pastel-citron));
    color: rgb(var(--text-primary));
  }
}

.dropdown-divider {
  border-top: 2px solid rgb(var(--background-tertiary));
  opacity: 1;
}

.modal-content {
  background-color: rgb(var(--background-secondary));
  border: none;
  border-radius: var(--border-radius);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.45); /* taste-skill-ignore : élément flottant (menu, fenêtre, barre) */
}

.modal-header {
  border-bottom: none;

  & .modal-title {
    font-weight: 800;
  }
}

.modal-footer {
  border-top: none;
}

/* Barre du bas (mobile) */
.bottomMenu {
  background-color: rgba(var(--background-primary), 0.95);
  border: none;
  box-shadow: 0 10px 30px -10px rgba(42, 35, 64, 0.45); /* taste-skill-ignore : élément flottant (menu, fenêtre, barre) */
  color: rgb(var(--text-primary));
}

/* Pied de page */
.footer {
  background: transparent;
  color: rgb(var(--text-secondary));

  & a {
    color: rgb(var(--text-secondary));
  }

  & a:hover {
    color: rgb(var(--red-primary));
  }
}

/* Accueil : une couleur par carte */
.buttonFamilyTree {
  cursor: pointer;
}

#page-accueil {
  & #col1mainPage .card {
    background-color: rgb(var(--pastel-ciel));
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.6;
  }

  & #col3mainPage .card {
    background-color: rgb(var(--pastel-menthe));
  }

  & #col4mainPage .card {
    background-color: rgb(var(--pastel-peche));
  }

  & #col3mainPage .btn-round {
    background-color: rgb(var(--background-primary));
    border-radius: var(--radius-petit) !important;

    &:hover {
      transform: translateY(-2px);
    }
  }

  & #col3mainPage .dropdown .btn-round {
    background-color: transparent;
  }

  & .input_google.form_field,
  & .input_google {
    background: rgb(var(--background-secondary)) !important;
    border: 2px solid transparent !important;
    border-radius: 999px !important;
    box-shadow: none !important; /* taste-skill-ignore : retire une ombre du framework */
    padding-inline: 1.1rem;

    &:focus {
      border-color: rgb(var(--text-primary)) !important;
    }
  }

  & #search_form .btn-primary {
    margin-top: 0.5rem !important;
  }

  & .wallpaperFeast {
    color: rgb(var(--text-primary));
    opacity: 0.12;
  }
}

/* Carte « Bientôt la fête » : prochains anniversaires */
.birthdays-card {
  position: relative;
}

.birthdays {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.birthdays h3 {
  margin-bottom: 0.2rem;
}

.birthdays-today {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin: 0;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-petit);
  background-color: rgb(var(--yellow-primary));
  color: #2a2340;
  font-weight: 700;
  line-height: 1.4;

  & svg {
    flex: none;
    margin-top: 2px;
  }
}

.birthdays-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.birthday {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-petit);
  background-color: rgb(var(--background-primary));
  color: rgb(var(--text-primary));
  text-decoration: none;
  transition: transform 0.15s ease;

  &:hover {
    color: rgb(var(--text-primary));
    transform: translateX(3px);
  }
}

.birthday-date {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background-color: rgb(var(--pastel-ciel));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.birthday-day {
  font-size: 1.15rem;
  font-weight: 800;
}

.birthday-month {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.birthday-now .birthday-date {
  background-color: rgb(var(--yellow-primary));
  color: #2a2340;
}

.birthday-avatar {
  flex: none;
}

.birthday-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.birthday-name {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.birthday-detail {
  font-size: 0.85rem;
  color: rgb(var(--text-secondary));
}

.birthdays-empty {
  margin: 0;
  color: rgb(var(--text-secondary));
}

/* Mots d'enfants : chaque mot sur une feuille d'école (Seyès) */
#page-mots_denfants [id^="col_word"] > .card {
  background-color: rgb(var(--seyes-paper));
  background-image: linear-gradient( /* taste-skill-ignore : réglure Seyès demandée */
      90deg,
      transparent 47px,
      rgb(var(--seyes-margin)) 47px,
      rgb(var(--seyes-margin)) 49px,
      transparent 49px
    ),
    repeating-linear-gradient( /* taste-skill-ignore : réglure Seyès */
      0deg,
      transparent 0,
      transparent 31px,
      rgb(var(--seyes-line)) 31px,
      rgb(var(--seyes-line)) 32px
    ),
    repeating-linear-gradient( /* taste-skill-ignore : réglure Seyès */
      0deg,
      transparent 0,
      transparent 7px,
      rgb(var(--seyes-subline)) 7px,
      rgb(var(--seyes-subline)) 8px
    ),
    repeating-linear-gradient( /* taste-skill-ignore : réglure Seyès */
      90deg,
      transparent 0,
      transparent 31px,
      rgb(var(--seyes-subline)) 31px,
      rgb(var(--seyes-subline)) 32px
    );
  border-radius: 6px;
  padding-left: 72px !important;

  & .font-110 {
    display: block;
    font-size: 1.35rem !important;
    font-weight: 700;
    line-height: 32px;
    padding-top: 4px;
  }

  & hr {
    border-top-color: rgba(var(--text-primary), 0.12);
  }

  & .form-control {
    background-color: rgb(var(--background-primary));
  }
}
