/* Composants partagés : boutons, pastilles, encadrés, cadre de marque, cartes d'idées, formulaires. */

/* ------------------------------------------------------------ Boutons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border: 2px solid transparent; border-radius: var(--radius-pill);
  font-size: 1rem; font-weight: 800; line-height: 1.2; text-align: center; text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s var(--ease);
}
.btn .icon { width: 20px; height: 20px; transition: transform 0.2s var(--ease); }
.btn:hover .icon:last-child { transform: translateX(2px); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--mint); color: var(--navy); }
.btn--primary:hover { background: var(--mint-strong); }
.btn--secondary { background: var(--white); color: var(--navy); border-color: var(--navy); }
.btn--secondary:hover { background: var(--navy-soft); }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--navy); }
.btn--compact { min-height: var(--tap); padding: 0 16px; font-size: var(--fs-sm); }
.btn--small { min-height: var(--tap); padding: 0 16px; font-size: var(--fs-sm); }
.btn--small .icon { width: 18px; height: 18px; }
.btn[aria-disabled='true'], .btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn[aria-disabled='true']:hover { background: var(--white); }

/* ------------------------------------------------------------ Pastilles, marqueurs */

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px 4px 8px; border: 1px solid; border-radius: var(--radius-pill);
  font-size: var(--fs-xs); font-weight: 700; line-height: 1.3;
}
.badge .icon { width: 14px; height: 14px; }
.badge--done { background: var(--mint-soft); color: var(--mint-ink); border-color: #bfe9cf; }
.badge--current { background: #e8eefb; color: #1d44a8; border-color: #c9d6f5; }
.badge--todo, .badge--neutral { background: #f1f4f8; color: var(--navy-60); border-color: #d8e0ea; }
.badge--warn { background: var(--caution-bg); color: var(--caution); border-color: var(--caution-line); }
.badge--demo { background: var(--white); color: var(--navy-80); border-color: #9aa8bc; border-style: dashed; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border: 1px solid var(--line); border-radius: var(--radius-pill);
  background: var(--white); color: var(--navy-80);
  font-size: var(--fs-xs); font-weight: 700; line-height: 1.3;
}
.chip .icon { width: 15px; height: 15px; }
.chip--audience { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }

.pending {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border: 1px dashed #d9953a; border-radius: 8px;
  background: var(--caution-bg); color: var(--caution);
  font-size: var(--fs-xs); font-weight: 800; line-height: 1.4;
}
.pending .icon { width: 15px; height: 15px; }
.pending--dark { background: rgb(255 244 224 / 10%); color: #ffd79a; border-color: #b98535; }

.demo-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border: 1px dashed #9aa8bc; border-radius: var(--radius-pill);
  background: #eef2f7; color: var(--navy);
  font-size: var(--fs-xs); font-weight: 800; line-height: 1.3;
}
.demo-tag .icon { width: 15px; height: 15px; }

.callout {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border: 1px solid; border-radius: 14px;
  font-size: var(--fs-sm); line-height: 1.5;
}
.callout > .icon { width: 22px; height: 22px; margin-top: 1px; }
.callout__title { font-weight: 800; }
.callout--demo, .callout--info { background: #f1f5fb; border-color: #cfd9e8; color: var(--navy); }
.callout--caution { background: var(--caution-bg); border-color: var(--caution-line); color: var(--caution-ink); }

.check-list { display: grid; gap: 8px; }
.check-list li { display: flex; align-items: flex-start; gap: 10px; }
.check-list .icon { width: 20px; height: 20px; margin-top: 2px; color: var(--mint-ink); }

.empty-state {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border: 1px dashed var(--line-strong); border-radius: 12px;
  color: var(--mute); font-size: var(--fs-sm);
}

.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-ink);
  font-size: 12px; font-weight: 800;
}
.avatar--lg { width: 44px; height: 44px; border-radius: 14px; background: var(--navy); color: var(--white); font-size: 15px; }

/* ------------------------------------------------------------ Cadre de marque (repris du film) */
/* Une carte blanche posée sur un bloc bleu nuit (bas-gauche) et un bloc menthe (haut-droite). */

.brand-frame { position: relative; isolation: isolate; margin: 12px; }
.brand-frame::before, .brand-frame::after { content: ''; position: absolute; border-radius: 22px; }
.brand-frame::before { inset: -12px -12px 12px 12px; background: var(--mint); z-index: -2; }
.brand-frame::after { inset: 12px 12px -12px -12px; background: var(--navy); z-index: -1; }
.brand-frame__card { position: relative; border-radius: 18px; background: var(--white); box-shadow: var(--shadow); }

/* ------------------------------------------------------------ Filtres */

.filters { display: grid; gap: 16px; padding-bottom: 32px; }
.filters__group { display: grid; gap: 8px; }
.filters__label { font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); }
.filters__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.filters__count { font-size: var(--fs-sm); color: var(--mute); font-weight: 700; }
.filters__empty { display: grid; gap: 8px; justify-items: start; padding: 24px; border: 1px dashed var(--line-strong); border-radius: var(--radius); }

.filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: var(--tap); padding: 0 16px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
  background: var(--white); color: var(--navy);
  font-size: var(--fs-sm); font-weight: 700; cursor: pointer;
}
.filter-chip .icon { display: none; width: 16px; height: 16px; }
.filter-chip:hover { border-color: var(--navy); }
.filter-chip[aria-pressed='true'] { background: var(--navy); border-color: var(--navy); color: var(--white); }
.filter-chip[aria-pressed='true'] .icon { display: block; }

