* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #f8fbff;
  color: #1f2d3d;
}

.wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  background-color: #ffffff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-weight: 1000;
  color: #005bbb;
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: baseline;
  cursor: pointer;
}

.logo-strong {
  font-weight: 200;
  color: #66aadd;
}

.app-sub,
.sample {
  font-size: 14px;
  color: #888;
  font-weight: 400;
  margin-left: 2px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

nav a {
  text-decoration: none;
  color: #1f2d3d;
  font-weight: 500;
}

nav a:hover {
  color: #005bbb;
}

@media (max-width: 768px) {
  nav {
    display: none;
  }
}

.hero {
  text-align: center;
  padding: 12rem 2rem 4rem;
  background: linear-gradient(to bottom, #e3f2fd, #f8fbff);
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 700;
  color: #003366;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1rem;
  color: #4a6078;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.search-box {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  border: 2px solid #005bbb;
  border-radius: 10px;
  overflow: hidden;
}

.search-box input {
  flex: 1;
  padding: 0.8rem;
  border: none;
  font-size: 1rem;
  outline: none;
}

.search-box button {
  background-color: #005bbb;
  color: white;
  border: none;
  padding: 0 1.5rem;
  cursor: pointer;
  font-weight: 600;
}

.search-box button:hover {
  background-color: #004a99;
}

input[type="file"] {
  font-size: 0.85rem;
  border: none;
  margin-top: 0.5rem;
  color: #003366;
  cursor: pointer;
}

.photo-btn {
  display: inline-flex;         /* inline with inputs but flex so we can center */
  align-items: center;          /* vertically center icon + text */
  vertical-align: top;       /* align with text-inputs on the same line */
  margin-top: -10px;
  background-color: #ffffff;
  color: white;
  border: none;
  padding: 0 1rem;              /* horizontal padding only */
  font-size: 1.6rem;
  cursor: pointer;
  margin-left: -0.5rem;          /* space from preceding input */
}


/* full-screen overlay */
.img-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.img-overlay img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Dans votre fichier styles.css */

.info-textarea {
  width: 100%;
  min-height: 4rem;
  margin-top: 0.5rem;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
}

.asset-updated {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: #555;
}

.storage-info {
  font-size: 0.85rem;
  color: #555;
  text-align: center;
  margin-bottom: 0.8rem;
  margin-top: -40px;
  opacity: 0.5;
}

.demo {
  padding: 5rem 3rem;
  text-align: center;
}

.demo h2 {
  font-size: 1.8rem;
  color: #003366;
  margin-bottom: 3rem;
}

.demo-list {
  max-width: 700px;
  margin: 0 auto;
  list-style: none;
  padding: 1rem;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.demo-list li {
  padding: 0.5rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.asset-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.5rem;
}

.tag-input,
.value-input {
  padding: 0.3rem 0.6rem;
  font-size: 0.85rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  min-width: 120px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  background: #cce5ff;
  color: #003366;
  padding: 0.2rem 0.6rem;
  border-radius: 5px;
  font-size: 0.75rem;
}

.add-tag-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #005bbb;
  cursor: pointer;
  padding: 0 0.5rem;
}

#groupBySection {
  padding-top: 6rem;
  margin-top: 2rem;
  display: flex;
  justify-content: left;
  max-width: 850px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

.group-inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.group-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: #003366;
  white-space: nowrap;
}

.group-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.group-btn {
  margin: 0.25rem;
  padding: 0.4rem 0.8rem;
  background: #005bbb;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 0.85rem;
  cursor: pointer;
}

.group-btn:hover {
  background: #004a99;
}

#resultBox {
  display: none;
  margin-top: 2rem;
  padding: 2rem;
  background-color: #ffffff;
  border: 2px solid #005bbb;
  border-radius: 12px;
  width: 40%;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  text-align: left;
}

#resultBox h3 {
  margin-bottom: 0.5rem;
  color: #003366;
}

#resultBox .total {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

#resultBox ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 2rem;
}

#resultBox li {
  padding: 0.25rem 0;
}

footer {
  background: #eaf1f8;
  padding: 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: #4a6078;
  margin-top: auto;
}

.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: #fff;
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
  max-width: 400px;
  width: 90%;
}

