/* =========================================================
   COMTRIA DOCUMENT
   Thème institutionnel SaaS — ComtriaDocument
   S'applique à tout document.comtria.com
   ========================================================= */

/* -------------------- VARIABLES GLOBALES -------------------- */

:root {
  /* ======== PALETTE INSTITUTIONNELLE COMTRIADOCUMENT ======== */

  /* Couleurs principales */
  --color-primary: #2563eb;          /* Bleu action premium */
  --color-primary-dark: #1d4ed8;     /* Bleu profond */
  --color-primary-light: #3b82f6;    /* Bleu clair */
  --color-primary-soft: rgba(37, 99, 235, 0.08);

  /* Couleurs institutionnelles / juridiques */
  --color-legal-dark: #1e293b;       /* Bleu nuit institutionnel */
  --color-legal-muted: #334155;      /* Bleu gris sérieux */
  --color-legal-text: #0f172a;       /* Texte principal */

  /* Couleurs d’accent */
  --color-accent: #fbbf24;           /* Jaune légal (sceaux, badges) */
  --color-accent-light: #fde68a;

  /* Backgrounds premium */
  --color-bg: #f1f5f9;               /* Gris très clair institutionnel */
  --color-bg-soft: #ffffff;          /* Blanc propre */
  --color-bg-muted: #f8fafc;         /* Neutre léger */

  /* Bordures */
  --color-border: #e2e8f0;
  --color-border-dark: #cbd5e1;

  /* Texte */
  --color-text: #0f172a;
  --color-text-muted: #64748b;

  /* Ombres premium */
  --shadow-soft: 0 12px 34px rgba(15, 23, 42, 0.05);
  --shadow-medium: 0 16px 40px rgba(15, 23, 42, 0.08);
  --shadow-strong: 0 22px 55px rgba(15, 23, 42, 0.12);

  /* Radius */
  --radius: 14px;
}

/* =========================================================
   GLOBAL
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI",
    Roboto, sans-serif;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

/* Conteneur central */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Titres / textes */
h1,
h2,
h3,
h4 {
  margin: 0 0 12px 0;
  font-weight: 700;
  color: var(--color-text);
}

p {
  margin: 0 0 10px 0;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Sections génériques */
.section {
  padding: 56px 0;
}

/* =========================================================
   HEADER LEGACY (si utilisé ailleurs)
   ========================================================= */

.header {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(241, 245, 249, 0.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo {
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 20px;
  color: #0f172a;
}

.header-logo span {
  color: var(--color-primary);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
}

.header-nav a {
  color: #111827;
  text-decoration: none;
}

.header-nav a:hover {
  color: var(--color-primary);
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Bouton "Connexion" style pill blanc */
.header-link-pill {
  padding: 7px 18px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  font-size: 14px;
  color: #111827;
  text-decoration: none;
}

.header-link-pill:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

/* =========================================================
   HEADER — FIX RESPONSIVE (LEGACY)
   ========================================================= */

@media (max-width: 900px) {
  .header {
    padding: 8px 0 !important;
    backdrop-filter: blur(8px);
  }

  .header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px !important;
    gap: 10px;
  }

  .header .logo {
    font-size: 16px !important;
    white-space: nowrap;
  }

  .header nav a {
    font-size: 14px !important;
    margin-left: 10px !important;
  }

  .header .btn {
    padding: 6px 14px !important;
    font-size: 13px !important;
    border-radius: 999px !important;
    white-space: nowrap;
  }

  .header .btn-outline {
    padding: 6px 14px !important;
    border-radius: 999px !important;
    font-size: 13px;
  }

  .header .btn-primary {
    padding: 6px 14px !important;
    border-radius: 999px !important;
    font-size: 13px;
  }

  .header nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
}

/* =========================================================
   HEADER PREMIUM COMTRIADOCUMENT (LegalPlace-style)
   ========================================================= */

.clp-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
}

.clp-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.clp-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.clp-header-logo {
  height: 34px;
}

.clp-header-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1e293b;
}

.clp-header-title span {
  color: var(--color-primary);
}

.clp-header-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.clp-header-nav a {
  font-size: 15px;
  color: #334155;
  text-decoration: none;
  font-weight: 500;
}

.clp-header-nav a:hover {
  color: var(--color-primary);
}

.clp-header-btn {
  padding: 9px 22px !important;
  font-size: 14px !important;
}

/* Responsive header premium */
@media (max-width: 900px) {
  .clp-header-nav {
    display: none;
  }

  .clp-header-inner {
    height: 60px;
  }
}

/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease,
    box-shadow 0.18s ease, transform 0.12s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary-dark));
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.45);
  transform: translateY(-1px);
}