.b-link {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: var(--tap); padding: 0;
  border: 0; background: none; color: var(--accent-ink);
  font-weight: 800; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer;
}
.b-link .icon { width: 18px; height: 18px; }

/* ------------------------------------------------------------ Cartes d'idées */

.idea-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }

.idea-card {
  position: relative;
  display: flex; flex-direction: column; gap: 12px;
  padding: 18px 20px 20px;
  border: 1px solid var(--line); border-radius: 22px;
  background: var(--white); box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.idea-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.idea-card:focus-within { outline: 3px solid var(--navy); outline-offset: 3px; }
.idea-card__app {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 14px; background: var(--accent-soft);
}
.idea-card__app-text { display: grid; min-width: 0; line-height: 1.25; }
.idea-card__app-text strong { font-size: var(--fs-sm); }
.idea-card__app-text span { font-size: 12px; color: var(--navy-60); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idea-card__sector {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink);
}
.idea-card__sector .icon { width: 16px; height: 16px; }
.idea-card__title { font-size: 1.25rem; line-height: 1.2; }
.idea-card__title a { text-decoration: none; }
.idea-card__title a:focus-visible { outline: none; }
.idea-card__title a::after { content: ''; position: absolute; inset: 0; border-radius: 22px; }
.idea-card__tagline { color: var(--navy-80); font-size: var(--fs-sm); }
.idea-card__meta { display: flex; flex-wrap: wrap; gap: 6px; }
.idea-card__more {
  display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 4px;
  color: var(--accent-ink); font-weight: 800; font-size: var(--fs-sm);
}
.idea-card__more .icon { width: 18px; height: 18px; transition: transform 0.2s var(--ease); }
.idea-card:hover .idea-card__more .icon { transform: translateX(3px); }

.app-mark {
  display: inline-grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--accent); color: var(--accent-on);
  font-size: 13px; font-weight: 800; letter-spacing: 0.02em;
}

/* ------------------------------------------------------------ Formulaires */

.field { display: grid; gap: 6px; }
.field label { font-weight: 800; }
.field__required { color: var(--danger); }
.field__optional { font-weight: 600; color: var(--mute); }
.field__hint { font-size: var(--fs-sm); color: var(--mute); }
.field input, .field textarea, .field select {
  width: 100%; min-height: 48px; padding: 12px 14px;
  border: 1.5px solid var(--line-strong); border-radius: 12px;
  background: var(--white); color: var(--navy); font-size: 1rem; line-height: 1.5;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--navy); }
.field input[type='file'] { padding: 10px; background: var(--paper); }
.field [aria-invalid='true'] { border-color: var(--danger); background: var(--danger-bg); }
.field__error { font-size: var(--fs-sm); font-weight: 700; color: var(--danger); }
.field__error::before { content: 'Erreur : '; }

/* Résumé des erreurs d'un formulaire renvoyé par le serveur (reçoit le focus). */
.form-summary { display: grid; gap: 8px; padding: 16px 18px; border: 2px solid var(--danger); border-radius: 16px; background: var(--danger-bg); color: var(--danger); }
.form-summary:focus { outline: 3px solid var(--navy); outline-offset: 3px; }
.form-summary__title { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.form-summary__title .icon { width: 20px; height: 20px; flex: none; }
.form-summary ul { display: grid; gap: 4px; padding-left: 28px; list-style: disc; }
.form-summary a { color: inherit; font-weight: 700; }
.btn--block { width: 100%; }

/* ------------------------------------------------------------ FAQ */

.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 60px; padding: 14px 0;
  font-size: 1.0625rem; font-weight: 800; list-style: none; cursor: pointer;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: '+'; display: grid; place-items: center; flex: none;
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--navy-soft); font-size: 1.25rem; font-weight: 700;
}
.faq__item[open] summary::after { content: '–'; }
.faq__item p { max-width: 65ch; padding-bottom: 18px; color: var(--navy-80); }

/* ------------------------------------------------------------ Appel à l'action */

.cta-block {
  display: grid; gap: 18px; align-items: center;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--white);
}
.cta-block__title { font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.cta-block p + p { margin-top: 6px; color: var(--mute); }
.cta-block .btn { justify-self: start; }
.cta-block--dark { background: var(--navy); border-color: var(--navy); color: var(--white); }
.cta-block--dark p + p { color: #c9d5e6; }

@media (min-width: 760px) {
  .cta-block { grid-template-columns: 1fr auto; gap: 32px; }
}
