/* Serpette & Cie - pages internes (services, réalisations, à propos, contact, légal).
   Chargée uniquement hors homepage. Réutilise les variables, sections et composants de site.css. */

/* ---------- En-tête de page (hero réduit) ---------- */

.page-hero {
  padding-bottom: clamp(56px, 6vw, 80px);
}

.page-hero .hero-inner {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.page-hero.is-text .hero-inner {
  grid-template-columns: minmax(0, 1fr);
}

.page-hero.is-text .hero-copy {
  max-width: 820px;
}

.page-title {
  color: #fff;
  font-size: clamp(2.1rem, 3.4vw, 2.9rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.022em;
}

.page-hero .hero-lead {
  max-width: 58ch;
}

/* Fil d'Ariane (style des sur-titres) */
.breadcrumb {
  margin-bottom: 18px;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.breadcrumb li + li::before {
  content: "/";
  color: rgba(174, 187, 216, 0.5);
}

.breadcrumb a {
  color: var(--on-dark-soft);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: #fff;
}

.breadcrumb [aria-current] {
  color: var(--link-on-dark);
}

/* Visuel de l'en-tête : capture ou illustration */
.page-visual {
  display: grid;
  place-items: center;
  justify-self: end;
  width: 100%;
  max-width: 560px;
}

.page-visual .tile-window {
  width: 100%;
  box-shadow: 0 40px 70px -30px rgba(2, 8, 24, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.page-visual .tile-window img {
  width: 100%;
}

.page-visual .tile-phone {
  height: auto;
  width: min(260px, 60%);
}

.page-visual .tile-phone img {
  width: 100%;
  height: auto;
}

.page-visual .fg-art,
.page-visual .brand-art {
  height: 340px;
}

.page-visual.is-art {
  aspect-ratio: 4 / 3;
  max-width: 460px;
  background: radial-gradient(60% 65% at 50% 55%, rgba(79, 141, 255, 0.3), transparent 72%);
}

.page-visual.is-art svg {
  width: 72%;
  height: auto;
  filter: drop-shadow(0 30px 40px rgba(4, 12, 34, 0.6));
}

.page-visual.is-photo {
  max-width: 400px;
}

.page-visual.is-photo .about-photo {
  width: 100%;
}

/* ---------- Mises en page de contenu ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 28px clamp(32px, 6vw, 96px);
  align-items: start;
}

.split + .split {
  margin-top: clamp(48px, 6vw, 80px);
}

.section-title.is-sm {
  font-size: clamp(1.7rem, 2.8vw, 2.3rem);
}

.prose {
  max-width: 68ch;
}

.prose p + p,
.prose p + ul,
.prose ul + p,
.prose .check-list + p {
  margin-top: 16px;
}

.prose h2 {
  margin: 40px 0 14px;
  font-size: clamp(1.35rem, 2vw, 1.6rem);
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin: 28px 0 10px;
  font-size: 1.12rem;
}

/* Liens dans le texte : couleur de lien, soulignement discret qui se renforce au survol */
.prose a,
.card a,
.faq-answer a {
  color: var(--link);
  font-weight: 600;
  text-decoration-color: var(--link-underline);
  text-underline-offset: 3px;
  transition: color 0.2s var(--ease), text-decoration-color 0.2s var(--ease);
}

.prose a:hover,
.card a:hover,
.faq-answer a:hover {
  color: var(--link-hover);
  text-decoration-color: currentColor;
}

.is-dark .prose a,
.is-dark .card a {
  color: var(--link-on-dark);
  text-decoration-color: var(--link-on-dark-underline);
}

.is-dark .prose a:hover,
.is-dark .card a:hover {
  color: var(--link-on-dark-hover);
  text-decoration-color: currentColor;
}

.prose ul:not(.check-list):not(.tags) {
  display: grid;
  gap: 8px;
}

.prose ul:not(.check-list):not(.tags) li {
  position: relative;
  padding-left: 20px;
}

.prose ul:not(.check-list):not(.tags) li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}

.prose strong {
  color: var(--ink);
}

.is-dark .prose strong {
  color: var(--on-dark);
}

.prose .lead {
  color: var(--ink);
}

.is-dark .prose .lead {
  color: var(--on-dark);
}

/* Liste cochée */
.check-list {
  display: grid;
  gap: 14px;
}

.check-list li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 14px;
  align-items: start;
}

.check-list svg {
  width: 30px;
  height: 30px;
  padding: 6px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
}

.check-list span {
  padding-top: 3px;
}

.is-dark .check-list svg {
  background: rgba(79, 141, 255, 0.16);
  color: var(--blue-bright);
}

/* Étiquettes (technologies) */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.tags li {
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-strong);
  font-size: 0.82rem;
  font-weight: 600;
}

.is-dark .tags li {
  background: rgba(79, 141, 255, 0.14);
  color: #d4e0ff;
}

/* ---------- Cartes ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.card-grid.is-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  padding: 26px 26px 28px;
  border-radius: var(--radius);
  background: var(--light);
}

.is-tinted .card {
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.card h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.card p {
  font-size: 0.95rem;
  line-height: 1.65;
}

.card p + p {
  margin-top: 10px;
}

.card .card-example {
  color: var(--ink);
  font-size: 0.88rem;
}

.is-dark .card {
  background: linear-gradient(180deg, rgba(36, 60, 120, 0.42) 0%, rgba(16, 30, 66, 0.55) 100%);
  box-shadow: inset 0 0 0 1px rgba(170, 196, 255, 0.1);
}

/* Grilles de services de 2 ou 3 cartes */
.service-grid.is-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.service-grid.is-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Cartes de maillage vers les réalisations */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px 26px 28px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.project-card:hover {
  transform: translateY(-3px);
}

.project-card:focus-within {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.project-card-cat {
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.project-card-name {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.project-card-name a {
  color: inherit;
  text-decoration: none;
}

.project-card-name a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.project-card-name a:focus-visible {
  outline: none;
}

.project-card p:not(.project-card-cat) {
  font-size: 0.95rem;
  line-height: 1.6;
}

.project-card-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
  color: var(--link);
  font-size: 0.88rem;
  font-weight: 700;
}

.project-card-more svg {
  width: 16px;
  height: 16px;
}

.is-light .project-card {
  background: var(--light);
  box-shadow: none;
}

.is-dark .project-card {
  background: linear-gradient(180deg, rgba(36, 60, 120, 0.42) 0%, rgba(16, 30, 66, 0.55) 100%);
  box-shadow: inset 0 0 0 1px rgba(170, 196, 255, 0.1);
}

.is-dark .project-card-cat {
  color: var(--blue-bright);
}

.is-dark .project-card-more {
  color: var(--link-on-dark);
}

/* ---------- Questions fréquentes ---------- */

.faq {
  display: grid;
  max-width: 860px;
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary h3 {
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}

.faq-item summary::after {
  content: "";
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--blue-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%232f6bff' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / 16px no-repeat;
  transition: transform 0.25s var(--ease);
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-width: 70ch;
  padding: 0 0 24px;
}

/* ---------- Liens et actions ---------- */

.section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: clamp(32px, 4vw, 48px);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--link);
  font-weight: 700;
  text-decoration: none;
}

.text-link svg {
  width: 17px;
  height: 17px;
  transition: transform 0.25s var(--ease);
}

.text-link:hover {
  color: var(--link-hover);
}

.text-link:hover svg {
  transform: translateX(3px);
}

.is-dark .text-link {
  color: var(--link-on-dark);
}

.is-dark .text-link:hover {
  color: var(--link-on-dark-hover);
}

.page-hero .btn-link svg {
  width: 18px;
  height: 18px;
}

/* Bandeau CTA de fin de page (section .contact sans formulaire) */
.cta-band .cta-final {
  padding-bottom: 0;
  border-bottom: 0;
}

/* Page contact : la section sombre démarre sous l'en-tête fixe */
.contact.is-page {
  padding-top: calc(var(--header-h) + clamp(36px, 6vw, 72px));
}

.contact.is-page .cta-title {
  font-size: clamp(2.3rem, 4vw, 3.3rem);
}

.contact .approach-note.is-dark-note {
  margin-top: 0;
  color: var(--on-dark);
}

/* ---------- Pages légales ---------- */

.legal .prose {
  max-width: 76ch;
}

.legal .prose h2 {
  margin-top: 44px;
}

.legal dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 24px;
  margin: 0;
}

.legal dt {
  color: var(--ink);
  font-weight: 700;
}

.legal dd {
  margin: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 1120px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-grid.is-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .page-hero .hero-inner,
  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-visual {
    justify-self: center;
  }

  .page-visual.is-art {
    max-width: 360px;
  }
}

@media (max-width: 700px) {
  .card-grid,
  .card-grid.is-2,
  .service-grid.is-2,
  .service-grid.is-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-visual .fg-art,
  .page-visual .brand-art {
    height: 260px;
  }

  /* Illustration décorative des services : masquée sur mobile pour laisser le contenu remonter */
  .page-visual.is-art {
    display: none;
  }

  .legal dl {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .legal dd + dt {
    margin-top: 12px;
  }
}
