/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */
body {
  margin: 0px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.dashboard {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  font-family: "Nunito", sans-serif;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.dashboard-header h1 {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  color: var(--color-ink);
}

.title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.back-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: solid 2px var(--color-secondary);
  background: #fff;
  color: #2b1e1a; /* même teinte foncée que le titre */
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.back-button:hover {
  background: #ebe6db;
}

.children-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.child-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.5rem;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: transform 0.15s ease;
}

.child-card:hover {
  transform: translateY(-3px);
}

.child-name {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--color-ink);
}

.child-meta {
  font-size: 0.85rem;
  color: var(--color-secondary);
}

.words-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.word-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  border-radius: 12px;
  padding: 1rem 1.2rem;
  margin-bottom: 0.6rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.word-content {
  font-family: "Fredoka", sans-serif;
  font-weight: 500;
  color: var(--color-ink);
}

.word-date {
  font-size: 0.8rem;
  color: var(--color-secondary);
}

.word-actions a {
  font-size: 0.8rem;
  color: var(--color-primary);
  margin-left: 0.8rem;
  text-decoration: none;
}

.header-actions {
  display: flex;
  gap: 0.6rem;
}

.empty-state {
  text-align: center;
  color: var(--color-ink);
  opacity: 0.6;
  margin-top: 2rem;
}

.word-main {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.word-baby-version {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-primary);
}

.word-arrow {
  color: var(--color-secondary);
}

.word-real-meaning {
  font-family: "Nunito", sans-serif;
  color: var(--color-ink);
  opacity: 0.75;
}

.word-context {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--color-ink);
  opacity: 0.6;
  margin: 0.4rem 0;
}

.form-page {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.form-page h1 {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  color: var(--color-ink);
  margin-bottom: 1.5rem;
  text-align: center;
}

/* navbar */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: #faf3ea;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.navbar-logo {
  height: 32px;
}

.navbar-title {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  color: #d2691e; /* terracotta */
  font-size: 1.1rem;
}

.account-menu {
  position: relative;
}

.account-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f4f1ea;
  color: #d2691e;
  cursor: pointer;
  list-style: none;
}
.account-icon::-webkit-details-marker {
  display: none;
}

.account-dropdown {
  position: absolute;
  right: 0;
  top: 48px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  min-width: 160px;
  overflow: hidden;
  z-index: 10;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 0.6rem 1rem;
  text-align: left;
  font-family: "Nunito", sans-serif;
  color: #333;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
}
.dropdown-item:hover {
  background: #f4f1ea;
}

/* Pages légales — politique de confidentialité, CGU, suppression de compte */
.legal {
  max-width: 780px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
  font-family: "Nunito", system-ui, sans-serif;
  color: #2b1e1a;
  line-height: 1.7;
}

.legal h1 {
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 2rem;
  color: #c85c33;
  margin-bottom: 0.5rem;
}

.legal h2 {
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 1.35rem;
  color: #2b1e1a;
  margin-top: 3rem;
  margin-bottom: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid #ebe3d7;
  scroll-margin-top: 1.5rem;
}

.legal h3 {
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 1.05rem;
  color: #c85c33;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.legal h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.legal p { margin: 0 0 1rem; }
.legal ul, .legal ol { margin: 0 0 1rem; padding-left: 1.25rem; }
.legal li { margin-bottom: 0.4rem; }
.legal strong { font-weight: 700; }
.legal a { color: #c85c33; }

.legal-meta {
  color: #7a6a60;
  font-size: 0.9rem;
  margin-bottom: 2.5rem;
}

.legal-toc {
  background: #faf3ea;
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.legal-toc ol { margin: 0; padding-left: 1.25rem; }
.legal-toc li { margin-bottom: 0.3rem; }
.legal-toc a { text-decoration: none; }
.legal-toc a:hover { text-decoration: underline; }

.legal-table-wrapper {
  overflow-x: auto;
  margin: 0 0 1.5rem;
  -webkit-overflow-scrolling: touch;
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 460px;
}

.legal th {
  background: #faf3ea;
  text-align: left;
  padding: 0.6rem 0.75rem;
  font-weight: 700;
  border-bottom: 2px solid #ebe3d7;
}

.legal td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid #ebe3d7;
  vertical-align: top;
}

.legal-contact {
  background: #faf3ea;
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-top: 1rem;
}

.legal-contact p { margin-bottom: 0.25rem; }

.legal-steps {
  counter-reset: legal-step;
  list-style: none;
  padding-left: 0;
}

.legal-steps li {
  counter-increment: legal-step;
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 1rem;
}

.legal-steps li::before {
  content: counter(legal-step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: #c85c33;
  color: #fff;
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.legal-warning {
  background: #fdf0ea;
  border-left: 4px solid #c85c33;
  border-radius: 0 10px 10px 0;
  padding: 1rem 1.25rem;
  margin: 0 0 1.5rem;
}

.legal-warning p:last-child { margin-bottom: 0; }

.legal-back {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: #c85c33;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.legal-back:hover { text-decoration: underline; }

/* Repères temporaires — supprimer cette règle une fois tous les champs renseignés */
.a-completer {
  background: #fff3cd;
  padding: 0 0.25rem;
  border-radius: 3px;
}

@media (max-width: 600px) {
  .legal { padding: 1.5rem 1rem 3rem; }
  .legal h1 { font-size: 1.6rem; }
  .legal h2 { font-size: 1.2rem; margin-top: 2.25rem; }
}

/* Footer */
.site-footer {
  margin-top: 4rem;
  padding: 2rem 1.25rem;
  border-top: 1px solid #ebe3d7;
  text-align: center;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 0.85rem;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  margin-bottom: 0.75rem;
}

.site-footer-links a {
  color: #c85c33;
  text-decoration: none;
}

.site-footer-links a:hover { text-decoration: underline; }

.site-footer-credit { color: #7a6a60; margin: 0; }

