/* ==========================================================================
   LAYOUT.CSS - Header, Navigation, Footer & Structure
   Sahel Group 2026 - Layout Components
   Version: 2.0 - Optimisée
   ========================================================================== */

/* ==========================================================================
   CONTAINER & GRID SYSTEM
   ========================================================================== */

.container {
  width: 100%;
  padding-right: var(--container-padding, 1.5rem);
  padding-left: var(--container-padding, 1.5rem);
  margin-right: auto;
  margin-left: auto;
}

@media (min-width: 576px) {
  .container {
    max-width: 540px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
}

@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}

@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

.container-fluid {
  width: 100%;
  padding-right: var(--container-padding, 1.5rem);
  padding-left: var(--container-padding, 1.5rem);
}

/* ==========================================================================
   HEADER & NAVBAR - SAHEL GROUP
   ========================================================================== */

.sahel-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  z-index: var(--z-fixed, 1030);
  transition: var(--transition-smooth);
  position: sticky;
  top: 0;
  width: 100%;
}

/* Navbar */
.sahel-navbar {
  padding: clamp(10px, 1.5vw, 15px) 0;
  transition: var(--transition-smooth);
}

/* État lors du scroll (Classe ajoutée via JS) */
.sahel-header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-md);
}

.sahel-header.scrolled .sahel-navbar {
  padding: 8px 0;
}

/* Réduction dynamique du Logo au scroll */
.sahel-header.scrolled .sahel-logo-wrapper {
  width: 48px !important;
  height: 48px !important;
}

.sahel-header.scrolled .brand-name {
  font-size: 1.1rem;
}

.sahel-header.scrolled .brand-tagline {
  display: none;
}

/* ==========================================================================
   LOGO & BRANDING
   ========================================================================== */

.sahel-logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(60px, 8vw, 70px);
  height: clamp(60px, 8vw, 70px);
  background: var(--sahel-white);
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.8);
  padding: 0;
  transition: var(--transition-smooth);
}

.sahel-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.25);
  transition: var(--transition-base);
  display: block;
}

.navbar-brand:hover .sahel-logo-wrapper {
  transform: scale(1.05);
  box-shadow: var(--shadow-primary);
  border-color: var(--sahel-primary-light);
}

.navbar-brand:hover .sahel-logo {
  transform: scale(1.35);
}

/* ==========================================================================
   TEXTE ACCOMPAGNANT LE LOGO
   ========================================================================== */

.brand-text-wrapper {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  margin-left: 14px;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  transition: var(--transition-base);
}

.brand-tagline {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--sahel-accent-dark);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 2px;
  transition: var(--transition-base);
}

/* ==========================================================================
   LIENS DE NAVIGATION
   ========================================================================== */

.sahel-nav-link {
  color: var(--sahel-dark-light) !important;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.6rem 1.2rem !important;
  margin: 0 0.1rem;
  position: relative;
  transition: var(--transition-base);
  border-radius: var(--radius-sm);
}

/* Effet underline au survol */
.sahel-nav-link::after {
  content: "";
  position: absolute;
  bottom: 6px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: var(--transition-smooth);
  transform: translateX(-50%);
  border-radius: 2px;
}

.sahel-nav-link:hover,
.sahel-nav-link.active {
  color: var(--sahel-primary) !important;
  background: rgba(var(--sahel-primary-rgb), 0.04);
}

.sahel-nav-link:hover::after,
.sahel-nav-link.active::after {
  width: 50%;
}

/* Dropdown */
.sahel-nav-link .dropdown-toggle::after {
  margin-left: 0.5rem;
  transition: var(--transition-fast);
}

.sahel-nav-link.show .dropdown-toggle::after {
  transform: rotate(180deg);
}

/* ==========================================================================
   BOUTON CTA NAVBAR
   ========================================================================== */

.sahel-cta-btn {
  background: var(--gradient-primary) !important;
  color: white !important;
  font-weight: 700 !important;
  padding: 0.65rem 1.6rem !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
  border: none !important;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

/* Effet de brillance (Shine) */
.sahel-cta-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: 0.6s;
}