.btn-outline {
  background: #ffffff;
  color: #111827;
  border: 1px solid #d1d5db;
  box-shadow: none;
}

.btn-outline:hover {
  background: #f3f4f6;
  border-color: #cbd5e1;
}

/* =========================================================
   CARDS
   ========================================================= */

.card {
  background: var(--color-bg-soft);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  padding: 22px 22px 20px 22px;
  transition: box-shadow 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: var(--shadow-strong);
}

.card--plain {
  box-shadow: none;
}

/* =========================================================
   FORM / INPUTS
   ========================================================= */

input,
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: var(--color-text);
  font-size: 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease,
    background-color 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-primary-light);
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
  background: #ffffff;
}

textarea {
  border-radius: 16px;
  resize: vertical;
  min-height: 80px;
}

label {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--color-text-muted);
  font-size: 13px;
}

/* =========================================================
   TABLES
   ========================================================= */

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 14px;
}

th {
  text-align: left;
  padding: 12px 10px;
  background: #f9fafb;
  color: #111827;
  font-weight: 600;
  border-bottom: 1px solid #e5e7eb;
}

td {
  padding: 10px;
  border-bottom: 1px solid #e5e7eb;
  color: #111827;
}

tr:hover td {
  background: #f3f4ff;
}

/* =========================================================
   FOOTER LEGACY (si utilisé ailleurs)
   ========================================================= */

footer {
  text-align: center;
  padding: 28px 0;
  border-top: 1px solid #e5e7eb;
  margin-top: 60px;
  color: var(--color-text-muted);
  font-size: 14px;
}

/* =========================================================
   HOME DOCUMENT — HERO LEGACY
   ========================================================= */

.hero {
  padding: 80px 0;
  background: linear-gradient(135deg, #eef2ff, #f8fafc);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.35fr);
  gap: 32px;
  align-items: center;
}

.hero-left h1 {
  font-size: 40px;
  line-height: 1.15;
  color: #0f172a;
  margin-bottom: 14px;
}

.hero-left p {
  font-size: 18px;
  color: #475569;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.hero-small {
  margin-top: 12px;
  font-size: 14px;
  color: #64748b;
}

.hero-card {
  border-left: 4px solid #facc15;
  padding: 24px;
}

/* =========================================================
   HOME DOCUMENT — BLOCS LISTES LEGACY
   ========================================================= */

.home-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.home-list li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 6px;
  font-size: 14px;
  color: #374151;
}

.home-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.8em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--color-primary);
  transform: translateY(-50%);
}

.home-list a {
  color: #1d4ed8;
  text-decoration: none;
}

.home-list a:hover {
  text-decoration: underline;
}

/* =========================================================
   HERO PREMIUM — STYLE LEGALPLACE PRO
   ========================================================= */

.clp-hero {
  background: var(--color-bg-muted);
  padding: 90px 0;
  border-bottom: 1px solid #e2e8f0;
}

.clp-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 60px;
  align-items: center;
}

.clp-hero-logo img {
  height: 38px;
  margin-bottom: 18px;
}

.clp-hero-title {
  font-size: 46px;
  font-weight: 800;
  line-height: 1.15;
  color: #0f172a;
  margin-bottom: 20px;
}

.clp-hero-sub {
  font-size: 18px;
  color: #475569;
  margin-bottom: 34px;
}

.clp-hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.clp-hero-btn {
  padding: 14px 28px !important;
  font-size: 15px !important;
}

.clp-hero-foot {
  margin-top: 16px;
  font-size: 14px;
  color: #64748b;
}

.clp-hero-illustr {
  width: 100%;
  max-width: 480px;
  display: block;
  margin: 0 auto;
  animation: fadeInUp 0.7s ease;
}

/* Micro-animation hero illustration */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   CARTES — TYPES DE DOCUMENTS (LegalPlace style)
   ========================================================= */

.clp-doc-types {
  margin-top: 80px;
}

.clp-doc-types-title {
  font-size: 30px;
  margin-bottom: 32px;
  font-weight: 800;
  color: #0f172a;
}

.clp-doc-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 26px;
}

.clp-doc-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: var(--shadow-soft);
  transition: all 0.2s ease;
}

.clp-doc-card:hover {
  border-color: var(--color-border-dark);
  box-shadow: var(--shadow-medium);
}

.clp-doc-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #1e293b;
}

.clp-doc-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.clp-doc-card li {
  margin-bottom: 6px;
}

.clp-doc-card a {
  color: var(--color-primary);
  font-size: 15px;
  text-decoration: none;
}

