/* ====================================================================
   DUO (Nous) — Feuille de Style Mobile-First & Design System Référentiel
   Fidèle au Storyboard Référentiel (French Couples App UI Storyboard.png)
   ==================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Palette Visuelle */
  --bg-app: #FFF8F6;
  --bg-card: #FFFFFF;
  --bg-card-subtle: #FDF2F4;
  --bg-banner: #FDE8EC;
  --bg-phone-bezel: #1C1917;

  /* Couleurs de Marque & Actions */
  --primary-deep: #A61B44;
  --primary-hover: #8C1438;
  --primary-light: #FFF0F3;
  --primary-accent: #E11D48;

  /* Typographie & Contraste */
  --text-main: #2D1F23;
  --text-muted: #7A666C;
  --text-light: #A39297;

  /* Accents Métiers */
  --accent-streak: #F59E0B;
  --accent-streak-bg: #FEF3C7;
  --accent-flight: #0284C7;
  --accent-flight-bg: #E0F2FE;
  --accent-calendar: #10B981;
  --accent-calendar-bg: #D1FAE5;
  --accent-deep-q: #8B5CF6;
  --accent-deep-q-bg: #EDE9FE;
  --border-card: #F4E5E8;
  --shadow-card: 0 4px 18px rgba(166, 27, 68, 0.05);

  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background: #F4ECE9; /* Fond chaleureux et doux sur grand écran */
  color: var(--text-main);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}

/* Conteneur Mobile de l'Application */
.device-wrapper {
  width: 100%;
  max-width: 430px;
  height: 100vh;
  height: 100dvh;
  background: var(--bg-app);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (min-width: 601px) {
  body {
    padding: 20px 0;
  }
  .device-wrapper {
    height: 92vh;
    max-height: 890px;
    border-radius: 36px;
    box-shadow: 0 16px 48px rgba(166, 27, 68, 0.08);
    border: 1px solid var(--border-card);
  }
}

@media (max-width: 600px), (display-mode: standalone) {
  body {
    background: var(--bg-app);
    padding: 0;
    margin: 0;
    display: flex;
  }
  .device-wrapper {
    max-width: 100%;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
    box-shadow: none;
    border: none;
  }
  .tab-bar {
    padding-bottom: max(14px, env(safe-area-inset-bottom));
    height: calc(64px + env(safe-area-inset-bottom));
  }
}

/* Zone d'Affichage Défilante des Écrans */
.screen-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  padding-bottom: 84px; /* Espace pour la Tab Bar */
  scroll-behavior: smooth;
}

.screen-container::-webkit-scrollbar {
  display: none;
}

/* Écrans Individuels */
.app-screen {
  display: none;
  animation: fadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  min-height: 100%;
  padding: 12px 18px 24px;
}

.app-screen.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* En-tête Commun des Écrans */
.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  min-height: 42px;
}

.header-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: background 0.15s;
}

.header-btn:hover {
  background: rgba(166, 27, 68, 0.08);
}

.screen-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
  flex: 1;
}

/* Tab Bar Inférieure (5 Boutons) */
.tab-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 76px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-card);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 12px 20px;
  z-index: 40;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.18s;
  flex: 1;
}

.tab-item svg {
  width: 22px;
  height: 22px;
  transition: transform 0.18s, color 0.18s;
}

.tab-item.active {
  color: var(--primary-deep);
}

.tab-item.active svg {
  transform: translateY(-2px);
  stroke-width: 2.3;
}

/* Cartes Génériques & Boutons */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
}

.btn-primary {
  width: 100%;
  background: var(--primary-deep);
  color: #FFFFFF;
  border: none;
  border-radius: 28px;
  padding: 15px 20px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(166, 27, 68, 0.25);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  width: 100%;
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-card);
  border-radius: 28px;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-secondary:hover {
  background: rgba(166, 27, 68, 0.04);
}

/* Onglets en Pilules (Segmented Controls) */
.pill-tabs {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  padding: 4px;
  margin-bottom: 16px;
  gap: 4px;
}

.pill-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  text-align: center;
}

.pill-tab.active {
  background: var(--primary-deep);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(166, 27, 68, 0.2);
}

/* Formulaires & Champs */
.input-group {
  margin-bottom: 14px;
}

.input-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.input-field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-light);
  font-size: 16px;
}

