/* ═══════════════════════════════════════
   agencedevoyage.tn — style.css
   ═══════════════════════════════════════ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  text-decoration: none;
}

/* ── DESIGN TOKENS ── */
:root {
  --c-deep:    #001a2c;
  --c-navy:    #003554;
  --c-teal:    #006494;
  --c-sky:     #0582ca;
  --c-aqua:    #00a8e8;
  --c-sand:    #e8d5b0;
  --c-white:   #f5f0e8;
  --c-text:    #d4cfc4;
  --c-accent:  #f4a535;
  --radius:    10px;
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

/* ── BASE ── */
html { scroll-behavior: smooth; }

body {
  background: var(--c-deep);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ════════════════════════════════════════
   NAVBAR
   ════════════════════════════════════════ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0,26,44,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,100,148,0.25);
  min-height: 3.5rem;
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  min-height: 3.5rem;
  position: relative;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}

.navbar-brand img { height: 32px; width: auto; }

.navbar-brand span {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--c-white);
  letter-spacing: -0.02em;
}

.navbar-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: .5rem;
  margin-left: auto;
  background: none;
  border: none;
}

.navbar-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--c-white);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}

.navbar-burger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar-burger.is-active span:nth-child(2) { opacity: 0; }
.navbar-burger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.navbar-menu {
  display: flex;
  align-items: center;
  gap: .1rem;
  margin-left: 2rem;
  flex: 1;
}

.navbar-item {
  color: var(--c-text);
  font-size: .9rem;
  font-weight: 500;
  padding: .5rem .75rem;
  border-radius: 6px;
  transition: color .2s, background .2s;
  white-space: nowrap;
}

.navbar-item:hover {
  color: var(--c-white);
  background: rgba(0,130,202,0.15);
}

.has-dropdown { position: relative; }

.navbar-link {
  display: flex;
  align-items: center;
  gap: .35rem;
  color: var(--c-text);
  font-size: .9rem;
  font-weight: 500;
  padding: .5rem .75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: color .2s, background .2s;
  white-space: nowrap;
}

.navbar-link:hover {
  color: var(--c-white);
  background: rgba(0,130,202,0.15);
}

.navbar-link svg { transition: transform .2s; }
.has-dropdown:hover .navbar-link svg { transform: rotate(180deg); }

.navbar-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  background: var(--c-navy);
  border: 1px solid rgba(0,130,202,0.2);
  border-radius: var(--radius);
  min-width: 240px;
  padding: .5rem;
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}

@media (min-width: 768px) {
  .has-dropdown:hover .navbar-link svg { transform: rotate(180deg); }
  .has-dropdown:hover .navbar-dropdown { display: block; }
}

.navbar-dropdown a {
  display: block;
  color: var(--c-text);
  font-size: .875rem;
  padding: .45rem .75rem;
  border-radius: 6px;
  transition: background .15s, color .15s;
}

.navbar-dropdown a:hover {
  background: rgba(0,130,202,0.15);
  color: var(--c-white);
}

/* ════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════ */
.btn-primary {
  background: var(--c-sky);
  color: #fff;
  padding: .75rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .95rem;
  transition: background .2s, transform .15s;
  display: inline-block;
}

.btn-primary:hover {
  background: var(--c-aqua);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--c-white);
  padding: .75rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: .95rem;
  transition: border-color .2s, background .2s;
  display: inline-block;
}

.btn-outline:hover {
  border-color: var(--c-aqua);
  background: rgba(0,168,232,0.08);
}

/* ════════════════════════════════════════
   DIVIDER
   ════════════════════════════════════════ */
.divider {
  width: 48px;
  height: 3px;
  background: var(--c-aqua);
  border-radius: 2px;
  margin: 1.5rem 0;
}

/* ════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════ */
footer {
  background: var(--c-navy);
  border-top: 1px solid rgba(0,100,148,0.2);
  padding: 2.5rem 1.5rem 1.5rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: start;
}

.footer-brand-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--c-white);
  margin-bottom: .4rem;
}

.footer-desc {
  font-size: .85rem;
  color: var(--c-text);
  max-width: 340px;
}

.footer-links {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.footer-col h4 {
  font-family: var(--font-head);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--c-aqua);
  margin-bottom: .75rem;
}

.footer-col a {
  display: block;
  color: var(--c-text);
  font-size: .85rem;
  padding: .2rem 0;
  transition: color .15s;
}

.footer-col a:hover { color: var(--c-white); }

.footer-bottom {
  max-width: 1200px;
  margin: 1.5rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(0,100,148,0.15);
  text-align: center;
  font-size: .8rem;
  color: rgba(212,207,196,0.5);
}

