/* Footer Aqaryoo — 4 colonnes alignées, thème rouge */

#footer.aq-footer,
.aq-footer {
  position: relative;
  margin-top: 0;
  background: linear-gradient(165deg, #1a1f2e 0%, #282f39 45%, #1e2430 100%) !important;
  color: #fff;
  overflow: hidden;
  height: auto !important;
}

.aq-footer-glow {
  position: absolute;
  top: -120px;
  right: -80px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(220, 53, 69, 0.35) 0%, transparent 70%);
  pointer-events: none;
  animation: aq-footer-glow-pulse 6s ease-in-out infinite;
}

.aq-footer-glow--left {
  top: auto;
  bottom: -100px;
  left: -60px;
  right: auto;
  animation-delay: 3s;
}

@keyframes aq-footer-glow-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.08); }
}

.aq-footer-main {
  position: relative;
  z-index: 2;
  padding-top: 48px;
  padding-bottom: 0;
}

.aq-footer-grid {
  row-gap: 36px;
}

.aq-footer-col {
  display: flex;
  flex-direction: column;
}

.aq-footer-tagline {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  line-height: 1.6;
  width: 100%;
  max-width: 100%;
  margin-bottom: 20px;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-sizing: border-box;
}

.aq-footer-col-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.aq-footer-col-title svg {
  flex-shrink: 0;
  color: #dc3545;
}

.aq-footer-col-title span {
  flex-shrink: 0;
  max-width: 55%;
}

.aq-footer-col-title::after {
  content: "";
  flex: 1 1 auto;
  min-width: 24px;
  height: 3px;
  margin-left: 8px;
  background: linear-gradient(90deg, #dc3545 0%, rgba(220, 53, 69, 0.55) 70%, rgba(220, 53, 69, 0.2) 100%);
  border-radius: 2px;
}

[dir="rtl"] .aq-footer-col-title::after {
  margin-left: 0;
  margin-right: 4px;
  background: linear-gradient(270deg, #dc3545, transparent);
}

.aq-footer-nav {
  display: flex;
  flex-direction: column;
}

.aq-footer-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  color: rgba(255, 255, 255, 0.75) !important;
  font-size: 15px;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.aq-footer-link:hover {
  color: #fff !important;
  transform: translateX(6px);
  text-decoration: none !important;
}

[dir="rtl"] .aq-footer-link:hover {
  transform: translateX(-6px);
}

.aq-footer-link-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #dc3545;
  opacity: 0;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.aq-footer-link:hover .aq-footer-link-dot {
  opacity: 1;
}

.aq-footer-contact-item {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  align-items: flex-start;
}

.aq-footer-contact-item svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #dc3545;
}

.aq-footer-contact-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.aq-footer-contact-value {
  font-size: 15px;
  font-weight: 500;
  color: #fff !important;
}

.aq-footer-contact-value:hover {
  color: #ff8a9a !important;
}

.aq-footer-logo {
  max-width: 110px;
  width: auto;
  height: auto;
  max-height: 72px;
  margin-bottom: 16px;
  object-fit: contain;
  display: block;
}

/* Télécharger les applications — 4e colonne */
.aq-footer-apps-desc {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.65);
  max-width: 220px;
}

.aq-footer-apps {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: flex-start;
}

.aq-footer-app-link {
  display: block;
  width: 148px;
  max-width: 148px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  line-height: 0;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.aq-footer-app-link:hover {
  transform: translateY(-2px);
  opacity: 0.92;
  background: transparent;
  border: none;
}

/* Badge style boutique officiel */
.aq-store-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 148px;
  height: 44px;
  padding: 0 12px;
  box-sizing: border-box;
  border-radius: 8px;
  background: #000;
  border: 1px solid #a6a6a6;
  color: #fff;
  direction: ltr;
  text-align: left;
}

.aq-store-btn__glyph {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  display: block;
}

.aq-store-btn__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  min-width: 0;
}

.aq-store-btn__eyebrow {
  font-size: 9px;
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #fff;
  white-space: nowrap;
}

.aq-store-btn__title {
  font-size: 15px;
  line-height: 1.15;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.aq-footer-app-link img,
.aq-footer-app-link .aq-store-badge {
  display: none;
}

.aq-footer-social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.aq-footer-social-label {
  font-size: 14px;
  font-weight: 600;
  margin-right: 8px;
  color: rgba(255, 255, 255, 0.8);
}

.aq-footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff !important;
  transition: all 0.25s ease;
}

.aq-footer-social a:hover {
  background: #dc3545;
  transform: translateY(-4px);
  color: #fff !important;
}

