/**
 * Doctiva Single Médecin - Premium Redesign
 * Design épuré, accessible, performant
 */

/* === TOKENS & VARIABLES === */
:root {
  --brand: #2563EB;
  --accent: #06B6D4;
  --ink: #0F172A;
  --muted: #334155;
  --wash: #F6F9FF;
  --ring: #E7EDF5;
}

/* === WRAPPER PRINCIPAL === */
.profile-wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  display: grid;
  gap: 16px;
  color: var(--ink);
  background: transparent;
}

/* === CARTE PREMIUM === */
.card {
  background: #fff;
  border: 1px solid var(--ring);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 12px 32px rgba(2, 6, 23, .06);
}

.card h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

/* === CHIPS & BOUTONS === */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 9999px;
  background: var(--wash);
  border: 1px solid var(--ring);
  color: #334155;
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  background: #F6F9FF;
  border: 1px solid var(--ring);
  color: #0F172A;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.btn.primary:hover {
  background: #1d4ed8;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

.btn.block {
  width: 100%;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* === GALERIE === */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.gallery a {
  display: block;
  overflow: hidden;
  border-radius: 12px;
  transition: transform 0.2s ease;
}

.gallery a:hover {
  transform: scale(1.02);
}

.gallery img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  cursor: zoom-in;
}

/* === RICHTEXT === */
.richtext {
  color: #334155;
  font-size: 14.5px;
  line-height: 1.7;
}

.richtext p {
  margin: 0 0 1em;
}

.richtext p:last-child {
  margin-bottom: 0;
}

/* === LEADNOTE === */
.leadnote {
  font-size: 12.5px;
  color: #5b6b7c;
  line-height: 1.6;
}

/* === FOCUS ACCESSIBLE === */
input,
textarea,
select,
.btn,
a {
  outline: none;
}

input:focus,
textarea:focus,
select:focus,
.btn:focus-visible,
a:focus-visible {
  box-shadow: 0 0 0 3px rgba(6, 182, 212, .18);
  border-color: #D8E6FF;
}

/* === PROFILE HEAD === */
.profile-head {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 14px;
  align-items: start;
}

.rounded-full {
  border-radius: 50%;
}

/* === STICKY CTA MOBILE === */
@media (max-width: 768px) {
  .cta-sticky {
    position: fixed;
    bottom: env(safe-area-inset-bottom, 0);
    left: 0;
    right: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0));
    background: rgba(255, 255, 255, .85);
    backdrop-filter: saturate(120%) blur(8px);
    box-shadow: 0 -10px 30px rgba(2, 6, 23, .15);
  }
  
  .cta-sticky .btn {
    height: 48px;
    border-radius: 12px;
    font-size: 13px;
    padding: 0 12px;
  }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .profile-wrap {
    padding: 16px 12px 32px;
  }
  
  .profile-head {
    grid-template-columns: 72px 1fr;
  }
  
  .cta-inline {
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .btn.primary.fit {
    width: min(260px, 100%);
  }
  
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .card {
    padding: 16px;
  }
  
  /* Cartes similaires en colonne unique sur mobile */
  .card > div[style*="grid-template-columns:repeat(3"] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .profile-wrap {
    padding: 12px 10px 24px;
    gap: 12px;
  }
  
  .card {
    padding: 14px;
    border-radius: 12px;
  }
  
  .cta-inline {
    flex-direction: column;
    width: 100%;
  }
  
  .cta-inline .btn {
    width: 100%;
  }
}

/* === CARD MINI (similaires) === */
.card-mini {
  text-align: center;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--ring);
  border-radius: 14px;
  box-shadow: 0 10px 24px -16px rgba(2, 6, 23, .16);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-mini:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(2, 6, 23, .12);
}

/* === FORMULAIRE RDV === */
#form-rdv input,
#form-rdv textarea,
#form-rdv select {
  width: 100%;
  min-height: 44px;
  padding: 12px 14px;
  border: 1px solid var(--ring);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  transition: all 0.2s ease;
}

#form-rdv input:focus,
#form-rdv textarea:focus,
#form-rdv select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, .18);
}

#form-rdv textarea {
  min-height: 100px;
  resize: vertical;
}

#form-rdv button,
#form-rdv input[type="submit"] {
  width: 100%;
  min-height: 44px;
  padding: 0 24px;
  background: var(--brand);
  color: #fff;
  border: 1px solid var(--brand);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

#form-rdv button:hover,
#form-rdv input[type="submit"]:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

/* === GLIGHTBOX CUSTOMIZATION === */
.glightbox-clean .gslide-description {
  background: rgba(0, 0, 0, 0.85);
  color: white;
}

.glightbox-clean .gclose,
.glightbox-clean .gnext,
.glightbox-clean .gprev {
  background: var(--brand);
  color: white;
}

.glightbox-clean .gclose:hover,
.glightbox-clean .gnext:hover,
.glightbox-clean .gprev:hover {
  background: #1d4ed8;
}

/* === UTILITIES === */
.text-2xl {
  font-size: clamp(22px, 3vw, 28px);
}

.text-center {
  text-align: center;
}

.mb-0 {
  margin-bottom: 0;
}

.mt-2 {
  margin-top: 8px;
}

.mt-3 {
  margin-top: 12px;
}

.mt-4 {
  margin-top: 16px;
}

/* === PRINT === */
@media print {
  .cta-sticky,
  .btn,
  .cta-inline {
    display: none !important;
  }
  
  .profile-wrap {
    max-width: 100%;
    padding: 0;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #ddd;
    page-break-inside: avoid;
  }
}
