/*
Theme Name: Blutech Bénin Theme
Theme URI: https://blutechbenin.com
Author: IT-NUM  
Description: Thème sur mesure pour Blutech Bénin (cybersécurité, analyse, informatique). HTML + Tailwind CSS, composants réutilisables.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: blutech
*/

/* ==========================================================================
   BLUTECH BENIN CUSTOM STYLES & OVERRIDES
   ========================================================================== */

/* ==========================================================================
   LAYOUT CONTAINERS & BASE STRUCTURE
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.custom-logo {
    height: 75px;
    width: 250px;   /* respect du ratio */
}

.custom-logo-link {
    display: block;
}

@media (min-width: 768px) {
  .container {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }
}

/* ==========================================================================
   DÉCALAGE DU HEADER FIXE SOUS LA BARRE D'ADMIN WORDPRESS
   (s'applique uniquement aux utilisateurs connectés — classe .admin-bar)
   ========================================================================== */
.admin-bar #header,
.admin-bar #mobile-drawer {
  top: 32px;
}
@media screen and (max-width: 782px) {
  .admin-bar #header,
  .admin-bar #mobile-drawer {
    top: 46px;
  }
}

/* ==========================================================================
   MENU PRINCIPAL (généré par wp_nav_menu) — survol & soulignement
   ========================================================================== */
.site-nav a {
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.site-nav a:hover {
  color: #2555cc;
  border-bottom-color: #2555cc;
}
.drawer-nav a {
  display: block;
  transition: color .2s;
}
.drawer-nav a:hover {
  color: #2555cc;
}
.footer-nav a {
  transition: color .2s;
}
.footer-nav a:hover {
  color: #2555cc;
}

/* Page / élément de menu actif */
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a,
.site-nav .current-menu-parent > a {
  color: #2555cc;
  border-bottom-color: #2555cc;
}
.drawer-nav .current-menu-item > a,
.drawer-nav .current_page_item > a {
  color: #2555cc;
}

/* ==========================================================================
   FILTRES DES RÉFÉRENCES (bouton actif)
   ========================================================================== */
.reference-filter.is-active {
  background-color: #2555cc;
  color: #ffffff;
  border-color: #2555cc;
}

/* ==========================================================================
   PAGINATION (composant pagination.php)
   ========================================================================== */
.blutech-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 .5rem;
  border: 1px solid #e7e5e4;
  border-radius: .5rem;
  color: #57534e;
  font-size: .8rem;
  font-weight: 600;
  transition: all .2s;
}
.blutech-pagination a.page-numbers:hover {
  border-color: #2555cc;
  color: #2555cc;
}
.blutech-pagination .page-numbers.current {
  background-color: #2555cc;
  border-color: #2555cc;
  color: #ffffff;
}
.blutech-pagination .page-numbers.dots {
  border-color: transparent;
}

/* Effet d'ombre du header au défilement */
#header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, .05);
}

/* ==========================================================================
   CARROUSEL DE LOGOS PARTENAIRES (défilement infini)
   ========================================================================== */
.partners-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.partners-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: partners-scroll 32s linear infinite;
}
.partners-marquee:hover .partners-track {
  animation-play-state: paused;
}
@keyframes partners-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .partners-track { animation: none; }
}

/* ==========================================================================
   CONTENU DE PAGE (mentions légales, confidentialité, pages de texte)
   ========================================================================== */