/* ════════════════════════════════════════
   INDEX — HERO
   ════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem 3rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(0,100,148,0.35) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(244,165,53,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(244,165,53,0.12);
  border: 1px solid rgba(244,165,53,0.3);
  color: var(--c-accent);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .35rem .9rem;
  border-radius: 99px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 800;
  color: var(--c-white);
  line-height: 1.1;
  letter-spacing: -0.03em;
  max-width: 780px;
  margin-bottom: 1.25rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--c-aqua);
}

.hero p {
  font-size: 1.1rem;
  color: var(--c-text);
  max-width: 560px;
  margin-bottom: 2.2rem;
  font-weight: 300;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ════════════════════════════════════════
   INDEX — BENTO GRID
   ════════════════════════════════════════ */
.bento-section {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1rem 4rem;
}

.bento-label {
  font-family: var(--font-head);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-aqua);
  text-align: center;
  margin-bottom: 1.5rem;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 58px;
  gap: 6px;
}

.bento-cell {
  background: var(--c-navy);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  transition: transform .18s, box-shadow .18s;
  border: 1px solid rgba(0,100,148,0.2);
}

.bento-cell:hover {
  transform: scale(1.035);
  box-shadow: 0 8px 28px rgba(0,130,202,0.25);
  border-color: var(--c-sky);
  z-index: 2;
}

.bento-cell img {
  width: 70%;
  height: 70%;
  object-fit: contain;
}

.bento-cell img.full { width: 80%; height: 80%; }

.bento-cell.text-cell {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--c-white);
  text-align: center;
  padding: .75rem;
  font-size: clamp(.8rem, 2cqi, 1.1rem);
  background: linear-gradient(135deg, var(--c-teal), var(--c-navy));
}

.bento-cell.text-cell:hover {
  background: linear-gradient(135deg, var(--c-sky), var(--c-teal));
}

.bento-cell.accent-cell {
  background: linear-gradient(135deg, rgba(244,165,53,0.15), rgba(0,100,148,0.3));
  border-color: rgba(244,165,53,0.25);
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--c-accent);
  text-align: center;
  padding: .75rem;
  font-size: clamp(.8rem, 2cqi, 1.05rem);
}

/* Bento cell sizes */
.cell-lg     { grid-column: span 6; grid-row: span 6; }
.cell-md     { grid-column: span 4; grid-row: span 4; }
.cell-sm     { grid-column: span 3; grid-row: span 3; }
.cell-wide-lg{ grid-column: span 6; grid-row: span 3; }
.cell-wide-md{ grid-column: span 6; grid-row: span 2; }

/* ════════════════════════════════════════
   INDEX — CONTENT SECTION
   ════════════════════════════════════════ */
.content-section {
  max-width: 760px;
  margin: 0 auto;
  padding: 1rem 1.5rem 5rem;
}

.content-section h2 {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  font-weight: 700;
  color: var(--c-white);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.content-section p {
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--c-text);
  margin-bottom: 1.25rem;
}

.content-section ul {
  list-style: none;
  margin-bottom: 1.5rem;
}

.content-section ul li {
  padding: .5rem 0 .5rem 1.5rem;
  position: relative;
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--c-text);
  border-bottom: 1px solid rgba(0,100,148,0.15);
}

.content-section ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--c-aqua);
  font-size: .85rem;
}

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

.feature-card {
  background: var(--c-navy);
  border: 1px solid rgba(0,100,148,0.2);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.feature-card .icon {
  font-size: 1.6rem;
  margin-bottom: .5rem;
  display: block;
}

.feature-card h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-white);
  margin-bottom: .4rem;
}

.feature-card p {
  font-size: .875rem;
  margin: 0;
}

.img-wide {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 1.5rem 0;
  display: block;
  object-fit: cover;
}

/* ════════════════════════════════════════
   LISTE — PAGE HEADER
   ════════════════════════════════════════ */
.page-header {
  padding: 3.5rem 1.5rem 2.5rem;
  text-align: center;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(0,100,148,0.25) 0%, transparent 70%);
}

.page-header .breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  font-size: .8rem;
  color: rgba(212,207,196,0.55);
  margin-bottom: 1.25rem;
}

.page-header .breadcrumb a { color: var(--c-aqua); }
.page-header .breadcrumb a:hover { color: var(--c-white); }

.page-header h1 {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 800;
  color: var(--c-white);
  line-height: 1.1;
  letter-spacing: -0.03em;
  max-width: 680px;
  margin: 0 auto 1rem;
}

.page-header h1 em { font-style: normal; color: var(--c-aqua); }

.page-header .intro {
  max-width: 580px;
  margin: 0 auto;
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--c-text);
}

/* ════════════════════════════════════════
   LISTE — INTRO IMAGE
   ════════════════════════════════════════ */
.intro-media {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.5rem 2.5rem;
}

.intro-media img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  display: block;
  object-fit: cover;
}

/* ════════════════════════════════════════
   LISTE — SEARCH BAR
   ════════════════════════════════════════ */
.search-bar-wrap {
  max-width: 900px;
  margin: 0 auto 2.5rem;
  padding: 0 1.5rem;
}

