/* =========================================================================
   MayIA — design solaire de Mayotte (orange / or / ylang), clair et chaleureux.
   Tout le style est ici : la CSP interdit le CSS inline.
   ========================================================================= */

:root {
  --sun: #f97316;
  --sun-deep: #ea580c;
  --gold: #fbbf24;
  --amber: #f59e0b;
  --grad: linear-gradient(120deg, #f97316 0%, #fb923c 45%, #fbbf24 100%);
  --grad-soft: linear-gradient(120deg, #fff0dd, #fff7e8);

  --cream: #fff9f1;
  --cream-2: #fff3e3;
  --surface: #ffffff;
  --ink: #2a1a0c;
  --ink-2: #6b5641;
  --ink-3: #a08a6f;
  --line: #f1e3cf;

  --shadow-sm: 0 1px 2px rgba(120, 60, 10, 0.06), 0 2px 8px rgba(120, 60, 10, 0.05);
  --shadow-md: 0 6px 24px rgba(200, 90, 20, 0.1), 0 2px 6px rgba(120, 60, 10, 0.06);
  --shadow-lg: 0 18px 50px rgba(200, 90, 20, 0.16), 0 4px 14px rgba(120, 60, 10, 0.08);
  --ring: 0 0 0 4px rgba(249, 115, 22, 0.18);

  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 30px;
  --maxw: 1080px;
  --readw: 720px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Décor : halo solaire fixe en fond */
.glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 45% at 80% -5%, rgba(251, 191, 36, 0.28), transparent 60%),
    radial-gradient(55% 45% at 10% 0%, rgba(249, 115, 22, 0.22), transparent 55%),
    radial-gradient(70% 60% at 50% 110%, rgba(251, 146, 60, 0.12), transparent 60%);
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

a {
  color: var(--sun-deep);
  text-decoration: none;
}

strong {
  font-weight: 700;
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--sun-deep);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Logo soleil ---------- */
.sun-core {
  fill: var(--sun);
}
.sun-rays line {
  stroke: var(--gold);
  stroke-width: 8;
  stroke-linecap: round;
}

/* ---------- En-tête ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(255, 249, 241, 0.8);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid rgba(241, 227, 207, 0.7);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.brand-mark {
  display: inline-flex;
}
.brand-name {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.brand-ia {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.site-nav a {
  color: var(--ink-2);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: 10px;
  white-space: nowrap;
}
.site-nav a:hover {
  color: var(--ink);
  background: var(--cream-2);
}
.nav-cta {
  color: #fff !important;
  background: var(--grad);
  box-shadow: var(--shadow-sm);
}
.nav-cta:hover {
  filter: brightness(1.03);
}

/* ---------- Hero + interface ---------- */
.hero {
  max-width: var(--readw);
  margin: 0 auto;
  padding: clamp(28px, 7vw, 68px) clamp(16px, 5vw, 24px) 24px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  padding: 7px 15px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--sun-deep);
}

.hero-title {
  font-size: clamp(2.15rem, 7vw, 3.6rem);
  font-weight: 850;
}

.hero-lead {
  max-width: 640px;
  margin: 18px auto 0;
  color: var(--ink-2);
  font-size: clamp(1.02rem, 2.6vw, 1.18rem);
}

.trust-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin: 22px 0 0;
  padding: 0;
  color: var(--ink-2);
  font-size: 0.92rem;
  font-weight: 600;
}

/* Carte de saisie (centre névralgique, façon ChatGPT/Claude) */
.ask-card {
  margin: 30px auto 0;
  max-width: 660px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 14px 14px 12px;
  transition: box-shadow 0.2s, border-color 0.2s;
  text-align: left;
}
.ask-card:focus-within {
  border-color: rgba(249, 115, 22, 0.5);
  box-shadow: var(--shadow-lg), var(--ring);
}

textarea {
  width: 100%;
  border: none;
  resize: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  line-height: 1.55;
  padding: 10px 8px 4px;
  max-height: 220px;
}
textarea::placeholder {
  color: #b79f84;
}
textarea:focus {
  outline: none;
}

.ask-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 4px 2px;
}
.charcount {
  color: #b8a48d;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  background: var(--grad);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 11px 20px;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.28);
  transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.2s;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(234, 88, 12, 0.34);
  filter: brightness(1.03);
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn-arrow {
  transition: transform 0.15s ease;
}
.btn-primary:hover .btn-arrow {
  transform: translateX(2px);
}
.btn-lg {
  font-size: 1.05rem;
  padding: 15px 28px;
  border-radius: 16px;
}

/* Suggestions */
.suggestions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin: 16px auto 0;
  max-width: 660px;
}
.chip {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s, border-color 0.2s, color 0.2s, background 0.2s;
}
.chip:hover {
  transform: translateY(-1px);
  color: var(--sun-deep);
  border-color: rgba(249, 115, 22, 0.4);
  background: #fff7ec;
}

