/* ── Accueil martincloud — style épuré (inspiration Apple : clarté, système, espace) ── */

:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --separator: rgba(60, 60, 67, 0.12);
  --hairline: rgba(0, 0, 0, 0.06);

  --accent: #0071e3;
  --accent-hover: #0077ed;

  --cloud-blue: #0a84ff;
  --jelly: #b8952e;
  --khopi: #5e4d8a;

  --link-contact: #0066cc;
  --link-contact-hover: #004499;

  --radius-card: 22px;
  --radius-pill: 980px;
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.04);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Segoe UI", system-ui, sans-serif;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.022em;
}

/* HEADER */
header {
  padding: 48px 24px 8px;
}

.logo {
  height: 52px;
  display: block;
  margin: 0 auto;
  opacity: 1;
  transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.logo:hover {
  opacity: 0.85;
  transform: scale(1.02);
}

/* TITRES & PARAGRAPHES */
h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 28px 24px 12px;
  max-width: 34rem;
  color: var(--text);
}

p {
  color: var(--text-secondary);
  max-width: 26rem;
  margin: 0 auto 28px;
  padding: 0 24px;
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 400;
}

h2#contact {
  margin-top: 56px;
  margin-bottom: 8px;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* LIENS */
a {
  text-decoration: none;
  color: inherit;
}

a[href="#contact"] {
  color: var(--link-contact);
  font-weight: 500;
  transition: color 0.2s ease;
}

a[href="#contact"]:hover {
  color: var(--link-contact-hover);
}

a[href="#contact"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* CARTES SERVICES */
.service-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 32px 28px;
  width: min(420px, calc(100% - 48px));
  margin: 0 auto;
  box-shadow: var(--shadow-card);
  text-align: center;
  transition: box-shadow 0.35s cubic-bezier(0.25, 0.1, 0.25, 1),
    transform 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.service-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
}

.service-card h2 {
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: -0.01em;
  line-height: 1.45;
  color: var(--text-secondary);
  margin-bottom: 20px;
  word-break: normal;
}

.service-card > a {
  display: flex;
  justify-content: center;
}

.separation {
  height: 12px;
}

/* BOUTONS PRINCIPAUX (services) */
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

button:active {
  transform: scale(0.98);
}

button:focus-visible {
  outline: 2px solid rgba(0, 113, 227, 0.45);
  outline-offset: 3px;
}

.service-card.nextcloud button {
  background: var(--cloud-blue);
}

.service-card.nextcloud button:hover {
  background: #409cff;
}

.service-card.jellyfin button {
  background: var(--jelly);
}

.service-card.jellyfin button:hover {
  background: #c9a43a;
}

.service-card.khopi button {
  background: var(--khopi);
}

.service-card.khopi button:hover {
  background: #6f5d9e;
}

/* BOUTON CONTACT (secondaire, type Apple) */
body > button {
  margin-top: 8px;
  margin-bottom: 64px;
  min-height: 48px;
  padding: 0 28px;
  background: var(--surface);
  color: var(--accent);
  border: 1px solid var(--separator);
  box-shadow: none;
  font-weight: 500;
}

body > button:hover {
  background: #fafafa;
  border-color: rgba(60, 60, 67, 0.18);
  color: var(--accent-hover);
  transform: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

body > button:active {
  transform: scale(0.99);
}

/* MODAL */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.modal-content {
  position: relative;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 36px 32px 32px;
  border-radius: 20px;
  width: min(340px, 100%);
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12), 0 0 1px rgba(0, 0, 0, 0.08);
}

.modal-content h2 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.modal-content p {
  margin-bottom: 16px;
  font-size: 0.9375rem;
}

.modal-content a {
  display: block;
  margin-top: 8px;
}

.modal-content button {
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
  background: var(--accent);
}

.modal-content button:hover {
  background: var(--accent-hover);
}

.close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 28px;
  height: 28px;
  line-height: 28px;
  font-size: 1.35rem;
  font-weight: 300;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.15s ease, color 0.15s ease;
}

.close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
}

/* FOOTER */
.footer {
  padding: 32px 24px 48px;
  max-width: 36rem;
  margin-top: auto;
}

.footer p {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.footer p:last-child {
  margin-bottom: 0;
}

.footer a {
  display: inline-block;
  margin: 4px 2px 0;
  padding: 6px 12px;
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.04);
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.footer a:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.06);
  border-color: var(--hairline);
  transform: none;
}

.footer a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .service-card,
  .logo,
  button,
  .footer a {
    transition: none !important;
  }

  .service-card:hover {
    transform: none;
  }

  button:hover,
  button:active {
    transform: none;
  }
}
