/* =====================================================================
   FelsWare — style.css
   Mobile-first. Semantic HTML, no layout classes.
   ===================================================================== */

/* ----- Variables ----- */
:root {
  --blue:       #4061BF;
  --blue-dark:  #2D4486;
  --blue-light: #7990D2;
  --text:       #1d1d1f;
  --text-2:     #6e6e73;
  --text-3:     #aeaeb2;
  --bg:         #f5f5f7;
  --surface:    #ffffff;
  --border:     rgba(0,0,0,0.08);
  --radius:     12px;
}

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  line-height: 1.55;
  font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; }
ul  { list-style: none; margin: 0; padding: 0; }
p   { margin: 0 0 0.6rem; }
a   { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { font-weight: 600; }
small  { font-size: 0.78rem; color: var(--text-2); }

h1 { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; margin: 0 0 0.5rem; color: var(--text); }
h2 { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 0.5rem; color: var(--text); }
h3 { font-size: 1.05rem; font-weight: 600; margin: 0 0 0.4rem; color: var(--text); }


/* =====================================================================
   SITE HEADER — sticky nav bar
   ===================================================================== */

header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 48px;
  padding: 0 max(16px, calc((100% - 1000px) / 2));
  background: rgba(255,255,255,0.88);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}

/* FelsWare logo */
header > a {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--blue-dark);
  letter-spacing: -0.02em;
  text-decoration: none;
  flex-shrink: 0;
}
header > a:hover { color: var(--blue); text-decoration: none; }

/* Main nav (Produits, Support) */
header > nav.main-nav {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  justify-content: center;
}

/* Dropdown container */
.dropdown {
  position: relative;
  display: inline-block;
}

/* Dropdown button */
.dropdown-btn {
  padding: 8px 14px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
  transition: all 0.15s;
  font-family: inherit;
  font-weight: 500;
}
.dropdown-btn:hover {
  color: var(--blue);
}

/* Dropdown menu */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  min-width: 160px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.15s ease;
  margin-top: 4px;
}

/* Show dropdown on hover (pointer/mouse devices only) */
@media (hover: hover) {
  .dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

/* Show dropdown on click/tap (JS toggle) */
.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Dropdown menu links */
.dropdown-menu a {
  display: block;
  padding: 10px 14px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
  transition: all 0.12s;
}
.dropdown-menu a:first-child {
  border-radius: var(--radius) var(--radius) 0 0;
}
.dropdown-menu a:last-child {
  border-bottom: none;
  border-radius: 0 0 var(--radius) var(--radius);
}
.dropdown-menu a:hover {
  background: rgba(64, 97, 191, 0.08);
  color: var(--blue);
  text-decoration: none;
}

/* Translation disclaimer */
.translation-notice {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-2);
  padding: 0.4rem max(16px, calc((100% - 1000px) / 2));
  margin: 0;
}
.translation-notice a {
  color: inherit;
  text-decoration: underline;
}

/* Language nav — alignée à droite */
header > nav:last-child {
  display: flex;
  justify-content: flex-end;
}

/* Dropdown langue aligné à droite */
.dropdown-lang .dropdown-menu {
  left: auto;
  right: 0;
}

/* Boutons/liens de langue dans le dropdown */
.lang-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
  font-family: inherit;
  border-bottom: 1px solid var(--border);
  transition: all 0.12s;
  text-decoration: none;
  box-sizing: border-box;
}
.lang-btn:last-child { border-bottom: none; }
.lang-btn:hover { background: rgba(64, 97, 191, 0.08); color: var(--blue); text-decoration: none; }
.lang-btn.active { font-weight: 700; color: var(--blue); }


/* =====================================================================
   LANGUAGE VISIBILITY (6 langues)
   ===================================================================== */

