/* ==========================================================================
   Header / Navigation — ClickToRank
   ========================================================================== */

.ctr-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  background-color: rgba(13, 17, 23, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(139, 148, 158, 0.15);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.ctr-header.is-scrolled {
  background-color: rgba(13, 17, 23, 0.95);
  border-bottom-color: rgba(0, 255, 136, 0.2);
}

.ctr-header__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo */
.ctr-header__logo {
  font-family: var(--ctr-font-heading);
  font-weight: var(--ctr-weight-heading);
  font-size: 22px;
  color: var(--ctr-color-text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
  position: relative;
  z-index: 1001; 
}

.ctr-header__logo:hover {
  color: var(--ctr-color-text-primary);
}

.ctr-header__logo-accent {
  color: var(--ctr-color-accent);
}

/* Navigation */
.ctr-header__nav-list {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ctr-header__nav-link {
  font-family: var(--ctr-font-body);
  font-weight: 400;
  font-size: 15px;
  color: var(--ctr-color-text-secondary);
  text-decoration: none;
  position: relative;
  padding-bottom: 4px;
}

.ctr-header__nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background-color: var(--ctr-color-accent);
  transition: width 0.25s ease;
}

.ctr-header__nav-link:hover {
  color: var(--ctr-color-text-primary);
}

.ctr-header__nav-link:hover::after {
  width: 100%;
}

/* CTA */
.ctr-header__cta {
  font-family: var(--ctr-font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--ctr-color-bg);
  background-color: var(--ctr-color-accent);
  padding: 11px 22px;
  border-radius: var(--ctr-radius-sm);
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ctr-header__cta:hover {
  color: var(--ctr-color-bg);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 255, 136, 0.35);
}

/* Burger (mobile) */
.ctr-header__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  position: relative;
  z-index: 1001; 
}

.ctr-header__burger-line {
  width: 100%;
  height: 2px;
  background-color: var(--ctr-color-text-primary, #fff);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.ctr-header__burger.is-active .ctr-header__burger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.ctr-header__burger.is-active .ctr-header__burger-line:nth-child(2) {
  opacity: 0;
}
.ctr-header__burger.is-active .ctr-header__burger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .ctr-header__nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(13, 17, 23, 0.98); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transform: translateY(-100%);
    transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    padding: 100px 32px 32px; 
    z-index: 999; 
  }

  .ctr-header__nav.is-open {
    transform: translateY(0);
  }

  .ctr-header__nav-list {
    flex-direction: column;
    align-items: center; 
    gap: 32px;
  }

  .ctr-header__nav-link {
    font-size: 20px; 
  }

  .ctr-header__cta {
    display: none;
  }

  .ctr-header__burger {
    display: flex;
  }

  .ctr-header__nav-item {
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
  }

  .ctr-header__nav.is-open .ctr-header__nav-item {
    opacity: 1;
    transform: translateY(0);
  }

  .ctr-header__nav.is-open .ctr-header__nav-item:nth-child(1) { transition-delay: 0.2s; }
  .ctr-header__nav.is-open .ctr-header__nav-item:nth-child(2) { transition-delay: 0.3s; }
  .ctr-header__nav.is-open .ctr-header__nav-item:nth-child(3) { transition-delay: 0.4s; }
  .ctr-header__nav.is-open .ctr-header__nav-item:nth-child(4) { transition-delay: 0.5s; }
  .ctr-header__nav.is-open .ctr-header__nav-item:nth-child(5) { transition-delay: 0.6s; }
}


/* ==========================================================================
   Sous-menu (Dropdown) — Services
   ========================================================================== */
.has-dropdown {
  position: relative;
}

/* ==========================================================================
   Conteneur du lien Services + Flèche (Correction alignements)
   ========================================================================== */