.aq-footer-bottom {
  position: relative;
  z-index: 2;
  margin-top: 40px;
  padding: 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.aq-footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.aq-footer-copyright {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 500;
}

/* FAB chatbot — déplaçable */
.aq-fab-ai-wrap {
  position: fixed;
  z-index: 1055;
  user-select: none;
  touch-action: manipulation;
}

.aq-fab-ai-stack {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.aq-fab-ai-stack--dragging .aq-fab-ai {
  transform: scale(1.05);
}

.aq-fab-ai-drag-handle {
  position: relative;
  z-index: 2;
  width: 32px;
  height: 22px;
  margin-bottom: -6px;
  border: none;
  border-radius: 10px 10px 0 0;
  background: rgba(26, 31, 46, 0.88);
  color: #fff;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.aq-fab-ai-drag-handle:active {
  cursor: grabbing;
}

.aq-fab-ai-stack--dragging .aq-fab-ai-drag-handle {
  cursor: grabbing;
}

.aq-fab-ai-hint {
  position: absolute;
  bottom: calc(100% + 12px);
  right: 0;
  width: min(280px, calc(100vw - 32px));
  padding: 14px 36px 14px 14px;
  border-radius: 12px;
  background: #fff;
  color: #333;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(220, 53, 69, 0.25);
  font-size: 13px;
  line-height: 1.5;
  pointer-events: auto;
}

.aq-fab-ai-hint strong {
  display: block;
  margin-bottom: 6px;
  color: #dc3545;
  font-size: 14px;
}

.aq-fab-ai-hint p {
  margin: 0 0 8px;
}

.aq-fab-ai-hint-small {
  font-size: 12px !important;
  color: #666 !important;
  margin-bottom: 0 !important;
}

.aq-fab-ai-hint-close {
  position: absolute;
  top: 8px;
  right: 8px;
  border: none;
  background: transparent;
  color: #888;
  cursor: pointer;
  padding: 2px;
  line-height: 1;
}

.aq-fab-ai-hint-close:hover {
  color: #dc3545;
}

[dir="rtl"] .aq-fab-ai-hint {
  right: auto;
  left: 0;
  padding: 14px 14px 14px 36px;
}

.aq-fab-ai {
  position: relative;
  z-index: 1;
  width: 58px;
  height: 58px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(145deg, #e31c23, #c45c45);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 6px 24px rgba(220, 53, 69, 0.5);
  transition: box-shadow 0.25s ease, transform 0.2s ease;
  overflow: visible;
}

.aq-fab-ai:hover {
  box-shadow: 0 10px 32px rgba(220, 53, 69, 0.55);
}

.aq-fab-ai:active {
  transform: scale(0.96);
}

.aq-fab-ai-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(220, 53, 69, 0.6);
  animation: aq-fab-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
  pointer-events: none;
}

@keyframes aq-fab-ping {
  0% { transform: scale(1); opacity: 0.8; }
  75%, 100% { transform: scale(1.35); opacity: 0; }
}

.aq-fab-ai-icon {
  position: relative;
  z-index: 1;
}

.aq-fab-ai-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  background: #1a1f2e;
  color: #fff;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

[dir="rtl"] .aq-fab-ai-tooltip {
  right: auto;
  left: calc(100% + 12px);
}

.aq-fab-ai:hover .aq-fab-ai-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(-4px);
}

@media (min-width: 992px) {
  .aq-footer-apps {
    max-width: 160px;
  }

  .aq-footer-accordion__summary,
  .aq-footer-accordion__chevron {
    display: none;
  }
}

/* ── Tablette ── */
@media (max-width: 991px) {
  .aq-footer-main {
    padding-top: 36px;
  }

  .aq-footer-grid {
    row-gap: 28px;
  }

  .aq-footer-col-title {
    font-size: 1rem;
    margin-bottom: 14px;
  }

  .aq-footer-col-title::after {
    min-width: 16px;
  }
}

/* ── Téléphone ── */
@media (max-width: 767px) {
  #footer.aq-footer,
  .aq-footer {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }

  .aq-footer-glow {
    width: 220px;
    height: 220px;
    top: -80px;
    right: -60px;
  }

  .aq-footer-glow--left {
    width: 200px;
    height: 200px;
    bottom: -70px;
    left: -50px;
  }

  .aq-footer-main {
    padding-top: 28px;
    padding-bottom: 4px;
  }

  .aq-footer-main .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .aq-footer-grid {
    row-gap: 0;
  }

  /* Colonne marque */
  .aq-footer-col--brand {
    text-align: left;
    align-items: stretch;
    padding-bottom: 20px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }

  .aq-footer-brand-link {
    display: inline-block;
    margin: 0;
    max-width: 100%;
  }

  .aq-footer-logo {
    max-width: 110px;
    max-height: 72px;
    width: auto;
    height: auto;
    margin: 0 0 12px;
    object-fit: contain;
  }

  .aq-footer-tagline {
    width: 100%;
    max-width: 100%;
    margin: 0 0 18px;
    font-size: 13px;
    line-height: 1.55;
    overflow-wrap: anywhere;
    word-break: break-word;
    box-sizing: border-box;
  }

  .aq-footer-contact-item {
    justify-content: flex-start;
    text-align: left;
    width: 100%;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
  }

  .aq-footer-contact-value {
    word-break: break-word;
    font-size: 14px;
  }

  /* Accordéon mobile */
  .aq-footer-accordion {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0;
  }

  .aq-footer-accordion__summary {
    display: flex;
    align-items: center;
    gap: 10px;
    list-style: none;
    cursor: pointer;
    padding: 16px 0;
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
  }

  .aq-footer-accordion__summary::-webkit-details-marker {
    display: none;
  }

  .aq-footer-accordion__icon {
    flex-shrink: 0;
    color: #dc3545;
  }

  .aq-footer-accordion__label {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .aq-footer-accordion__line {
    flex: 1 1 auto;
    min-width: 16px;
    height: 3px;
    margin: 0 4px;
    border-radius: 2px;
    background: linear-gradient(90deg, #dc3545 0%, rgba(220, 53, 69, 0.55) 70%, rgba(220, 53, 69, 0.2) 100%);
  }

  .aq-footer-accordion__chevron {
    margin-left: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    position: relative;
    flex-shrink: 0;
  }

  .aq-footer-accordion__chevron::before,
  .aq-footer-accordion__chevron::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 2px;
    background: #fff;
    border-radius: 1px;
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease;
  }

  .aq-footer-accordion__chevron::after {
    transform: translate(-50%, -50%) rotate(90deg);
  }

  .aq-footer-accordion[open] .aq-footer-accordion__chevron::after {
    transform: translate(-50%, -50%) rotate(0deg);
    opacity: 0;
  }

  .aq-footer-accordion__body {
    padding-bottom: 14px;
  }

  .aq-footer-col-inner .aq-footer-col-title {
    display: none;
  }

  /* Liens en grille 2 colonnes */
  .aq-footer-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 10px;
  }

  .aq-footer-link {
    padding: 10px 4px;
    font-size: 13px;
    min-height: 44px;
    align-items: center;
  }

  .aq-footer-link:hover {
    transform: none;
  }

  .aq-footer-link-dot {
    display: none;
  }

  /* Apps */
  .aq-footer-col--apps .aq-footer-apps-desc {
    max-width: 100%;
    text-align: center;
    margin-bottom: 14px;
  }

  .aq-footer-apps {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    justify-content: center;
    align-items: center;
    display: flex !important;
  }

  .aq-footer-app-link {
    flex: 0 0 auto;
    width: 148px;
    max-width: 148px;
    min-width: 148px;
    min-height: 44px;
    padding: 0;
    display: block !important;
  }

  .aq-store-btn {
    width: 148px;
    height: 44px;
  }

  .aq-footer-app-link img,
  .aq-footer-app-link .aq-store-badge {
    display: none !important;
  }

  /* Bas de page */
  .aq-footer-bottom {
    margin-top: 20px;
    padding: 20px 0 calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .aq-footer-bottom .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .aq-footer-bottom-inner {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .aq-footer-copyright {
    font-size: 12px;
    line-height: 1.55;
    max-width: 300px;
    margin: 0 auto;
    order: 2;
  }

  .aq-footer-social {
    justify-content: center;
    width: 100%;
    order: 1;
    gap: 10px;
  }

  .aq-footer-social-label {
    width: 100%;
    text-align: center;
    margin: 0 0 4px;
    font-size: 13px;
  }

  .aq-footer-social a {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  /* FAB */
  .aq-fab-ai-wrap {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
    right: calc(16px + env(safe-area-inset-right, 0px)) !important;
  }

  .aq-fab-ai {
    width: 52px;
    height: 52px;
  }

  .aq-fab-ai-hint {
    width: min(260px, calc(100vw - 24px));
    font-size: 12px;
  }

  .aq-fab-ai-tooltip {
    display: none;
  }

  #footer a {
    font-size: inherit !important;
  }

  #footer_deatils {
    gap: 0 !important;
  }

  [dir="rtl"] .aq-footer-accordion__chevron {
    margin-left: 0;
    margin-right: auto;
  }

  [dir="rtl"] .aq-footer-contact-item {
    text-align: right;
  }
}

@media (max-width: 390px) {
  .aq-footer-nav {
    grid-template-columns: 1fr;
  }

  .aq-footer-apps {
    flex-direction: row;
    justify-content: center;
    gap: 10px;
  }

  .aq-footer-app-link {
    width: 148px;
    max-width: 148px;
    margin: 0;
  }
}

body.modal-open .aq-fab-ai-wrap {
  z-index: 100003;
}
