/* ==========================================================================
   Cogefin App - Support & Tutoriels
   Identité visuelle Cogefin : bleu nuit, rouge accent, fonds sombres
   ========================================================================== */

/* --------------------------------------------------------------------------
   BASE - Couleurs Cogefin (strictes)
   -------------------------------------------------------------------------- */
:root {
  --color-bg-primary: #152532;
  --color-bg-secondary: #1c3344;
  --color-bg-tertiary: #243d4f;
  --color-bg-bar: #2a4a5f;
  --color-bg-footer: #0f1c26;
  --color-accent: #e10600;
  --color-accent-hover: #b80500;
  --color-text: #ffffff;
  --color-text-secondary: #cbd5e1;
  --color-border: rgba(255, 255, 255, 0.1);
  --color-border-red: rgba(225, 6, 0, 0.4);
  --radius: 14px;
  --radius-lg: 16px;
  --transition: 180ms ease;
  --container-max: 1120px;
  --section-gap: 56px;
  --padding-block: 24px;
  --padding-inline: 24px;
}

@media (min-width: 768px) {
  :root {
    --padding-inline: 32px;
    --section-gap: 64px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #ffffff;
  color: var(--color-text);
  background: #152532;
  background: var(--color-bg-primary);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: #ff3d36;
}

/* --------------------------------------------------------------------------
   LAYOUT
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-inline: var(--padding-inline);
}
.container--narrow {
  max-width: 640px;
}

.section {
  padding-block: var(--section-gap);
  background: var(--color-bg-primary);
}

.section--alt {
  background: var(--color-bg-bar);
}
.section--alt .option-cards .option-card {
  background: var(--color-bg-tertiary);
}
.section--thanks {
  background: var(--color-bg-primary);
}
.section--thanks .thanks__text {
  margin-left: auto;
  margin-right: auto;
  font-size: 1.0625rem;
  color: var(--color-text-secondary);
}

/* Message accrocheur : même fond que section Support, texte rouge, halo rouge brillant */
.tagline-banner {
  background: #152532;
  background: var(--color-bg-primary);
  padding-block: 20px 24px;
  margin: 0;
}
.tagline-banner__text {
  margin: 0;
  text-align: center;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  font-weight: 700;
  color: #e10600;
  color: var(--color-accent);
  line-height: 1.4;
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  padding-inline: 20px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-shadow:
    0 0 8px rgba(225, 6, 0, 0.8),
    0 0 16px rgba(225, 6, 0, 0.5),
    0 0 24px rgba(225, 6, 0, 0.35),
    0 0 40px rgba(225, 6, 0, 0.25);
}
@media (max-width: 767px) {
  .tagline-banner__text {
    white-space: normal;
  }
}
@media (min-width: 768px) {
  .tagline-banner {
    padding-block: 24px 28px;
  }
  .tagline-banner__text {
    font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  }
}

.section--download {
  background: var(--color-bg-primary);
}
.section--download .store-badges-desc {
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 24px;
}
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  align-items: center;
}
.store-badge {
  display: inline-block;
  transition: opacity var(--transition), transform var(--transition);
}
.store-badge:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}
.store-badge:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
  border-radius: 8px;
}
.store-badge img {
  display: block;
  height: 112px;
  width: auto;
  max-width: 360px;
  object-fit: contain;
}

/* --------------------------------------------------------------------------
   HEADER
   -------------------------------------------------------------------------- */
/* Barre du haut : logo Cogefin à gauche, Support & Tutoriels à droite */
.site-header {
  background: #2a4a5f;
  background: var(--color-bg-bar);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 6px 8px;
  min-height: 50px;
}
@media (min-width: 768px) {
  .site-header__bar {
    padding-block: 8px 10px;
    min-height: 62px;
  }
}

.site-logo {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-text);
}
.site-logo:hover {
  color: var(--color-accent);
  opacity: 0.95;
}
.site-logo__img {
  display: block;
  height: 112px;
  width: auto;
  max-width: 560px;
  object-fit: contain;
  object-position: left center;
}
@media (min-width: 768px) {
  .site-logo__img {
    height: 148px;
    max-width: 680px;
  }
}

.nav-desktop {
  display: none;
}
@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
    align-items: center;
    gap: 24px;
  }
  .nav-desktop a {
    color: var(--color-text-secondary);
    font-weight: 500;
    font-size: 1.0625rem;
    text-decoration: none;
    padding: 0.35em 0;
    transition: color var(--transition);
  }
  .nav-desktop a:hover {
    color: var(--color-text);
  }
}

