/* ============================================
   FORUM DE L'ENSIIE - CSS RESPONSIVE
   Version optimisée mobile-first
   ============================================ */

/* ============================================
   1. VARIABLES & RESET
   ============================================ */
:root {
    /* Couleurs principales */
    --color-primary: #2b4271;
    --color-primary-dark: #162F6B;
    --color-secondary: #1F3C88;
    --color-accent: #fd8c64;
    --color-text: #1f2933;
    --color-text-light: #64748B;
    --color-text-dark: #334155;
    --color-bg: #f8fafc;
    --color-white: #ffffff;
    --color-gray-light: #E5E7EB;
    --color-gray: #9CA3AF;
    --color-gray-dark: #6B7280;
    
    /* Espacements */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 40px;
    --spacing-xl: 60px;
    --spacing-xxl: 80px;
    
    /* Typographie */
    --font-size-base: 16px;
    --font-size-sm: 14px;
    --font-size-lg: 18px;
    --font-size-xl: 24px;
    --font-size-2xl: 32px;
    --font-size-3xl: 48px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    
    /* Ombres */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 18px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 20px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 12px 30px rgba(0, 0, 0, 0.25);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Manrope', system-ui, -apple-system, sans-serif;
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    margin: 0;
    padding: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   2. NAVIGATION
   ============================================ */
.forum-navbar {
    background-color: var(--color-white);
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-logo img {
    height: 32px;
    width: auto;
}

.navbar-nav {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.navbar-nav li a {
    color: var(--color-primary);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    padding: 6px 8px;
    border-radius: 6px;
    transition: var(--transition-normal);
    white-space: nowrap;
}

.navbar-nav li a:hover {
    background-color: var(--color-gray-light);
    color: var(--color-secondary);
}

/* ============================================
   3. HERO SECTION
   ============================================ */
.forum-hero {
    background: var(--color-primary);
    padding: 30px 20px;
    color: var(--color-white);
}

.forum-hero-content {
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--color-primary);
    border-radius: 16px;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.forum-text {
    width: 100%;
}

.forum-infos {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.forum-info .label {
    font-size: var(--font-size-sm);
    opacity: 0.8;
    display: block;
}

.forum-info .value {
    font-size: var(--font-size-lg);
    font-weight: 500;
    display: block;
}

.forum-description {
    font-size: var(--font-size-base);
    line-height: 1.7;
    margin-bottom: 24px;
}

.forum-images {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.forum-images img {
    width: 100%;
    max-width: 500px;
    border-radius: 12px;
    object-fit: cover;
    border: 4px solid var(--color-white);
    box-shadow: var(--shadow-lg);
}

.forum-images img:last-child {
    display: none;
}

/* ============================================
   4. BOUTONS
   ============================================ */
.forum-btn,
.cta-button,
.contact-submit {
    display: inline-block;
    width: 100%;
    padding: 16px 24px;
    background-color: var(--color-gray-light);
    color: var(--color-text);
    text-decoration: none;
    font-size: var(--font-size-base);
    font-weight: 500;
    border-radius: 10px;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
    text-align: center;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.forum-btn:hover,
.cta-button:hover,
.contact-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.cta-button {
    background-color: var(--color-gray-dark);
    color: var(--color-white);
}

.cta-button:hover {
    background-color: var(--color-text-dark);
}

.contact-submit {
    background-color: var(--color-secondary);
    color: var(--color-white);
    margin-top: 16px;
}

.contact-submit:hover {
    background-color: var(--color-primary-dark);
}

/* ============================================
   5. SECTIONS COMMUNES
   ============================================ */
.page-title {
    text-align: center;
    padding: 30px 20px;
}

.page-title h1 {
    font-size: 32px;
    font-weight: 600;
    color: var(--color-secondary);
    margin-bottom: 10px;
}

.page-title p {
    font-size: var(--font-size-base);
    color: var(--color-text-light);
}

.section-divider {
    width: 70px;
    height: 4px;
    background-color: var(--color-accent);
    border-radius: 2px;
    margin: 20px auto;
}

/* ============================================
   6. STATISTIQUES
   ============================================ */
.forum-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 20px;
}

.stat {
    padding: 24px 30px;
    border-radius: 12px;
    text-align: center;
    transition: var(--transition-normal);
    width: 100%;
    max-width: 280px;
}

.stat:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-sm);
}

.stat .number {
    font-size: 40px;
    font-weight: 600;
    color: var(--color-accent);
    display: block;
    margin-bottom: 8px;
}

.stat .label {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: block;
}

/* ============================================
   7. CTA SECTION
   ============================================ */
.forum-cta {
    padding: 40px 20px;
    text-align: center;
}

.forum-cta h2 {
    font-size: 28px;
    font-weight: 600;
    color: var(--color-secondary);
    margin-bottom: 16px;
}

.forum-cta p {
    max-width: 700px;
    margin: 0 auto 30px;
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--color-text-dark);
}

/* ============================================
   8. FORMULAIRE DE CONTACT
   ============================================ */
.forum-contact {
    padding: 30px 15px;
    text-align: center;
}

.forum-contact h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--color-secondary);
    margin-bottom: 8px;
}

