/* =============================================================================
   Odichou — Style global
   Ton flash : jaune-orangé + vert. Écriture moderne et funky.
   ========================================================================== */

:root {
  --primary:    #FFB300;
  --primary-2:  #FF7A00;
  --secondary:  #1FBF7C;
  --secondary-2:#128B57;
  --cream:      #FFF8E7;
  --cream-2:    #FFF1CF;
  --ink:        #1A1A1A;
  --ink-soft:   #4A4A4A;
  --soft:       #F2EAD3;
  --bad:        #E6463A;
  --warn:       #FF9F1C;
  --good:       #1FBF7C;
  --shadow-sm:  0 2px 6px rgba(0,0,0,.05);
  --shadow:     0 4px 20px rgba(0,0,0,.06);
  --shadow-lg:  0 14px 40px rgba(0,0,0,.10);
  --radius:     16px;
  --radius-pill: 999px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Quicksand', system-ui, -apple-system, sans-serif;
  font-size: clamp(1rem, 1vw + .85rem, 1.125rem);
  line-height: 1.55;
  color: var(--ink);
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: 'Fredoka', system-ui, sans-serif;
  font-weight: 700;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.75rem, 4vw + .25rem, 3rem); }
h2 { font-size: clamp(1.25rem, 2vw + .5rem, 1.75rem); }
h3 { font-size: 1.125rem; }

p { margin: 0 0 1em; }

a {
  color: var(--secondary-2);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover { color: var(--primary-2); }

.accent {
  background: linear-gradient(180deg, transparent 60%, var(--primary) 60%);
  padding: 0 .15em;
}

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

/* =========== Topbar / footer ============================================== */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.topbar__brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--ink);
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
}

.topbar__logo {
  width: 2.25rem; height: 2.25rem;
  object-fit: contain;
}

.footer {
  padding: 2rem 1.5rem 3rem;
  max-width: 1100px;
  margin: 4rem auto 0;
  text-align: center;
  color: var(--ink-soft);
  font-size: .9rem;
}

.footer__links a { margin: 0 .25rem; }

/* =========== Hero (page d'accueil) ======================================= */

.hero {
  max-width: 720px;
  margin: 2rem auto 0;
  padding: 1rem 1.5rem;
  text-align: center;
}

.hero__title { margin-top: 1.5rem; }
.hero__lead { font-size: 1.1rem; color: var(--ink-soft); }

.features {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  padding: 0;
  margin: 2.5rem 0;
}
.features li {
  background: white;
  border-radius: var(--radius-pill);
  padding: .5rem 1rem;
  box-shadow: var(--shadow-sm);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.features__icon { font-size: 1.1rem; }

/* =========== Odichou ===================================================== */

.odichou {
  display: grid;
  place-items: center;
  margin: 1.5rem auto;
}

.odichou__placeholder {
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--primary) 0%, var(--primary-2) 100%);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-lg);
  color: var(--ink);
  position: relative;
  animation: bob 4s ease-in-out infinite;
}
.odichou__emoji {
  font-size: 5rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.15));
}
.odichou__name {
  position: absolute;
  bottom: -.5rem;
  right: -.5rem;
  background: var(--secondary);
  color: white;
  padding: .25rem .75rem;
  border-radius: var(--radius-pill);
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: .85rem;
  box-shadow: var(--shadow);
  transform: rotate(-6deg);
}

