/* ---------------------------------------------------------------
   apps.gregory-mostacci.fr
   Tout ce qui est "réglable" est dans :root ci-dessous.
   --------------------------------------------------------------- */

:root {
  /* Couleurs — aligne-les sur ton portfolio si besoin */
  --bg:            #fbfbfa;
  --surface:       #ffffff;
  --text:          #1a1a18;
  --text-muted:    #6b6b66;
  --border:        #e6e5e0;
  --border-strong: #d3d2cb;
  --accent:        #2f5d50;

  /* Typo */
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
          Inter, Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Rythme */
  --radius: 14px;
  --radius-logo: 16px;
  --maxw: 940px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:            #131313;
    --surface:       #1b1b1a;
    --text:          #f0efec;
    --text-muted:    #9b9a94;
    --border:        #2b2b29;
    --border-strong: #3d3d3a;
    --accent:        #7fc0ac;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0 24px 64px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 24px;
  top: 12px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  z-index: 10;
}

/* ---------------- Header ---------------- */

.site-header {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 88px 0 56px;
  text-align: center;
}

.site-title {
  margin: 0;
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.025em;
}

.site-tagline {
  margin: 14px auto 0;
  max-width: 46ch;
  color: var(--text-muted);
  font-size: 1.0625rem;
}

/* ---------------- Grille ---------------- */

main {
  max-width: var(--maxw);
  margin: 0 auto;
}

.grid {
  display: grid;
  /* Cartes de largeur constante, centrées : rend aussi bien avec 1 app qu'avec 9 */
  grid-template-columns: repeat(auto-fit, minmax(270px, 300px));
  justify-content: center;
  gap: 20px;
}

.state {
  grid-column: 1 / -1;
  margin: 0;
  padding: 40px 0;
  color: var(--text-muted);
  text-align: center;
}

/* ---------------- Carte app ---------------- */

.card {
  position: relative;           /* ancre le lien « étiré » */
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(0, 0, 0, .07);
}

/* Lien principal : le texte est dans le titre, mais la zone cliquable
   couvre toute la carte. Le lien « Confidentialité » repasse au-dessus. */
.card-link {
  text-decoration: none;
  color: inherit;
}

.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}

.card:focus-within {
  border-color: var(--border-strong);
}

.card-link:focus-visible::after {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.card-logo {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-logo);
  object-fit: cover;
  background: var(--bg);
  border: 1px solid var(--border);
  flex: none;
}

.card-name {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card-desc {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: .9375rem;
  line-height: 1.55;
}

.card-body { flex: 1 1 auto; }

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--accent);
}

/* App pas encore publiée : libellé neutre, non cliquable */
.card-cta--soon {
  color: var(--text-muted);
  font-weight: 400;
}

/* Au-dessus de la zone cliquable de la carte */
.card-privacy {
  position: relative;
  z-index: 1;
  font-size: .8125rem;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}

.card-privacy:hover,
.card-privacy:focus-visible {
  color: var(--text);
  border-bottom-color: var(--border-strong);
}

.card-cta svg {
  width: 15px;
  height: 15px;
  transition: transform .18s ease;
}

.card:hover .card-cta svg { transform: translateX(3px); }

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card-tags li {
  font-size: .75rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 9px;
}

/* ---------------- Pages document (confidentialité, suppression) ---------------- */

.doc {
  max-width: 720px;
  margin: 0 auto;
}

.doc-header {
  padding: 72px 0 8px;
}

.doc-back {
  display: inline-block;
  margin-bottom: 28px;
  font-size: .875rem;
  color: var(--text-muted);
  text-decoration: none;
}

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

.doc h1 {
  margin: 0;
  font-size: clamp(1.6rem, 4.5vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.doc-meta {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: .875rem;
}

.doc h2 {
  margin: 48px 0 12px;
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.doc h3 {
  margin: 28px 0 8px;
  font-size: 1rem;
  font-weight: 600;
}

.doc p, .doc li { font-size: .9688rem; }

.doc ul, .doc ol { padding-left: 1.25rem; }

.doc li { margin-bottom: 6px; }

.doc a { color: var(--accent); }

.doc-lead {
  margin-top: 24px;
  font-size: 1.0625rem;
  color: var(--text-muted);
}

.doc-callout {
  margin: 24px 0;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
}

.doc-callout p { margin: 0 0 8px; }
.doc-callout p:last-child { margin-bottom: 0; }

.table-wrap {
  overflow-x: auto;
  margin: 16px 0 8px;
  -webkit-overflow-scrolling: touch;
}

.doc table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: .9063rem;
}

.doc th, .doc td {
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.doc th {
  font-weight: 600;
  font-size: .8125rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  border-bottom-color: var(--border-strong);
  white-space: nowrap;
}

.doc tbody tr:last-child td { border-bottom: none; }

.pill {
  display: inline-block;
  font-size: .75rem;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  white-space: nowrap;
}

.doc-contact {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.doc-contact li { margin-bottom: 4px; }

@media (max-width: 600px) {
  .doc-header { padding: 40px 0 4px; }
  .doc h2 { margin-top: 36px; }
}

/* ---------------- Footer ---------------- */

.site-footer {
  max-width: var(--maxw);
  margin: 72px auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: .875rem;
}

.site-footer p { margin: 0 0 6px; }

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 1px;
}

.site-footer a:hover { color: var(--text); }

.motto {
  font-style: italic;
  opacity: .75;
}

@media (max-width: 600px) {
  .site-header { padding: 56px 0 36px; }
  body { padding: 0 18px 48px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