html.lang-en .text-fr, html.lang-en .text-es, html.lang-en .text-de, html.lang-en .text-ja, html.lang-en .text-zh { display: none !important; }
html.lang-fr .text-en, html.lang-fr .text-es, html.lang-fr .text-de, html.lang-fr .text-ja, html.lang-fr .text-zh { display: none !important; }
html.lang-es .text-fr, html.lang-es .text-en, html.lang-es .text-de, html.lang-es .text-ja, html.lang-es .text-zh { display: none !important; }
html.lang-de .text-fr, html.lang-de .text-en, html.lang-de .text-es, html.lang-de .text-ja, html.lang-de .text-zh { display: none !important; }
html.lang-ja .text-fr, html.lang-ja .text-en, html.lang-ja .text-es, html.lang-ja .text-de, html.lang-ja .text-zh { display: none !important; }
html.lang-zh .text-fr, html.lang-zh .text-en, html.lang-zh .text-es, html.lang-zh .text-de, html.lang-zh .text-ja { display: none !important; }


/* =====================================================================
   MAIN — conteneur centré
   ===================================================================== */

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 16px 2rem;
}


/* =====================================================================
   INDEX — #intro (brand hero)
   ===================================================================== */

#intro {
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
}
#intro h1 {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}
#intro > p {
  font-size: 1.05rem;
  color: var(--text-2);
  margin: 0 0 0.15rem;
}
#intro > small {
  display: block;
  margin-top: 0.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--text-3);
}


/* =====================================================================
   INDEX — #apps (grille apps)
   ===================================================================== */

#apps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding-bottom: 1rem;
}

@media (min-width: 560px) {
  #apps { grid-template-columns: 1fr 1fr; }
}

#apps article {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
@media (hover: hover) {
  #apps article:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  }
}

/* Link wraps the whole card */
#apps article > a {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 14px;
  color: inherit;
  text-decoration: none;
}
#apps article > a:hover { text-decoration: none; }

/* Card header: icon + text */
#apps article .card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
#apps article .card-header img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  flex-shrink: 0;
}
#apps article .card-header h2 {
  font-size: 1rem;
  margin: 0 0 0.15rem;
}
#apps article .card-header p {
  font-size: 0.82rem;
  color: var(--text-2);
  font-style: italic;
  margin: 0 0 0.1rem;
}
#apps article .card-header small {
  font-size: 0.7rem;
  color: var(--text-3);
}

/* Feature list */
#apps article ul {
  border-top: 1px solid var(--border);
  padding-top: 8px;
  flex: 1;
}
#apps article ul li {
  padding: 0.3rem 0 0.3rem 1.1rem;
  position: relative;
  font-size: 0.83rem;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
}
#apps article ul li:last-child { border: none; }
#apps article ul li::before { content: "→"; position: absolute; left: 0; opacity: 0.3; }

#coming { text-align: center; color: var(--text-2); font-size: 1.05rem; padding: 0.5rem 1rem 1rem; }


/* =====================================================================
   INDEX / APP PAGES — #contact
   ===================================================================== */

#contact {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.5rem 16px;
  text-align: center;
  border-top: 1px solid var(--border);
}
#contact p { font-size: 0.9rem; color: var(--text-2); margin: 0.25rem 0; }
#contact a { font-weight: 600; }


/* =====================================================================
   APP PAGES — #hero
   ===================================================================== */

#hero {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.5rem 0 1rem;
}

@media (min-width: 560px) {
  #hero { flex-direction: row; align-items: flex-start; gap: 2rem; }
}

/* Left column: icon + appstore button */
#hero > div:first-child {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}
#hero > div:first-child img {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  margin-bottom: 12px;
}

/* Right column: text */
#hero > div:last-child { flex: 1; }
#hero h1 { font-size: 1.9rem; }
#hero > div:last-child > p { font-size: 0.9rem; color: var(--text-2); font-style: italic; margin: 0 0 0.2rem; }
#hero small { display: block; margin: 0 0 1rem; }
#hero h2 { font-size: 1.15rem; font-weight: 700; margin: 1rem 0 0.4rem; }
#hero > div:last-child > div > p { font-size: 0.95rem; }

