/* base.css */
@import url('https://api.fontshare.com/v2/css?f[]=satoshi@400,500,700&display=swap');

:root {
  --vinted-color: #008c8c;
  --light-bg: #f1fafa;
  --cta-color: #008c8c;
  --gray-text: #555;
  --font-base: 'Satoshi', 'Inter', 'Helvetica Neue', Helvetica, sans-serif;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

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

main {
  flex: 1; /* pousse le footer vers le bas quand le contenu est court */
}

body {
  font-family: var(--font-base);
  background-color: white;
  margin: 0;
  padding: 0;
  color: #222;
}

.alert-counter {
  position: absolute;
  top: 10px;
  right: 80px; /* espace entre la cloche et le burger */
  font-weight: bold;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  z-index: 10;
  transition: transform 0.2s ease;
  color: white;
  background-color: var(--vinted-color);
  margin-right: 1rem;
  height: 36px;
  line-height: 1;
}

header > .alert-counter {
  margin-top: 4px; /* ajuste finement si besoin */
}

/*
.alert-counter {
  font-weight: bold;
  color: white;
  background-color: var(--vinted-color);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
  margin-right: 1rem;
  height: 36px;
  line-height: 1;
}
*/

.alert-counter:hover {
  transform: scale(1.05);
}

.alert-counter.low {
  background-color: var(--vinted-color);
}

.alert-counter.medium {
  background-color: #f0a202; /* orange clair */
}

.alert-counter.full {
  background-color: #d00; /* rouge vif */
}

.burger-menu {
  position: relative;
}

.burger-button {
  background-color: var(--vinted-color);
  color: white;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
}

.burger-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: white;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 0.5rem;
  width: 220px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.burger-dropdown.show {
  display: block;
}

.burger-dropdown a,
.burger-dropdown form button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  text-decoration: none;
  color: var(--vinted-color);
  background: white;
  border: none;
  border-left: 4px solid transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-base);
  transition: background 0.2s ease, border-color 0.2s ease;
  box-sizing: border-box; /* ← corrige le débordement */
}

.burger-dropdown a:hover,
.burger-dropdown form button:hover {
  background-color: var(--light-bg);
  border-left: 4px solid var(--vinted-color);
  font-weight: bold;
}

.burger-dropdown i {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
  width: 100%;
  box-sizing: border-box;
}

header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 75px;
    padding: 0 1rem;
    background-color: rgba(255, 255, 255, 0.75); /* semi-transparent */
    backdrop-filter: blur(10px);                   /* effet flou */
    -webkit-backdrop-filter: blur(10px);           /* pour Safari */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);   /* légère ombre */
    border-bottom: none;                           /* supprime la bordure */
}

header h1 {
    font-family: var(--font-base);
    color: var(--vinted-color);
    font-size: 1.5rem;
}

main {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    padding: 3rem 5vw 2rem;  /* ↑ haut, → côtés (vw = %) , ↓ bas */
    margin-top: 2rem;         /* espace entre header et le bloc principal */
}

.cta {
  background-color: var(--vinted-color);
  color: white;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
}

.centered {
  text-align: center;
}

.centered-cta {
  display: block;
  width: max-content;
  margin: 1.5rem auto 0;
  background-color: var(--cta-color);
  color: white;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  text-decoration: none;
}

footer {
  font-size: 0.9rem;
  border-top: 1px solid #eee;
  background: linear-gradient(to bottom, var(--light-bg), white);
  padding: 2rem 1rem;
}

.footer-content {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  text-align: center;
  position: relative;
}

.footer-left {
  position: absolute;
  left: 1rem;
}

.footer-center {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-center a {
  color: var(--gray-text);
  text-decoration: none;
  font-weight: 500;
}

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

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo {
  height: 150px;
  width: auto;
}

@media (max-width: 600px) {
    .logo {
      height: 90px;
    }
  }

.logo-footer {
  height: 135px;
  width: auto;
}

@media (max-width: 600px) {
  .logo-footer {
    height: 85px;
  }
}
  
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
    margin-top: 1.5rem;
}

.login-form input {
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
}

.login-form input:focus {
    border-color: var(--vinted-color);
    outline: none;
}

.nav-links a.login-link {
  color: var(--gray-text);
  text-decoration: none;
  margin-right: 0.5rem;
  font-weight: 500;
}

.message {
  text-align: center;
  color: red;
  font-weight: bold;
}

.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  background-color: white;
  color: var(--vinted-color);
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  border: 1px solid var(--vinted-color);
  font-weight: bold;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
}

.toast.error {
  border-left: 5px solid #d00;
  color: #d00;
}

/* === Modal de confirmation ou de renommage === */
.modal-fixed {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  top: 40px; /* même hauteur que les toast */
}

.modal-box {
  background: white;
  border: 1px solid var(--vinted-color);
  border-radius: 12px;
  padding: 1.25rem 2rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  text-align: center;
  max-width: 400px;
  margin: 0 auto;
  animation: fadeIn 0.3s ease;
}

.modal-box p {
  margin-bottom: 1.25rem;
  font-weight: bold;
  color: var(--vinted-color);
}

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

.modal-actions .cta {
  padding: 0.5rem 1.25rem;
}


/* === Boutons === */
.cta {
  background-color: var(--vinted-color);
  color: white;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  font-weight: bold;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  text-align: center;
}

.small-button {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  width: 100%;
  max-width: 300px;
  margin: 1rem auto 0;
  display: block;
}

.form-button {    /* Cette classe reproduit exactement le style de form .cta mais est indépendante de la structure HTML. */
  width: 100%;
  max-width: 400px;
  padding: 0.75rem;
  font-size: 0.95rem;
  border-radius: 8px;
  display: block;
  margin: 1rem auto 0;
  box-sizing: border-box;
}

/* === Champs de formulaire === */
.input-base {
  font-family: var(--font-base);
  font-size: 1rem;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: white;
  width: 100%;
  box-sizing: border-box;
}

.input-base:focus {
  border-color: var(--vinted-color);
  outline: none;
}

/* === Infobulle === */
.tooltip {
  position: relative;
  cursor: help;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: white;
  color: var(--vinted-color);
  font-size: 0.75rem;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  border: 1px solid var(--vinted-color);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.tooltip:hover::after {
  opacity: 1;
}

/* === Badge générique (plan actuel, recommandé) === */
.badge {
  text-align: center;
  position: absolute;
  top: -1rem;
  left: 50%;
  transform: translateX(-50%);
  background-color: white;
  color: var(--vinted-color);
  font-weight: bold;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
  font-size: 0.85rem;
  border: 1px solid var(--vinted-color);
}

/* === Spinner === */
.spinner {
  margin: 2rem auto;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--vinted-color);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* === Cadres contenant des listes === */
.select-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.4rem 0;
}

.select-wrapper select {
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: var(--font-base);
  min-width: 250px;
  color: #333;
}

/* === Liste déroulante === */
.dropdownlist-select {
    width: 100%;
    min-width: 250px;
    max-width: 350px;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    color: var(--vinted-color);
    box-sizing: border-box;
}

.dropdownlist-select:focus {
    border-color: var(--vinted-color);
    outline: none;
}
