/* GraphPhon — vitrine statique www.graphphon.com (Infomaniak) */
@import url("https://fonts.googleapis.com/css2?family=Gentium+Plus:ital@0;1&family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #f0f4f9;
  --bg-mesh: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 64, 128, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(0, 89, 168, 0.08), transparent);
  --hero: linear-gradient(135deg, #001a33 0%, #002952 28%, #004080 62%, #0066b3 100%);
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #004080;
  --accent-hover: #002952;
  --accent-soft: #e8f2fc;
  --border: #e2e8f0;
  --ok: #0d6b4f;
  --danger: #b42318;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow: 0 12px 40px rgba(0, 32, 64, 0.1);
  --shadow-lg: 0 24px 56px rgba(0, 32, 64, 0.14);
  --radius: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --nav-h: 4.25rem;
  --content-w: 1040px;
  --font: "Inter", system-ui, sans-serif;
  --font-phon: "Gentium Plus", Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image: var(--bg-mesh);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-hover);
}

/* --- En-tête --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: linear-gradient(120deg, #001a33 0%, #002952 40%, #004080 100%);
  box-shadow: 0 4px 24px rgba(0, 20, 40, 0.25);
}

.header-inner {
  max-width: var(--content-w);
  margin: 0 auto;
  min-height: var(--nav-h);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #fff;
  flex-shrink: 0;
}

.brand:hover {
  color: #fff;
}

.brand-mark {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.06em;
}

.brand-tag {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

.nav-toggle {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: #fff;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
}

.site-nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.site-nav a.is-active {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-weight: 600;
}

.site-nav a.nav-cta {
  margin-left: 0.35rem;
  background: #fff;
  color: var(--accent);
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.site-nav a.nav-cta:hover {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

/* --- Contenu principal --- */
.site-main {
  flex: 1;
  width: 100%;
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  animation: rise 0.45s ease-out;
}

/* Hero accueil */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--hero);
  color: #fff;
  border-radius: var(--radius);
  padding: clamp(2rem, 5vw, 3.25rem) clamp(1.5rem, 4vw, 2.75rem);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 255, 255, 0.14) 0%, transparent 42%),
    radial-gradient(circle at 88% 80%, rgba(255, 255, 255, 0.06) 0%, transparent 35%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -20% -60% -20%;
  height: 70%;
  background: radial-gradient(ellipse, rgba(0, 102, 179, 0.35) 0%, transparent 70%);
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.85rem, 5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 16ch;
}

.hero-lead {
  margin: 0;
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.92);
  max-width: 36rem;
}

.hero-lead strong {
  color: #fff;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* Bandeau titre pages internes */
.page-banner {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.page-banner h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.page-banner .sub {
  margin: 0;
  max-width: 42rem;
}

/* Cartes */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: clamp(1.35rem, 3vw, 2rem);
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.card-elevated {
  box-shadow: var(--shadow);
}

.card h1 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.sub {
  color: var(--muted);
  font-size: 1rem;
  margin: 0 0 1.25rem;
  line-height: 1.65;
}

.sub:last-child {
  margin-bottom: 0;
}

/* Grille fonctionnalités accueil */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.feature-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.95rem;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
}

.feature-card h2 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.feature-card p {
  margin: 0 0 1.15rem;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
  flex: 1;
}

.feature-card .btn {
  align-self: flex-start;
  margin-top: auto;
}

/* Bandeau statut */
.status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: #ecfdf5;
  color: var(--ok);
  border: 1px solid #a7f3d0;
}

.badge-live::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(13, 107, 79, 0.2);
}

.status-bar .small {
  margin: 0;
}

/* Info discrète */
.info-panel {
  background: linear-gradient(135deg, #f8fafc 0%, #eef4fb 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  font-size: 0.925rem;
  color: var(--muted);
  line-height: 1.65;
}

.info-panel strong {
  color: var(--text);
}

/* Formulaires */
label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.45rem;
  font-size: 0.875rem;
  color: var(--text);
}

input[type="text"],
input[type="password"],
input[type="file"] {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  background: #f8fafc;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

input[type="text"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 64, 128, 0.12);
  background: #fff;
}

.search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: stretch;
}

.search-row input {
  flex: 1 1 14rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

button,
.btn {
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 2px 10px rgba(0, 64, 128, 0.22);
}

button:hover,
.btn:hover {
  background: var(--accent-hover);
  color: #fff;
}

button:active,
.btn:active {
  transform: translateY(1px);
}

.btn-secondary,
button.btn-secondary {
  background: #fff;
  color: var(--accent);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover,
button.btn-secondary:hover {
  background: var(--accent-soft);
  color: var(--accent-hover);
  border-color: #c5d9ef;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: none;
  backdrop-filter: blur(4px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.btn-lg {
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

.msg {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.925rem;
}

.msg-error {
  background: #fef2f2;
  color: var(--danger);
  border: 1px solid #fecaca;
}

.msg-ok {
  background: #ecfdf5;
  color: var(--ok);
  border: 1px solid #a7f3d0;
}

.results {
  margin-top: 1.25rem;
}

.result-item {
  padding: 1rem 1.1rem;
  margin-bottom: 0.5rem;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s, background 0.15s;
}

.result-item:hover {
  border-color: #c5d9ef;
  background: var(--accent-soft);
}

.result-item:last-child {
  margin-bottom: 0;
}

.result-item strong {
  font-family: var(--font-phon);
  font-size: 1.15rem;
  color: var(--accent);
  font-weight: 400;
}

.word-pick-btn {
  width: 100%;
  text-align: left;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  font: inherit;
  color: var(--text);
  box-shadow: none;
  transition: border-color 0.15s, background 0.15s;
}

.word-pick-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}

.word-pick-btn.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.small {
  font-size: 0.875rem;
  color: var(--muted);
}

.form-stack label + input {
  margin-bottom: 1rem;
}

.form-stack label:not(:first-child) {
  margin-top: 0.25rem;
}

/* Graphèmes Tem dans les champs de recherche */
.phon {
  font-family: var(--font-phon);
}

/* --- Pied de page --- */
.site-footer {
  margin-top: auto;
  background: linear-gradient(165deg, #001a33 0%, #002952 45%, #003366 100%);
  color: rgba(255, 255, 255, 0.78);
  padding: 2.75rem 1.5rem 1.5rem;
}

.footer-inner {
  max-width: var(--content-w);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem 1.5rem;
  margin-bottom: 2rem;
  text-align: left;
}

.footer-title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

.footer-text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.72);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.45rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-bottom {
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: #fff;
  text-decoration: underline;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .header-inner {
    flex-wrap: wrap;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem 1rem;
    background: rgba(0, 26, 51, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
  }

  .site-nav a.nav-cta {
    margin-left: 0;
    text-align: center;
  }

  .site-header {
    position: sticky;
  }

  .header-inner {
    position: relative;
  }

  .search-row {
    flex-direction: column;
  }

  .search-row button {
    width: 100%;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
