
/* =========================================
   FOODBOOK — STYLE PRINCIPAL
   Thème clair : blanc et violet
   Thème sombre : noir et violet
   Interface mobile-first
========================================= */

:root {
  color-scheme: light;

  --primary: #7546d8;
  --primary-dark: #6035bd;
  --primary-light: #eee7ff;
  --primary-soft: #f6f2ff;

  --background: #f7f7fb;
  --surface: #ffffff;
  --surface-secondary: #f3f1f8;

  --text: #211b30;
  --text-secondary: #777184;
  --border: #e8e3f0;

  --success: #27855b;
  --danger: #d9435f;

  --shadow: 0 8px 28px rgba(49, 29, 89, 0.07);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;

  --app-width: 480px;
  --nav-height: 76px;
}

/* =========================================
   MODE SOMBRE
========================================= */

body.dark-mode {
  color-scheme: dark;

  --primary: #a584ff;
  --primary-dark: #8a65ef;
  --primary-light: #30234e;
  --primary-soft: #20192f;

  --background: #100e15;
  --surface: #191620;
  --surface-secondary: #231e2d;

  --text: #f5f1ff;
  --text-secondary: #b1a9c0;
  --border: #352d43;

  --success: #70d8a4;
  --danger: #ff7188;

  --shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}

/* =========================================
   RESET
========================================= */

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 14px;
  line-height: 1.5;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

img {
  display: block;
  max-width: 100%;
}

input,
textarea,
select {
  color: var(--text);
}

::selection {
  color: #ffffff;
  background: var(--primary);
}

/* =========================================
   APPLICATION
========================================= */

.app {
  position: relative;
  width: 100%;
  max-width: var(--app-width);
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: calc(var(--nav-height) + 24px);
  overflow-x: clip;
  background: var(--background);
  box-shadow: var(--shadow);
}

#main-content {
  min-width: 0;
}

/* =========================================
   HEADER
========================================= */

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 14px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background: var(--primary);
  color: #ffffff;
  font-size: 23px;
  font-weight: 800;
  box-shadow: 0 5px 14px rgba(117, 70, 216, 0.23);
}

.brand h1 {
  margin: 0;
  color: var(--text);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.7px;
}

.brand p {
  margin: 1px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
}

/* =========================================
   PAGES
========================================= */

.page {
  display: none;
  padding: 22px 18px 28px;
  animation: page-appear 0.18s ease;
}

.page.active {
  display: block;
}

@keyframes page-appear {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-heading {
  margin-bottom: 25px;
}

.page-heading h2,
.welcome h2 {
  margin: 4px 0 8px;
  color: var(--text);
  font-size: 27px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.9px;
  overflow-wrap: anywhere;
}

.page-heading > p:last-child,
.welcome > p:last-child {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
}

.eyebrow {
  margin: 0;
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.4px;
}

/* =========================================
   ACCUEIL
========================================= */

.welcome {
  margin-bottom: 22px;
}

.welcome h2 {
  max-width: 340px;
}

/* =========================================
   RECHERCHE
========================================= */

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 49px;
  margin-bottom: 25px;
  padding: 0 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  box-shadow: 0 3px 12px rgba(30, 20, 50, 0.025);
}

.search-box > span {
  color: var(--primary);
  font-size: 25px;
  line-height: 1;
}

.search-box input {
  width: 100%;
  min-width: 0;
  height: 45px;
  padding: 0;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
}

.search-box input:focus-visible {
  outline: none;
}

.search-box input::placeholder {
  color: var(--text-secondary);
}

/* =========================================
   TITRES DE SECTION
========================================= */

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 25px 0 13px;
}

.section-heading h2,
.section-heading h3 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 800;
}

.count {
  flex-shrink: 0;
  color: var(--text-secondary);
  font-size: 11px;
}

/* =========================================
   CATÉGORIES
========================================= */

.category-list {
  display: flex;
  gap: 8px;
  margin: 0 -18px;
  padding: 2px 18px 9px;
  overflow-x: auto;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.category-list::-webkit-scrollbar {
  display: none;
}

.category-chip {
  flex-shrink: 0;
  min-height: 36px;
  padding: 8px 13px;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  transition: 0.2s ease;
}

.category-chip:hover {
  border-color: var(--primary);
}

.category-chip.active {
  color: #ffffff;
  background: var(--primary);
  border-color: var(--primary);
}

/* =========================================
   LISTE DE RECETTES
========================================= */

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  min-width: 0;
}

.recipe-card {
  min-width: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 15px rgba(35, 20, 60, 0.035);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.recipe-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.recipe-card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1.25 / 1;
  overflow: hidden;
  background: var(--surface-secondary);
}

.recipe-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recipe-image-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--primary);
  background:
    radial-gradient(
      circle at 25% 25%,
      var(--surface) 0,
      transparent 60%
    ),
    var(--primary-light);
  font-size: 38px;
}

