/* Custom UI helpers (not generated by Tailwind) */
/* Global readability + responsive content width */
:root {
  --site-max-width: calc(100vw - 1rem);
}

html {
  font-size: clamp(15px, 0.28vw + 14px, 18px);
}

body {
  line-height: 1.55;
}

.max-w-6xl {
  max-width: var(--site-max-width);
}

.text-sm {
  font-size: clamp(0.95rem, 0.12vw + 0.92rem, 1.04rem);
  line-height: 1.6;
}

.text-xs {
  font-size: clamp(0.86rem, 0.08vw + 0.84rem, 0.94rem);
  line-height: 1.45;
}

@media (min-width: 1800px) {
  :root {
    --site-max-width: calc(100vw - 2rem);
  }
}

.dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.dropdown::after {
  content: "";
  position: absolute;
  left: -8px;
  right: -8px;
  top: 100%;
  height: 14px;
}

.dropdown-btn {
  background: transparent;
  border: 0;
  color: #ffffff;
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 4px;
}

.dropdown-caret {
  font-size: 12px;
  opacity: 0.9;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 6px;
  min-width: 240px;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  padding: 6px 0;
  z-index: 9999;
  display: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.dropdown:hover > .dropdown-menu,
.dropdown-menu:hover {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-menu {
  pointer-events: auto;
}

.dropdown-item {
  display: block;
  padding: 10px 14px;
  color: #0f172a;
  text-decoration: none;
  white-space: nowrap;
  font-size: 14px;
}

.dropdown-item:hover {
  background-color: #f1f5f9;
}

.dropdown-btn:focus-visible {
  outline: 2px solid #34d399;
  outline-offset: 2px;
}

/* Technologies page */
.technologies-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 24px;
  margin-top: 24px;
}

/* Card hover effects (site-wide) */
.rounded-2xl.border,
.card.shadow-sm {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.rounded-2xl.border:hover,
.rounded-2xl.border:focus-within,
.card.shadow-sm:hover,
.card.shadow-sm:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
  border-color: #34d399;
}

/* Reusable hover lift for buttons */
.card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-hover:hover,
.card-hover:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

/* Code button color (independent of Tailwind build) */
.btn-code {
  background: #2563eb;
  color: #ffffff;
}

.btn-code:hover,
.btn-code:focus-visible {
  background: #1d4ed8;
}

/* Mobile nav */
.mobile-nav {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  border-top: 1px solid #334155;
  background: #0f172a;
  transition: max-height 0.25s ease, opacity 0.2s ease;
}

.mobile-nav.is-open {
  max-height: 520px;
  opacity: 1;
}

/* Custom caret bullets */
.caret-bullet {
  display: inline-block;
  width: 18px;
  color: #0f766e;
  font-weight: 700;
}

/* Footer icons */
.footer-icon {
  width: 26px;
  height: 26px;
  display: block;
}

/* Game help card */
.game-help-card {
  border: 1px solid #cbd5e1;
  border-left: 6px solid #0ea5a4;
  border-radius: 16px;
  background: #ffffff;
  padding: 16px 18px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.09);
}

.game-help-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.game-help-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.game-help-icon {
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ccfbf1;
  color: #0f766e;
  font-weight: 800;
  font-size: 0.92rem;
}

.game-help-title {
  font-size: 1.05rem;
  line-height: 1.2;
  font-weight: 700;
  color: #0f172a;
}

.game-help-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #bfdbfe;
  background: #dbeafe;
  color: #1e40af;
  border-radius: 9999px;
  padding: 4px 11px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.game-help-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
  color: #334155;
  font-size: 0.97rem;
}

.game-help-list li {
  position: relative;
  padding-left: 18px;
}

.game-help-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #14b8a6;
  transform: translateY(-50%);
}

/* Home hero spacing on very wide screens */
.hero-intro {
  max-width: min(1400px, calc(100vw - 1rem));
}

@media (min-width: 768px) {
  .hero-intro {
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 360px);
    gap: 3rem;
  }
}

/* Featured projects cards */
.featured-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.12);
}

.featured-card-media {
  position: relative;
  height: 9.5rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.featured-card-media--teal {
  background: linear-gradient(135deg, #34d399 0%, #0f766e 100%);
}

.featured-card-media--blue {
  background: linear-gradient(135deg, #60a5fa 0%, #4338ca 100%);
}

.featured-card-media--purple {
  background: linear-gradient(135deg, #c084fc 0%, #db2777 100%);
}

.featured-card-icon {
  width: 4.75rem;
  height: 4.75rem;
  color: #ffffff;
}

.featured-card-badge-wrap {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.featured-card-badge {
  display: inline-block;
  border-radius: 9999px;
  background: #ffffff;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  line-height: 1;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.featured-card-badge--teal {
  color: #047857;
}

.featured-card-badge--blue {
  color: #1d4ed8;
}

.featured-card-badge--purple {
  color: #7e22ce;
}

.featured-points {
  list-style: disc;
  padding-left: 1.1rem;
}

.featured-points li {
  margin-top: 0.45rem;
}

.featured-points li::marker {
  color: #10b981;
}

/* CTA buttons in "Ce que je sais faire" */
.cta-contact-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: 1px solid #059669;
}

.cta-contact-btn:hover,
.cta-contact-btn:focus-visible {
  background: linear-gradient(135deg, #0ea371 0%, #047857 100%);
}

.cta-cv-btn {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border: 1px solid #1d4ed8;
}

.cta-cv-btn:hover,
.cta-cv-btn:focus-visible {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

/* Domain cards (projects hub) with SVG icons */
.hub-icon-wrap {
  border: 1px solid #e2e8f0;
}

.hub-icon {
  width: 82px;
  height: 82px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hub-icon-wrap--teal {
  background: linear-gradient(135deg, #ecfdf5 0%, #ccfbf1 100%);
  color: #0f766e;
}

.hub-icon-wrap--blue {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #1d4ed8;
}

.hub-icon-wrap--violet {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  color: #6d28d9;
}

.hub-icon-wrap--indigo {
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  color: #4338ca;
}

.hub-icon-wrap--emerald {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  color: #047857;
}

.hub-icon-wrap--amber {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: #b45309;
}

/* Projects hub: keep mobile horizontal scroll, center cards on large screens */
.projects-hub-row {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scroll-snap-type: x mandatory;
}

@media (min-width: 1024px) {
  .projects-hub-row {
    overflow: visible;
    justify-content: center;
    flex-wrap: wrap;
    scroll-snap-type: none;
  }
}
