/* ============================================================
   Cap Horizon Voyages — démo chatbot agence de voyages
   Identité « évasion » : sable / turquoise-mer / navy
   Display : Fraunces · Texte : Inter
   ============================================================ */

:root {
  --sand: #eae0d0;        /* sable — sections, bulles du bot, vague du héro */
  --sand-light: #f6f0e6;  /* sable clair — textes sur navy, fonds doux */
  --navy: #142f47;
  --navy-light: #1e4265;
  --sea: #2e8b8b;
  --sea-deep: #226f6f;
  --sea-light: #5cb3ae;
  --sky: #d8edee;         /* ciel — haut du héro, fond des messages */
  --ink: #22303c;
  --ink-soft: #5b6a76;
  --white: #ffffff;
  --radius: 18px;
  --shadow: 0 10px 40px rgba(20, 47, 71, .18);
  --font-display: "Fraunces", Georgia, serif;
  --font-sans: "Inter", -apple-system, "Segoe UI", sans-serif;
}

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

/* La feuille auteur ne doit jamais écraser l'attribut hidden
   (sinon le panneau de chat reste affiché en permanence) */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--sand-light);
  line-height: 1.6;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: var(--font-display); color: var(--navy); }

/* ===== En-tête (navy plein) ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 66px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { font-size: 24px; line-height: 1; }
.brand-name {
  font-family: var(--font-display); font-weight: 600; font-size: 19px;
  color: var(--sand-light); letter-spacing: .01em;
}
.site-nav { display: flex; align-items: center; gap: 24px; }
.site-nav a {
  color: rgba(246, 240, 230, .75); text-decoration: none;
  font-size: 14.5px; font-weight: 500;
}
.site-nav a:hover { color: var(--white); }

/* ===== Boutons ===== */
.btn {
  display: inline-block; border: none; cursor: pointer;
  font-family: var(--font-sans); font-weight: 600; font-size: 15px;
  padding: 13px 26px; border-radius: 999px;
  text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s;
}
.btn-small { padding: 9px 18px; font-size: 13.5px; }
.btn-primary {
  background: var(--sea); color: var(--white);
  box-shadow: 0 4px 14px rgba(46, 139, 139, .32);
}
.btn-primary:hover { background: var(--sea-light); transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: var(--navy);
  border: 1.5px solid var(--navy);
}
.btn-ghost:hover { background: var(--navy); color: var(--sand-light); }

/* ===== Héro : ciel → mer → vague de sable ===== */
.hero {
  position: relative;
  background: linear-gradient(180deg, var(--sky) 0%, #e9f2ee 60%, #f0e9db 100%);
  padding: 84px 0 130px;
  overflow: hidden;
}
.hero::before { /* halo de soleil */
  content: "";
  position: absolute; top: -140px; right: -60px;
  width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, rgba(46, 139, 139, .22), transparent 65%);
}
.hero-inner {
  position: relative;
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 48px; align-items: center;
}
.hero-kicker, .section-kicker {
  text-transform: uppercase; letter-spacing: .18em; font-size: 12.5px;
  font-weight: 600; color: var(--sea);
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(38px, 5.4vw, 58px);
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 20px;
}
.accent { color: var(--sea); font-style: italic; }
.hero-sub {
  max-width: 480px; margin-bottom: 30px;
  color: var(--ink-soft); font-size: 17px;
}
.hero-sub strong { color: var(--navy); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.badge {
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(46, 139, 139, .28);
  border-radius: 999px;
  padding: 7px 14px; font-size: 13px; font-weight: 500;
  color: var(--navy);
}
.hero-wave {
  position: absolute; left: 0; right: 0; bottom: -1px;
  width: 100%; height: 80px; display: block;
}

/* Cartes postales du héro */
.hero-scene { position: relative; height: 380px; }
.postcard {
  position: absolute;
  width: 190px;
  background: var(--white);
  border-radius: 14px;
  padding: 12px 12px 10px;
  box-shadow: 0 18px 40px rgba(20, 47, 71, .18);
  text-align: center;
}
.postcard-img {
  height: 116px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 50px;
}
.postcard-tag {
  margin-top: 9px;
  font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-soft);
}
.postcard-title {
  font-family: var(--font-display); font-weight: 600; font-size: 18px;
  color: var(--navy);
}
.postcard-1 { top: 4%;  left: 2%;   transform: rotate(-7deg); }
.postcard-2 { top: 22%; right: 1%;  transform: rotate(5deg); z-index: 2; }
.postcard-3 { bottom: 2%; left: 26%; transform: rotate(-2deg); z-index: 3; }

