/* ==========================================================
   Devica — site vitrine (visiteurs non connectés)
   À charger après style.css.
   ========================================================== */

.site {
  background: #fff;
  font-size: 16px;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

.container--narrow {
  max-width: 820px;
}

.icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ---------- En-tête ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid transparent;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 64px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.site-brand img {
  height: 38px;
  width: auto;
}

.site-brand--small {
  font-size: 19px;
}

.site-brand--small img {
  height: 28px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-nav__login {
  display: inline-flex;
  justify-content: center;
  color: var(--color-text-soft);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav__login:hover {
  color: var(--color-text);
}

.site-nav__signup {
  display: none; /* mobile : le bouton de l'accroche suffit */
  width: auto;
  height: 38px;
  padding: 0 14px;
  font-size: 14px;
  white-space: nowrap;
  text-decoration: none;
}

.lang-switch {
  display: inline-flex;
  padding: 2px;
  border-radius: 8px;
  background: #f1f4f8;
}

.lang-switch button {
  min-width: 32px;
  height: 28px;
  padding: 0 6px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--color-text-muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.lang-switch button[aria-pressed="true"] {
  background: #fff;
  color: var(--color-text);
  box-shadow: 0 1px 3px rgba(11, 27, 58, 0.12);
}

.lang-switch button:focus-visible,
.site-brand:focus-visible,
.site-nav__login:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- Boutons d'appel ---------- */

.cta-button {
  display: inline-flex;
  gap: 10px;
  width: auto;
  height: 52px;
  padding: 0 24px;
  font-size: 16px;
  text-decoration: none;
  box-shadow: 0 10px 24px -12px rgba(10, 122, 255, 0.7);
}

.cta-button .icon {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
  transition: transform 0.15s;
}

.cta-button:hover .icon {
  transform: translateX(3px);
}

/* ---------- Accroche ---------- */

.hero {
  padding: 32px 0 56px;
  overflow: hidden;
}

.hero__inner {
  display: grid;
  gap: 40px;
  align-items: center;
}

.hero__title {
  margin: 0;
  font-size: clamp(36px, 9vw, 60px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.hero__lead {
  max-width: 34ch;
  margin: 18px 0 0;
  font-size: 18px;
  line-height: 1.55;
  color: var(--color-text-soft);
}

.hero__cta {
  margin-top: 28px;
}

.hero__note {
  margin: 12px 0 0;
  font-size: 13.5px;
  color: var(--color-text-muted);
}

/* Captures de l'app dans des cadres d'appareils (dessinés en CSS) */
.hero__visual {
  position: relative;
  padding: 0 0 8% 0;
}

.device-laptop__screen {
  padding: 2.2% 2.2% 0;
  border-radius: 14px 14px 0 0;
  background: #0f172a;
  box-shadow: 0 30px 60px -30px rgba(11, 27, 58, 0.45);
}

.device-laptop__screen img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px 4px 0 0;
}

.device-laptop__base {
  height: 14px;
  margin: 0 -6%;
  border-radius: 0 0 14px 14px;
  background: linear-gradient(#cbd3df, #9aa5b5);
}

.device-phone {
  position: absolute;
  right: -2%;
  bottom: 0;
  width: 26%;
  padding: 1.6%;
  border-radius: 22px;
  background: #0f172a;
  box-shadow: 0 24px 48px -20px rgba(11, 27, 58, 0.55);
}

.device-phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}

/* ---------- Sections ---------- */

.section {
  padding: 64px 0;
}

.section--tinted {
  background: #f6f8fc;
}

.section--last {
  padding-top: 16px;
}

.section__title {
  margin: 0;
  font-size: clamp(26px, 5vw, 36px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-align: center;
}

.section__title--left {
  text-align: left;
}

.section__lead {
  max-width: 56ch;
  margin: 12px auto 0;
  font-size: 17px;
  color: var(--color-text-muted);
  text-align: center;
}

/* Après .section__lead, sinon le centrage reprend le dessus (même spécificité). */
.section__lead--left {
  margin-left: 0;
  text-align: left;
}

/* Fonctions */
.features {
  display: grid;
  gap: 16px;
  margin-top: 36px;
}

.feature {
  padding: 28px 24px;
  border: 1px solid #e6ebf2;
  border-radius: 16px;
  background: #fff;
  text-align: center;
}

.feature__icon {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
}

.feature__icon .icon {
  width: 26px;
  height: 26px;
}

.feature__icon--green { background: #e6f6ec; color: #16a34a; }
.feature__icon--blue { background: #eaf2ff; color: var(--color-primary); }
.feature__icon--purple { background: #f1ecff; color: #7c3aed; }

.feature__title {
  margin: 16px 0 6px;
  font-size: 19px;
  font-weight: 700;
}

.feature__text {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.55;
}

/* Fait pour la Suisse */
.swiss {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 16px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.swiss__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.swiss__item strong {
  margin-top: 8px;
  font-size: 15.5px;
}

.swiss__item span:last-child {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.swiss__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #eaf2ff;
  color: var(--color-primary);
  font-size: 22px;
  font-weight: 800;
}

.swiss__icon--text {
  font-size: 15px;
  letter-spacing: 0.02em;
}

/* ---------- Au moment des comptes ---------- */

.section__eyebrow {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
  text-align: center;
}

.accounts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.account {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 28px 24px;
  border: 1px solid #e6ebf2;
  border-radius: 18px;
  background: #fff;
}

.account--blue {
  background: linear-gradient(170deg, #f4f8ff 0%, #ffffff 55%);
}

.account--green {
  background: linear-gradient(170deg, #f2fbf5 0%, #ffffff 55%);
}

.account__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #eaf2ff;
  color: var(--color-primary);
}

.account--green .account__icon {
  background: #e6f6ec;
  color: #16a34a;
}

.account__icon .icon {
  width: 26px;
  height: 26px;
}

.account__title {
  margin: 18px 0 6px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.account__text {
  margin: 0;
  font-size: 16px;
  color: var(--color-text-muted);
}

/* L'illustration occupe la place restante pour que les deux listes
   de puces restent alignées d'une carte à l'autre. */
.account__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 0;
  margin-top: 22px;
  padding: 18px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 1px 2px rgba(11, 27, 58, 0.06), 0 12px 28px -22px rgba(11, 27, 58, 0.5);
}

.account .checks {
  margin-top: 22px;
}

.account--green .checks li::before {
  border-color: #16a34a;
}

/* Illustration de l'export : une facture qui devient un fichier CSV */
.export-visual {
  gap: 10px;
  min-width: 0;
}

.paper {
  flex: 1;
  min-width: 0;
  max-width: 210px;
  padding: 12px 14px;
  border: 1px solid #e9eef6;
  border-radius: 8px;
  background: #fff;
}

.paper__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.paper__title {
  font-size: 12.5px;
  font-weight: 700;
}

.paper__number {
  font-size: 10px;
  color: var(--color-text-muted);
}

.paper__lines {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
}

.paper__lines span {
  height: 6px;
  border-radius: 3px;
  background: #eef2f7;
}

.paper__lines span:nth-child(3),
.paper__lines span:nth-child(6) {
  width: 60%;
}

.export-visual__arrow {
  width: 38px;
  height: 24px;
  flex-shrink: 0;
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.file {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  width: 84px;
  padding: 14px 10px;
  border: 1px solid #e9eef6;
  border-radius: 8px;
  background: #fff;
}

.file__badge {
  padding: 4px 9px;
  border-radius: 5px;
  background: #16a34a;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.file__lines {
  display: grid;
  gap: 5px;
  width: 100%;
}

.file__lines span {
  height: 5px;
  border-radius: 3px;
  background: #eef2f7;
}

.file__lines span:last-child {
  width: 65%;
}

/* Sur petit écran l'illustration doit tenir : on la resserre et on retire
   le numéro de facture, qui partait sur trois lignes. */
@media (max-width: 479px) {
  .export-visual {
    gap: 8px;
  }

  .paper__number {
    display: none;
  }

  .export-visual__arrow {
    width: 28px;
  }

  .file {
    width: 70px;
    padding: 12px 8px;
  }

  /* Le tableau doit rester dans son cadre, y compris avec les mots allemands. */
  .account__visual {
    padding: 16px 8px;
  }
}

/* Tableau TVA */
.vat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.vat-table th,
.vat-table td {
  padding: 9px 6px;
  text-align: left;
}

.vat-table td {
  white-space: nowrap;
}

.vat-table th {
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text-muted);
  border-bottom: 1px solid #eef2f7;
}

.vat-table tbody td {
  border-bottom: 1px solid #f4f7fb;
}

.vat-table__total td {
  border-bottom: 0;
  font-weight: 800;
}

/* Placé après les règles ci-dessus : une media query n'ajoute pas de priorité. */
@media (max-width: 479px) {
  .vat-table {
    font-size: 12.5px;
  }

  .vat-table th,
  .vat-table td {
    padding: 8px 3px;
  }
}

/* Étapes */
.steps {
  display: grid;
  gap: 20px;
  max-width: 980px;
  margin: 36px auto 0;
  padding: 0;
  list-style: none;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.step strong {
  display: block;
  font-size: 17px;
}

.step p {
  margin: 4px 0 0;
  color: var(--color-text-muted);
}

.step__number {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 800;
}

/* Rendu */
.result {
  display: grid;
  gap: 40px;
  align-items: center;
}

.checks {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.checks li {
  position: relative;
  padding-left: 30px;
  color: var(--color-text-soft);
}

.checks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 5px;
  width: 14px;
  height: 8px;
  border-left: 2.5px solid var(--color-primary);
  border-bottom: 2.5px solid var(--color-primary);
  transform: rotate(-45deg);
}

.checks--center {
  width: fit-content;
  margin: 20px auto 28px;
  text-align: left;
}

.result__paper {
  margin: 0;
  padding: 0;
  transform: rotate(1.2deg);
}

.result__paper img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #e3e8ef;
  border-radius: 6px;
  box-shadow: 0 30px 60px -30px rgba(11, 27, 58, 0.4);
}

/* Prix */
.prices {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  max-width: 820px;
  margin: 36px auto 0;
}

.price {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 28px 24px;
  border: 1px solid #e6ebf2;
  border-radius: 20px;
  background: #fff;
  text-align: center;
}

.price--premium {
  border-color: #cfe1ff;
  box-shadow: 0 20px 50px -30px rgba(10, 90, 240, 0.45);
}

.price__badge {
  display: inline-block;
  align-self: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: #f1f4f8;
  color: var(--color-text-soft);
  font-size: 13px;
  font-weight: 700;
}

.price__badge--premium {
  background: #eaf2ff;
  color: var(--color-primary);
}

.price__amount {
  margin: 12px 0 0;
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.price__period {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0;
}

.price__text {
  margin: 4px 0 0;
  color: var(--color-text-muted);
}

/* Les listes restent alignées d'une offre à l'autre, le bouton reste en bas. */
.price .checks {
  flex: 1;
  margin: 24px 0 0;
  text-align: left;
}

.price__cta {
  width: 100%;
  margin-top: 24px;
  text-decoration: none;
}

/* Bouton secondaire : app.css n'est pas chargé sur le site vitrine. */
.price__cta--free {
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-text);
}

.price__cta--free:hover {
  background: var(--color-bg);
  border-color: var(--color-border-strong);
}


/* Questions */
.faq {
  display: grid;
  gap: 10px;
  margin-top: 32px;
}

.faq details {
  border: 1px solid #e6ebf2;
  border-radius: 12px;
  background: #fff;
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--color-text-soft);
  border-bottom: 2px solid var(--color-text-soft);
  transform: rotate(45deg);
  transition: transform 0.15s;
}

.faq details[open] summary::after {
  transform: rotate(-135deg);
}

.faq summary:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
  border-radius: 12px;
}

.faq details p {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--color-text-soft);
  line-height: 1.6;
}

/* Dernier appel */
.final-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 32px 28px;
  border-radius: 20px;
  background: linear-gradient(120deg, #eaf2ff, #f5f9ff);
}

.final-cta__title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.final-cta__text {
  margin: 6px 0 0;
  color: var(--color-text-muted);
}

/* ---------- Pied de page ---------- */

.site-footer {
  padding: 32px 0 calc(32px + env(safe-area-inset-bottom));
  border-top: 1px solid #eef1f5;
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.site-footer__links a {
  color: var(--color-text-muted);
  font-size: 14px;
  text-decoration: none;
}

.site-footer__links a:hover {
  color: var(--color-text);
}

.site-footer__made {
  margin: 0;
  font-size: 14px;
  color: var(--color-text-muted);
}

/* ==========================================================
   Tablette et ordinateur
   ========================================================== */

@media (min-width: 640px) {
  .site-nav__signup {
    display: inline-flex;
  }

  .features {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .swiss {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .accounts,
  .prices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .vat-table th {
    white-space: nowrap;
  }

  .account {
    padding: 32px 28px;
  }

  .final-cta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 40px 44px;
  }
}

@media (min-width: 900px) {
  .container {
    padding: 0 32px;
  }

  .hero {
    padding: 56px 0 88px;
  }

  .hero__inner {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 48px;
  }

  .section {
    padding: 88px 0;
  }

  .swiss {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
  }

  .result {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 64px;
  }

  .result__paper {
    max-width: 520px;
    justify-self: end;
  }

  .site-footer__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cta-button .icon {
    transition: none;
  }
}

/* ==========================================================
   Pages légales
   ========================================================== */

.legal {
  padding: 40px 0 72px;
}

.legal__title {
  margin: 0;
  font-size: clamp(30px, 6vw, 42px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.legal__updated {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--color-text-muted);
}

.legal__lead {
  margin: 20px 0 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--color-text-soft);
}

.legal h2 {
  margin: 44px 0 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.legal h3 {
  margin: 28px 0 0;
  font-size: 16.5px;
  font-weight: 700;
}

.legal p,
.legal li {
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text-soft);
}

.legal p {
  margin: 12px 0 0;
}

.legal ul {
  margin: 12px 0 0;
  padding-left: 22px;
}

.legal li + li {
  margin-top: 6px;
}

.legal a {
  color: var(--color-primary);
}

.legal strong {
  color: var(--color-text);
}

/* Encadré : coordonnées, avertissement */
.legal__box {
  margin: 20px 0 0;
  padding: 20px 22px;
  border: 1px solid #e6ebf2;
  border-radius: 14px;
  background: #f8fafd;
}

.legal__box p:first-child {
  margin-top: 0;
}

.legal__box--warn {
  border-color: #f5d9a8;
  background: #fff8ec;
}

.legal__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  color: var(--color-text-soft);
  font-size: 15px;
  text-decoration: none;
}

.legal__back:hover {
  color: var(--color-text);
}

.legal__back .icon {
  width: 18px;
  height: 18px;
}