.search-box {
  background: var(--c-navy);
  border: 1px solid rgba(0,130,202,0.25);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}

.search-row {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

.search-input-wrap {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.search-input-wrap svg {
  position: absolute;
  left: .85rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(212,207,196,0.4);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: rgba(0,26,44,0.6);
  border: 1px solid rgba(0,130,202,0.2);
  border-radius: 8px;
  color: var(--c-white);
  font-family: var(--font-body);
  font-size: .9rem;
  padding: .65rem .75rem .65rem 2.4rem;
  outline: none;
  transition: border-color .2s;
}

.search-input::placeholder { color: rgba(212,207,196,0.35); }
.search-input:focus { border-color: var(--c-sky); }

.filter-select {
  background: rgba(0,26,44,0.6);
  border: 1px solid rgba(0,130,202,0.2);
  border-radius: 8px;
  color: var(--c-white);
  font-family: var(--font-body);
  font-size: .9rem;
  padding: .65rem 1rem;
  cursor: pointer;
  outline: none;
  transition: border-color .2s;
  min-width: 160px;
}

.filter-select:focus { border-color: var(--c-sky); }
.filter-select option { background: var(--c-navy); }

.search-count {
  font-size: .8rem;
  color: rgba(212,207,196,0.5);
  margin-top: .75rem;
}

.search-count span {
  color: var(--c-aqua);
  font-weight: 600;
}

/* ════════════════════════════════════════
   LISTE — AGENCY CARDS
   ════════════════════════════════════════ */
.cards-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.1rem;
}

.agency-card {
  background: var(--c-navy);
  border: 1px solid rgba(0,100,148,0.2);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
}

.agency-card:hover {
  border-color: var(--c-sky);
  box-shadow: 0 8px 32px rgba(0,100,148,0.2);
  transform: translateY(-3px);
}

.card-logo {
  background: rgba(0,26,44,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  height: 110px;
  border-bottom: 1px solid rgba(0,100,148,0.12);
}

.card-logo img {
  max-width: 120px;
  max-height: 70px;
  object-fit: contain;
  width: auto;
  height: auto;
}

.card-body {
  padding: 1.1rem 1.25rem;
  flex: 1;
}

.card-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  color: var(--c-white);
  margin-bottom: .75rem;
}

.card-info {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.card-row {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-size: .85rem;
  color: var(--c-text);
}

.card-row svg { flex-shrink: 0; margin-top: 2px; color: var(--c-aqua); }
.card-row a { color: var(--c-text); transition: color .15s; }
.card-row a:hover { color: var(--c-aqua); }

.card-footer {
  padding: .85rem 1.25rem;
  border-top: 1px solid rgba(0,100,148,0.12);
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}

.tag-link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .78rem;
  font-weight: 500;
  padding: .3rem .75rem;
  border-radius: 99px;
  transition: background .15s, color .15s;
}

.tag-wa {
  background: rgba(37,211,102,0.1);
  color: #25d366;
  border: 1px solid rgba(37,211,102,0.25);
}
.tag-wa:hover { background: rgba(37,211,102,0.2); }

.tag-web {
  background: rgba(5,130,202,0.1);
  color: var(--c-aqua);
  border: 1px solid rgba(0,130,202,0.25);
}
.tag-web:hover { background: rgba(5,130,202,0.2); }

.tag-tel {
  background: rgba(244,165,53,0.1);
  color: var(--c-accent);
  border: 1px solid rgba(244,165,53,0.25);
}
.tag-tel:hover { background: rgba(244,165,53,0.2); }

.no-results {
  text-align: center;
  padding: 4rem 1rem;
  color: rgba(212,207,196,0.4);
  font-size: 1.1rem;
  display: none;
}

/* ════════════════════════════════════════
   RESPONSIVE — MOBILE (< 768px)
   ════════════════════════════════════════ */
@media (max-width: 767px) {
  /* Navbar */
  .navbar-burger { display: flex; }

  .navbar-menu {
    display: none;
    position: fixed;
    top: 3.5rem;
    left: 0;
    right: 0;
    max-height: calc(100dvh - 3.5rem);
    background: var(--c-deep);
    border-bottom: 1px solid rgba(0,100,148,0.25);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin-left: 0;
    padding: .5rem 0 2rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .navbar-menu.is-active { display: flex; }

  body.nav-open { overflow: hidden; }

  .navbar-item,
  .navbar-link {
    width: 100%;
    padding: .7rem 1.25rem;
    border-radius: 0;
  }

  .has-dropdown { width: 100%; }

  .navbar-dropdown {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: rgba(0,53,84,0.5);
    padding-left: 1rem;
  }

  .has-dropdown.is-open .navbar-dropdown { display: block; }
  .has-dropdown.is-open .navbar-link svg { transform: rotate(180deg); }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { gap: 1.5rem; }

  /* Cards */
  .cards-grid { grid-template-columns: 1fr; }
}
