/* ===== RESPONSIVE : ÉCRANS LARGE (1440px et moins) ===== */
/* Ajuste la largeur max du conteneur pour les écrans 1440p */
@media (max-width: 1440px) {
  .container {
    max-width: 1140px;
  }
}

/* ===== RESPONSIVE : ÉCRANS MOYENS (1200px et moins) ===== */
/* Table : réduit la taille du héro, 2 colonnes pour filiales, galerie et footer */
@media (max-width: 1200px) {
  .container {
    max-width: 960px;
  }

  .hero-content h1 {
    font-size: 2.8rem;
  }

  .filiales-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .galerie-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

}

/* ===== RESPONSIVE : TABLETTE (992px et moins) ===== */
/* Passe la plupart des grilles en 1 colonne, réduit les tailles de police */
@media (max-width: 992px) {
  .container {
    max-width: 720px;
  }

  .section {
    padding: 70px 0;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .hero-content h1 {
    font-size: 2.3rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .presentation-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .presentation-image::before {
    display: none;
  }


  .activites-grid {
    grid-template-columns: 1fr;
  }

  .chiffres-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .actualites-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-home-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .values-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .activity-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .activity-content.reverse {
    direction: ltr;
  }

  .news-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .news-featured {
    grid-template-columns: 1fr;
  }

  .news-featured-img {
    height: 300px;
  }

  .media-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-page-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .page-header {
    height: 300px;
    padding-top: 90px;
  }

  .page-header-content h1 {
    font-size: 2.2rem;
  }

  .auth-modal-content {
    max-height: 90vh;
  }

  .auth-guide {
    padding: 40px 28px;
  }

  .auth-form-wrap {
    padding: 40px 32px;
  }
}

/* ===== RESPONSIVE : MOBILE LARGE (1024px et moins) ===== */
/* Active le menu hamburger, transforme la navigation en panneau latéral */
@media (max-width: 1024px) {
  .why-album-card {
    width: 220px;
  }

  .why-content {
    gap: 24px;
  }

  .hamburger {
    display: flex;
    margin-left: auto;   /* Pousse le hamburger à droite */
  }

  .nav {
    order: 3;
  }

  /* Overlay flouté derrière le menu mobile */
  .menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
  }

  .menu-overlay.active {
    opacity: 1;
    pointer-events: all;
  }

  /* Panneau latéral du menu mobile (glisse depuis la droite) */
  .nav-list {
    position: fixed;
    top: 0;
    right: -100%;          /* Caché hors de l'écran */
    width: 300px;
    max-width: 80vw;
    height: 100vh;
    height: 100dvh;        /* Tient compte de la barre d'adresse mobile */
    background: var(--white);
    flex-direction: column;
    padding: 0;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
    transition: right 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 999;
    overflow-y: auto;
  }

  .nav-list.active {
    right: 0;              /* Glisse dans l'écran */
  }

  /* En-tête du menu mobile (logo + bouton X) */
  .menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--light-gray);
    flex-shrink: 0;
  }

  .menu-header .menu-logo {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--blue);
  }

  .menu-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--light-gray);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--text);
    transition: all 0.3s ease;
  }

  .menu-close:hover {
    background: var(--gold);
    color: var(--white);
  }

  /* Liens du menu en version mobile */
  .nav-list > li {
    width: 100%;
  }

  .nav-list a {
    color: var(--text) !important;
    padding: 15px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    width: 100%;
    white-space: normal;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--light-gray);
    text-transform: none;
    letter-spacing: normal;
  }

  .nav-list a i {
    width: 20px;
    text-align: center;
    font-size: 1.05rem;
    color: var(--gold);
  }

  .nav-list a::after {
    display: none;
  }

  .nav-list a:hover {
    background: var(--light-gray);
    color: var(--blue) !important;
    padding-left: 28px;
  }

  .nav-list a.active {
    background: linear-gradient(135deg, rgba(0, 59, 113, 0.06), rgba(201, 168, 76, 0.06));
    color: var(--gold) !important;
    font-weight: 600;
    border-left: 3px solid var(--gold);
  }

  /* Bouton "Se Connecter" dans le menu mobile */
  .nav-list .nav-btn {
    margin: 20px 24px;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    color: var(--white) !important;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    justify-content: center;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: none;
    width: auto;
  }

  .nav-list .nav-btn:hover {
    box-shadow: 0 8px 25px rgba(0, 59, 113, 0.3);
    background: linear-gradient(135deg, var(--blue-dark), var(--blue));
    padding-left: 24px;
    transform: translateY(-2px);
  }

  .nav-list .nav-btn i {
    color: var(--white);
  }

  /* Profile dropdown in mobile nav */
  .nav-profile-item {
    width: 100%;
    margin: 0;
    padding: 16px 24px;
  }

  .profile-trigger {
    width: 100%;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--light-gray);
    border-color: var(--gray-200);
    color: var(--text);
    border-radius: 12px;
  }

  .profile-dropdown {
    position: static;
    width: 100%;
    box-shadow: none;
    border-radius: 12px;
    margin-top: 8px;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    border: 1px solid var(--gray-200);
  }

  .profile-dropdown.show {
    display: block;
  }

  .dropdown-header {
    padding: 16px 20px;
  }
}

