/* =================================== */
/* =========== RESPONSIVE ============ */
/* =================================== */

/* Styles pour tablettes et plus petits */
@media (max-width: 1024px) {
  :root {
    --spacing-sm: 0.8rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2.5rem;
  }
  .parameters-content,
  .profiles-content {
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    grid-template-columns: 1fr;
  }
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Styles pour smartphones */
@media (max-width: 768px) {
  body {
    line-height: 1.5;
  }

  /* --- Structure générale --- */
  .content-section {
    margin-top: 4rem;
    grid-template-columns: 1fr !important; /* Force 1 column */
    gap: var(--spacing-sm) !important; /* Reduce vertical gap */
  }

  .text-container {
    margin-bottom: 0 !important;
  }

  .text-container h1 {
    line-height: 1.1;
  }

  /* --- Header --- */
  .main-header {
    display: grid;
    grid-template-columns: 50px 1fr 50px;
    align-items: center;
    padding: 0.5rem 1rem;
  }
  .main-header.scrolled {
    padding: 0.5rem;
  }

  .hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    grid-column: 1;
    justify-self: start;
    transition: transform 0.3s ease;
  }

  .hamburger-line {
    width: 2rem;
    height: 3px;
    background: white;
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
  }

  .hamburger-menu.is-active .hamburger-line:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
  }
  .hamburger-menu.is-active .hamburger-line:nth-child(2) {
    opacity: 0;
  }
  .hamburger-menu.is-active .hamburger-line:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
  }

  .header-left {
    grid-column: 2;
    justify-self: start;
    gap: 0.5rem;
  }

  .language-menu {
    grid-column: 3;
    justify-self: end;
    display: flex;
    align-items: center;
  }

  .header-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(13, 1, 39, 0.98);
    backdrop-filter: blur(5px);
    transition: left 0.3s ease-in-out;
    transform: none;
  }
  .header-menu.menu-open {
    left: 0;
  }
  .header-menu.active {
    display: block;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    padding: var(--spacing-md);
  }

  .header-menu ul {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }
  .header-menu a {
    font-size: 1.8rem;
    font-weight: 600;
  }
  .header-menu a::after {
    display: none;
  }

  .logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }
  .title {
    font-size: 1.8rem;
  }
  .language-icon {
    width: 30px;
    height: 30px;
    transition: transform 0.3s ease;
  }

  .main-header.scrolled .logo {
    width: 32px;
    height: 32px;
    border-radius: 5px;
  }
  .main-header.scrolled .title {
    font-size: 1.5rem;
  }
  .main-header.scrolled .hamburger-menu {
    transform: scale(0.8);
  }
  .main-header.scrolled .language-icon {
    transform: scale(0.8);
  }

  /* --- Sections --- */
  .stories-description,
  .feature-text,
  .hero-text,
  .review-text,
  .category-item p,
  .educational-section p,
  .educational-section li,
  .legal-content p,
  .legal-content li {
    font-size: 1.1rem;
    line-height: 1.5;
  }

  .features-section {
    padding-bottom: var(--spacing-md);
  }
  .feature {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  .feature .feature-text {
    padding-left: 0;
    padding-right: 0;
  }
  .features-section video {
    width: 100%;
    max-width: 100%;
  }

  .parameters-section {
    padding-top: var(--spacing-md);
  }
  .parameters-text {
    font-size: 1.1rem;
  }

  .video-section {
    padding-bottom: var(--spacing-lg);
  }
  #mute-button {
    width: 25px;
    height: 25px;
    top: 5px;
    right: 5px;
    padding: 5px;
  }
  #mute-button svg {
    width: 15px;
    height: 15px;
  }
  #fullscreen-button {
    display: flex !important; /* Rendre visible sur mobile */
    width: 25px !important;
    height: 25px !important;
    bottom: 5px;
    left: 5px;
    padding: 5px;
  }
  #fullscreen-button svg {
    width: 15px;
    height: 15px;
  }

  .multilingual-section {
    padding-top: var(--spacing-sm);
  }
  .multilingual-title-container {
    padding-top: 0;
    padding-bottom: var(--spacing-md);
  }
  .flags-row {
    padding-left: var(--spacing-sm);
    padding-right: var(--spacing-sm);
    justify-content: flex-start;
  }
  .heroes-section {
    grid-template-columns: 1fr;
  }

  .profiles-section {
    padding-bottom: 0;
  }
  h3.profiles-footer-title {
    padding-top: var(--spacing-md);
    margin-top: 0;
    font-size: 2rem;
    line-height: 1.5;
    margin-bottom: var(--spacing-lg);
    font-weight: 500;
  }
  .profiles-footer-title .highlighted-text {
    font-size: 2rem;
    font-weight: 700;
  }

  .profiles-text {
    font-size: 1.1rem;
    line-height: 1.2;
  }
  .profiles-text p {
    padding-left: 0;
  }

  .educational-section {
    padding-top: var(--spacing-sm);
    padding-bottom: var(--spacing-sm);
    margin-bottom: 2rem;
  }
  .educational-content {
    flex-direction: column;
    align-items: center;
  }
  .educational-image {
    order: 1;
    margin-bottom: 1.5rem;
  }
  .educational-text {
    order: 2;
    width: 100%;
    padding: 0 0.5rem;
  }
  .category-details-container {
    flex-direction: column;
    gap: 2.5rem;
  }
  .educational-categories .category-item,
  .educational-intro-text {
    padding: 0 1rem;
    width: 100%;
    max-width: none;
  }
  .educational-section ul {
    padding-left: 0;
  }
  .educational-categories .category-item img {
    width: 100%;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
    margin-top: 5rem;
  }

  .download-section .store-box {
    width: 250px;
    justify-content: center;
  }
  .store-text {
    text-align: center;
  }
  .download-container {
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
  }
  .try-app-container {
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
  }

  .try-app-section .store-buttons {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .try-app-section .store-box {
    width: 250px;
    justify-content: center;
  }

  /* --- FAQ --- */
  .faq-content {
    grid-template-columns: 1fr;
    flex-direction: column;
    padding: 0 20px;
    gap: 40px;
  }
  .faq-image {
    display: none;
  }
  .faq-questions,
  .faq-image {
    flex: 0 0 100%;
  }
  .faq-item {
    width: 100%;
  }
  .faq-questions {
    padding: 0 1rem;
  }

  /* --- Footer --- */
  .footer {
    padding: 3rem 1rem 1.5rem;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
  }
  .footer-bottom-links {
    gap: 1rem;
    flex-direction: column;
  }
  .social-links {
    gap: 1rem;
  }
  .social-icon {
    width: 36px;
    height: 36px;
  }
  .social-icon img {
    width: 18px;
    height: 18px;
  }
}

/* Styles pour petits smartphones */
@media (max-width: 480px) {
  .reviews-row {
    padding-bottom: 1rem;
    grid-auto-columns: 280px;
  }
  .feature-image {
    max-width: 100px;
  }
  .flag {
    width: 50px;
    height: 50px;
  }
  .download-section {
    padding-top: 2rem;
    max-width: 90%;
  }
}

/* Styles spécifiques pour le footer sur des écrans intermédiaires */
@media (max-width: 640px) {
  .footer-content {
    grid-template-columns: 1fr;
  }
  .footer-bottom-links {
    flex-direction: column;
    gap: 1rem;
  }
}