/* App Store button */
.appstore-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #000;
  color: #fff !important;
  text-decoration: none !important;
  padding: 7px 18px;
  border-radius: 9px;
  min-width: 130px;
  line-height: 1.2;
  border: none;
}
.appstore-btn:hover { background: #333; text-decoration: none !important; }
.appstore-btn span { font-size: 0.55rem; letter-spacing: 0.04em; opacity: 0.9; }
.appstore-btn strong { font-size: 0.95rem; font-weight: 700; letter-spacing: -0.01em; }
#dl-btn span { font-size: 1rem; letter-spacing: 0; opacity: 1; font-weight: 600; }
#dl-btn strong { font-size: 0.7rem; font-weight: 400; opacity: 0.85; }

/* Coming soon (hero) */
.hero-coming {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: #FF6B35;
  color: #fff !important;
  padding: 7px 18px;
  border-radius: 9px;
  min-width: 130px;
  line-height: 1.2;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none !important;
}
.hero-coming span { font-size: 0.55rem; opacity: 0.85; font-weight: 400; letter-spacing: 0.04em; text-transform: none; }

/* Coming badge (in titles) */
.coming-badge {
  display: inline-block;
  background: #FF6B35;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 20px;
  vertical-align: middle;
  margin-left: 4px;
}


/* =====================================================================
   APP PAGES — #filetypes (tags)
   ===================================================================== */

#filetypes {
  padding: 0.5rem 0 1rem;
}
#filetypes ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
#filetypes li {
  font-size: 0.72rem;
  background: rgba(0,0,0,0.06);
  color: var(--text-2);
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}


/* =====================================================================
   APP PAGES — #videos
   ===================================================================== */

#videos {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 1rem;
}
@media (min-width: 560px) {
  #videos { grid-template-columns: 1fr 1fr; }
}
#videos > div {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}
#videos iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border: none;
}
#videos p {
  font-size: 0.8rem;
  color: var(--text-2);
  padding: 8px 10px;
  margin: 0;
}

/* FCW tutorials — hidden on mobile (shown at bottom instead via #fcw-mobile) */
@media (max-width: 767px) {
  .fcw-hide-mobile { display: none; }
}
@media (min-width: 768px) {
  #fcw-mobile { display: none; }
}

/* #fcw-mobile shares the same card style as #videos > div */
#fcw-mobile {
  padding: 0 max(16px, calc((100% - 1000px) / 2));
  margin-bottom: 1rem;
}
#fcw-mobile > div {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}
#fcw-mobile iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border: none;
}
#fcw-mobile p {
  font-size: 0.8rem;
  color: var(--text-2);
  padding: 8px 10px;
  margin: 0;
}


/* =====================================================================
   APP PAGES — #features, #also (grilles sections)
   ===================================================================== */

#features, #also {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 1rem;
}
@media (min-width: 560px) {
  #features { grid-template-columns: 1fr 1fr; }
  #also { grid-template-columns: repeat(4, 1fr); gap: 8px; }
}
@media (min-width: 1000px) {
  #also { gap: 8px; }
}

#features article, #also article {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px 14px 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

#features article h3, #also article h3 { margin-bottom: 8px; }

/* Feature list */
#features ul, #also ul {
  border-top: 1px solid var(--border);
  padding-top: 4px;
}
#features li, #also li {
  padding: 0.3rem 0 0.3rem 1.1rem;
  position: relative;
  font-size: 0.84rem;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
}
#features li:last-child, #also li:last-child { border: none; }
#features li::before, #also li::before { content: "→"; position: absolute; left: 0; opacity: 0.3; }