.forum-contact-subtitle {
    font-size: 13px;
    color: var(--color-text-light);
    max-width: 700px;
    margin: 0 auto 25px;
    line-height: 1.5;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
    padding: 0 5px;
}

.form-field {
    margin-bottom: 18px;
}

.form-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-dark);
    margin-bottom: 6px;
}

.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 2px solid #cbd5e1;
    font-size: 14px;
    font-family: inherit;
    background-color: var(--color-white);
    transition: var(--transition-normal);
    box-sizing: border-box;
    line-height: 1.4;
    color: var(--color-text-dark);
}

.form-field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23334155' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-field textarea {
    min-height: 100px;
    resize: vertical;
}

/* Placeholder styling */
.form-field input::placeholder,
.form-field textarea::placeholder {
    color: #94a3b8;
    font-size: 13px;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    outline: none;
    border-color: var(--color-secondary);
    background-color: var(--color-white);
    box-shadow: 0 0 0 3px rgba(31, 60, 136, 0.1);
}

/* Messages */
#messageBox {
    margin-bottom: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.form-message {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    line-height: 1.4;
}

.form-success {
    background-color: #ECFDF5;
    color: #065F46;
    border: 2px solid #10B981;
}

.form-error {
    background-color: #FEF2F2;
    color: #991B1B;
    border: 2px solid #EF4444;
}

.form-loading {
    background-color: #FFFBEB;
    color: #92400E;
    border: 2px solid #F59E0B;
}

/* Bouton submit */
.contact-submit {
    width: 100%;
    padding: 13px;
    font-size: 14px;
    font-weight: 600;
    background-color: var(--color-secondary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-normal);
}

.contact-submit:hover {
    background-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(31, 60, 136, 0.3);
}

.contact-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   9. PAGE ENTREPRISES - HERO / CAROUSEL
   ============================================ */
.companies-hero {
  width: 100%;
  margin-bottom: 60px;
}
.carousel {
  width: 100%;
  overflow: hidden;
}
.carousel-track {
  display: flex;
  gap: 40px;
  animation: scroll 20s linear infinite;
}
.carousel-track a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 60px;
  flex-shrink: 0;
}
.carousel-track img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================
   10. PAGE ENTREPRISES - CONTENU
   ============================================ */
.companies-content {
  padding-bottom: 80px;
  width: 100%;
  box-sizing: border-box;
}

/* Layout principal gauche / droite */
.companies-layout {
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Colonne gauche : menu */
#entreprises-menu {
  width: 100%;
}

/* Menu éditions */
.companies-menu {
  position: static;
}

.companies-menu h3 {
  font-size: 18px;
  margin-bottom: 16px;
  color: #2b4271;
}

.companies-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.companies-menu li {
  margin-bottom: 0;
}

.companies-menu a {
  text-decoration: none;
  font-weight: 500;
  color: #2b4271;
  padding: 8px 12px;
  display: block;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.companies-menu a:hover {
  background: rgba(255, 140, 0, 0.15);
  color: #ff8c00;
}

/* Colonne droite : entreprises */
.companies-list {
  flex: 1;
  min-width: 0;
  width: 100%;
}

.companies-list h1 {
  margin-top: 0;
  margin-bottom: 40px;
  font-weight: 600;
  font-size: 32px;
  color: var(--color-secondary);
  text-align: left;
}

/* Grille entreprises */
.companies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 24px;
  width: 100%;
}