.entry-content h2 {
  font-family: 'Outfit', sans-serif; font-size: 1.5rem; font-weight: 600;
  color: #1c1917; letter-spacing: -.5px; margin: 2.2rem 0 .8rem;
}
.entry-content h3 {
  font-family: 'Outfit', sans-serif; font-size: 1.18rem; font-weight: 600;
  color: #1a3a8a; margin: 1.6rem 0 .5rem;
}
.entry-content h2:first-child, .entry-content h3:first-child { margin-top: 0; }
.entry-content p { margin-bottom: 1.1rem; }
.entry-content ul, .entry-content ol { margin: 0 0 1.2rem 1.4rem; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: .4rem; }
.entry-content a { color: #2555cc; text-decoration: underline; text-underline-offset: 2px; }
.entry-content a:hover { color: #1a3a8a; }
.entry-content strong { color: #1c1917; font-weight: 600; }

/* Custom Logo SVG Colors (Navy & Slate) */
#blutech-logo #label-blutech {
  fill: #1a3a8a !important;
}
#blutech-logo #label-tagline {
  fill: #4a5a90 !important;
}

/* ==========================================================================
   BUTTON UTILITIES (Reused in Modals and Script triggers)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border-radius: 6px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background-color: #2555cc;
  color: #ffffff;
  border: 1px solid #2555cc;
  box-shadow: 0 4px 12px rgba(37, 85, 204, 0.15);
}

.btn-primary:hover {
  background-color: #1a3a8a;
  border-color: #1a3a8a;
  box-shadow: 0 6px 16px rgba(26, 58, 138, 0.3);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: transparent;
  color: #4a5568;
  border: 1px solid #cbd5e1;
}

.btn-secondary:hover {
  background-color: #f8fafc;
  color: #1e293b;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

/* ==========================================================================
   MODAL DIALOG SYSTEM
   ========================================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.open {
  opacity: 1;
  pointer-events: all;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(28, 25, 23, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-wrapper {
  position: relative;
  z-index: 110;
  width: 100%;
  max-width: 620px;
  padding: 16px;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.open .modal-wrapper {
  transform: scale(1);
}

.modal-card {
  background-color: #fbfaf8;
  border: 1px solid rgba(229, 231, 235, 0.8);
  border-radius: 12px;
  box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.1), 0 10px 20px -5px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

/* Accent strip on top of modal cards */
.modal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #2555cc, #1a3a8a);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 1.75rem;
  color: #94a3b8;
  line-height: 1;
  transition: color 0.2s ease;
  cursor: pointer;
  z-index: 10;
}

.modal-close:hover {
  color: #1e293b;
}

.modal-body {
  padding: 36px;
}

/* Service Detail Modal Structure */
.modal-service-header {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 20px;
}

.modal-service-icon {
  width: 48px;
  height: 48px;
  background-color: rgba(37, 85, 204, 0.05);
  border: 1px solid rgba(37, 85, 204, 0.15);
  color: #2555cc;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.modal-service-tag {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  color: #2555cc;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.modal-service-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: #1c1917;
}

.modal-service-desc {
  font-size: 0.92rem;
  color: #4a5568;
  line-height: 1.65;
  margin-bottom: 24px;
}

.modal-section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: #1a3a8a;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.modal-service-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.modal-service-list li {
  font-size: 0.88rem;
  color: #334155;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.modal-service-list li::before {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: #2555cc;
  font-size: 0.78rem;
  margin-top: 4px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid #e2e8f0;
  padding-top: 20px;
}

/* ==========================================
   AUDIT FORM SYSTEM
   ========================================== */
.modal-card-form {
  max-width: 640px;
}

.form-header {
  margin-bottom: 24px;
}

.form-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: #1c1917;
  margin-bottom: 6px;
}

.form-subtitle {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.4;
}

.audit-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 540px) {
  .form-group-row {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  color: #475569;
  letter-spacing: 0.5px;
}

.form-group input, 
.form-group select, 
.form-group textarea {
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 10px 12px;
  color: #1e293b;
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  transition: all 0.2s ease;
}

.form-group input::placeholder, 
.form-group textarea::placeholder {
  color: #94a3b8;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
  border-color: #2555cc;
  box-shadow: 0 0 0 3px rgba(37, 85, 204, 0.15);
  outline: none;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
  border-top: 1px solid #e2e8f0;
  padding-top: 20px;
}

/* Success Form Feedback state */
.modal-success-view {
  text-align: center;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.success-icon-container {
  font-size: 3.5rem;
  color: #10b981;
  margin-bottom: 20px;
  animation: scale-up 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.success-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1c1917;
  margin-bottom: 8px;
}

.success-message {
  color: #4b5563;
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 400px;
  margin-bottom: 24px;
}

/* ==========================================
   MONITORING LOGS INTERACTIVE DECORATION
   ========================================== */
#console-logs .log-line {
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  animation: console-fade 0.2s forwards;
}

/* Custom layout class for dynamic animations */
@keyframes console-fade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scale-up {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Hide helper helper classes */
.d-none {
  display: none !important;
}

/* ==========================================================================
   HERO FULL-BLEED BACKGROUND IMAGE FADING (Inspired by Image 1)
   ========================================================================== */
.hero-image-container {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 100%;
  opacity: 0.22;
  pointer-events: none;
  z-index: 0;
}
.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(251, 250, 248, 0.45) 0%, #fbfaf8 100%);
}
@media (min-width: 1024px) {
  .hero-image-container {
    width: 100%;
    opacity: 1;
  }
  .hero-gradient-overlay {
    background: linear-gradient(90deg, #fbfaf8 0%, #fbfaf8 45%, rgba(251, 250, 248, 0.6) 65%, rgba(251, 250, 248, 0) 100%);
  }
}