.sahel-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-primary);
}

.sahel-cta-btn:hover::before {
  left: 100%;
}

.sahel-cta-btn:active {
  transform: translateY(0);
}

/* ==========================================================================
   MOBILE TOGGLER
   ========================================================================== */

.navbar-toggler {
  border: none;
  padding: var(--space-xs);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.navbar-toggler:focus {
  box-shadow: none;
  outline: none;
}

.navbar-toggler:focus-visible {
  outline: 2px solid var(--sahel-primary);
  outline-offset: 2px;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 102, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* ==========================================================================
   FOOTER - SAHEL GROUP 2026
   ========================================================================== */

.sahel-footer {
  background: linear-gradient(180deg, #1a1d24 0%, #0f1117 100%);
  color: var(--sahel-white);
  position: relative;
  overflow: hidden;
  font-family: var(--font-body);
  margin-top: auto;
}

/* Ligne décorative supérieure */
.sahel-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--sahel-primary) 25%,
    var(--sahel-accent) 50%,
    var(--sahel-warning) 75%,
    transparent
  );
  opacity: 0.5;
}

/* ==========================================================================
   FOOTER TOP SECTION
   ========================================================================== */

.sahel-footer-top {
  padding: clamp(2.5rem, 6vw, 4rem) 0;
  position: relative;
  z-index: 1;
}

/* Logo Footer */
.sahel-footer .sahel-logo-wrapper {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

.sahel-footer .brand-text-wrapper {
  align-items: flex-start;
}

.sahel-footer .brand-name {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sahel-footer .footer-description {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.95rem;
  line-height: 1.75;
  margin: 1.25rem 0;
  max-width: 320px;
}

/* ==========================================================================
   TITRES & STRUCTURE FOOTER
   ========================================================================== */

.footer-title,
.sahel-footer-title {
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  margin-bottom: 0.5rem !important;
  color: var(--sahel-white) !important;
  letter-spacing: 0.05em;
  font-family: var(--font-heading);
}

.footer-title-line,
.sahel-footer-line {
  height: 3px;
  width: 35px;
  background: var(--gradient-primary);
  margin-bottom: 1.25rem;
  border-radius: 50px;
}

/* ==========================================================================
   LIENS FOOTER
   ========================================================================== */

.sahel-footer-link {
  color: rgba(255, 255, 255, 0.65) !important;
  font-size: 0.95rem;
  padding: 0.35rem 0;
  display: inline-block;
  transition: var(--transition-smooth);
  text-decoration: none !important;
}

.sahel-footer-link:hover {
  color: var(--sahel-accent-light) !important;
  transform: translateX(6px);
}

/* ==========================================================================
   CONTACT FOOTER
   ========================================================================== */

.footer-contact {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.95rem;
  margin-bottom: 1.1rem;
  line-height: 1.5;
}

.footer-contact i {
  color: var(--sahel-primary-light) !important;
  font-size: 1.15rem;
  line-height: 1.4;
  transition: var(--transition-base);
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

.footer-contact li:hover i {
  transform: scale(1.15);
  color: var(--sahel-accent-light) !important;
}

/* ==========================================================================
   SOCIAL LINKS
   ========================================================================== */

.sahel-social-link {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sahel-white) !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition-smooth);
  text-decoration: none;
  font-size: 1rem;
}

.sahel-social-link:hover {
  background: var(--gradient-primary) !important;
  border-color: transparent !important;
  transform: translateY(-4px);
  box-shadow: var(--shadow-primary);
  color: var(--sahel-white) !important;
}

.social-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   FOOTER BOTTOM
   ========================================================================== */

.sahel-footer-bottom {
  padding: 1.25rem 0;
  background: rgba(0, 0, 0, 0.35);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}

.sahel-footer-bottom .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.sahel-footer-bottom p {
  margin: 0;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
}

.sahel-footer-bottom .text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  padding: 0 3px;
}

/* ==========================================================================
   RESPONSIVE - TABLET & MOBILE
   ========================================================================== */

