/* style-entretien.css — Interface entretien ARIA
 * Extrait de index.html (A8 — suppression unsafe-inline)
 * Les styles inline restants ont été convertis en classes :
 *   .contact-hint       → <p style="margin-top:12px; font-size:13px; color:var(--text-light)">
 *   .contact-hint a     → <a style="color:var(--orange); text-decoration:none; font-weight:500">
 */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=DM+Serif+Display&display=swap');

:root {
  --beige: #d5cec0;
  --beige-light: #e8e3da;
  --beige-dark: #c4bba9;
  --orange: #e07a2f;
  --orange-hover: #c96a22;
  --orange-light: #f5dcc5;
  --gold: #c9a84c;
  --gold-hover: #b8963e;
  --green-grey: #6b7c6b;
  --text-dark: #3a3632;
  --text-light: #7a7168;
  --white: #faf8f5;
  --red: #c0392b;
  --red-light: #e74c3c;
  --bubble-user: #e8e3da;
  --bubble-aria: #fff8f0;
  --shadow: 0 2px 12px rgba(58, 54, 50, 0.08);
  --shadow-lg: 0 4px 24px rgba(58, 54, 50, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'DM Sans', sans-serif;
  background-color: var(--beige);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Header --- */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 32px;
  background: var(--white);
  border-bottom: 1px solid var(--beige-dark);
}
.brand-aria-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-logo { display: block; height: auto; }
.brand-logo-aria { width: 152px; }
.brand-logo-spentia { width: 176px; }
.brand-version {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--beige-dark);
  border-radius: 999px;
  background: var(--beige-light);
  color: var(--text-light);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* --- Conteneur principal --- */
.container {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 0 16px;
}

/* --- Écrans --- */
.screen { display: none; flex: 1; flex-direction: column; }
.screen.active { display: flex; }

/* --- Écran accueil --- */
.welcome-screen {
  justify-content: center;
  align-items: center;
  padding: 40px 0;
  gap: 32px;
}
.welcome-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 48px 40px;
  max-width: 560px;
  width: 100%;
}
.welcome-title {
  font-family: 'DM Serif Display', serif;
  font-size: 26px;
  color: var(--text-dark);
  margin-bottom: 8px;
}
.welcome-subtitle {
  color: var(--text-light);
  font-size: 15px;
  margin-bottom: 32px;
  line-height: 1.5;
}
.welcome-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}
.welcome-points li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 15px;
  line-height: 1.5;
}
.welcome-points .point-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  border: 2px solid var(--beige-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--orange);
  background: var(--beige-light);
}

/* --- Consentement --- */
.consent-box {
  background: var(--beige-light);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 24px;
}
.consent-box p {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 14px;
}
.consent-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-dark);
}
.consent-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--orange);
  cursor: pointer;
}
.consent-link {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-light);
}
.consent-link a {
  color: var(--orange);
  text-decoration: none;
  font-weight: 500;
}
.consent-link a:hover { text-decoration: underline; }

/* --- Boutons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary { background: var(--orange); color: var(--white); }
.btn-primary:hover:not(:disabled) {
  background: var(--orange-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.btn-secondary { background: var(--gold); color: var(--white); }
.btn-secondary:hover:not(:disabled) { background: var(--gold-hover); }
.btn-danger { background: var(--red); color: var(--white); }
.btn-danger:hover:not(:disabled) { background: var(--red-light); }
.btn-start {
  width: 100%;
  min-height: 56px;
  padding: 10px 16px;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.btn-start-label {
  line-height: 1.2;
}

.btn-start-logo-shell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: 38px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(250, 248, 245, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: inset 0 0 0 1px rgba(224, 122, 47, 0.12);
}

.btn-start-brand {
  width: 82px;
  max-width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.45));
}

/* --- Badge France --- */
.badge-france {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: 1px solid var(--beige-dark);
  border-radius: 50px;
  padding: 8px 16px;
  font-size: 12px;
  color: var(--text-light);
  font-weight: 500;
}

/* --- Contact hint (ancien style inline) --- */
.contact-hint {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-light);
}
.contact-hint a {
  color: var(--orange);
  text-decoration: none;
  font-weight: 500;
}
.contact-hint a:hover { text-decoration: underline; }

/* --- Écran entretien --- */
.interview-screen {
  padding: 16px 0;
  gap: 0;
  height: calc(100vh - 77px);
}
.chat-area {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}
.chat-bubble {
  max-width: 80%;
  padding: 14px 18px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.55;
  animation: bubble-in 0.25s ease;
  position: relative;
}
@keyframes bubble-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.bubble-user {
  align-self: flex-start;
  background: var(--bubble-user);
  color: var(--text-dark);
  border-bottom-left-radius: 4px;
}
.bubble-aria {
  align-self: flex-end;
  background: var(--bubble-aria);
  color: var(--text-dark);
  border: 1px solid var(--orange-light);
  border-bottom-right-radius: 4px;
}
.bubble-important { border-left: 3px solid var(--gold); }
.chat-bubble { overflow-wrap: anywhere; word-break: break-word; }