.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  border-radius: var(--radius);
  transition: background var(--transition);
}
.menu-toggle:hover {
  background: var(--color-bg-secondary);
}
.menu-toggle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }
}

.menu-toggle .icon {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  max-width: 90vw;
  height: 100vh;
  background: var(--color-bg-secondary);
  border-left: 1px solid var(--color-border);
  padding: 24px;
  transform: translateX(100%);
  transition: transform 250ms ease;
  z-index: 200;
  overflow-y: auto;
}
.nav-drawer.is-open {
  transform: translateX(0);
}

.nav-drawer .drawer-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  border-radius: var(--radius);
}
.nav-drawer .drawer-close:hover {
  background: var(--color-bg-primary);
}
.nav-drawer .drawer-close:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.nav-drawer ul {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
}
.nav-drawer li {
  margin-bottom: 8px;
}
.nav-drawer a {
  display: block;
  padding: 12px 0;
  font-weight: 500;
  color: var(--color-text-secondary);
}
.nav-drawer a:hover {
  color: var(--color-text);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms, visibility 200ms;
  z-index: 199;
}
.drawer-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
}

/* --------------------------------------------------------------------------
   HERO - Fond sombre, dégradé, ligne rouge sous H1
   -------------------------------------------------------------------------- */
.hero {
  padding-block: 56px 48px;
  text-align: center;
  background: var(--color-bg-primary);
  background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, var(--color-bg-primary) 50%);
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(21, 37, 50, 0.75) 0%, var(--color-bg-primary) 100%);
  pointer-events: none;
}
.hero .container {
  position: relative;
  z-index: 1;
}
@media (min-width: 768px) {
  .hero {
    padding-block: 72px 64px;
  }
}

.hero__title {
  margin: 0 0 12px;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-text);
  letter-spacing: -0.02em;
}
.hero__title::after {
  content: "";
  display: block;
  width: 80px;
  height: 3px;
  margin: 16px auto 0;
  background: var(--color-accent);
}

.hero__desc {
  margin: 0 0 28px;
  font-size: 1.0625rem;
  color: var(--color-text-secondary);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   BUTTONS - CTA rouges, hover plus sombre
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-text);
}
.btn--primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
}

.btn--secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn--secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-text);
}

/* --------------------------------------------------------------------------
   IMAGE SLIDER
   -------------------------------------------------------------------------- */
/* Section carrousel : même fond, aucun trait autour */
.slider-section {
  padding-block: 24px var(--section-gap);
  background: #152532 !important;
  background-color: #152532;
  border: none !important;
  outline: none;
  box-shadow: none;
}

.slider {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: var(--padding-inline);
  border: none;
  outline: none;
}
.slider--centered {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.slider--centered .slider__track {
  width: 100%;
}

/* Conteneur des slides : sans aucun contour */
.slider__track {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  border: none !important;
  outline: none;
  box-shadow: none;
  background: #152532 !important;
  background-color: #152532;
  width: 100%;
  min-height: 420px;
  height: 65vh;
  max-height: 800px;
}

/* Chaque slide : fond identique (images transparentes = même couleur) */
.slider__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms ease, visibility 300ms ease;
  background: #152532 !important;
  background-color: #152532;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slider__slide.is-active {
  opacity: 1;
  visibility: visible;
  position: relative;
}

/* Images réduites pour tenir dans la section, centrées */
.slider__slide img {
  width: auto;
  height: auto;
  max-width: 42%;
  max-height: 42%;
  object-fit: contain;
  object-position: center;
}
.slider--centered .slider__slide img {
  object-position: center;
}
.slider__slide--hidden {
  display: none !important;
}
.slider--single .slider__dots {
  display: none;
}

.slider__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.slider__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  padding: 0;
  transition: background var(--transition), transform var(--transition);
}
.slider__dot:hover {
  background: rgba(255, 255, 255, 0.5);
}
.slider__dot.is-active {
  background: var(--color-accent);
  transform: scale(1.2);
}
.slider__dot:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   OPTION CARDS - Fond bleu secondaire, bordure subtile, hover bordure rouge
   -------------------------------------------------------------------------- */
.option-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 768px) {
  .option-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

.option-card {
  display: block;
  padding: 28px 24px;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: transform var(--transition), border-color var(--transition);
  color: var(--color-text);
}
.option-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-accent);
}

