/* EUROCOPY - Éléments d'interface utilisateur */

/* ===== BOUTON RETOUR EN HAUT ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 999;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--secondary-color);
}

.arrow-up {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-left: 3px solid white;
  border-top: 3px solid white;
  transform: rotate(45deg);
}

/* ===== NOTIFICATION ===== */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transform: translateX(120%);
  transition: transform 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
}

.notification.active {
  transform: translateX(0);
}

.notification-icon {
  margin-right: 15px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.notification-text {
  flex: 1;
  font-size: 14px;
}

.notification-close {
  margin-left: 15px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.notification-close:hover {
  opacity: 1;
}

/* ===== PROGRESSION DE DÉFILEMENT ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: var(--gradient-primary);
  width: 0;
  z-index: 1001;
  transition: width 0.2s ease;
}

/* ===== MENU DE NAVIGATION AMÉLIORÉ ===== */
.main-navigation ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-navigation li {
  position: relative;
}

.main-navigation a {
  display: block;
  padding: 10px 15px;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
  position: relative;
  transition: color 0.3s ease;
}

.main-navigation a:before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 15px;
  right: 15px;
  height: 2px;
  background: var(--secondary-color);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.main-navigation a:hover {
  color: var(--primary-color);
}

.main-navigation a:hover:before {
  transform: scaleX(1);
  transform-origin: left;
}

.main-navigation .current-menu-item a:before {
  transform: scaleX(1);
}

/* ===== PRÉCHARGEUR ===== */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.loaded {
  opacity: 0;
  visibility: hidden;
}

.loader {
  width: 50px;
  height: 50px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== ACCORDÉON ===== */
.accordion {
  border: 1px solid #eaeaea;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 15px;
}

.accordion-header {
  background: white;
  padding: 15px 20px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.3s ease;
}

.accordion-header:hover {
  background: #f9f9f9;
}

.accordion-header:after {
  content: '+';
  font-size: 20px;
  transition: transform 0.3s ease;
}

.accordion.active .accordion-header:after {
  transform: rotate(45deg);
}

.accordion-content {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.accordion.active .accordion-content {
  max-height: 1000px;
  padding: 20px;
}

/* ===== ONGLETS ===== */
.tabs {
  margin-bottom: 30px;
}

.tab-headers {
  display: flex;
  border-bottom: 1px solid #eaeaea;
}

.tab-header {
  padding: 10px 20px;
  font-weight: 600;
  cursor: pointer;
  background: #f5f5f5;
  transition: background 0.3s ease;
  border-radius: 8px 8px 0 0;
  margin-right: 5px;
}

.tab-header.active {
  background: white;
  border: 1px solid #eaeaea;
  border-bottom: none;
}

.tab-content {
  display: none;
  padding: 20px;
  background: white;
  border: 1px solid #eaeaea;
  border-top: none;
}

.tab-content.active {
  display: block;
}

/* ===== CARTE INTERACTIVE ===== */
.interactive-card {
  position: relative;
  perspective: 1000px;
  width: 100%;
  height: 300px;
  margin-bottom: 30px;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
}

.interactive-card:hover .card-inner {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  padding: 30px;
}

.card-front {
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.card-back {
  background: var(--gradient-primary);
  color: white;
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== COMPTEUR ===== */
.counter-value {
  font-size: 40px;
  font-weight: 700;
  color: var(--primary-color);
  display: inline-block;
}

.counter-label {
  display: block;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 5px;
}

/* ===== BARRE DE PROGRESSION ===== */
.progress-bar {
  width: 100%;
  height: 10px;
  background: #f0f0f0;
  border-radius: 5px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 5px;
  width: 0;
  transition: width 1s ease;
}

.progress-bar-label {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 600;
  color: white;
}

/* ===== TOOLTIP ===== */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltip-text {
  visibility: hidden;
  width: 200px;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  text-align: center;
  padding: 5px 10px;
  border-radius: 6px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  font-size: 14px;
}

.tooltip .tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(-10px);
}

/* ===== MEDIA QUERIES ===== */
@media (max-width: 768px) {
  .back-to-top {
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
  }
  
  .notification {
    width: calc(100% - 40px);
    left: 20px;
    right: 20px;
    transform: translateY(-100%);
  }
  
  .notification.active {
    transform: translateY(0);
  }
  
  .tab-headers {
    flex-wrap: wrap;
  }
  
  .tab-header {
    flex: 1 0 auto;
    text-align: center;
  }
  
  .counter-value {
    font-size: 30px;
  }
}