.odichou--sad .odichou__placeholder      { background: radial-gradient(circle at 30% 30%, #c8d6e5, #8395a7); }
.odichou--bored .odichou__placeholder    { background: radial-gradient(circle at 30% 30%, #ffeaa7, #d4a017); }
.odichou--confused .odichou__placeholder { background: radial-gradient(circle at 30% 30%, #ff9ff3, #c44569); }
.odichou--blase .odichou__placeholder    { background: radial-gradient(circle at 30% 30%, #b2bec3, #636e72); }

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

/* =========== Forms / boutons ============================================= */

.form-card {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  background: white;
  padding: 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 1.5rem auto;
  max-width: 540px;
}

.form-card input[type="url"],
.form-card input[type="email"],
.form-card input[type="text"] {
  flex: 1 1 240px;
  border: 2px solid var(--soft);
  border-radius: var(--radius-pill);
  padding: .75rem 1.25rem;
  font: inherit;
  background: var(--cream);
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-card input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(255, 179, 0, .25);
}

.btn {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-pill);
  padding: .75rem 1.5rem;
  cursor: pointer;
  font-size: 1rem;
  transition: transform .1s ease, box-shadow .15s ease, background .15s ease;
  box-shadow: var(--shadow-sm);
}
.btn--primary {
  background: var(--primary);
  color: var(--ink);
}
.btn--primary:hover {
  background: var(--primary-2);
  color: white;
  transform: translateY(-1px);
}
.btn--primary:active { transform: translateY(0); }

.checkbox {
  flex: 1 1 100%;
  display: inline-flex;
  align-items: flex-start;
  gap: .5rem;
  font-size: .9rem;
  color: var(--ink-soft);
  margin-top: .25rem;
}
.checkbox input { margin-top: .25rem; }

.form-card__error {
  flex: 1 1 100%;
  color: var(--bad);
  font-size: .9rem;
  margin: 0;
}

/* =========== Audit en cours ============================================== */

.audit-running {
  max-width: 640px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  text-align: center;
}

.audit-running__title { margin-top: 1.5rem; }
.audit-running__step {
  font-size: 1.15rem;
  color: var(--secondary-2);
  font-weight: 600;
  min-height: 1.5em;
}

.progress {
  background: var(--soft);
  border-radius: var(--radius-pill);
  height: 1.25rem;
  overflow: hidden;
  margin: 1rem auto;
  max-width: 480px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.08);
}
.progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: var(--radius-pill);
  transition: width .4s ease;
}
.progress__pct {
  font-weight: 600;
  font-size: .95rem;
  color: var(--ink-soft);
}

.audit-running__hint { color: var(--ink-soft); font-style: italic; }
.audit-running__error {
  background: #fff;
  color: var(--bad);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

/* =========== Rapport ===================================================== */

.report {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.report__header {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 2rem;
}
@media (max-width: 700px) {
  .report__header { grid-template-columns: 1fr; text-align: center; }
}

.report__title { margin: 0 0 .25em; }
.report__subtitle { color: var(--ink-soft); }
.report__expires { font-size: .85rem; color: var(--ink-soft); }

.report__teaser {
  background: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}
.report__teaser-lead { font-size: 1.1rem; }

.teaser-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.teaser-list__item {
  background: var(--cream);
  padding: .75rem 1rem;
  border-left: 4px solid var(--warn);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
}
.teaser-list__item--sad      { border-left-color: var(--bad); }
.teaser-list__item--confused { border-left-color: var(--bad); }
.teaser-list__item--bored    { border-left-color: var(--warn); }
.teaser-list__item--blase    { border-left-color: var(--ink-soft); }
.teaser-list__item--happy    { border-left-color: var(--good); }
.teaser-list__title { font-weight: 600; }
.teaser-list__hint { font-size: .85rem; color: var(--ink-soft); }
.teaser-list__more { font-style: italic; color: var(--ink-soft); padding: .5rem 1rem; }

.unlock-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-lg);
  border: 2px dashed var(--primary);
  position: relative;
}
.unlock-card__title {
  background: linear-gradient(180deg, transparent 65%, var(--primary) 65%);
  display: inline;
  padding: 0 .15em;
}
.unlock-card__lead { color: var(--ink-soft); margin: 1rem 0; }

.form-card--inline { box-shadow: none; padding: 0; margin: 0; }

/* Cartes du rapport complet */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.card {
  background: white;
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--secondary);
}
.card__title { font-size: 1.1rem; }
.card__list { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; font-size: .95rem; }
.card__note  { margin-top: .85rem; padding: .65rem .85rem; background: var(--soft); border-left: 3px solid var(--primary); border-radius: var(--radius-md, .5rem); font-size: .82rem; color: var(--ink-soft); line-height: 1.45; }
.card__note code { background: rgba(0,0,0,.05); padding: 0 .25rem; border-radius: 3px; font-size: .9em; }
.card__list code { background: var(--cream-2); padding: 0 .25em; border-radius: 4px; word-break: break-all; }

.scores { display: flex; gap: 1rem; }
.score {
  flex: 1;
  text-align: center;
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--cream-2);
}
.score__label { display: block; font-size: .8rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; }
.score__value { font-family: 'Fredoka', sans-serif; font-size: 2rem; font-weight: 700; }
.score--good { background: rgba(31, 191, 124, .15); }
.score--good .score__value { color: var(--good); }
.score--warn { background: rgba(255, 159, 28, .15); }
.score--warn .score__value { color: var(--warn); }
.score--bad  { background: rgba(230, 70, 58, .15); }
.score--bad  .score__value { color: var(--bad); }

/* Findings list */

.findings {
  background: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.findings__list { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.finding {
  background: var(--cream);
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid var(--warn);
}
.finding--sad      { border-left-color: var(--bad); }
.finding--confused { border-left-color: #c44569; }
.finding--bored    { border-left-color: var(--warn); }
.finding--blase    { border-left-color: var(--ink-soft); }
.finding__title { font-size: 1rem; margin: 0 0 .35em; }
.finding__details { margin: 0; color: var(--ink-soft); }

/* =========== Pages texte (legal/cgu) ===================================== */

.container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}
.container--text h2 { margin-top: 2rem; }

/* =========== Admin (rappel : peu d'éléments à styler) ==================== */

.admin-shell { max-width: 1100px; margin: 1rem auto; padding: 0 1.5rem; }
.admin-shell h1 { margin-top: 1rem; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .75rem; margin: 1rem 0; }
.kpi { background: white; border-radius: 12px; padding: .75rem 1rem; box-shadow: var(--shadow-sm); }
.kpi__label { font-size: .8rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; }
.kpi__value { font-family: 'Fredoka', sans-serif; font-size: 1.5rem; font-weight: 600; }

.admin-table { width: 100%; border-collapse: collapse; background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.admin-table th, .admin-table td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--soft); font-size: .9rem; }
.admin-table th { background: var(--cream-2); font-weight: 600; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table .muted { color: var(--ink-soft); }
.admin-table a { color: var(--secondary-2); }

.badge {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: var(--radius-pill);
  font-size: .75rem;
  font-weight: 600;
  background: var(--soft);
  color: var(--ink-soft);
}
.badge--completed { background: rgba(31, 191, 124, .2); color: var(--secondary-2); }
.badge--running   { background: rgba(255, 179, 0, .25);  color: var(--primary-2); }
.badge--failed    { background: rgba(230, 70, 58, .2);   color: var(--bad); }
.badge--pending   { background: var(--soft); }

.pagination { display: flex; gap: .5rem; justify-content: center; margin: 1rem 0; }
.pagination a, .pagination span { padding: .35rem .75rem; border-radius: 8px; background: white; box-shadow: var(--shadow-sm); text-decoration: none; }
.pagination .current { background: var(--primary); color: var(--ink); }

.login-card {
  max-width: 360px; margin: 4rem auto; background: white; padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.login-card h1 { margin-top: 0; }
.login-card label { display: block; margin: .75rem 0 .25rem; font-weight: 600; }
.login-card input { width: 100%; padding: .65rem 1rem; border: 2px solid var(--soft); border-radius: 8px; font: inherit; }
.login-card .btn { width: 100%; margin-top: 1.25rem; }
.login-error { color: var(--bad); margin: 1rem 0 0; }