.clp-doc-card a:hover {
  text-decoration: underline;
}

/* =========================================================
   SECTION POURQUOI — PRO & INSTITUTIONNEL
   ========================================================= */

.clp-why {
  margin-top: 80px;
}

.clp-why-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 30px;
}

.clp-why-list {
  margin: 18px 0;
  list-style: none;
  padding: 0;
}

.clp-why-list li {
  font-size: 15px;
  margin-bottom: 8px;
  padding-left: 18px;
  position: relative;
  color: #374151;
}

.clp-why-list li::before {
  content: "•";
  color: var(--color-primary);
  position: absolute;
  left: 0;
  top: 2px;
}

.clp-why-note {
  margin-top: 12px;
  font-size: 13px;
  color: #64748b;
}

/* =========================================================
   FOOTER PREMIUM — INSTITUTIONNEL
   ========================================================= */

.clp-footer {
  background: #f1f5f9;
  border-top: 1px solid #e2e8f0;
  padding: 50px 0 30px;
  margin-top: 80px;
}

.clp-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
}

.clp-footer-col h4 {
  font-size: 16px;
  margin-bottom: 12px;
  color: #0f172a;
}

.clp-footer-col p {
  font-size: 14px;
  color: #475569;
}

.clp-footer-col a {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: #334155;
  text-decoration: none;
}

.clp-footer-col a:hover {
  color: var(--color-primary);
}

.clp-footer-bottom {
  margin-top: 40px;
  text-align: center;
  font-size: 13px;
  color: #64748b;
}

/* =========================================================
   HERO LEGAL ALTERNATIF (optionnel, si encore utilisé)
   ========================================================= */

.hero-legal {
  background: linear-gradient(180deg, #ffffff 0%, #f5f7fb 100%);
  padding: 80px 0;
  border-bottom: 1px solid #e5e7eb;
}

.hero-legal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.hero-legal-logo img {
  width: 85px;
  margin-bottom: 14px;
}

.hero-legal-title {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.13;
  color: #1a2b3c;
  margin-bottom: 16px;
}

.hero-legal-subtext {
  font-size: 18px;
  color: #475569;
  margin-bottom: 22px;
}

.hero-legal-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-legal-note {
  margin-top: 12px;
  color: #6b7280;
  font-size: 14px;
}

.hero-legal-illustr img {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  display: block;
}

/* =========================================================
   RESPONSIVE GLOBAL
   ========================================================= */

/* --------- TABLETTES (hero legacy + layout) --------- */
@media (max-width: 992px) {
  .hero {
    padding: 70px 0;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .hero-left h1 {
    font-size: 32px;
    line-height: 1.2;
  }

  .hero-left p {
    font-size: 16px;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-card {
    order: -1;
  }

  .header-inner {
    flex-wrap: wrap;
    gap: 8px;
  }

  .header-nav {
    gap: 12px;
    font-size: 13px;
  }

  .header-actions {
    gap: 8px;
  }

  .clp-hero {
    padding: 60px 0;
    text-align: center;
  }

  .clp-hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .clp-hero-title {
    font-size: 34px;
    line-height: 1.2;
  }

  .clp-hero-sub {
    font-size: 16px;
  }

  .clp-why-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .hero-legal {
    padding: 60px 0;
  }

  .hero-legal-grid {
    grid-template-columns: 1fr;
  }

  .hero-legal-title {
    font-size: 32px;
  }

  .hero-legal-illustr img {
    margin-top: 20px;
  }
}

/* --------- MOBILE --------- */
@media (max-width: 640px) {
  .hero {
    padding: 52px 0;
  }

  .hero-left h1 {
    font-size: 26px;
    line-height: 1.25;
  }

  .hero-left p {
    font-size: 15px;
  }

  .card {
    padding: 18px 16px 16px 16px;
  }

  .container {
    padding: 0 14px;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .clp-hero-btn {
    width: 100%;
  }

  .hero-legal-title {
    font-size: 26px;
  }

  .hero-legal-subtext {
    font-size: 15px;
  }

  .hero-legal-buttons {
    flex-direction: column;
  }
}

/* --------- TRES PETIT MOBILE --------- */
@media (max-width: 480px) {
  .hero {
    padding: 45px 0;
  }

  .hero-left h1 {
    font-size: 24px;
  }

  .hero-buttons .btn {
    padding-top: 11px;
    padding-bottom: 11px;
  }
}

/* --------- GRID RESPONSIVE POUR ANCIENNES SECTIONS --------- */
@media (max-width: 900px) {
  .home-grid,
  .why-grid {
    grid-template-columns: 1fr !important;
  }

  .home-grid .card,
  .why-grid .card {
    width: 100% !important;
  }

  .why-section {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  .why-section .card {
    padding: 20px !important;
  }
}

.search-doc-input {
    width: 100%;
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    font-size: 16px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 10px;
}

.search-doc-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 6px 18px rgba(37,99,235,0.12);
}

.search-doc-suggestions {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    display: none;
    position: absolute;
    width: 100%;
    z-index: 50;
    max-height: 280px;
    overflow-y: auto;
}

.search-doc-suggestions div {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 15px;
}

.search-doc-suggestions div:hover {
    background: var(--color-primary-soft);
}
/* ---------------------------------------------------
   AUTOCOMPLETE SEARCH — COMTRIADOCUMENT (PRO)
---------------------------------------------------- */

.search-doc-wrapper {
    position: relative;
    width: 100%;
}

#searchDocumentInput {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    border: 1px solid #d0d7e3;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,0.04);
    transition: all .2s ease;
}

#searchDocumentInput:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37,99,235,0.15);
}

/* --- RESULTS DROPDOWN --- */
#searchSuggestions {
    position: absolute;
    top: 54px;
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 12px 25px rgba(0,0,0,0.08);
    padding: 6px 0;
    z-index: 50;
    display: none;
    max-height: 320px;
    overflow-y: auto;
}

/* HIDE SCROLLBAR CLEAN */
#searchSuggestions::-webkit-scrollbar {
    width: 8px;
}
#searchSuggestions::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 6px;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    cursor: pointer;
    transition: background .15s;
}