.company-card {
  background-color: var(--color-white);
  padding: 24px;
  border-radius: 12px;
  text-align: center;
  text-decoration: none;
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
}

.company-card img {
  width: 100%;
  height: 60px;
  object-fit: contain;
}

.company-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}


/* ============================================
   11. FOOTER
   ============================================ */
.forum-footer {
    background-color: var(--color-text);
    color: var(--color-gray-light);
    padding: 40px 20px 20px;
    font-size: var(--font-size-sm);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto 30px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.footer-column h3,
.footer-column h4 {
    color: var(--color-white);
    margin-bottom: 12px;
    font-weight: 600;
    font-size: var(--font-size-base);
}

.footer-column p {
    line-height: 1.6;
    color: var(--color-gray);
}

.footer-logo {
    text-align: center;
}

.footer-logo img {
    max-width: 120px;
    height: auto;
    opacity: 0.85;
    transition: var(--transition-normal);
    margin: 0 auto;
}

.footer-logo img:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: var(--color-gray);
    font-size: 13px;
}

/* ============================================
   12. RESPONSIVE - TABLETTES (768px+)
   ============================================ */
@media (min-width: 768px) {
    /* Navigation */
    .forum-navbar {
        padding: 12px 30px;
    }
    
    .navbar-logo img {
        height: 46px;
    }
    
    .navbar-nav {
        gap: 24px;
    }
    
    .navbar-nav li a {
        font-size: 16px;
        padding: 10px 14px;
    }
    
    /* Hero */
    .forum-hero {
        padding: 40px 30px;
    }
    
    .forum-hero-content {
        padding: 40px 30px;
        border-radius: 20px;
    }
    
    .forum-images {
        flex-direction: row;
        justify-content: center;
    }
    
    .forum-images img {
        max-width: 300px;
    }
    
    .forum-images img:last-child {
        display: block;
    }
    
    /* Titres */
    .page-title h1 {
        font-size: 40px;
    }
    
    .page-title p {
        font-size: var(--font-size-lg);
    }
    
    /* Stats */
    .forum-stats {
        flex-direction: row;
        justify-content: center;
        gap: 40px;
    }
    
    .stat {
        width: auto;
        padding: 30px 40px;
    }
    
    .stat .number {
        font-size: 48px;
    }
    
    /* Boutons */
    .forum-btn,
    .cta-button,
    .contact-submit {
        width: auto;
        padding: 14px 32px;
        display: inline-block;
    }
    
    /* CTA */
    .forum-cta {
        padding: 60px 30px;
    }
    
    .forum-cta h2 {
        font-size: 32px;
    }
    
    .forum-cta p {
        font-size: var(--font-size-lg);
    }
    
    /* Contact */
    .forum-contact {
        padding: 60px 30px;
    }
    
    .forum-contact h2 {
        font-size: 36px;
    }
    
    .forum-contact-subtitle {
        font-size: 18px;
    }
    
    .contact-form {
        padding: 0;
    }
    
    .form-field label {
        font-size: 16px;
    }
    
    .form-field input,
    .form-field textarea,
    .form-field select {
        padding: 18px 20px;
        font-size: 16px;
    }
    
    .form-field input::placeholder,
    .form-field textarea::placeholder {
        font-size: 15px;
    }
    
    /* Carrousel */
    .carousel-track {
        gap: 40px;
    }
    
    .carousel-track a {
        width: 110px;
        height: 55px;
    }
    
    /* Page entreprises - Layout sidebar */

    .companies-hero {
    padding: 30px 0;
  }
  #entreprises-hero {
  padding-top: 120px; 
}
    .companies-layout {
      flex-direction: column;
      gap: 24px;
    }

    #entreprises-menu {
      width: 100%;
      flex-shrink: unset;
    }

    .companies-menu {
      position: static;
    }

    .companies-menu ul {
      flex-direction: row;
      flex-wrap: wrap;
      gap: 8px;
    }

    .companies-menu li {
      margin-bottom: 0;
    }

    .companies-menu li a {
    padding: 8px 12px;
    font-size: 13px;
    background-color: #f3f4f6;
    border-radius: 20px;
    }

    .companies-menu li.active a::before {
      display: none;
    }

    .companies-menu li.active a {
      background-color: #FFF7ED;
      color: #F97316;
    }

    .companies-list h1 {
      font-size: 22px;
      margin-bottom: 20px;
      text-align: center;
    }

    .companies-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .company-card {
    padding: 16px;
    min-height: 80px;
  }

  .company-card img {
    height: 45px;
  }
    
    /* Footer */
    .footer-container {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 40px;
    }
    
    .footer-logo {
        text-align: right;
    }
    
    .footer-logo img {
        margin: 0;
    }
}