/* === Tablet & Mobile (< 991.98px) === */
@media (max-width: 991.98px) {
  /* Navbar Mobile */
  .sahel-navbar {
    padding: var(--space-sm) 0;
  }

  .navbar-collapse {
    background: rgba(255, 255, 255, 0.98);
    margin-top: var(--space-sm);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.05);
  }

  .sahel-nav-link {
    margin: 0 !important;
    padding: 0.9rem 0 !important;
    border-bottom: 1px solid var(--sahel-light);
    text-align: center;
    border-radius: 0;
  }

  .sahel-nav-link::after {
    display: none;
  }

  .sahel-nav-link:last-of-type {
    border-bottom: none;
  }

  .sahel-cta-btn {
    width: 100%;
    margin-top: var(--space-sm);
    text-align: center;
    justify-content: center;
  }

  /* Footer Mobile */
  .sahel-footer-top {
    text-align: center;
    padding: 2.5rem 0 2rem;
  }

  .sahel-footer .sahel-logo-wrapper {
    margin: 0 auto;
    width: 52px;
    height: 52px;
  }

  .sahel-footer .brand-text-wrapper {
    align-items: center;
    margin-left: 0;
    margin-top: 0.75rem;
  }

  .sahel-footer .footer-description {
    margin: 1rem auto 1.5rem;
    max-width: 90%;
  }

  .footer-title-line,
  .sahel-footer-line {
    margin: 0.5rem auto 1rem;
  }

  .footer-contact li {
    justify-content: center;
    text-align: left;
  }

  .sahel-footer-link:hover {
    transform: translateY(-2px) !important;
  }

  .social-links {
    justify-content: center !important;
    margin-bottom: 0.5rem;
  }

  .sahel-footer-bottom {
    padding: 1rem 0;
  }
}

/* === Mobile (< 767.98px) === */
@media (max-width: 767.98px) {
  .sahel-logo-wrapper {
    width: 52px;
    height: 52px;
  }

  .brand-name {
    font-size: 1.05rem;
  }

  .brand-tagline {
    font-size: 0.55rem;
  }

  .brand-text-wrapper {
    margin-left: 10px;
  }

  /* Footer */
  .sahel-footer-top {
    padding: 2rem 0 1.5rem;
  }

  .sahel-footer .sahel-logo-wrapper {
    width: 48px;
    height: 48px;
  }

  .sahel-footer .footer-description {
    font-size: 0.9rem;
  }

  .footer-title,
  .sahel-footer-title {
    font-size: 1rem !important;
    margin-top: 1.25rem;
  }

  .footer-contact li {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }

  .sahel-social-link {
    width: 38px;
    height: 38px;
    font-size: 0.95rem;
  }
}

/* === Small Mobile (< 575.98px) === */
@media (max-width: 575.98px) {
  .sahel-logo-wrapper {
    width: 46px;
    height: 46px;
  }

  .brand-name {
    font-size: 0.95rem;
  }

  .brand-tagline {
    font-size: 0.5rem;
    letter-spacing: 0.12em;
  }

  .brand-text-wrapper {
    margin-left: 8px;
  }

  .navbar-collapse {
    padding: var(--space-md);
    margin-top: 0.75rem;
  }

  .sahel-nav-link {
    padding: 0.8rem 0 !important;
    font-size: 0.95rem;
  }

  .sahel-cta-btn {
    padding: 0.75rem 1.25rem !important;
    font-size: 0.9rem !important;
  }

  /* Footer */
  .sahel-footer-top {
    padding: 1.75rem 0 1.25rem;
  }

  .sahel-footer .sahel-logo-wrapper {
    width: 44px;
    height: 44px;
  }

  .sahel-footer .footer-description {
    font-size: 0.85rem;
    line-height: 1.65;
  }

  .footer-title,
  .sahel-footer-title {
    font-size: 0.95rem !important;
  }

  .footer-title-line,
  .sahel-footer-line {
    width: 30px;
    height: 2px;
  }

  .sahel-footer-link {
    font-size: 0.9rem;
  }

  .footer-contact li {
    font-size: 0.85rem;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
  }

  .footer-contact i {
    font-size: 1rem;
  }

  .sahel-social-link {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }

  .social-links {
    gap: 0.6rem;
  }

  .sahel-footer-bottom p {
    font-size: 0.8rem;
  }
}

