
/* Modal Styles */
    .modal {
      display: none;
      position: fixed;
      z-index: 1000;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.5);
      backdrop-filter: blur(8px);
      animation: fadeInModal 0.3s ease-out;
    }

    .modal.active {
      display: flex;
      align-items: center;
      justify-content: center;
    }

    @keyframes fadeInModal {
      from { opacity: 0; }
      to { opacity: 1; }
    }

    .modal-content {
      background: white;
      margin: 2rem;
      padding: 0;
      border-radius: 24px;
      width: 100%;
      max-width: 600px;
      max-height: 90vh;
      overflow-y: auto;
      position: relative;
      box-shadow: 
        0 50px 100px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.2);
      transform: scale(0.7);
      transform-origin: center;
      animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    }

    @keyframes scaleIn {
      to {
        transform: scale(1);
      }
    }

    .modal-header {
      padding: 2rem 2.5rem;
      border-bottom: 1px solid rgba(0, 0, 0, 0.08);
      background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
      border-radius: 24px 24px 0 0;
      position: sticky;
      top: 0;
      z-index: 10;
    }

    .modal-header h2 {
      font-size: 1.75rem;
      font-weight: 700;
      color: #1e293b;
      margin-bottom: 0.5rem;
      display: flex;
      align-items: center;
      gap: 1rem;
    }

    .modal-header .flag {
      width: 40px;
      height: 30px;
      border-radius: 6px;
      object-fit: cover;
      border: 2px solid #f59e0b;
    }

    .close-modal {
      position: absolute;
      right: 1.5rem;
      top: 1.5rem;
      background: none;
      border: none;
      font-size: 1.5rem;
      color: #64748b;
      cursor: pointer;
      padding: 0.5rem;
      border-radius: 50%;
      transition: all 0.3s ease;
      width: 40px;
      height: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .close-modal:hover {
      background: #fee2e2;
      color: #dc2626;
      transform: rotate(90deg);
    }

    .modal-body {
      padding: 2.5rem;
    }

    /* Niveaux section */
    .niveaux-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
      gap: 1rem;
      margin: 2rem 0;
    }

    .niveau-btn {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.75rem;
      padding: 1.5rem 1rem;
      border: 2px solid rgba(251, 191, 36, 0.2);
      border-radius: 16px;
      background: rgba(255, 255, 255, 0.8);
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      position: relative;
      overflow: hidden;
      text-decoration: none;
      color: #1e293b;
      font-weight: 600;
      text-align: center;
      backdrop-filter: blur(10px);
    }

    .niveau-btn::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, transparent 50%);
      opacity: 0;
      transition: opacity 0.3s ease;
      z-index: -1;
    }

    .niveau-btn:hover {
      transform: translateY(-4px);
      border-color: #f59e0b;
      box-shadow: 
        0 20px 40px rgba(245, 158, 11, 0.2),
        0 0 0 1px rgba(245, 158, 11, 0.1);
    }

    .niveau-btn:hover::before {
      opacity: 1;
    }

    .niveau-btn.active {
      background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
      color: white;
      border-color: #f59e0b;
      transform: scale(1.05);
      box-shadow: 
        0 20px 40px rgba(245, 158, 11, 0.3),
        0 0 0 1px rgba(245, 158, 11, 0.2);
      animation: pulseNiveau 2s infinite;
    }

    @keyframes pulseNiveau {
      0%, 100% { box-shadow: 0 20px 40px rgba(245, 158, 11, 0.3); }
      50% { box-shadow: 0 20px 40px rgba(245, 158, 11, 0.5); }
    }

    .niveau-icon {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background: linear-gradient(135deg, #f59e0b, #ef4444);
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-weight: bold;
      font-size: 1.1rem;
      flex-shrink: 0;
      box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
      transition: all 0.3s ease;
    }

    .niveau-btn:hover .niveau-icon,
    .niveau-btn.active .niveau-icon {
      transform: scale(1.1) rotate(10deg);
      box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
    }

    .niveau-label {
      font-size: 0.9rem;
      font-weight: 600;
      margin-top: 0.25rem;
    }

    /* Formules section */
    .formules-section {
      margin-top: 2rem;
      padding: 2rem;
      background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
      border-radius: 20px;
      border: 1px solid rgba(251, 191, 36, 0.1);
      position: relative;
      overflow: hidden;
    }

    .formules-section::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 4px;
      background: linear-gradient(135deg, #f59e0b, #ef4444);
    }

    .formules-title {
      font-size: 1.25rem;
      font-weight: 700;
      color: #1e293b;
      margin-bottom: 1.5rem;
      text-align: center;
      position: relative;
    }

    .formules-list {
      list-style: none;
      display: grid;
      gap: 1rem;
    }

    .formule-item {
      display: flex;
      align-items: center;
      gap: 1rem;
      padding: 1.25rem;
      background: white;
      border-radius: 12px;
      border-left: 4px solid #f59e0b;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
      transition: all 0.3s ease;
      position: relative;
      overflow: hidden;
    }

    .formule-item::before {
      content: '';
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      width: 4px;
      background: linear-gradient(180deg, #f59e0b 0%, #ef4444 100%);
    }

    .formule-item.normal {
      border-left-color: #10b981;
    }

    .formule-item.normal::before {
      background: linear-gradient(180deg, #10b981 0%, #059669 100%);
    }

    .formule-item.accelere {
      border-left-color: #3b82f6;
    }

    .formule-item.accelere::before {
      background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    }

    .formule-item.vip {
      border-left-color: #8b5cf6;
    }

    .formule-item.vip::before {
      background: linear-gradient(180deg, #8b5cf6 0%, #7c3aed 100%);
    }

    .formule-item:hover {
      transform: translateX(8px);
      box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    }

    .formule-icon {
      width: 45px;
      height: 45px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.1rem;
      color: white;
      flex-shrink: 0;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    }

    .formule-item.normal .formule-icon {
      background: linear-gradient(135deg, #10b981, #059669);
    }

    .formule-item.accelere .formule-icon {
      background: linear-gradient(135deg, #3b82f6, #2563eb);
    }

    .formule-item.vip .formule-icon {
      background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    }

    .formule-content {
      flex: 1;
    }

    .formule-type {
      font-weight: 700;
      font-size: 1.1rem;
      color: #1e293b;
      margin-bottom: 0.25rem;
    }

    .formule-desc {
      color: #64748b;
      font-size: 0.95rem;
      line-height: 1.5;
    }

    .inscription-btn {
      display: inline-flex;
      align-items: center;
      gap: 0.75rem;
      padding: 0.875rem 2rem;
      border-radius: 50px;
      background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
      color: white;
      font-size: 1rem;
      font-weight: 600;
      text-decoration: none;
      transition: all 0.3s ease;
      box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
      margin-top: 1.5rem;
      position: relative;
      overflow: hidden;
      border: none;
      cursor: pointer;
      justify-content: center;
      width: 100%;
    }

    .inscription-btn::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
      transition: left 0.5s ease;
    }

    .inscription-btn:hover::before {
      left: 100%;
    }

    .inscription-btn:hover {
      transform: translateY(-2px) scale(1.02);
      box-shadow: 0 12px 35px rgba(245, 158, 11, 0.5);
      background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    }

    /* ===========================================
       MAIN SECTION - ENHANCED CARDS
    ============================================= */
    main {
      min-height: 100vh;
      padding: 3rem 1.5rem;
      position: relative;
      background: linear-gradient(135deg, #fffdf5 0%, #fef3c7 50%, #fed7aa 100%);
      overflow: hidden;
    }

    main::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-image: 
        radial-gradient(circle at 20% 80%, rgba(251, 191, 36, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(239, 68, 68, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(59, 130, 246, 0.08) 0%, transparent 50%);
      pointer-events: none;
      z-index: 1;
    }

    .main-container {
      max-width: 1400px;
      margin: 0 auto;
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 5rem;
      align-items: start;
      position: relative;
      z-index: 2;
      min-height: 80vh;
    }

    /* Enhanced Language Cards */
    .languages-section {
      display: flex;
      flex-direction: column;
      gap: 3.5rem;
      padding: 2rem 0;
      animation: slideInLeft 1s ease-out;
    }

    @keyframes slideInLeft {
      from {
        opacity: 0;
        transform: translateX(-50px);
      }
      to {
        opacity: 1;
        transform: translateX(0);
      }
    }

    .languages-section h1 {
      font-size: clamp(2.8rem, 6vw, 4.5rem);
      font-weight: 800;
      line-height: 1.1;
      margin-bottom: 0;
      background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      position: relative;
      z-index: 10;
    }

    .languages-section h1 .black {
      color: #1e293b;
      display: block;
      font-weight: 900;
    }

    .languages-section h1 .highlight {
      background: linear-gradient(135deg, #f59e0b 0%, #ef4444 50%, #dc2626 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      display: block;
      font-weight: 900;
      text-shadow: 0 0 30px rgba(239, 68, 68, 0.3);
      animation: glow 2s ease-in-out infinite alternate;
    }

    @keyframes glow {
      from {
        filter: drop-shadow(0 0 5px rgba(239, 68, 68, 0.3));
      }
      to {
        filter: drop-shadow(0 0 20px rgba(239, 68, 68, 0.6));
      }
    }

    .language-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 1.75rem;
      max-width: 650px;
      animation: slideInUp 1s ease-out 0.3s both;
      perspective: 1000px;
    }

    @keyframes slideInUp {
      from {
        opacity: 0;
        transform: translateY(50px) rotateX(15deg);
      }
      to {
        opacity: 1;
        transform: translateY(0) rotateX(0deg);
      }
    }

    .lang-card {
      display: flex;
      align-items: center;
      gap: 1.5rem;
      padding: 2rem 1.75rem;
      background: rgba(255, 255, 255, 0.9);
      border-radius: 24px;
      border: 2px solid rgba(251, 191, 36, 0.2);
      backdrop-filter: blur(20px);
      transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
      cursor: pointer;
      position: relative;
      overflow: hidden;
      text-decoration: none;
      box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
      transform-style: preserve-3d;
    }

    .lang-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(135deg, 
        rgba(251, 191, 36, 0.1) 0%, 
        rgba(239, 68, 68, 0.08) 50%, 
        rgba(59, 130, 246, 0.06) 100%
      );
      opacity: 0;
      transition: opacity 0.4s ease;
      z-index: -1;
    }

    .lang-card::after {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      width: 0;
      height: 0;
      background: radial-gradient(circle, rgba(251, 191, 36, 0.2) 0%, transparent 70%);
      border-radius: 50%;
      transform: translate(-50%, -50%);
      transition: all 0.6s ease;
      z-index: -1;
    }

    .lang-card:hover {
      transform: translateY(-12px) scale(1.03) rotateX(5deg);
      box-shadow: 
        0 35px 70px rgba(251, 191, 36, 0.25),
        0 20px 40px rgba(239, 68, 68, 0.15),
        0 10px 20px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
      border-color: #f59e0b;
    }

    .lang-card:hover::before {
      opacity: 1;
    }

    .lang-card:hover::after {
      width: 300px;
      height: 300px;
    }

    .lang-card:active {
      transform: translateY(-8px) scale(0.98);
      transition: all 0.2s ease;
    }

    .lang-card:focus {
      outline: none;
      box-shadow: 
        0 0 0 4px rgba(251, 191, 36, 0.3),
        0 35px 70px rgba(251, 191, 36, 0.25);
    }

    .lang-card {
      animation: cardSlideIn 0.8s ease-out forwards;
      opacity: 0;
      transform: translateY(30px) scale(0.95);
      animation-delay: calc(var(--order) * 0.15s);
    }

    .lang-card:nth-child(1) { --order: 1; }
    .lang-card:nth-child(2) { --order: 2; }
    .lang-card:nth-child(3) { --order: 3; }
    .lang-card:nth-child(4) { --order: 4; }
    .lang-card:nth-child(5) { --order: 5; }
    .lang-card:nth-child(6) { --order: 6; }

    @keyframes cardSlideIn {
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    .lang-flag {
      flex-shrink: 0;
      position: relative;
    }

    .lang-flag img {
      width: 48px;
      height: 36px;
      border-radius: 12px;
      object-fit: cover;
      border: 3px solid rgba(255, 255, 255, 0.8);
      box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
      transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .lang-card:hover .lang-flag img {
      transform: scale(1.15) rotate(5deg);
      box-shadow: 
        0 12px 30px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 1);
      border-color: #f59e0b;
      filter: drop-shadow(0 6px 12px rgba(245, 158, 11, 0.3));
    }

    .lang-content {
      flex: 1;
    }

    .lang-card h3 {
      font-size: 1.5rem;
      font-weight: 700;
      color: #1e293b;
      margin-bottom: 0.5rem;
      line-height: 1.2;
    }

    .lang-card p {
      color: #64748b;
      font-size: 0.95rem;
      line-height: 1.6;
      margin-bottom: 1.25rem;
      flex: 1;
    }

    .btn {
      display: inline-flex;
      align-items: center;
      gap: 0.75rem;
      padding: 0.75rem 1.75rem;
      border-radius: 50px;
      background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
      color: white;
      font-size: 0.95rem;
      font-weight: 600;
      text-decoration: none;
      transition: all 0.3s ease;
      box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
      border: none;
      cursor: pointer;
      position: relative;
      overflow: hidden;
    }

    .btn::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
      transition: left 0.5s ease;
    }

    .btn:hover::before {
      left: 100%;
    }

    .btn:hover {
      transform: translateY(-2px) scale(1.05);
      box-shadow: 0 10px 30px rgba(245, 158, 11, 0.4);
      background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    }

    /* Images section (inchangée mais améliorée) */
    .images-section {
      display: flex;
      flex-direction: column;
      gap: 2rem;
      position: relative;
      animation: slideInRight 1s ease-out 0.6s both;
      height: 100%;
      min-height: 550px;
    }

    @keyframes slideInRight {
      from {
        opacity: 0;
        transform: translateX(50px) rotateY(-15deg);
      }
      to {
        opacity: 1;
        transform: translateX(0) rotateY(0deg);
      }
    }

    .card {
      border-radius: 28px;
      overflow: hidden;
      position: relative;
      background-size: cover;
      background-position: center;
      transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
      border: 3px solid rgba(255, 255, 255, 0.6);
      box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }

    .card.main-image {
      height: 500px;
      flex-shrink: 0;
      box-shadow: 
        0 40px 80px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(251, 191, 36, 0.3);
      animation: floatMain 6s ease-in-out infinite;
    }

    @keyframes floatMain {
      0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
      }
      33% { 
        transform: translateY(-15px) rotate(1deg); 
      }
      66% { 
        transform: translateY(-8px) rotate(-1deg); 
      }
    }

    .card.small-images-container {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1.25rem;
      height: 200px;
      border-radius: 20px;
    }

    .card.small-image-1,
    .card.small-image-2 {
      height: 100%;
      box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.6);
      transition: all 0.4s ease;
    }

    .card:hover {
      transform: translateY(-15px) scale(1.03);
      box-shadow: 
        0 50px 100px rgba(251, 191, 36, 0.3),
        0 30px 60px rgba(239, 68, 68, 0.2),
        0 20px 40px rgba(0, 0, 0, 0.15);
      border-color: rgba(251, 191, 36, 0.6);
    }

    /* Section title and course cards (inchangées) */
    .section-title {
      text-align: center;
      margin: 4rem 0 2rem 0;
      position: relative;
      z-index: 2;
    }

    .section-title::before {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 80px;
      height: 4px;
      background: linear-gradient(135deg, #f59e0b, #ef4444);
      border-radius: 2px;
      z-index: -1;
    }

    .section-title p {
      font-size: 1.25rem;
      color: #475569;
      max-width: 700px;
      margin: 0 auto;
      font-weight: 600;
      line-height: 1.7;
      padding: 0 1rem;
      background: rgba(255, 255, 255, 0.8);
      border-radius: 16px;
      backdrop-filter: blur(10px);
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.3);
    }

    .section-cards {
      display: flex;
      justify-content: center;
      gap: 3rem;
      padding: 4rem 2rem;
      flex-wrap: wrap;
      position: relative;
      z-index: 2;
      max-width: 1200px;
      margin: 0 auto;
    }

    .course-card {
      position: relative;
      width: 380px;
      height: 260px;
      display: flex;
      align-items: center;
      justify-content: center;
      background-size: cover;
      background-position: center;
      border-radius: 24px;
      color: white;
      text-decoration: none;
      overflow: hidden;
      transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
      cursor: pointer;
      box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.2);
      transform-style: preserve-3d;
    }

    .course-card span {
      z-index: 3;
      font-weight: 700;
      background: linear-gradient(135deg, rgba(245, 158, 11, 0.9), rgba(239, 68, 68, 0.9));
      padding: 1rem 2rem;
      border-radius: 50px;
      font-size: 1.4rem;
      transition: all 0.4s ease;
      box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
      transform: translateY(0);
      position: relative;
    }

    .course-card .description {
      position: absolute;
      bottom: -100%;
      left: 0;
      width: 100%;
      padding: 2.5rem;
      background: linear-gradient(180deg, 
        rgba(30, 41, 59, 0.95) 0%, 
        rgba(51, 65, 85, 0.95) 100%
      );
      text-align: center;
      transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
      font-size: 1.1rem;
      line-height: 1.6;
      opacity: 0;
      transform: translateY(20px);
      z-index: 2;
    }

    .course-card.active .description {
      bottom: 0;
      opacity: 1;
      transform: translateY(0);
    }

    .course-card.active span {
      opacity: 0;
      transform: translateY(-20px);
      pointer-events: none;
    }

    .btn-contact {
      display: inline-flex;
      align-items: center;
      gap: 0.75rem;
      padding: 0.875rem 2rem;
      border-radius: 50px;
      background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
      color: white;
      font-size: 1rem;
      font-weight: 600;
      text-decoration: none;
      transition: all 0.3s ease;
      box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
      position: relative;
      overflow: hidden;
    }

    .btn-contact:hover {
      transform: translateY(-2px) scale(1.05);
      box-shadow: 0 12px 35px rgba(245, 158, 11, 0.5);
      background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    }

    /* Responsive */
    @media (max-width: 1024px) {
      .main-container {
        grid-template-columns: 1fr;
        gap: 4rem;
        text-align: center;
      }
      
      .language-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
      }
      
      .card.main-image {
        height: 400px;
        max-width: 500px;
        margin: 0 auto;
      }
      
      .card.small-images-container {
        height: 180px;
        max-width: 500px;
        margin: 0 auto;
      }
      
      .section-cards {
        gap: 2rem;
        padding: 3rem 1rem;
      }
      
      .course-card {
        width: 340px;
        height: 220px;
      }
      
      .modal-content {
        margin: 1rem;
        max-width: 90vw;
      }
    }

    @media (max-width: 768px) {
      main {
        padding: 2rem 1rem;
      }
      
      .languages-section h1 {
        margin-bottom: 2rem;
        text-align: center;
      }
      
      .language-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
      }
      
      .lang-card {
        padding: 1.75rem 1.5rem;
        gap: 1.25rem;
      }
      
      .lang-flag img {
        width: 40px;
        height: 30px;
      }
      
      .lang-card h3 {
        font-size: 1.3rem;
      }
      
      .card.main-image {
        height: 320px;
      }
      
      .card.small-images-container {
        height: 160px;
        grid-template-columns: 1fr;
        gap: 1rem;
      }
      
      .section-title p {
        font-size: 1.1rem;
        padding: 1rem;
      }
      
      .course-card {
        width: 300px;
        height: 200px;
      }
      
      .niveaux-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
      }
      
      .modal-body {
        padding: 1.5rem;
      }
      
      .formules-section {
        padding: 1.5rem;
      }
    }

    @media (max-width: 480px) {
      .lang-card {
        padding: 1.5rem 1.25rem;
        gap: 1rem;
      }
      
      .lang-flag img {
        width: 36px;
        height: 27px;
      }
      
      .languages-section h1 {
        font-size: clamp(2.2rem, 7vw, 3rem);
      }
      
      .card.main-image {
        height: 280px;
      }
      
      .section-cards {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
        padding: 2rem 0.5rem;
      }
      
      .course-card {
        width: 100%;
        max-width: 320px;
        height: 180px;
      }
      
      .niveaux-grid {
        grid-template-columns: 1fr;
      }
      
      .formule-item {
        padding: 1rem;
        gap: 0.75rem;
      }
      
      .formule-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
      }
    }

    /* Dark mode */
    @media (prefers-color-scheme: dark) {
      body {
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
        color: #f1f5f9;
      }
      
      main {
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
      }
      
      .modal-content {
        background: #1e293b;
        color: #f1f5f9;
      }
      
      .modal-header {
        background: linear-gradient(135deg, #334155 0%, #475569 100%);
        border-bottom-color: rgba(255, 255, 255, 0.1);
      }
      
      .modal-header h2 {
        color: #f1f5f9;
      }
      
      .niveau-btn {
        background: rgba(30, 41, 59, 0.8);
        color: #f1f5f9;
        border-color: rgba(251, 191, 36, 0.4);
      }
      
      .niveau-btn.active {
        background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
        color: white;
      }
      
      .formules-section {
        background: linear-gradient(135deg, #334155 0%, #475569 100%);
        border-color: rgba(251, 191, 36, 0.2);
      }
      
      .formules-title {
        color: #f1f5f9;
      }
      
      .formule-item {
        background: #475569;
        border-left-color: #f59e0b;
      }
      
      .formule-type {
        color: #f1f5f9;
      }
      
      .formule-desc {
        color: #cbd5e1;
      }
      
      .lang-card {
        background: rgba(30, 41, 59, 0.8);
        border-color: rgba(251, 191, 36, 0.4);
        color: #f1f5f9;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
      }
      
      .languages-section h1 .black {
        color: #f1f5f9;
      }
      
      .section-title p {
        background: rgba(30, 41, 59, 0.8);
        color: #e2e8f0;
        border-color: rgba(251, 191, 36, 0.2);
      }
    }