/* Dégradés « photo » partagés (cartes postales + fiches destinations) */
.g-sakura { background: linear-gradient(160deg, #fbe3e0, #eba39b); }
.g-egee   { background: linear-gradient(160deg, #bfe2ec, #4da3bd); }
.g-savane { background: linear-gradient(160deg, #f3ddb0, #d29a55); }

/* ===== Sections ===== */
.section { padding: 84px 0; }
.section-dest { background: var(--sand); }
.section-alt { background: var(--white); }
.section h2 { font-size: clamp(28px, 4vw, 38px); font-weight: 600; margin-bottom: 36px; }

/* Fiches destinations façon carte postale */
.dest-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px;
}
.dest-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(20, 47, 71, .10);
  display: flex; flex-direction: column;
  transition: transform .18s, box-shadow .18s;
}
.dest-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(20, 47, 71, .16);
}
.dest-visual {
  position: relative;
  height: 128px;
  display: grid; place-items: center;
  font-size: 52px;
}
.dest-badge {
  position: absolute; bottom: 12px; right: 12px;
  background: var(--navy); color: var(--white);
  border-radius: 999px;
  padding: 6px 13px; font-size: 13px; font-weight: 600;
  box-shadow: 0 4px 12px rgba(20, 47, 71, .3);
}
.dest-body {
  padding: 22px 22px 20px;
  display: flex; flex-direction: column; gap: 8px;
  flex: 1;
}
.dest-body h3 { font-size: 22px; font-weight: 600; }
.dest-meta { color: var(--ink-soft); font-size: 14px; }
.dest-list { list-style: none; margin: 6px 0; }
.dest-list li {
  position: relative;
  padding: 4px 0 4px 20px;
  font-size: 14.3px;
}
.dest-list li::before {
  content: "✦";
  position: absolute; left: 0;
  color: var(--sea);
  font-size: 12px;
}
.dest-season { font-size: 13.5px; color: var(--ink-soft); }
.dest-foot {
  margin-top: auto; padding-top: 12px;
  border-top: 1px dashed var(--sand);
  font-size: 12.5px; color: var(--ink-soft);
}

/* Bannière d'appel à l'action */
.cta-banner {
  margin-top: 46px;
  background: linear-gradient(120deg, var(--navy), var(--sea-deep));
  color: rgba(255, 255, 255, .85);
  border-radius: var(--radius);
  padding: 30px 34px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  font-size: 15px;
}
.cta-banner strong {
  display: block;
  font-family: var(--font-display); font-weight: 600; font-size: 21px;
  color: var(--white); margin-bottom: 4px;
}

/* Agence + contact */
.two-cols {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
}
.hours-table { border-collapse: collapse; width: 100%; font-size: 15.5px; }
.hours-table td { padding: 11px 0; border-bottom: 1px dashed var(--sand); }
.hours-table td:first-child { font-weight: 600; color: var(--navy); }
.hours-table td:last-child { text-align: right; color: var(--ink-soft); }
.closed { color: #b0483c !important; font-weight: 600; }
.hours-note { margin-top: 18px; font-size: 14px; color: var(--ink-soft); }
.contact-line { padding: 7px 0; color: var(--ink-soft); font-size: 15.5px; }

/* Pied de page */
.site-footer {
  background: var(--navy); color: rgba(246, 240, 230, .75);
  padding: 28px 0; font-size: 13.5px; text-align: center;
}
.site-footer strong { color: var(--sea-light); font-weight: 600; }

/* ============================================================
   Widget chatbot
   ============================================================ */

/* Bouton flottant */
.chat-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 100;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--sea); color: var(--white);
  border: none; cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 6px 24px rgba(46, 139, 139, .45);
  transition: transform .2s, background .2s;
  animation: fab-pulse 2.6s ease-in-out infinite;
}
.chat-fab:hover { transform: scale(1.08); background: var(--sea-light); }
.chat-fab .chat-fab-close { display: none; font-size: 22px; }
.chat-fab.open { animation: none; }
.chat-fab.open svg { display: none; }
.chat-fab.open .chat-fab-close { display: block; }

@keyframes fab-pulse {
  0%, 100% { box-shadow: 0 6px 24px rgba(46, 139, 139, .45), 0 0 0 0 rgba(46, 139, 139, .35); }
  50%      { box-shadow: 0 6px 24px rgba(46, 139, 139, .45), 0 0 0 12px rgba(46, 139, 139, 0); }
}

/* Bulle d'accroche */
.chat-teaser {
  position: fixed; bottom: 98px; right: 24px; z-index: 99;
  max-width: 260px;
  background: var(--white); color: var(--ink);
  padding: 13px 16px; border-radius: 14px 14px 2px 14px;
  font-size: 14px; box-shadow: var(--shadow);
  cursor: pointer;
  animation: teaser-in .4s ease-out;
}
@keyframes teaser-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Panneau */
.chat-panel {
  position: fixed; bottom: 98px; right: 24px; z-index: 100;
  width: 380px; max-width: calc(100vw - 32px);
  height: 560px; max-height: calc(100vh - 130px);
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: panel-in .28s cubic-bezier(.2, .9, .3, 1.1);
}
@keyframes panel-in {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-header {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(120deg, var(--navy), var(--sea-deep));
  color: var(--sand-light);
  padding: 14px 18px;
}
.chat-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--white); color: var(--navy);
  font-family: var(--font-display); font-size: 21px; font-weight: 700;
  display: grid; place-items: center; flex-shrink: 0;
}
.chat-title { font-weight: 600; font-size: 15.5px; }
.chat-status { font-size: 12px; opacity: .85; display: flex; align-items: center; gap: 6px; }
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #6fd08c; display: inline-block;
}

