/* Custom minimal CSS. Keep Tailwind as primary utility source. */

:root {
  --header-offset: 0px;
}

body.has-fixed-header {
  padding-top: var(--header-offset, 0px);
}

body.has-fixed-header > header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 60;
  background-color: #f8fafc;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.1);
}

body.has-fixed-header > header nav {
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Mali flag badge animation in footer */
.flag-badge {
  animation: flagPulse 4s ease-in-out infinite;
}

@keyframes flagPulse {
  0%, 100% { transform: translateY(0); box-shadow: 0 0 0 0 rgba(0,0,0,0.15); }
  50% { transform: translateY(-2px); box-shadow: 0 8px 18px 0 rgba(0,0,0,0.12); }
}

/* Optional light gradient overlay for hero text readability */
.hero-overlay {
  background: linear-gradient(90deg, rgba(17,24,39,0.75) 20%, rgba(17,24,39,0.35) 60%, rgba(255,255,255,0));
}

/* Hero carousel: stacked slides for smooth Flowbite transitions */
#hero-carousel [data-carousel-item] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
}

/* Responsive hero height: taller on large screens to reduce image cropping */
.hero-carousel__viewport {
  height: 440px;
}

/* Shift focal point only on very wide screens; normal center below 1800px */
.hero-carousel__img--up {
  object-position: center center;
}

@media (min-width: 1800px) {
  .hero-carousel__img--up {
    object-position: center calc(50% + 150px);
  }
}

@media (min-width: 768px) {
  .hero-carousel__viewport {
    height: clamp(520px, 62vh, 700px);
  }
}

@media (min-width: 1024px) {
  .hero-carousel__viewport {
    /* Use most of the viewport under the fixed header so cover crops less vertically */
    height: clamp(620px, calc(100vh - var(--header-offset, 80px) - 1.5rem), 900px);
    min-height: 620px;
  }
}

@media (min-width: 1440px) {
  .hero-carousel__viewport {
    height: clamp(720px, calc(100vh - var(--header-offset, 80px) - 1rem), 980px);
  }
}

@media (max-width: 400px) {
  #hero-carousel [data-carousel-prev],
  #hero-carousel [data-carousel-next] {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }
}

/* Fade carousel (À propos preview) */
.fade-carousel__viewport {
  isolation: isolate;
}

.fade-carousel__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.55s ease-in-out, visibility 0.55s ease-in-out;
  z-index: 0;
  pointer-events: none;
}

.fade-carousel__slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
  pointer-events: auto;
}

.fade-carousel__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.5);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.fade-carousel__dot.is-active,
.fade-carousel__dot[aria-current="true"] {
  background-color: #ffffff;
  transform: scale(1.15);
}

@media (prefers-reduced-motion: reduce) {
  .fade-carousel__slide {
    transition: none;
  }
}

/* Subtle card lift */
.card-hover:hover {
  transform: translateY(-4px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* Navigation links bar styling */
.nav-links-bar {
  background-color: #ffffff;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

.nav-links-bar .nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0;
  color: #374151;
  font-weight: 500;
}

.nav-links-bar .nav-link::before,
.nav-links-bar .nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transition: transform 0.25s ease;
  opacity: 0.9;
}

.nav-links-bar .nav-link::before {
  top: 0;
  background-color: #82bcde;
  transform-origin: left top;
}

.nav-links-bar .nav-link::after {
  bottom: 0;
  background-color: #e6857f;
  transform-origin: right bottom;
}

.nav-links-bar .nav-link:hover {
  color: #111827;
}

.nav-links-bar .nav-link:hover::before,
.nav-links-bar .nav-link:hover::after {
  transform: scaleX(1);
}

.nav-link-active {
  color: #e6857f !important;
}

.nav-link-active::before,
.nav-link-active::after {
  transform: scaleX(1);
}

/* Animated dossier search focus */
[data-search-form] input[name="dossier"] {
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

[data-search-form] input[name="dossier"]:focus {
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(245, 61, 70, 0.432), 0 15px 25px rgba(117, 190, 250, 0.15);
  animation: dossierGlow 1.4s ease-out;
}

[data-search-form].is-focused button {
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
  transform: translateY(0);
}

@keyframes dossierGlow {
  0% { box-shadow: 0 0 0 0 rgba(62, 148, 200, 0.1); }
  60% { box-shadow: 0 0 0 6px rgba(230, 133, 127, 0.2); }
  100% { box-shadow: 0 0 0 3px rgba(62, 148, 200, 0.25); }
}

/* Mobile nav animation */
#nav-colored {
  transform-origin: top center;
}

#nav-colored.menu-anim {
  animation: menuSlideIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

#nav-colored.menu-closing {
  animation: menuSlideOut 0.24s ease forwards;
}