/* ===== RESPONSIVE : PETITE TABLETTE (768px et moins) ===== */
/* Optimisation pour les écrans moyens : texte plus petit, colonnes uniques */
@media (max-width: 768px) {
  .container {
    max-width: 540px;
  }

  .why-content {
    flex-direction: column;
    gap: 20px;
  }

  .why-content-img {
    min-height: 200px;
  }

  .section {
    padding: 60px 0;
  }

  .section-header h2 {
    font-size: 1.8rem;
  }

  .hero-content {
    padding: 0 30px;
    align-items: flex-start;
    max-width: 100%;
  }

  .hero-content h1 {
    font-size: 2rem;
    text-align: left;
  }

  .hero-content p {
    max-width: 100%;
    text-align: left;
  }

  .hero-arrows {
    display: none;   /* Cache les flèches du slider sur mobile */
  }

  .filiales-grid {
    grid-template-columns: 1fr;
    max-width: 450px;
    margin: 0 auto;
  }

  .activite-card {
    padding: 28px 20px 24px;
  }

  .why-album-card {
    width: 300px;
  }

  .why-album {
    height: 300px;
  }

  .why-album:hover {
    height: 560px;
  }

  .why-album:hover .why-album-card:nth-child(1) {
    left: 25%;
    top: 20px;
  }

  .why-album:hover .why-album-card:nth-child(2) {
    left: 75%;
    top: 20px;
  }

  .why-album:hover .why-album-card:nth-child(3) {
    left: 25%;
    top: 300px;
  }

  .why-album:hover .why-album-card:nth-child(4) {
    left: 75%;
    top: 300px;
  }

  .chiffres-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .chiffre-number {
    font-size: 2.5rem;
  }

  .actualites-grid {
    grid-template-columns: 1fr;
    max-width: 450px;
    margin: 0 auto;
  }

  .galerie-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .galerie-item:nth-child(1) {
    grid-row: span 1;
    grid-column: span 2;
  }

  .galerie-item:nth-child(2),
  .galerie-item:nth-child(3) {
    grid-column: span 1;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .values-list {
    grid-template-columns: 1fr;
  }

  .news-list {
    grid-template-columns: 1fr;
  }

  .news-featured-body {
    padding: 25px;
  }

  .news-featured-body h2 {
    font-size: 1.3rem;
  }

  .media-grid {
    grid-template-columns: 1fr;
    max-width: 450px;
    margin: 0 auto;
  }

  .media-tabs {
    flex-direction: column;
    align-items: center;
  }

  .job-card {
    grid-template-columns: 1fr;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .page-header {
    height: 250px;
    padding-top: 90px;
  }

  .page-header-content h1 {
    font-size: 1.8rem;
  }

  .map-wrapper {
    height: 350px;
  }

  /* Modal auth : passe en colonne, le guide au-dessus du formulaire */
  .auth-inner {
    flex-direction: column;
  }

  .auth-guide {
    width: 100%;
    padding: 36px 28px;
    min-height: auto;
  }

  .auth-guide-content h2 {
    font-size: 1.5rem;
  }

  .auth-steps {
    flex-direction: row;
    gap: 12px;
    overflow-x: auto;
  }

  .auth-step {
    flex-shrink: 0;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 140px;
    gap: 10px;
  }

  .auth-form-wrap {
    width: 100%;
    padding: 36px 28px;
    max-height: none;
    flex: 1;
  }

  .auth-modal-content {
    max-height: 95vh;
  }
}

/* ===== RESPONSIVE : PETIT MOBILE (480px et moins) ===== */
/* Taille minimale : polices réduites, espacement resserré, éléments empilés */
@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .section {
    padding: 50px 0;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .section-header h2 {
    font-size: 1.5rem;
  }

  .hero-content h1 {
    font-size: 1.6rem;
  }

  .hero-content p {
    font-size: 0.9rem;
  }

  .hero {
    min-height: 500px;
  }

  .btn {
    padding: 10px 22px;
    font-size: 0.85rem;
  }

  .chiffres-grid {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }

  .chiffre-item {
    padding: 20px;
  }

  .chiffre-number {
    font-size: 2rem;
  }

  .chiffre-icon {
    font-size: 1.8rem;
  }

  .galerie-grid {
    grid-template-columns: 1fr;
  }

  .galerie-item:nth-child(1) {
    grid-column: span 1;
  }


  .activite-card {
    padding: 24px 18px 22px;
  }

  .why-album-card {
    width: 150px;
    padding: 18px 14px;
  }

  .why-album {
    height: 260px;
  }

  .why-album:hover {
    height: 540px;
  }

  .why-album:hover .why-album-card:nth-child(1) {
    left: 25%;
    top: 20px;
  }

  .why-album:hover .why-album-card:nth-child(2) {
    left: 75%;
    top: 20px;
  }

  .why-album:hover .why-album-card:nth-child(3) {
    left: 25%;
    top: 280px;
  }

  .why-album:hover .why-album-card:nth-child(4) {
    left: 75%;
    top: 280px;
  }

  .activite-card-overlay {
    padding: 0;
  }

  .activite-card-overlay h3 {
    font-size: 1.15rem;
  }

  .logo img {
    height: 40px;
    width: 40px;
    padding: 5px;
    border-radius: 10px;
  }

  .contact-card {
    flex-direction: column;
    gap: 10px;
  }

  .footer {
    padding: 50px 0 0;
  }

  .footer-bottom {
    margin-top: 40px;
  }

  .about-card {
    padding: 25px;
  }

  .activity-image img {
    height: 300px;
  }

  .career-form {
    padding: 25px;
  }

  .page-header {
    height: 220px;
    padding-top: 85px;
  }

  .page-header-content h1 {
    font-size: 1.5rem;
  }

  .map-wrapper {
    height: 280px;
    border-radius: 12px;
  }

  .map-badge {
    padding: 8px 16px;
    font-size: 0.75rem;
    top: 16px;
  }

  /* Modal auth : encore plus compact */
  .auth-modal-content {
    max-height: 95vh;
    border-radius: 16px;
    max-width: 96vw;
  }

  .auth-guide {
    padding: 28px 20px;
  }

  .auth-guide-content h2 {
    font-size: 1.3rem;
  }

  .auth-guide-sub {
    font-size: 0.8rem;
    margin-bottom: 24px;
  }

  .auth-steps {
    display: none;   /* Cache les étapes du guide sur très petit écran */
  }

  .auth-form-wrap {
    padding: 28px 20px;
    max-height: none;
    flex: 1;
  }

  .auth-tabs {
    margin-bottom: 20px;
  }

  .auth-form-group input {
    padding: 12px 14px;
    height: 44px;
    font-size: 0.85rem;
  }

  .auth-form-row {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }

  .auth-submit {
    padding: 14px;
    font-size: 0.9rem;
  }
}
