/**
 * SOVEREIGN TRUST - Components Stylesheet
 * Annuaire Inversé Portable - French Telecom Authority UI Components
 */

/* ==========================================================================
   Top Institutional Header Banner
   ========================================================================== */
.top-bar {
  background-color: var(--neutral-900);
  color: #e2e8f0;
  font-size: 0.75rem;
  padding: 0.4rem 0;
  border-bottom: 2px solid #2563eb;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.top-bar-notice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.top-bar-flag {
  display: inline-flex;
  width: 14px;
  height: 10px;
  background: linear-gradient(90deg, #002395 33.3%, #ffffff 33.3%, #ffffff 66.6%, #ed2939 66.6%);
  border-radius: 1px;
}

.top-bar-links {
  display: flex;
  gap: 1rem;
}

.top-bar-links a {
  color: #94a3b8;
  font-size: 0.75rem;
}

.top-bar-links a:hover {
  color: #ffffff;
  text-decoration: none;
}

/* ==========================================================================
   Main Header & Navigation Bar
   ========================================================================== */
.site-header {
  background-color: var(--surface);
  border-bottom: 1px solid var(--neutral-200);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 1.5rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--neutral-900);
}

.brand-logo {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-container) 100%);
  color: #ffffff;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 1.25rem;
  box-shadow: 0 2px 4px rgba(0, 35, 111, 0.2);
  flex-shrink: 0;
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--neutral-900);
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--neutral-500);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Navigation Links */
.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--neutral-700);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--primary-container);
  background-color: var(--neutral-100);
  text-decoration: none;
}

.nav-link.active {
  color: var(--primary-container);
  background-color: var(--info-container);
  box-shadow: inset 0 0 0 1px var(--info-border);
}

.nav-cta {
  background-color: var(--primary-container);
  color: #ffffff !important;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.15s ease;
}

.nav-cta:hover {
  background-color: var(--primary-hover);
  text-decoration: none;
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  cursor: pointer;
  color: var(--neutral-800);
}

@media (max-width: 1024px) {
  .mobile-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    top: calc(var(--header-height) + 33px);
    left: 0;
    right: 0;
    background-color: var(--surface);
    border-bottom: 2px solid var(--neutral-300);
    flex-direction: column;
    padding: 1.5rem;
    gap: 0.5rem;
    box-shadow: var(--shadow-xl);
    display: none;
  }

  .main-nav.is-open {
    display: flex;
  }

  .nav-link {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }

  .nav-cta {
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
  }
}

/* ==========================================================================
   Interactive Phone Search Engine (French Telecom)
   ========================================================================== */
.search-widget {
  background: #ffffff;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
  max-width: 780px;
  margin: 0 auto;
}

.search-widget-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--neutral-900);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-widget-subtitle {
  font-size: 0.88rem;
  color: var(--neutral-600);
  margin-bottom: 1.25rem;
}

.search-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-country-badge {
  position: absolute;
  left: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.5rem;
  background-color: var(--neutral-100);
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--neutral-800);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 56px;
  padding-left: 5.25rem;
  padding-right: 140px;
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--neutral-900);
  background-color: #ffffff;
  border: 2px solid var(--neutral-300);
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.2s ease;
  font-variant-numeric: tabular-nums;
}

.search-input:focus {
  border-color: var(--secondary);
  box-shadow: var(--shadow-focus);
}

.search-input::placeholder {
  color: var(--neutral-400);
  font-weight: 400;
  font-size: 1.1rem;
}

.search-format-badge {
  position: absolute;
  right: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  pointer-events: none;
}

.search-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.btn-search {
  height: 52px;
  background-color: var(--primary-container);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  padding: 0 1.75rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: all 0.15s ease;
  flex: 1;
}

.btn-search:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-reset {
  height: 52px;
  background-color: var(--neutral-100);
  color: var(--neutral-700);
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0 1.25rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.btn-reset:hover {
  background-color: var(--neutral-200);
}

/* Quick prefix shortcuts */
.quick-prefixes {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--neutral-200);
  font-size: 0.82rem;
  color: var(--neutral-600);
}

.prefix-tag {
  background-color: var(--neutral-100);
  border: 1px solid var(--neutral-300);
  color: var(--neutral-800);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.prefix-tag:hover {
  background-color: var(--info-container);
  border-color: var(--secondary);
  color: var(--secondary);
  text-decoration: none;
}

/* ==========================================================================
   Telemetry Result Card (Live Identification Feedback)
   ========================================================================== */
.telemetry-card {
  display: none;
  margin-top: 1.5rem;
  background-color: #ffffff;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.telemetry-header {
  background-color: var(--neutral-50);
  border-bottom: 1px solid var(--neutral-200);
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.telemetry-number {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-container);
  font-variant-numeric: tabular-nums;
}

.telemetry-body {
  padding: 1.5rem;
}

.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
  .telemetry-grid {
    grid-template-columns: 1fr;
  }
}