@keyframes menuSlideIn {
  0% { opacity: 0; transform: translateY(-12px) scaleY(0.92); }
  80% { opacity: 1; transform: translateY(2px) scaleY(1.02); }
  100% { opacity: 1; transform: translateY(0) scaleY(1); }
}

@keyframes menuSlideOut {
  0% { opacity: 1; transform: translateY(0) scaleY(1); }
  100% { opacity: 0; transform: translateY(-8px) scaleY(0.96); }
}

/* Partner marquee animation */
.partner-marquee {
  width: 100%;
  overflow: hidden;
}

.partner-marquee__track {
  display: flex;
  width: max-content;
  animation: partnerMarquee 20s linear infinite;
  will-change: transform;
}

.partner-marquee__group {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.partner-marquee__logo {
  height: 72px;
  object-fit: contain;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .partner-marquee__logo {
    height: 52px;
  }
}

@keyframes partnerMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Partner alternating layout */
.partner-row {
  position: relative;
  isolation: isolate;
}

.partner-row::after {
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: 20px;
  background: linear-gradient(120deg, rgba(130, 188, 222, 0.08), rgba(230, 133, 127, 0.06));
  opacity: 0;
  z-index: -1;
  transition: opacity 0.25s ease;
}

.partner-row:hover::after {
  opacity: 1;
}

.partner-photo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  background: #f8fafc;
}

.partner-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.45s ease;
}

.partner-row:hover .partner-photo img {
  transform: scale(1.03);
}

.partner-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #1f2937;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

@media (min-width: 768px) {
  .partner-row:nth-child(even) .partner-media {
    order: 2;
  }
  .partner-row:nth-child(even) .partner-content {
    order: 1;
  }
}

/* Services page components */
.service-panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 28px;
  padding: 2rem;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.06);
}

.service-option {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  padding: 0.95rem 1.1rem;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.service-option__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #1f2937;
  background: rgba(130, 188, 222, 0.2);
  border: 1px solid rgba(130, 188, 222, 0.4);
}

.service-option:is(:hover, :focus-visible) {
  border-color: #de8291;
  transform: translateX(4px);
  box-shadow: 0 12px 30px rgba(222, 130, 145, 0.22);
}

.service-option--active {
  border-color: #de8291;
  background: rgba(222, 130, 145, 0.1);
  box-shadow: 0 16px 35px rgba(222, 130, 145, 0.18);
}

.service-photo {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  min-height: 160px;
  background: #f8fafc;
}

.service-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.service-photo__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0) 30%, rgba(17, 24, 39, 0.75));
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0.85rem 1rem;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.service-photo:hover img {
  transform: scale(1.08);
}

.service-photo:hover .service-photo__overlay {
  opacity: 1;
}

@media (max-width: 1024px) {
  .service-panel {
    padding: 1.5rem;
  }
  [data-service-nav] .sticky {
    position: static;
  }
}

/* Service detail modals */
.cetig-modal {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 120 !important;
}

.cetig-modal.modal-visible {
  opacity: 1;
  pointer-events: auto;
}