.ctr-header__nav-link-container {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* Flèche du dropdown (Desktop) */
.ctr-header__dropdown-toggle {
  background: none;
  border: none;
  padding: 0;
  margin-left: 6px;
  margin-top: -4px; /* Compense le padding-bottom de 4px du lien pour aligner les textes sur la même ligne */
  color: var(--ctr-color-text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, color 0.2s ease;
}

.ctr-header__dropdown-toggle:hover,
.has-dropdown:hover .ctr-header__dropdown-toggle {
  color: var(--ctr-color-accent);
}

/* Rotation de la flèche au survol (Desktop) */
@media (min-width: 901px) {
  .has-dropdown:hover .ctr-header__dropdown-toggle {
    transform: rotate(180deg);
  }
}

/* Menu déroulant (Desktop par défaut) */
.ctr-header__dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(15px);
  min-width: 200px;
  background-color: rgba(13, 17, 23, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(139, 148, 158, 0.15);
  border-radius: var(--ctr-radius-sm, 8px);
  list-style: none;
  padding: 12px 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 1002;
}

/* Apparition au survol (Desktop) */
@media (min-width: 901px) {
  .has-dropdown:hover .ctr-header__dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }
}

/* Liens du sous-menu */
.ctr-header__dropdown-link {
  display: block;
  padding: 10px 24px;
  font-family: var(--ctr-font-body);
  font-size: 14px;
  color: var(--ctr-color-text-secondary);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.ctr-header__dropdown-link:hover {
  color: var(--ctr-color-accent);
  background-color: rgba(255, 255, 255, 0.03);
}

/* ===== Responsive Dropdown ===== */
@media (max-width: 900px) {
  .ctr-header__nav-link-container {
    justify-content: center;
  }

  .ctr-header__dropdown-menu {
    position: static;
    transform: none;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin-top: 16px;
    display: none; /* Caché par défaut, géré via JS */
    opacity: 1;
    visibility: visible;
    width: 100%;
    text-align: center;
  }
  
  /* Force le conteneur parent à centrer le mot "Services" même quand le sous-menu s'élargit */
  .ctr-header__nav-item.has-dropdown {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* Classe ajoutée via JS pour ouvrir le menu sur mobile */
  .ctr-header__dropdown-menu.is-open {
    display: block;
    animation: fadeInDropdown 0.3s ease forwards;
  }

  /* Rotation de la flèche sur mobile */
  .ctr-header__dropdown-toggle.is-active {
    transform: rotate(180deg);
  }

  .ctr-header__dropdown-link {
    font-size: 16px;
    padding: 10px 0;
  }
}

  @keyframes fadeInDropdown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }
/* ==========================================================================
   Footer — ClickToRank
   ========================================================================== */

.ctr-footer {
  padding: 80px 24px 32px;
  background-color: rgba(139, 148, 158, 0.03);
  border-top: 1px solid rgba(139, 148, 158, 0.15);
}

.ctr-footer__container {
  max-width: 1200px;
  margin: 0 auto;
}

.ctr-footer__top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
}

.ctr-footer__logo {
  font-family: var(--ctr-font-heading);
  font-weight: var(--ctr-weight-heading);
  font-size: 20px;
  color: var(--ctr-color-text-primary);
  text-decoration: none;
}

.ctr-footer__logo-accent {
  color: var(--ctr-color-accent);
}

.ctr-footer__baseline {
  font-family: var(--ctr-font-body);
  font-weight: var(--ctr-weight-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ctr-color-text-secondary);
  margin: 16px 0 0;
  max-width: 280px;
}

.ctr-footer__col-title {
  font-family: var(--ctr-font-heading);
  font-weight: var(--ctr-weight-heading);
  font-size: 14px;
  color: var(--ctr-color-text-primary);
  margin: 0 0 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ctr-footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ctr-footer__link {
  font-family: var(--ctr-font-body);
  font-weight: var(--ctr-weight-body);
  font-size: 14px;
  color: var(--ctr-color-text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.ctr-footer__link:hover {
  color: var(--ctr-color-accent);
}

/* Bottom bar */
.ctr-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  border-top: 1px solid rgba(139, 148, 158, 0.15);
  flex-wrap: wrap;
  gap: 16px;
}

.ctr-footer__copyright {
  font-family: var(--ctr-font-mono);
  font-weight: var(--ctr-weight-mono);
  font-size: 12px;
  color: var(--ctr-color-text-secondary);
}

.ctr-footer__legal {
  display: flex;
  gap: 24px;
}

.ctr-footer__legal-link {
  font-family: var(--ctr-font-body);
  font-weight: var(--ctr-weight-body);
  font-size: 12.5px;
  color: var(--ctr-color-text-secondary);
  text-decoration: none;
}

.ctr-footer__legal-link:hover {
  color: var(--ctr-color-accent);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .ctr-footer__top {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .ctr-footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .ctr-footer {
    padding: 64px 20px 24px;
  }

  .ctr-footer__top {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .ctr-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Ajustement du header quand l'admin WordPress est connecté */
.admin-bar .ctr-header {
  top: 32px;
}

/* La barre d'admin est un peu plus épaisse sur mobile */
@media screen and (max-width: 782px) {
  .admin-bar .ctr-header {
    top: 46px;
  }
}