.recipe-category-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  max-width: calc(100% - 16px);
  padding: 5px 8px;
  overflow: hidden;
  color: var(--primary);
  background: var(--surface);
  border-radius: 7px;
  font-size: 9px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favorite-button {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: #ffffff;
  background: rgba(20, 15, 30, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  font-size: 21px;
  line-height: 1;
  backdrop-filter: blur(8px);
}

.favorite-button.is-favorite {
  color: #ff6d94;
  background: var(--surface);
  border-color: var(--surface);
}

.recipe-card-body {
  padding: 11px;
}

.recipe-card-title {
  display: -webkit-box;
  margin: 0 0 6px;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.recipe-card-description {
  display: -webkit-box;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.recipe-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 10px;
}

.recipe-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 10px;
}

.recipe-card-footer .btn {
  min-height: 32px;
  padding: 7px 9px;
  font-size: 11px;
}

/* =========================================
   BOUTONS
========================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease,
    border-color 0.2s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  color: #ffffff;
  background: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-secondary {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary);
}

.btn-danger {
  color: #ffffff;
  background: var(--danger);
  border-color: var(--danger);
}

.btn-danger:hover {
  filter: brightness(0.95);
}

.text-button {
  padding: 5px 0;
  color: var(--primary);
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 800;
}

.back-button {
  margin-bottom: 20px;
  padding: 9px 0;
  color: var(--primary);
  background: transparent;
  border: 0;
  font-size: 13px;
  font-weight: 800;
}

/* =========================================
   FORMULAIRES
========================================= */

#recipe-form {
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.form-group > label {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.form-group input:not([type="file"]),
.form-group textarea,
.form-group select,
.shopping-form input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 12px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.shopping-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.6;
}

.form-group input::placeholder,
.form-group textarea::placeholder,
.shopping-form input::placeholder {
  color: var(--text-secondary);
  opacity: 0.8;
}

.form-group select {
  cursor: pointer;
}

.form-group input[type="file"] {
  width: 100%;
  min-width: 0;
  padding: 10px;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 12px;
  font-size: 12px;
}

.field-help {
  margin: 0;
  color: var(--text-secondary);
  font-size: 11px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.macro-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-section-heading {
  margin: 6px 0 -4px;
}

.form-section-heading h3 {
  font-size: 15px;
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 5px;
}

.form-actions .btn {
  width: 100%;
}

.image-preview {
  display: none;
  width: 100%;
  max-height: 240px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.image-preview img {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  background: var(--surface-secondary);
}

/* =========================================
   ÉTAT VIDE
========================================= */

.empty-state {
  display: none;
  padding: 32px 18px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

.empty-state.visible {
  display: block;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 15px;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 19px;
  font-size: 30px;
}

.empty-state h3 {
  margin: 0 0 7px;
  color: var(--text);
  font-size: 16px;
}

.empty-state p {
  margin: 0 auto 17px;
  max-width: 260px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.7;
}

/* =========================================
   FAVORIS
========================================= */

#page-favorites .page-heading {
  margin-bottom: 23px;
}

/* =========================================
   DÉTAIL D'UNE RECETTE
========================================= */

.detail-cover {
  width: 100%;
  max-height: 300px;
  aspect-ratio: 1.2 / 1;
  object-fit: cover;
  overflow: hidden;
  background: var(--primary-light);
  border-radius: var(--radius-lg);
}

.detail-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 180px;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: var(--radius-lg);
  font-size: 55px;
}

.detail-title {
  margin: 18px 0 8px;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.detail-description {
  color: var(--text-secondary);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0;
}

.detail-meta-item {
  padding: 12px 7px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
}

.detail-meta-item strong {
  display: block;
  margin-bottom: 4px;
  color: var(--primary);
  font-size: 15px;
}

.detail-meta-item span {
  color: var(--text-secondary);
  font-size: 10px;
}

.detail-section {
  margin-top: 23px;
}

.detail-section h3 {
  margin: 0 0 12px;
  font-size: 17px;
}

.detail-text {
  color: var(--text-secondary);
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.detail-macros {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.macro-card {
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
}

.macro-card strong {
  display: block;
  color: var(--primary);
  font-size: 19px;
}

.macro-card span {
  color: var(--text-secondary);
  font-size: 11px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.detail-actions .btn {
  flex: 1 1 120px;
}

/* =========================================
   LISTE DE COURSES
========================================= */

.shopping-form {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 18px;
}

.shopping-form input {
  flex: 1;
  min-width: 0;
}

.shopping-form .btn {
  flex-shrink: 0;
  padding-inline: 13px;
}

.shopping-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--text-secondary);
  font-size: 12px;
}

.shopping-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.shopping-item {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
}

.shopping-item input[type="checkbox"] {
  flex-shrink: 0;
  width: 19px;
  height: 19px;
  accent-color: var(--primary);
  cursor: pointer;
}

.shopping-item-text {
  flex: 1;
  min-width: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.shopping-item.checked .shopping-item-text {
  color: var(--text-secondary);
  text-decoration: line-through;
}

.shopping-delete {
  flex-shrink: 0;
  padding: 6px 8px;
  color: var(--danger);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

/* =========================================
   PARAMÈTRES
========================================= */

.settings-group {
  margin-bottom: 16px;
  padding: 17px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.settings-group h3 {
  margin: 0 0 15px;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.setting-info {
  flex: 1;
  min-width: 0;
}

.setting-info strong {
  display: block;
  color: var(--text);
  font-size: 13px;
}

.setting-info p {
  margin: 5px 0 0;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.6;
}

.status-label {
  flex-shrink: 0;
  padding: 5px 8px;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
}

/* Interrupteur du mode sombre */

.switch {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  width: 48px;
  height: 27px;
  cursor: pointer;
}

.switch input {
  width: 0;
  height: 0;
  opacity: 0;
}

.switch-slider {
  position: absolute;
  inset: 0;
  background: #d8d2e3;
  border-radius: 50px;
  transition: background 0.2s ease;
}

.switch-slider::before {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 21px;
  height: 21px;
  content: "";
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}

.switch input:checked + .switch-slider {
  background: var(--primary);
}

.switch input:checked + .switch-slider::before {
  transform: translateX(21px);
}

.switch input:focus-visible + .switch-slider {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

.danger-zone > p {
  margin: -4px 0 15px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.7;
}

.danger-zone .btn {
  width: 100%;
}

.app-version {
  margin: 25px 0 5px;
  color: var(--text-secondary);
  font-size: 11px;
  text-align: center;
}

/* =========================================
   NAVIGATION BASSE
========================================= */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  z-index: 50;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: 100%;
  max-width: var(--app-width);
  min-height: var(--nav-height);
  padding: 7px 5px max(7px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -5px 20px rgba(25, 15, 45, 0.045);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  padding: 4px 1px;
  color: var(--text-secondary);
  background: transparent;
  border: 0;
  border-radius: 12px;
  font-size: 9px;
  font-weight: 700;
  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 27px;
  font-size: 23px;
  line-height: 1;
}

.nav-item.active {
  color: var(--primary);
}

.nav-item.active:not(.nav-add) {
  background: var(--primary-soft);
}

.nav-add-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 34px;
  margin-top: -9px;
  color: #ffffff;
  background: var(--primary);
  border-radius: 12px;
  box-shadow: 0 5px 12px rgba(117, 70, 216, 0.25);
  font-size: 27px;
  line-height: 1;
}

.nav-add.active .nav-add-icon {
  background: var(--primary-dark);
}

/* =========================================
   NOTIFICATION
========================================= */

.toast {
  position: fixed;
  bottom: calc(var(--nav-height) + 18px);
  left: 50%;
  z-index: 100;
  width: calc(100% - 36px);
  max-width: 440px;
  padding: 13px 16px;
  color: #ffffff;
  background: #302442;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* =========================================
   MODE SOMBRE : AJUSTEMENTS
========================================= */

body.dark-mode .app-header,
body.dark-mode .bottom-nav {
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.12);
}

body.dark-mode .recipe-card,
body.dark-mode .settings-group,
body.dark-mode .shopping-item,
body.dark-mode .detail-meta-item,
body.dark-mode .macro-card {
  box-shadow: none;
}

body.dark-mode .recipe-card-image-wrap {
  background: #252031;
}

body.dark-mode .recipe-image-placeholder,
body.dark-mode .detail-placeholder {
  background:
    radial-gradient(
      circle at 25% 25%,
      #302541 0,
      transparent 65%
    ),
    #21182f;
}

body.dark-mode .favorite-button {
  background: rgba(15, 12, 22, 0.7);
}

body.dark-mode .favorite-button.is-favorite {
  color: #ff7fa0;
  background: #2a2035;
  border-color: #2a2035;
}

/* =========================================
   RESPONSIVE : PETITS TÉLÉPHONES
========================================= */

@media (max-width: 360px) {
  .app-header {
    min-height: 68px;
    padding-inline: 14px;
  }

  .page {
    padding-inline: 13px;
  }

  .category-list {
    margin-inline: -13px;
    padding-inline: 13px;
  }

  .page-heading h2,
  .welcome h2 {
    font-size: 24px;
  }

  .recipe-grid {
    gap: 9px;
  }

  .recipe-card-body {
    padding: 9px;
  }

  .recipe-card-title {
    font-size: 12px;
  }

  .form-row {
    gap: 8px;
  }

  .bottom-nav {
    padding-inline: 3px;
  }

  .nav-item {
    font-size: 8px;
  }

  .nav-add-icon {
    width: 33px;
    height: 32px;
  }
}

/* =========================================
   ORDINATEUR : CONSERVATION DU FORMAT MOBILE
========================================= */

@media (min-width: 600px) {
  body {
    padding: 20px 0;
  }

  .app {
    min-height: calc(100vh - 40px);
    border: 1px solid var(--border);
    border-radius: 24px;
  }

  .app-header {
    border-radius: 24px 24px 0 0;
  }

  .bottom-nav {
    bottom: 20px;
    border-right: 1px solid var(--border);
    border-left: 1px solid var(--border);
    border-radius: 0 0 24px 24px;
  }

  .toast {
    bottom: calc(var(--nav-height) + 38px);
  }
}

/* =========================================
   ACCESSIBILITÉ
========================================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