/* Also section: card is a link */
#also article {
  padding: 10px 10px 4px;
}
#also article > a {
  display: block;
  color: inherit;
  text-decoration: none;
  margin: -10px -10px -4px;
  padding: 10px 10px 4px;
}
#also article > a:hover { text-decoration: none; background: rgba(0,0,0,0.02); border-radius: var(--radius); }

/* Card mini-header (icon + title) inside #also */
#also .card-header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}
#also .card-header img   { width: 40px; height: 40px; border-radius: 8px; flex-shrink: 0; }
#also .card-header h3    { font-size: 0.88rem; margin: 0 0 0.08rem; font-weight: 600; }
#also .card-header p     { font-size: 0.72rem; color: var(--text-2); font-style: italic; margin: 0; }

/* Also list items smaller */
#also ul {
  padding-top: 3px;
}
#also li {
  padding: 0.2rem 0 0.2rem 0.9rem;
  font-size: 0.76rem;
}
#also li::before { font-size: 0.8rem; }


/* =====================================================================
   APP PAGES — #support, #privacy
   ===================================================================== */

#support, #privacy {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  text-align: center;
}
#support h3, #privacy h3 { margin-bottom: 0.5rem; }
#support p, #privacy p   { font-size: 0.85rem; color: var(--text-2); max-width: 640px; margin: 0 auto 0.4rem; line-height: 1.5; }
#support a, #privacy a   { font-weight: 600; }
#support ul { margin: 0.75rem auto; max-width: 640px; text-align: center; }
#support li { font-size: 0.85rem; color: var(--text-2); padding: 0.2rem 0; }


/* =====================================================================
   SUPPORT PAGES — structure générale
   ===================================================================== */

/* Back link */
main > a:first-child {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-2);
  margin: 1rem 0 1.5rem;
  text-decoration: none;
}
main > a:first-child:hover { color: var(--blue); text-decoration: none; }

/* Page header (icon + title) */
main > a:first-child + section {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.5rem;
}
main > a:first-child + section img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  flex-shrink: 0;
}
main > a:first-child + section h1 {
  font-size: 1.5rem;
  margin: 0;
}

/* FAQ sections grid */
#faq {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 560px) {
  #faq { grid-template-columns: 1fr 1fr; }
}

#faq section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}
#faq section h3 { margin-bottom: 8px; }

#faq ul { border-top: 1px solid var(--border); }
#faq li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}
#faq li:last-child { border: none; }
#faq li b {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
#faq li p {
  font-size: 0.82rem;
  color: var(--text-2);
  margin: 0;
  line-height: 1.5;
}
#faq li p a { font-weight: 600; }
#faq li p code {
  font-size: 0.8rem;
  background: rgba(0,0,0,0.06);
  padding: 1px 5px;
  border-radius: 4px;
}

/* Keyboard shortcuts table */
#faq table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
  margin: 0.5rem 0;
}
#faq td {
  padding: 0.35rem 0.4rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
#faq tr:last-child td { border: none; }
#faq td:first-child {
  font-family: monospace;
  white-space: nowrap;
  color: var(--text-2);
  width: 1%;
  padding-right: 1rem;
}

/* Prose / licences */
#faq .prose { font-size: 0.83rem; color: var(--text-2); line-height: 1.6; margin: 0 0 8px; }
#faq .prose a { font-weight: 600; }


/* =====================================================================
   MENTIONS LÉGALES — même structure que support
   ===================================================================== */

/* Uses #faq grid styles */
#legal h1 { text-align: center; margin: 1rem 0 1.5rem; }


/* =====================================================================
   FOOTER
   ===================================================================== */

footer {
  max-width: 1000px;
  margin: 0 auto 1.5rem;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  padding: 12px 16px;
  background: #e8e8ed;
  background-clip: padding-box;
  border-radius: var(--radius);
  text-align: center;
}
footer a {
  font-size: 0.75rem;
  color: var(--text-2);
  line-height: 2;
}
footer a:hover { color: var(--blue); text-decoration: none; }