.search-item:hover {
    background: #f8fafc;
}

.search-item-icon {
    width: 40px;
    height: 40px;
    background: #eef2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 20px;
}

.search-item-content {
    display: flex;
    flex-direction: column;
}

.search-item-title {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
}

.search-item-category {
    font-size: 13px;
    color: #64748b;
}

/* MOBILE */
@media (max-width: 640px) {

    #searchDocumentInput {
        font-size: 14px;
        padding: 12px 14px;
    }

    .search-item {
        padding: 10px 14px;
    }

    .search-item-icon {
        width: 34px;
        height: 34px;
        font-size: 18px;
    }

    #searchSuggestions {
        max-height: 240px;
    }
}

/* ============================================================
   SEARCH BAR — PAGE /modeles UNIQUEMENT
============================================================ */

.models-search-wrapper {
    position: relative;
    width: 100%;
    max-width: 760px;
}

.models-search-input {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    transition: 0.2s ease;
    box-shadow: 0 4px 14px rgba(0,0,0,0.04);
}

.models-search-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37,99,235,0.15);
}

/* Dropdown */
.models-search-suggestions {
    position: absolute;
    top: 58px;
    width: 100%;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 12px 25px rgba(0,0,0,0.08);
    padding: 8px 0;
    display: none;
    z-index: 999;
    max-height: 340px;
    overflow-y: auto;
}

.models-search-suggestions::-webkit-scrollbar {
    width: 8px;
}
.models-search-suggestions::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 6px;
}

.models-search-item {
    display: flex;
    gap: 14px;
    padding: 14px 18px;
    cursor: pointer;
    transition: background 0.2s;
}

.models-search-item:hover {
    background: #f3f4f6;
}

.models-search-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.models-search-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.models-search-category {
    font-size: 14px;
    color: #6b7280;
}


/* ============================================
   ComtriaDocument — DESIGN PREMIUM
   ============================================ */

.models-toolbar {
    display:flex;
    flex-wrap:wrap;
    gap:16px;
    align-items:center;
    justify-content:space-between;
    margin-bottom:22px;
}

.models-search-wrapper {
    position:relative;
    flex:1 1 320px;
    max-width:620px;
}

.models-search-input {
    width:100%;
    padding:14px 16px;
    border-radius:999px;
    border:1px solid #d0d7e3;
    background:#ffffff;
    font-size:15px;
    box-shadow:0 12px 30px rgba(15,23,42,0.06);
    outline:none;
    transition:border-color .18s ease, box-shadow .18s ease, transform .08s ease;
}

.models-search-input:focus {
    border-color:#2563eb;
    box-shadow:0 0 0 3px rgba(37,99,235,0.18);
    transform:translateY(-1px);
}

.models-search-suggestions {
    position:absolute;
    top:52px;
    left:0;
    right:0;
    background:#ffffff;
    border-radius:16px;
    box-shadow:0 18px 45px rgba(15,23,42,0.12);
    padding:6px 0;
    z-index:40;
    max-height:320px;
    overflow-y:auto;
    display:none;
}