/* ---------- Résultat ---------- */
.result {
  max-width: 660px;
  margin: 26px auto 0;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 20px 20px 22px;
  animation: rise 0.35s ease;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.answer-head {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 12px;
}
.answer-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--grad-soft);
  border: 1px solid var(--line);
  flex: none;
}
.answer-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.answer-name {
  font-weight: 800;
}
.status {
  color: var(--ink-2);
  font-size: 0.9rem;
  min-height: 1.1em;
}
.status.refused {
  color: var(--sun-deep);
}

.answer {
  white-space: pre-wrap;
  color: var(--ink);
  font-size: 1.02rem;
}
.answer:empty {
  display: none;
}

.sources {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.sources-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  margin: 0 0 10px;
}
.sources-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.sources-list li {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--cream);
}
.sources-list a {
  font-weight: 700;
  word-break: break-word;
}
.sources-list .date {
  color: var(--ink-2);
  font-size: 0.8rem;
  margin-top: 2px;
}

/* Points de chargement */
.dots::after {
  content: "";
  animation: dots 1.3s steps(4, end) infinite;
}
@keyframes dots {
  0% { content: ""; }
  25% { content: "·"; }
  50% { content: "··"; }
  75% { content: "···"; }
}

/* ---------- Sections ---------- */
.section-title {
  font-size: clamp(1.6rem, 4.5vw, 2.35rem);
  font-weight: 850;
  text-align: center;
}
.section-lead {
  max-width: 620px;
  margin: 14px auto 0;
  text-align: center;
  color: var(--ink-2);
  font-size: 1.05rem;
}

.about {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(48px, 9vw, 90px) clamp(16px, 5vw, 24px) 30px;
}
.feature-grid {
  margin-top: 34px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.2s;
}
.feature:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.feature-icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border-radius: 13px;
  background: var(--grad-soft);
  border: 1px solid var(--line);
  margin-bottom: 12px;
}
.feature h3 {
  font-size: 1.12rem;
  margin-bottom: 6px;
}
.feature p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.97rem;
}

/* ---------- Collaboration ---------- */
.collab {
  position: relative;
  margin: 20px clamp(12px, 4vw, 32px) 0;
  border-radius: clamp(24px, 5vw, 40px);
  background:
    radial-gradient(80% 120% at 50% 0%, rgba(255, 255, 255, 0.5), transparent 60%),
    linear-gradient(160deg, #fff4e2 0%, #ffe9cf 55%, #ffe0b8 100%);
  border: 1px solid #ffd9a8;
  overflow: hidden;
}
.collab-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(44px, 8vw, 80px) clamp(20px, 5vw, 40px);
  text-align: center;
}
.eyebrow-light {
  background: rgba(255, 255, 255, 0.75);
}
.collab-grid {
  margin-top: 38px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  text-align: left;
}
.collab-card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #ffe0bb;
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.2s;
}
.collab-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.collab-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  border-radius: 15px;
  background: var(--grad);
  margin-bottom: 14px;
  box-shadow: 0 6px 16px rgba(234, 88, 12, 0.25);
}
.collab-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}
.collab-card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.98rem;
}
.collab-cta {
  margin-top: 38px;
}
.collab-note {
  margin: 14px 0 0;
  color: var(--ink-2);
  font-size: 0.92rem;
}

/* ---------- Pied de page ---------- */
.site-footer {
  margin-top: clamp(40px, 8vw, 80px);
  border-top: 1px solid var(--line);
  background: rgba(255, 243, 227, 0.6);
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px clamp(16px, 5vw, 24px);
  display: grid;
  gap: 18px;
}
.footer-tagline {
  color: var(--ink-2);
  margin: 6px 0 0;
  font-size: 0.95rem;
}
.footer-info .privacy,
.footer-info .disclaimer {
  color: var(--ink-2);
  font-size: 0.85rem;
  margin: 0 0 8px;
}
.footer-info .privacy a {
  font-weight: 700;
}

/* ---------- Responsive ---------- */
@media (min-width: 720px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .collab-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer-inner {
    grid-template-columns: 1fr 1.4fr;
    align-items: start;
  }
}

@media (max-width: 480px) {
  .site-nav a:not(.nav-cta) {
    display: none;
  }
  .btn-label {
    display: inline;
  }
}

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