.chat-messages {
  flex: 1; overflow-y: auto;
  padding: 18px 16px;
  display: flex; flex-direction: column; gap: 10px;
  background: #edf5f5;
}

.msg {
  max-width: 84%; padding: 11px 14px;
  font-size: 14.3px; line-height: 1.5;
  white-space: pre-line;
  animation: msg-in .25s ease-out;
}
@keyframes msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.msg-bot {
  align-self: flex-start;
  background: var(--sand); color: var(--navy);
  border-radius: 4px 14px 14px 14px;
  box-shadow: 0 2px 8px rgba(20, 47, 71, .07);
}
.msg-user {
  align-self: flex-end;
  background: var(--sea); color: var(--white);
  border-radius: 14px 4px 14px 14px;
}
.msg-bot strong { color: var(--navy); font-weight: 700; }
.msg-user strong { color: #d9f0ee; }

/* Indicateur de frappe */
.typing {
  align-self: flex-start;
  background: var(--sand);
  border-radius: 4px 14px 14px 14px;
  padding: 14px 16px;
  display: flex; gap: 5px;
  box-shadow: 0 2px 8px rgba(20, 47, 71, .07);
}
.typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--sea);
  animation: typing-bounce 1.1s infinite;
}
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .5; }
  30%           { transform: translateY(-5px); opacity: 1; }
}

/* Suggestions (chips) */
.chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  align-self: flex-start;
  animation: msg-in .25s ease-out;
}
.chip {
  background: var(--white); color: var(--sea-deep);
  border: 1.5px solid var(--sea);
  border-radius: 999px;
  padding: 7px 14px; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: var(--font-sans);
  transition: background .15s, color .15s;
}
.chip:hover { background: var(--sea); color: var(--white); }

/* Zone de saisie */
.chat-input-row {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  background: var(--white);
  border-top: 1px solid var(--sand);
}
.chat-input-row input {
  flex: 1; border: 1.5px solid var(--sand);
  border-radius: 999px;
  padding: 11px 16px; font-size: 14.3px;
  font-family: var(--font-sans);
  outline: none; background: var(--sand-light);
  transition: border-color .15s;
}
.chat-input-row input:focus { border-color: var(--sea); }
.chat-input-row button {
  width: 42px; height: 42px; border-radius: 50%;
  border: none; cursor: pointer;
  background: var(--sea); color: var(--white);
  display: grid; place-items: center;
  transition: background .15s;
  flex-shrink: 0;
}
.chat-input-row button:hover { background: var(--sea-light); }

.chat-footer {
  text-align: center; font-size: 11px; color: var(--ink-soft);
  padding: 6px 0 9px; background: var(--white);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-scene { display: none; }
  .hero { padding: 60px 0 100px; }
}
@media (max-width: 820px) {
  .dest-grid { grid-template-columns: 1fr; gap: 24px; }
  .two-cols { grid-template-columns: 1fr; gap: 40px; }
  .site-nav a { display: none; }
  .section { padding: 56px 0; }
  .cta-banner { padding: 24px 22px; }
}
@media (max-width: 480px) {
  .chat-panel {
    right: 8px; bottom: 86px;
    width: calc(100vw - 16px);
    height: calc(100vh - 110px);
  }
  .chat-fab { right: 16px; bottom: 16px; }
  .chat-teaser { right: 16px; bottom: 90px; }
}