/* --- Indicateurs --- */
.typing-indicator {
  display: none;
  align-self: flex-end;
  background: var(--bubble-aria);
  border: 1px solid var(--orange-light);
  border-radius: 18px;
  padding: 14px 22px;
  gap: 5px;
}
.typing-indicator.visible { display: flex; }
.typing-dot {
  width: 7px;
  height: 7px;
  background: var(--orange);
  border-radius: 50%;
  animation: typing-bounce 1.2s infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%           { transform: translateY(-6px); opacity: 1; }
}
.transcribing-indicator {
  display: none;
  align-self: flex-start;
  background: var(--bubble-user);
  border-radius: 18px;
  padding: 12px 18px;
  font-size: 13px;
  color: var(--text-light);
  font-style: italic;
}
.transcribing-indicator.visible { display: block; }

/* --- Barre d'actions --- */
.action-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 0 8px;
  border-top: 1px solid var(--beige-dark);
  background: var(--beige);
}
.text-input-row { display: flex; gap: 8px; }
.text-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--beige-dark);
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  background: var(--white);
  color: var(--text-dark);
  outline: none;
  transition: border-color var(--transition);
}
.text-input:focus { border-color: var(--orange); }
.text-input::placeholder { color: var(--beige-dark); }
.btn-send {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  font-size: 18px;
}
.action-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-action {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: 2px solid var(--beige-dark);
  border-radius: 50px;
  background: var(--white);
  color: var(--text-dark);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-action:hover { border-color: var(--orange); background: var(--orange-light); }
.btn-action .icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.btn-mic { border-color: var(--orange); background: var(--orange-light); position: relative; overflow: hidden; }
.btn-mic .icon { background: var(--orange); color: var(--white); }
.btn-mic .action-label { font-weight: 700; }
.btn-mic.recording { border-color: var(--red); background: #fde8e5; animation: pulse-recording 1.5s infinite; }
.btn-mic.recording .icon { background: var(--red); }
@keyframes pulse-recording {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192, 57, 43, 0.2); }
  50%      { box-shadow: 0 0 0 8px rgba(192, 57, 43, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .btn-mic.recording {
    animation: none !important;
  }
}
.btn-pause .icon, .btn-back .icon, .btn-flag .icon { background: var(--gold); color: var(--white); }
.btn-end .icon { background: var(--red); color: var(--white); }

/* --- Niveau audio --- */
.audio-level { display: none; height: 4px; background: var(--beige-dark); border-radius: 2px; overflow: hidden; }
.audio-level.visible { display: block; }
.audio-level-bar { height: 100%; width: 0%; background: var(--orange); border-radius: 2px; transition: width 0.1s ease; }

/* --- Écran remerciement --- */
.thankyou-screen { justify-content: center; align-items: center; padding: 40px 0; text-align: center; }
.thankyou-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 56px 40px;
  max-width: 480px;
  width: 100%;
}
.thankyou-icon {
  width: 72px;
  height: 72px;
  background: var(--orange-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 32px;
}
.thankyou-title { font-family: 'DM Serif Display', serif; font-size: 24px; margin-bottom: 12px; }
.thankyou-text { color: var(--text-light); font-size: 15px; line-height: 1.6; margin-bottom: 32px; white-space: pre-line; }
.thankyou-link { color: var(--orange); text-decoration: none; font-weight: 600; font-size: 14px; }
.thankyou-link:hover { text-decoration: underline; }

/* --- Écran erreur --- */
.error-screen { justify-content: center; align-items: center; padding: 40px 0; }
.error-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 48px 40px;
  max-width: 480px;
  width: 100%;
  text-align: center;
}
.error-icon {
  width: 64px;
  height: 64px;
  background: var(--beige-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 28px;
}
.error-title { font-family: 'DM Serif Display', serif; font-size: 22px; margin-bottom: 10px; }
.error-text { color: var(--text-light); font-size: 14px; line-height: 1.6; }

/* --- Overlays --- */
.pause-overlay, .inactivity-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(58, 54, 50, 0.6);
  justify-content: center;
  align-items: center;
}
.pause-overlay { z-index: 100; }
.inactivity-overlay { z-index: 110; }
.pause-overlay.visible, .inactivity-overlay.visible { display: flex; }
.pause-card, .inactivity-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.inactivity-card { max-width: 420px; width: 90%; }
.pause-card h2, .inactivity-card h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  margin-bottom: 12px;
}
.pause-card p, .inactivity-card p {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 24px;
}
.inactivity-buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.inactivity-buttons .btn { padding: 12px 22px; font-size: 14px; }

.user-help-hint { cursor: default; }

/* --- Responsive --- */
@media (max-width: 600px) {
  .header { padding: 14px 16px; }
  .brand-logo-aria { width: 124px; }
  .brand-logo-spentia { width: 140px; }
  .brand-version { height: 24px; padding: 0 8px; font-size: 11px; }
  .btn-start { min-height: 52px; gap: 10px; }
  .btn-start-logo-shell { min-height: 34px; padding: 5px 10px; }
  .btn-start-brand { width: 72px; }
  .welcome-card, .thankyou-card, .error-card { padding: 32px 24px; }
  .action-buttons { gap: 6px; }
  .btn-action { padding: 8px 12px; font-size: 12px; }
  .btn-action .action-label { display: none; }
}