.models-search-item {
    display:flex;
    gap:12px;
    padding:10px 16px;
    cursor:pointer;
    transition:background .15s ease;
}

.models-search-item:hover {
    background:#f3f4f6;
}

.models-search-icon {
    width:38px;
    height:38px;
    border-radius:10px;
    background:#eef2ff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:20px;
}

.models-search-title {
    font-size:15px;
    font-weight:600;
    color:#0f172a;
}

.models-search-category {
    font-size:13px;
    color:#6b7280;
}

.models-search-suggestions::-webkit-scrollbar {
    width:8px;
}
.models-search-suggestions::-webkit-scrollbar-thumb {
    background:#cbd5e1;
    border-radius:6px;
}

.models-filters {
    display:flex;
    align-items:center;
    gap:16px;
}

.models-sort label {
    font-size:13px;
    color:#6b7280;
    margin-right:6px;
}

.models-sort select {
    padding:8px 10px;
    border-radius:999px;
    border:1px solid #d1d5db;
    font-size:14px;
    background:#ffffff;
}

.models-grid {
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(260px, 1fr));
    gap:18px;
}

.models-card {
    background:#ffffff;
    border-radius:18px;
    padding:18px 18px 16px;
    border:1px solid #e2e8f0;
    box-shadow:0 14px 34px rgba(15,23,42,0.06);
    display:flex;
    flex-direction:column;
    gap:10px;
    transition:transform .12s ease, box-shadow .15s ease, border-color .15s ease;
    text-decoration:none;
}

.models-card:hover {
    transform:translateY(-2px);
    border-color:rgba(37,99,235,0.55);
    box-shadow:0 20px 45px rgba(37,99,235,0.20);
}

.models-card-header {
    display:flex;
    gap:10px;
    align-items:flex-start;
}

.models-card-icon {
    width:40px;
    height:40px;
    border-radius:12px;
    background:#eff6ff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:21px;
    flex-shrink:0;
}

.models-card-title {
    font-size:15px;
    font-weight:600;
    color:#0f172a;
    margin-bottom:2px;
}

.models-card-sub {
    font-size:13px;
    color:#6b7280;
}

.models-card-meta {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-top:6px;
}

.models-badge-category {
    font-size:11px;
    text-transform:uppercase;
    letter-spacing:.05em;
    padding:4px 9px;
    border-radius:999px;
    background:#eef2ff;
    color:#1d4ed8;
}

.models-badge-subcat {
    font-size:11px;
    padding:4px 8px;
    border-radius:999px;
    background:#f3f4f6;
    color:#4b5563;
}

.models-popularity {
    font-size:11px;
    color:#9ca3af;
}

@media (max-width:768px){
    .models-toolbar {
        flex-direction:column;
        align-items:stretch;
    }
    .models-filters {
        justify-content:flex-start;
    }
}


/* ==========================================
   MENU BURGER — MOBILE
========================================== */

.clp-burger {
    display: none;
    width: 28px;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    height: 18px;
}

.clp-burger div {
    height: 3px;
    background: #1e293b;
    border-radius: 4px;
    transition: .2s ease;
}

/* Menu mobile */
.clp-mobile-menu {
    display: none;
    flex-direction: column;
    padding: 18px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    z-index: 90;
}

.clp-mobile-menu a {
    padding: 14px 0;
    font-size: 16px;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
}

.clp-mobile-menu a:last-child {
    border-bottom: none;
    margin-top: 10px;
}

/* BURGER visible en mobile */
@media (max-width: 900px) {
    .clp-header-nav {
        display: none !important;
    }
    .clp-header-actions {
        display: none !important;
    }
    .clp-burger {
        display: flex;
    }
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-btn {
    width: 100%;
    padding: 14px;
    font-size: 16px !important;
}

.form-group label {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 6px;
}

.form-group input {
    background: #fff;
    border: 1px solid #d4dae4;
    border-radius: 12px;
    padding: 12px 14px;
}

.form-group input:focus {
    background: #ffffff;
}

.form-row {
    display: flex;
    gap: 14px;
}

@media(max-width: 640px) {
    .form-row {
        flex-direction: column;
    }
}

.auth-links {
    margin-top: 18px;
    text-align: center;
}

.auth-link {
    font-size: 13px;
    color: var(--color-primary);
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

.auth-note {
    margin-top: 20px;
    text-align: center;
    font-size: 13px;
    color: var(--color-text-muted);
}

.auth-note a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

.clp-header-logo-link {
    text-decoration: none;
    color: inherit;
}

.clp-header-logo-link:hover {
    opacity: .85;
}