.option-card__title {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
}
.option-card__desc {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
}

/* --------------------------------------------------------------------------
   SECTION HEADINGS
   -------------------------------------------------------------------------- */
.section__title {
  margin: 0 0 12px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
}
.section__subtitle {
  margin: 0 0 24px;
  color: var(--color-text-secondary);
  max-width: 560px;
}

/* --------------------------------------------------------------------------
   SUPPORT MODAL - Thème sombre cohérent
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms ease, visibility 200ms ease;
  z-index: 300;
}
.modal-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  z-index: 301;
  transition: transform 200ms ease;
}
.modal-backdrop.is-visible .modal {
  transform: translate(-50%, -50%) scale(1);
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-accent);
}
.modal__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
}
.modal__close {
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  border-radius: var(--radius);
}
.modal__close:hover {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.06);
}
.modal__close:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--color-text-secondary);
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(203, 213, 225, 0.6);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}
.form-group textarea {
  min-height: 140px;
  resize: vertical;
}
.form-group .error {
  margin-top: 4px;
  font-size: 0.875rem;
  color: #f87171;
}

.form-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.form-message {
  margin-top: 16px;
  padding: 12px;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  display: none;
  border: 1px solid var(--color-border);
}
.form-message.is-visible {
  display: block;
}
.form-message--info {
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-text-secondary);
}
.form-message--success {
  background: rgba(225, 6, 0, 0.1);
  border-color: var(--color-border-red);
  color: var(--color-text-secondary);
}

/* --------------------------------------------------------------------------
   TUTORIAL FEATURE CARD - Séparation fine rouge, segmented control sombre
   -------------------------------------------------------------------------- */
.tutorial-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tutorial-card {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-top: 1px solid var(--color-border-red);
  border-radius: 0;
  overflow: hidden;
}
.tutorial-card:first-child {
  border-top: 1px solid var(--color-border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.tutorial-card:last-child {
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.tutorial-card + .tutorial-card {
  border-top: none;
}

.tutorial-card__header {
  padding: 20px 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: background var(--transition);
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  color: var(--color-text);
  font: inherit;
}
.tutorial-card__header:hover {
  background: rgba(255, 255, 255, 0.04);
}
.tutorial-card__header:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}

.tutorial-card__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
}

.tutorial-card__chevron {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  transition: transform 200ms ease;
  color: var(--color-text-secondary);
}
.tutorial-card.is-open .tutorial-card__chevron {
  transform: rotate(180deg);
}

.tutorial-card__body {
  display: none;
  padding: 0 24px 24px;
  border-top: 1px solid var(--color-border);
}
.tutorial-card.is-open .tutorial-card__body {
  display: block;
}

.tutorial-card__desc {
  margin: 0 0 20px;
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
}

/* Platform switch - sombre, état actif rouge */
.platform-switch {
  display: inline-flex;
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 16px;
}
.platform-switch button {
  padding: 8px 20px;
  font-size: 0.9375rem;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.platform-switch button:hover {
  color: var(--color-text);
}
.platform-switch button.is-active {
  background: var(--color-accent);
  color: var(--color-text);
}
.platform-switch button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.video-container {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--color-border);
  aspect-ratio: 16 / 9;
}
.video-container video,
.video-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}
.video-container video {
  object-fit: contain;
}

.video-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  background: var(--color-bg-primary);
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  border: 1px dashed var(--color-border);
}

/* --------------------------------------------------------------------------
   FOOTER - Fond plus sombre, texte gris, liens rouges au hover
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--color-bg-footer);
  border-top: 1px solid var(--color-border);
  padding-block: 32px 24px;
  margin-top: var(--section-gap);
}

.site-footer .container {
  text-align: center;
}

.footer__contact {
  margin-bottom: 16px;
  color: var(--color-text-secondary);
}
.footer__contact a {
  color: var(--color-text-secondary);
  font-weight: 500;
}
.footer__contact a:hover {
  color: var(--color-accent);
}

.footer__legal {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}
.footer__legal a {
  color: var(--color-text-secondary);
}
.footer__legal a:hover {
  color: var(--color-accent);
}

/* --------------------------------------------------------------------------
   UTILITIES
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center {
  text-align: center;
}

.mb-0 { margin-bottom: 0; }
.mt-24 { margin-top: 24px; }