.telemetry-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.telemetry-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--neutral-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.telemetry-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--neutral-900);
}

.legal-guarantee-box {
  background-color: var(--neutral-50);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1rem;
}

.legal-guarantee-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--neutral-900);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.legal-guarantee-text {
  font-size: 0.82rem;
  color: var(--neutral-600);
  line-height: 1.55;
  margin-bottom: 0;
}

/* ==========================================================================
   Badges, Chips & Indicator Styles
   ========================================================================== */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
}

.chip-blue {
  background-color: #eff6ff;
  color: #1e3a8a;
  border: 1px solid #dbeafe;
}

.chip-emerald {
  background-color: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.chip-amber {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.chip-red {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.chip-neutral {
  background-color: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

/* ==========================================================================
   Cards & Content Containers
   ========================================================================== */
.card {
  background-color: var(--surface);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--neutral-200);
  background-color: var(--neutral-50);
}

.card-body {
  padding: 1.5rem;
  flex: 1 1 auto;
}

.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--neutral-200);
  background-color: var(--neutral-50);
}

.card-feature {
  padding: 2rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--neutral-200);
  background-color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.card-feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background-color: var(--info-container);
  color: var(--primary-container);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

/* ==========================================================================
   Alert Banners
   ========================================================================== */
.alert {
  padding: 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.alert-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 0.15rem;
}

.alert-content {
  flex: 1;
}

.alert-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.alert-text {
  font-size: 0.88rem;
  margin-bottom: 0;
  line-height: 1.5;
}

.alert-info {
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
}
.alert-info .alert-title { color: #1e3a8a; }
.alert-info .alert-text { color: #1e40af; }

.alert-warning {
  background-color: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}
.alert-warning .alert-title { color: #92400e; }
.alert-warning .alert-text { color: #b45309; }

.alert-danger {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}
.alert-danger .alert-title { color: #991b1b; }
.alert-danger .alert-text { color: #b91c1c; }

.alert-success {
  background-color: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}
.alert-success .alert-title { color: #065f46; }
.alert-success .alert-text { color: #047857; }

/* ==========================================================================
   Table Styles
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  background-color: #ffffff;
  margin-bottom: 1.5rem;
}

.table-custom {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.table-custom th {
  background-color: var(--neutral-100);
  color: var(--neutral-800);
  font-weight: 700;
  padding: 0.85rem 1rem;
  border-bottom: 2px solid var(--neutral-200);
  white-space: nowrap;
}

.table-custom td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--neutral-200);
  color: var(--neutral-700);
  vertical-align: middle;
}

.table-custom tr:last-child td {
  border-bottom: none;
}

.table-custom tr:hover td {
  background-color: var(--neutral-50);
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.breadcrumbs {
  padding: 1rem 0;
  font-size: 0.82rem;
  color: var(--neutral-500);
}

.breadcrumbs ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0;
}

.breadcrumbs li::after {
  content: "›";
  color: var(--neutral-400);
  font-size: 1rem;
  line-height: 1;
}

.breadcrumbs li:last-child::after {
  content: "";
}

.breadcrumbs a {
  color: var(--neutral-600);
}

.breadcrumbs a:hover {
  color: var(--primary-container);
}

.breadcrumbs [aria-current="page"] {
  color: var(--neutral-900);
  font-weight: 600;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  text-decoration: none !important;
}

.btn-primary {
  background-color: var(--primary-container);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--secondary);
  color: #ffffff;
}

.btn-secondary:hover {
  background-color: var(--secondary-hover);
  color: #ffffff;
}

.btn-outline {
  background-color: transparent;
  border-color: var(--neutral-300);
  color: var(--neutral-800);
}

.btn-outline:hover {
  background-color: var(--neutral-100);
  border-color: var(--neutral-400);
  color: var(--neutral-900);
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.82rem;
}

.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1.05rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background-color: var(--neutral-900);
  color: #cbd5e1;
  padding-top: 3.5rem;
  padding-bottom: 2rem;
  border-top: 3px solid var(--primary-container);
  font-size: 0.88rem;
}

.site-footer a {
  color: #94a3b8;
}

.site-footer a:hover {
  color: #ffffff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

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

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

.footer-col h4 {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

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

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-disclaimer {
  background-color: #0b1120;
  border: 1px solid #1e293b;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  font-size: 0.8rem;
  line-height: 1.6;
  color: #94a3b8;
  margin-bottom: 2rem;
}

.footer-disclaimer strong {
  color: #e2e8f0;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid #1e293b;
  font-size: 0.78rem;
  color: #64748b;
}