.modal-actions {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.modal-confirm {
  background-color: #e53935;
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}

.modal-confirm:hover {
  background-color: #c62828;
}

.modal-cancel {
  background-color: #ccc;
  color: #333;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 5px;
  cursor: pointer;
}

.modal-cancel:hover {
  background-color: #bbb;
}

.asset-header {
  position: relative;
  padding: 0.75rem 1rem 0.5rem;
  background: #f0f6fb;
  border-radius: 10px 10px 0 0;
  font-weight: 600;
  color: #003366;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.delete-btn {
  position: absolute;
  top: 0;
  right: 0;
  border: none;
  background-color: #e53935;
  color: white;
  border-top-right-radius: 10px;
  font-size: 1.2rem;
  font-weight: bold;
  padding: 0.75rem 0.8rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.delete-btn:hover {
  background-color: #c62828;
}

.asset-name {
  cursor: pointer;
  display: inline-block;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

.asset-name:hover {
  background-color: #e3f2fd;
}

.edit-name-input {
  font-size: 1rem;
  padding: 0.2rem 0.4rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 100%;
  max-width: 580px;
}

.manifesto-section,
#about {
  padding: 60px 20px;
  background-color: #ffffff;
}

.manifesto-container,
.subscribe-container {
  max-width: 850px;
  margin: 0 auto;
}

.manifesto-title {
  font-size: 2.2rem;
  font-weight: 600;
  color: #002855;
  margin-bottom: 1.5rem;
  text-align: left;
}

.manifesto-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #333;
  text-align: justify;
}

.manifesto-text a {
  color: #005bbb;
  text-decoration: underline;
}

.manifesto-subtitle {
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #005BBB;
}

.manifesto-block {
  margin-bottom: 2.5rem;
}

.manifesto-quote {
  font-size: 1.1rem;
  font-style: italic;
  text-align: center;
  color: #333;
}

.flag {
  font-size: 1.2rem;
}

.subscribe {
  background-color: #2e7d32;
  color: #fff;
  padding: 10px 14px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.subscribe:hover {
  background-color: #333;
  color: #fff;
  box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

.subscribe-section {
  padding: 60px 20px;
  background-color: #f8f9fb;
  text-align: center;
  border-top: 1px solid #eee;
}

.subscribe-button {
  display: inline-block;
  margin-top: 25px;
  padding: 12px 24px;
  background-color: #2e7d32;
  color: #fff;
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.subscribe-button:hover {
  background-color: #333;
}

.pricing-table {
  width: 100%;
  max-width: 800px;
  margin: 0 auto 40px;
  border-collapse: collapse;
  font-size: 0.95em;
}

.pricing-table th,
.pricing-table td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: center;
}

.pricing-table th {
  background-color: #f2f2f2;
  font-weight: bold;
}

.pricing-table td:first-child {
  text-align: left;
}

.input-alert {
  color: #e53935;
  font-size: 0.95rem;
  margin-top: 0.75rem;
  text-align: center;
  font-weight: 500;
}

@keyframes highlightInput {
  0%, 100% { background-color: #fff3f3; border-color: #e53935; }
  50% { background-color: #ffecec; border-color: #e53935; }
}

.value-highlight {
  animation: highlightInput 1.2s ease-in-out 2;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

#typewriterWord::after {
  content: '|';
  animation: blink 1s infinite;
  margin-left: 4px;
}

.faq-item {
  border-top: 1px solid #ddd;
  padding: 1rem 0;
}

.faq-question {
  background: none;
  border: none;
  font-size: 1.05rem;
  font-weight: 600;
  color: #003366;
  cursor: pointer;
  display: flex;
  align-items: center;
  width: 100%;
  text-align: justify;
  padding: 0;
  gap: 0.6rem;
  transition: color 0.2s ease;
}

.faq-question:hover {
  color: #005bbb;
}

.faq-icon {
  display: inline-block;
  font-size: 1.3rem;
  font-weight: bold;
  transition: transform 0.2s;
  color: #005bbb;
  width: 20px;
  text-align: center;
}

.faq-answer {
  margin-top: 0.5rem;
  padding-left: 1.8rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #4a6078;
  display: none;
  animation: fadeIn 0.3s ease-in-out;
  text-align: justify;
}


@media (max-width: 768px) {

  .logo {
    font-size: 2.5rem; /* au lieu de 1.5rem */
  }

  .logo-strong {
    font-size: 2rem; /* accentue visuellement "Owner" */
  }

  .app-sub {
    font-size: 0.7rem; /* légèrement plus lisible */
  }
  
  .sample{
    font-size: 0.7rem;
  }


  /* Hero & Titre ajusté */
  .demo h2 {
    font-size: 1.5rem;
    text-align: left;
    padding: 0 1rem;
  }

  .demo {
    padding: 2rem 1rem;
  }

  /* Liste des actifs */
  .demo-list {
    width: 100%;
    padding: 0.5rem;
  }

  .demo-list li {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid #ddd;
  }
  
  .delete-btn {
    position: absolute;
    top: 0;
    right: 0;
    align-self: auto;
    padding: 0.6rem 0.8rem;
    font-size: 1.45rem;
  }

  .asset-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

  .asset-header input.edit-name-input {
  flex: 1;
  max-width: calc(100% - 60px); /* espace pour le bouton supprimer */
  font-size: 1rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
}

  .asset-name {
  flex: 1;
  font-size: 1rem;
  word-break: break-word;
  }

  /* Champs de valeur et tag */
  .asset-details {
    flex-direction: column;
    align-items: stretch;
  }

  .value-input,
  .tag-input {
    width: 100%;
    min-width: unset;
    font-size: 1rem;
  }

  .tags {
    justify-content: flex-start;
    gap: 0.6rem;
  }

  /* Section de regroupement */
  #groupBySection {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem 1rem 0;
  }

  .group-inline {
    flex-direction: column;
    align-items: flex-start;
  }

  .group-label {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .group-buttons {
    width: 100%;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .group-btn {
    flex: 1 1 45%;
    font-size: 0.85rem;
    padding: 0.6rem 0.5rem;
  }

  /* Résultat & graphe */
  #resultBox {
    width: 95vw;
    border-radius: 0;
    padding: 1.2rem 1rem;
    margin: 0;
    box-shadow: none;
    margin-top: 3rem;
  }

  #resultBox canvas {
    padding-top; 50px;
    width: 100% !important;
    height: auto !important;
  }
}