.input-field {
  width: 100%;
  padding: 13px 14px 13px 42px;
  border-radius: 14px;
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  font-size: 15px;
  font-family: inherit;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-field:focus {
  border-color: var(--primary-deep);
  box-shadow: 0 0 0 3px rgba(166, 27, 68, 0.1);
}

/* -------------------------------------------------------------
   ÉCRAN 1 : SPLASH / ACCUEIL
   ------------------------------------------------------------- */
#screen-1 {
  padding: 0;
  position: relative;
  background: #000;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.splash-hero-bg {
  position: absolute;
  inset: 0;
  background: url('https://images.unsplash.com/photo-1516589178581-6cd7833ae3b2?auto=format&fit=crop&w=800&q=80') center/cover no-repeat;
  filter: brightness(0.92);
}

.splash-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,248,246,0.92) 0%, rgba(255,248,246,0.2) 35%, rgba(0,0,0,0.4) 65%, rgba(0,0,0,0.85) 100%);
}

.splash-top {
  position: relative;
  z-index: 10;
  padding: 30px 24px 0;
  text-align: center;
}

.splash-logo-circle {
  width: 58px;
  height: 58px;
  background: #FFFFFF;
  border-radius: 50%;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(166, 27, 68, 0.15);
}

.splash-logo-circle svg {
  width: 32px;
  height: 32px;
  fill: var(--primary-deep);
}

.splash-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary-deep);
  letter-spacing: -0.5px;
}

.splash-subtitle {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-deep);
  opacity: 0.9;
}

.splash-bottom {
  position: relative;
  z-index: 10;
  padding: 30px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.splash-btn-already {
  color: #FFFFFF;
  background: transparent;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* -------------------------------------------------------------
   ÉCRAN 3 : LIER LE COUPLE
   ------------------------------------------------------------- */
.link-couple-art {
  width: 140px;
  height: 140px;
  margin: 10px auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-banner);
}

.link-couple-code-box {
  background: var(--bg-card);
  border: 1px dashed var(--primary-deep);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0;
}

.code-digits {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 5px;
  color: var(--primary-deep);
}

/* -------------------------------------------------------------
   ÉCRAN 4 : TABLEAU DE BORD (DASHBOARD)
   ------------------------------------------------------------- */
.dash-banner {
  background: var(--bg-banner);
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  border: 1px solid rgba(166, 27, 68, 0.12);
}

.dash-banner-txt {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-deep);
  line-height: 1.4;
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.dash-tile {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s, box-shadow 0.18s;
}

.dash-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(166, 27, 68, 0.09);
}

.tile-icon-box {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tile-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}

.streak-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.streak-info h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}

.streak-info p {
  font-size: 12px;
  color: var(--text-muted);
}

.streak-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 15px;
  font-weight: 800;
  color: var(--accent-streak);
}

/* -------------------------------------------------------------
   ÉCRAN 9 : JOURNAL PARTAGÉ
   ------------------------------------------------------------- */
.journal-item {
  background: var(--bg-card);
  border-radius: 20px;
  border: 1px solid var(--border-card);
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: var(--shadow-card);
}

.journal-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.journal-content {
  padding: 16px;
}

.journal-date {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.journal-note {
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.45;
}

.fab-add {
  position: fixed;
  bottom: 90px;
  right: calc(50% - 180px);
  width: 52px;
  height: 52px;
  background: var(--primary-deep);
  color: #fff;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(166, 27, 68, 0.35);
  z-index: 45;
  transition: transform 0.2s;
}

@media (max-width: 500px) {
  .fab-add {
    right: 20px;
  }
}

.fab-add:hover {
  transform: scale(1.06);
}

/* -------------------------------------------------------------
   ÉCRAN 14 : SUIVI DE L'HUMEUR
   ------------------------------------------------------------- */
.mood-picker {
  display: flex;
  justify-content: space-between;
  margin: 18px 0;
}

.mood-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: var(--bg-card);
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
}

.mood-btn:hover, .mood-btn.selected {
  transform: scale(1.18);
  border-color: var(--primary-deep);
  box-shadow: 0 4px 12px rgba(166, 27, 68, 0.2);
}

.week-mood-row {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
}

.day-mood-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.day-mood-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-card-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.day-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

/* -------------------------------------------------------------
   ÉCRAN 18 : CENTRE DE NOTIFICATIONS AUTHENTIQUE
   ------------------------------------------------------------- */
.notif-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 14px 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--border-card);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.notif-card:hover {
  background: var(--bg-card-subtle);
  transform: translateY(-1px);
}

.notif-card.unread {
  background: #FFFDFD;
  border-color: #F8D7DD;
}

.notif-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.notif-content {
  flex: 1;
}

.notif-header-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.notif-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.notif-timestamp {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 500;
}

.notif-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

.unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-deep);
  position: absolute;
  top: 14px;
  right: 12px;
}