/* ============================================
   13. RESPONSIVE - DESKTOP (1024px+)
   ============================================ */
@media (min-width: 1024px) {
    /* Hero - Layout en 2 colonnes */
    .forum-hero-content {
        flex-direction: row;
        gap: 50px;
        padding: 50px 40px;
    }
    
    .forum-text {
        flex: 1.1;
    }
    
    .forum-text h1 {
        font-size: 48px;
        font-weight: 600;
        margin-bottom: 30px;
    }
    
    .forum-description {
        font-size: var(--font-size-lg);
        max-width: 520px;
    }
    
    .forum-images {
        flex: 0.9;
        flex-direction: column;
    }
    
    .forum-images img {
        width: 100%;
        max-width: 400px;
        border: 7px solid var(--color-white);
        border-radius: 16px;
    }
    
    /* Titres */
    .page-title h1 {
        font-size: 48px;
    }
    
    /* Stats */
    .forum-stats {
        gap: 60px;
    }
    
    /* CTA */
    .forum-cta {
        padding: var(--spacing-xxl) var(--spacing-lg);
    }
    
    /* Contact */
    .forum-contact {
        padding: var(--spacing-xxl) var(--spacing-lg);
    }
    
    .forum-contact h2 {
        font-size: 36px;
    }
    
    /* Carrousel */
    
    .carousel-track {
        gap: 60px;
    }
    
    .carousel-track a {
        width: 140px;
        height: 70px;
    }
    
    .companies-layout {
    flex-direction: row;
    gap: 60px;
  }

  #entreprises-menu {
    width: 260px;
    flex-shrink: 0;
  }
  #entreprises-hero {
  padding-top: 120px; 
}

  .companies-menu {
    position: sticky;
    top: 120px;
  }

  .companies-menu ul {
    flex-direction: column;
    gap: 0;
  }
  .companies-menu li {
    margin-bottom: 10px;
  }

  .companies-menu h3 {
    text-align: left;
  }

  .companies-menu li a {
    background-color: transparent;
    border: none;
    padding: 10px 16px;
    text-align: left;
  }
  .companies-menu li.active a::before {
    content: "";
    position: absolute;
    left: -23px;
    top: 0;
    height: 100%;
    width: 3px;
    background-color: #F97316;
    border-radius: 2px;
  }

  .companies-menu li.active a {
    position: relative;
    background-color: #FFF7ED;
    border: none;
  }

  .companies-list h1 {
    font-size: 36px;
    margin-bottom: 40px;
  }
  .companies-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
  }
}

/* ============================================
   14. RESPONSIVE - GRAND DESKTOP (1200px+)
   ============================================ */
@media (min-width: 1200px) {
    .navbar-nav {
        gap: 40px;
    }
    
    .navbar-nav li a {
        font-size: 17px;
        padding: 10px 16px;
    }
    
    .forum-hero-content {
        max-width: 1100px;
        gap: 60px;
    }
    
    .forum-stats {
        gap: 80px;
    }
    
    .companies-content {
        gap: 60px;
    }
}

/* ============================================
   15. UTILITAIRES & ANIMATIONS
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Amélioration de la lisibilité sur petits écrans */
@media (max-width: 380px) {
    body {
        font-size: 15px;
    }
    
    .page-title h1 {
        font-size: 26px;
    }
    
    .forum-btn,
    .cta-button,
    .contact-submit {
        font-size: 15px;
        padding: 14px 20px;
    }
    
    .navbar-nav li a {
        font-size: 10px;
        padding: 5px 6px;
    }
    /* Page entreprise*/
    .companies-list h1 {
    font-size: 18px;
  }

  .companies-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .company-card {
    padding: 12px;
    min-height: 70px;
  }

  .company-card img {
    height: 38px;
  }
}