/* === Extra Small Mobile (< 374.98px) === */
@media (max-width: 374.98px) {
  .sahel-logo-wrapper {
    width: 42px;
    height: 42px;
  }

  .brand-name {
    font-size: 0.9rem;
  }

  .brand-tagline {
    display: none;
  }

  .sahel-footer .sahel-logo-wrapper {
    width: 40px;
    height: 40px;
  }

  .sahel-social-link {
    width: 34px;
    height: 34px;
  }
}

/* ==========================================================================
   RESPONSIVE - DESKTOP & LARGE SCREENS
   ========================================================================== */

/* === Desktop (>= 992px) === */
@media (min-width: 992px) {
  .navbar-collapse {
    background: transparent !important;
    box-shadow: none !important;
    border: none;
    padding: 0;
    margin-top: 0;
  }

  .sahel-nav-link {
    padding: 0.6rem 1.1rem !important;
    font-size: 0.95rem;
  }

  .sahel-cta-btn {
    padding: 0.65rem 1.5rem !important;
  }

  .sahel-footer-top {
    text-align: left;
  }

  .sahel-footer .brand-text-wrapper {
    align-items: flex-start;
  }
}

/* === Large Desktop (>= 1200px) === */
@media (min-width: 1200px) {
  .sahel-logo-wrapper {
    width: 68px;
    height: 68px;
  }

  .brand-name {
    font-size: 1.5rem;
  }

  .brand-tagline {
    font-size: 0.62rem;
  }

  .sahel-nav-link {
    padding: 0.6rem 1.25rem !important;
    font-size: 1rem;
  }
}

/* === Ultra Large Desktop (>= 1400px) === */
@media (min-width: 1400px) {
  .sahel-logo-wrapper {
    width: 75px;
    height: 75px;
  }

  .brand-name {
    font-size: 1.55rem;
  }

  .sahel-nav-link {
    font-size: 1.02rem;
    padding: 0.6rem 1.4rem !important;
  }
}

/* ==========================================================================
   ANIMATIONS & PERFORMANCES
   ========================================================================== */

.sahel-navbar,
.sahel-nav-link,
.sahel-social-link,
.sahel-footer .sahel-logo-wrapper,
.sahel-logo-wrapper,
.sahel-cta-btn {
  will-change: transform;
  backface-visibility: hidden;
}

/* ==========================================================================
   LANGUAGE SWITCHER - Bouton FR / EN
   ========================================================================== */

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 50px;
  padding: 3px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border: none;
  background: transparent;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.22s ease;
  color: var(--sahel-dark-light, #444);
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  text-transform: uppercase;
}

.lang-btn .lang-flag {
  font-size: 1rem;
  line-height: 1;
}

.lang-btn:hover:not(.active) {
  background: rgba(var(--sahel-primary-rgb), 0.08);
  color: var(--sahel-primary);
}

.lang-btn.active {
  background: var(--gradient-primary);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(var(--sahel-primary-rgb), 0.3);
}

/* Mobile: dans le menu collapse */
@media (max-width: 991.98px) {
  .nav-item .lang-switcher {
    margin: 0.5rem auto;
    width: fit-content;
    background: rgba(0, 0, 0, 0.04);
  }

  .lang-btn {
    padding: 7px 14px;
    font-size: 0.82rem;
  }
}

/* Footer specific styles */
.sahel-footer-bottom .lang-switcher {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.sahel-footer-bottom .lang-btn {
  color: rgba(255, 255, 255, 0.7);
}

.sahel-footer-bottom .lang-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.sahel-footer-bottom .lang-btn.active {
  background: var(--gradient-primary);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(var(--sahel-primary-rgb), 0.3);
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
  .sahel-header,
  .sahel-footer,
  .sahel-cta-btn,
  .navbar-toggler,
  .social-links {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }
}