.cetig-modal__card {
  transform: translateY(24px) scale(0.96);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
  width: min(72vw, 960px);
  max-width: none !important;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.cetig-modal.modal-visible .cetig-modal__card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.cetig-modal__card--wide {
  width: min(92vw, 960px);
}

.client-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.client-tabs::-webkit-scrollbar {
  display: none;
}

.client-tabs__btn {
  padding: 0.65rem 1rem;
  min-height: 44px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #475569;
  border-radius: 0.65rem;
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.client-tabs__btn:hover {
  color: #1e293b;
  background: #f1f5f9;
}

.client-tabs__btn--active {
  color: #265f85;
  background: #d9ebf6;
  box-shadow: inset 0 -2px 0 #3a94c8;
}

.client-tab-panels {
  min-height: 12rem;
}

.client-dataview {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: min(50vh, 420px);
  overflow-y: auto;
}

.client-dataview__chevron {
  display: inline-block;
  font-size: 0.65rem;
  transition: transform 0.2s ease;
}

.client-dataview__chevron--open {
  transform: rotate(180deg);
}

.client-dataview__head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  min-height: 44px;
  cursor: pointer;
}

.client-dataview__badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .client-dataview__head {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .client-dataview__badges {
    flex-wrap: nowrap;
    justify-content: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cetig-modal {
    transition: none;
  }
  .cetig-modal__card {
    transition: none;
    transform: none;
    opacity: 1;
  }
}

/* Service modal content helpers */
.modal-section {
  border-left: 4px solid #e6857f;
  border-radius: 0 18px 18px 0;
  padding: 0.5rem 0 0.5rem 1.25rem;
  background: linear-gradient(90deg, rgba(230, 133, 127, 0.12), rgba(255, 255, 255, 0));
}

.modal-eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  font-weight: 600;
  color: #e6857f;
  margin-bottom: 0.55rem;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.35rem;
}

.modal-table-wrapper {
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.modal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.modal-table thead {
  background: #f8fafc;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: #475569;
}

.modal-table th,
.modal-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}

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

.modal-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.modal-grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.modal-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  padding: 1.25rem;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.modal-card--accent {
  background: linear-gradient(160deg, rgba(130, 188, 222, 0.12), rgba(230, 133, 127, 0.12));
  border-color: transparent;
}

.modal-card__title {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.75rem;
}

.modal-list {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.modal-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.modal-steps li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.modal-step__index {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f172a;
  background: rgba(130, 188, 222, 0.35);
  border: 1px solid rgba(130, 188, 222, 0.6);
}

@media (max-width: 640px) {
  .modal-table thead {
    display: none;
  }
  .modal-table tr {
    display: block;
    border-bottom: 1px solid #e2e8f0;
  }
  .modal-table td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
  }
  .modal-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
}

/* --- Gallery improvements for equipements page --- */
.hero-card {
  position: relative;
}

.glightbox {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 12px;
}
.glightbox img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}
.glightbox::after {
  content: attr(data-title);
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.75rem 1rem;
  background: linear-gradient(180deg, rgba(0,0,0,0) 10%, rgba(0,0,0,0.42) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  opacity: 0;
  transform: translateY(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.22s ease, transform 0.22s ease;
  text-align: center;
}
.glightbox::before {
  content: "🔍";
  position: absolute;
  right: 0.6rem;
  top: 0.6rem;
  background: rgba(255,255,255,0.95);
  color: #111827;
  padding: 0.35rem 0.5rem;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(15,23,42,0.12);
  opacity: 0;
  transform: translateY(-4px) scale(0.96);
  transition: opacity 0.22s ease, transform 0.22s ease;
  font-size: 0.9rem;
}
.glightbox:hover::after,
.glightbox:focus::after {
  opacity: 1;
  transform: translateY(0);
}
.glightbox:hover::before,
.glightbox:focus::before {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.glightbox:hover img,
.glightbox:focus img {
  transform: scale(1.06);
}

/* Slightly larger cards and spacing on desktop */
@media (min-width: 1024px) {
  .card-hover { border-radius: 14px; }
  .grid.md\:grid-cols-4 > article, .grid.md\:grid-cols-3 > article { min-height: 200px; }
}

/* Annonces page styling */
.annonces-hero {
  background: linear-gradient(90deg, rgba(130,188,222,0.06), rgba(230,133,127,0.03));
  border: 1px solid rgba(226,232,240,0.6);
  padding: 1.25rem;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(15,23,42,0.04);
}

.annonces-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .annonces-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
}

.annonce-card {
  background: #fff;
  border: 1px solid #e6eef6;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 8px 20px rgba(15,23,42,0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.annonce-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(15,23,42,0.08); border-color: rgba(130,188,222,0.4); }

.annonce-meta { display:flex; gap:0.5rem; flex-wrap:wrap; align-items:center; margin-bottom:0.5rem; }
.annonce-badge { font-size:0.72rem; padding:0.2rem 0.5rem; border-radius:999px; background:#f1f9ff; color:#135e83; border:1px solid rgba(130,188,222,0.25); font-weight:700; }
.annonce-date { font-size:0.82rem; color:#64748b; }

.annonce-title { font-size:1.05rem; font-weight:700; color:#0f172a; margin-bottom:0.35rem; }
.annonce-desc { color:#475569; font-size:0.95rem; margin-bottom:0.75rem; }
.annonce-doc { font-weight:600; color:#0f172a; }
.annonce-doc .unavailable { color:#94a3b8; font-style:italic; font-weight:500; }

/* Pagination visual */
.annonces-pagination { display:inline-flex; gap:0.35rem; align-items:center; }
.annonces-pagination a, .annonces-pagination span, .annonces-pagination button { display:inline-block; padding:0.45rem 0.7rem; border-radius:8px; border:1px solid #e6eef6; background:#fff; color:#0f172a; text-decoration:none; }
.annonces-pagination button { cursor:pointer; }
.annonces-pagination a:hover, .annonces-pagination button:hover { background:#f1f8ff; border-color:rgba(130,188,222,0.4); }
.annonces-pagination .active, .annonces-pagination button.active { background:linear-gradient(90deg,#82bcde,#e6857f); color:#fff; border-color:transparent; font-weight:700; }

/* Pagination behaviour using :target */
.annonces-page { display:none; }
#page1 { display:block; }
.annonces-page:target { display:block; }

@media (max-width: 640px) {
  .annonce-title { font-size:1rem; }
  .annonce-desc { font-size:0.92rem; }
}

/* --- Espace client (page publique) --- */
.client-portal-page {
  padding: 1.25rem 0 6rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.client-portal-shell {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .client-portal-shell {
    max-width: 52rem;
    padding: 0 1.5rem;
    gap: 1.25rem;
  }
}

.client-portal-hero {
  text-align: center;
}

.client-portal-eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #3a94c8;
}

.client-portal-title {
  margin-top: 0.35rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
}

.client-portal-lead {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.55;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.client-portal-search-card,
.client-portal-results,
.client-portal-help {
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.client-portal-search-card {
  padding: 1rem;
}

.client-portal-search-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.35rem;
}

.client-portal-search-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (min-width: 480px) {
  .client-portal-search-row {
    flex-direction: row;
    align-items: stretch;
  }
}

.client-portal-search-input {
  flex: 1;
  min-height: 44px;
  padding: 0.65rem 0.9rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  font-size: 1rem;
  color: #0f172a;
  background: #fff;
}

.client-portal-search-input:focus {
  outline: none;
  border-color: #3a94c8;
  box-shadow: 0 0 0 3px rgba(58, 148, 200, 0.2);
}

.client-portal-search-input--error {
  border-color: #f87171;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.25);
}

.client-portal-search-btn {
  min-height: 44px;
  padding: 0.65rem 1.25rem;
  border: none;
  border-radius: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #f5c07b, #e6857f);
  cursor: pointer;
  white-space: nowrap;
}

.client-portal-search-btn:hover {
  filter: brightness(0.97);
}

.client-portal-search-hint {
  margin-top: 0.65rem;
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.45;
}

.client-portal-results {
  padding: 1rem;
  min-height: 10rem;
}

@media (min-width: 768px) {
  .client-portal-results {
    padding: 1.25rem 1.5rem;
  }
}

.client-portal-empty__title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.75rem;
}

.client-portal-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.client-portal-step {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #f8fafc;
}

.client-portal-step__index {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: #265f85;
  background: #d9ebf6;
}

.client-portal-step__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #0f172a;
}

.client-portal-step__text {
  margin-top: 0.15rem;
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.45;
}

.client-portal-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  padding: 1.5rem 1rem;
}

.client-portal-state--loading {
  color: #475569;
}

.client-portal-state--error {
  color: #b91c1c;
  background: #fef2f2;
  border-radius: 0.75rem;
}

.client-portal-state__title {
  font-weight: 700;
  font-size: 1rem;
}

.client-portal-state__text {
  font-size: 0.9375rem;
  line-height: 1.5;
  max-width: 28rem;
}

.client-portal-spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid #cbd5e1;
  border-top-color: #3a94c8;
  border-radius: 999px;
  animation: client-portal-spin 0.8s linear infinite;
}

@keyframes client-portal-spin {
  to { transform: rotate(360deg); }
}

.client-portal-result {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.client-portal-result__meta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .client-portal-result__meta {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}

.client-portal-result__ref {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #265f85;
}

.client-portal-result__name {
  margin-top: 0.25rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.client-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.client-status-badge--ongoing {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.client-status-badge--done {
  color: #047857;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.client-status-badge--suspended {
  color: #b45309;
  background: #fffbeb;
  border-color: #fde68a;
}

.client-status-badge--unknown {
  color: #475569;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.client-status-badge--suivi {
  color: #265f85;
  background: #d9ebf6;
  border-color: #82bcde;
}

.client-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

@media (min-width: 640px) {
  .client-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.client-info-field {
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #f8fafc;
}

.client-info-field__label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.client-info-field__value {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #0f172a;
  word-break: break-word;
}

.client-portal-panel {
  border: 1px solid #e2e8f0;
  border-radius: 0.875rem;
  padding: 1rem;
  background: linear-gradient(160deg, rgba(130, 188, 222, 0.08), rgba(255, 255, 255, 0.95));
}

.client-portal-panel__header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
  .client-portal-panel__header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.client-portal-panel__title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.client-portal-segment {
  display: flex;
  width: 100%;
  padding: 0.2rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  background: #fff;
}

@media (min-width: 640px) {
  .client-portal-segment {
    width: auto;
  }
}

.client-portal-segment__btn {
  flex: 1;
  min-height: 44px;
  padding: 0.45rem 0.85rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
  background: transparent;
  cursor: pointer;
}

.client-portal-segment__btn--active {
  color: #fff;
  background: #3a94c8;
  box-shadow: 0 2px 8px rgba(58, 148, 200, 0.35);
}

.client-portal-download-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0.75rem;
  border-radius: 0.5rem;
  font-weight: 600;
  color: #265f85;
  background: #d9ebf6;
  text-decoration: none;
}

.client-portal-download-link:hover {
  background: #c5e0f2;
}

.client-portal-help {
  padding: 1rem;
  margin-bottom: 1rem;
}

.client-portal-help-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f172a;
}

.client-portal-help-text {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #64748b;
}

.client-portal-help-links {
  margin-top: 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.client-portal-help-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #265f85;
  text-decoration: none;
  background: #f8fafc;
}

.client-portal-help-link:hover {
  background: #eef6fb;
  border-color: #82bcde;
}

.client-portal-page .client-dataview {
  max-height: none;
}

.client-portal-page .flag-badge {
  bottom: 5.5rem;
}

@media (prefers-reduced-motion: reduce) {
  .client-portal-spinner {
    animation: none;
    border-top-color: #3a94c8;
  }

  .client-dataview__chevron {
    transition: none;
  }
}
