/* ============================================================
   PHUKET360 — main.css
   Mobile-first. Variables → Reset → Base → Header desktop →
   Mobile bottom nav → Drawer → Footer → Utilitaires
   ============================================================ */

/* === GOOGLE FONTS (chargées via <link> dans header.php) === */

/* === VARIABLES === */
:root {
  /* Couleurs */
  --ocean-deep:  #0D1B2A;
  --ocean:       #1B4F72;
  --ocean-light: #2E86C1;
  --emeraude:    #17A589;
  --jungle:      #1E8449;
  --soleil:      #F0B429;
  --sunset:      #E67E22;
  --violet:      #8E44AD;
  --sable:       #FDF6EC;
  --text:        #2C3E50;
  --text-light:  #7F8C8D;
  --white:       #ffffff;

  /* Layout */
  --header-height:    64px;
  --mobile-nav-h:     60px;
  --drawer-width:     280px;
  --container-max:    1200px;

  /* UI */
  --radius:       8px;
  --radius-lg:    14px;
  --transition:   0.22s ease;
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.08);
  --shadow-md:    0 6px 24px rgba(0,0,0,0.12);
}

/* === RESET === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* === BASE === */
body {
  margin: 0;
  padding: 0;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--sable);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

/* Mobile : espace pour la barre fixe en bas */
@media (max-width: 767px) {
  body {
    padding-bottom: var(--mobile-nav-h);
  }
}

/* Desktop : espace pour le header fixe en haut */
@media (min-width: 768px) {
  body {
    padding-top: var(--header-height);
  }
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ocean-deep);
}

a {
  color: var(--ocean-light);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--ocean); text-decoration: underline; }

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

button { font-family: inherit; }

/* === CONTAINER === */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 768px) { .container { padding: 0 24px; } }
@media (min-width: 1280px) { .container { padding: 0 32px; } }


/* ============================================================
   HEADER DESKTOP
   Caché sur mobile (<768px) — affiché uniquement en desktop
   ============================================================ */
#site-header {
  display: none;
}

@media (min-width: 768px) {
  #site-header {
    display: block;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 900;
    height: var(--header-height);
    background: var(--ocean-deep);
    transition:
      background var(--transition),
      box-shadow var(--transition),
      backdrop-filter var(--transition);
  }

  /* État sticky au scroll */
  #site-header.is-sticky {
    background: rgba(13, 27, 42, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
  }

  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
  }

  /* --- Logo --- */
  .header-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
  }

  .header-logo img {
    height: 40px;
    width: auto;
  }

  /* Swap logo normal ↔ sticky */
  .logo-sticky { display: none; }

  #site-header.is-sticky .logo-default { display: none; }
  #site-header.is-sticky .logo-sticky  { display: block; }

  /* --- Navigation --- */
  .header-nav {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .nav-link {
    display: inline-flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: var(--radius);
    transition: color var(--transition), background var(--transition);
    text-decoration: none;
  }
  .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.09);
    text-decoration: none;
  }

  /* --- Dropdown Catégories --- */
  .nav-dropdown { position: relative; }

  .nav-dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    gap: 5px;
  }

  .dropdown-arrow {
    font-size: 0.7rem;
    transition: transform var(--transition);
  }
  .nav-dropdown.is-open .dropdown-arrow {
    transform: rotate(180deg);
  }

  .nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    min-width: 230px;
    overflow: hidden;
    z-index: 100;
  }
  .nav-dropdown.is-open .nav-dropdown-menu { display: block; }

  .nav-dropdown-menu a {
    display: block;
    padding: 11px 20px;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background var(--transition), color var(--transition);
    text-decoration: none;
  }
  .nav-dropdown-menu a:last-child { border-bottom: none; }
  .nav-dropdown-menu a:hover {
    background: var(--sable);
    color: var(--ocean);
    text-decoration: none;
  }

  /* --- Bouton Boutique (CTA) --- */
  .nav-link-cta {
    background: var(--soleil);
    color: var(--ocean-deep) !important;
    font-weight: 700;
    padding: 8px 18px;
    margin-left: 6px;
  }
  .nav-link-cta:hover {
    background: #dda020;
    color: var(--ocean-deep) !important;
    text-decoration: none;
  }

  /* --- Bouton Catégories --- */
  .nav-link-categories {
    background: var(--ocean-light);
    color: #fff !important;
    font-weight: 700;
    padding: 8px 18px;
    margin-left: 6px;
  }
  .nav-link-categories:hover {
    background: #2271a8;
    color: #fff !important;
    text-decoration: none;
  }
}


/* ============================================================
   MOBILE — BARRE DE NAV BASSE
   Visible uniquement sur mobile (<768px)
   ============================================================ */
#mobile-bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 900;
  height: calc(65px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--white);
  border-top: 1px solid rgba(0, 0, 0, 0.09);
  box-shadow: 0 -3px 16px rgba(0, 0, 0, 0.08);
  display: flex;
}

@media (min-width: 768px) {
  #mobile-bottom-nav { display: none; }
}

.mobile-nav-btn {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  text-decoration: none;
  font-family: inherit;
  padding: 6px 0;
  transition: color var(--transition);
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.mobile-nav-btn:hover,
.mobile-nav-btn.is-active {
  color: var(--ocean);
  text-decoration: none;
}

.mobile-nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.mobile-nav-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.75;
}

/* min-width: 0 sur le bouton + nowrap sur le libelle : sur un ecran etroit
   (360/380px), un libelle un peu long ne passe jamais sur deux lignes, ce qui
   deformerait la hauteur de toute la barre. Il reste dans sa colonne. */
.mobile-nav-label {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}


/* ============================================================
   MOBILE — DRAWER (panneau latéral gauche)
   ============================================================ */
#mobile-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
#mobile-drawer-overlay.is-open { display: block; }

#mobile-drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--drawer-width);
  z-index: 1100;
  background: var(--white);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  overscroll-behavior: contain;
}
#mobile-drawer.is-open { transform: translateX(0); }

/* En-tête du drawer (fond sombre + logo) */
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px;
  background: var(--ocean-deep);
  flex-shrink: 0;
}

.drawer-logo {
  height: 34px;
  width: auto;
}

.drawer-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.65);
  font-size: 1.35rem;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
  border-radius: 4px;
  transition: color var(--transition), background var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.drawer-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* Croix Lucide : le SVG n'est pas dimensionne par le font-size ci-dessus.
   Taille fixee ici, couleur heritee du bouton. Le fond, le padding et la
   position du bouton ne bougent pas. */
.drawer-close svg {
  display: block;
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

/* Corps du drawer */
.drawer-nav {
  flex: 1;
  padding: 8px 0 16px;
}

.drawer-section-title {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
  padding: 14px 18px 6px;
}

.drawer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid rgba(0, 0, 0, 0.045);
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}
.drawer-link:hover {
  background: var(--sable);
  color: var(--ocean);
  text-decoration: none;
}
.drawer-link::after {
  content: '›';
  color: var(--text-light);
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Liens secondaires en bas du drawer */
.drawer-footer-links {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
}
.drawer-footer-link {
  font-size: 0.8rem;
  color: var(--text-light);
  text-decoration: none;
  transition: color var(--transition);
}
.drawer-footer-link:hover { color: var(--ocean); text-decoration: none; }

/* Icônes Lucide dans les liens drawer */
.drawer-link--icon {
  gap: 10px;
}
.drawer-nav-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--text-light);
}
.drawer-nav-icon svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 1.75;
}
.drawer-link--icon:hover .drawer-nav-icon { color: var(--ocean); }


/* ============================================================
   FOOTER
   ============================================================ */
#site-footer {
  background: var(--ocean-deep);
  padding: 44px 16px 28px;
  text-align: center;
}

@media (max-width: 767px) {
  #site-footer {
    padding-bottom: 70px;
  }
}

.footer-logo {
  height: 44px;
  width: auto;
  margin: 0 auto 28px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 20px;
  margin-bottom: 24px;
}
.footer-links a {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.82rem;
  transition: color var(--transition);
  text-decoration: none;
}
.footer-links a:hover {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
}

.footer-divider {
  width: 40px;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 auto 20px;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}

.footer-social-link:hover {
  background: rgba(255,255,255,0.18);
}

.footer-social-link svg {
  width: 20px;
  height: 20px;
  stroke: rgba(255,255,255,0.5);
  flex-shrink: 0;
  transition: stroke var(--transition);
}

.footer-social-link:hover svg {
  stroke: #fff;
}

.footer-disclosure {
  color: rgba(255, 255, 255, 0.32);
  font-size: 0.72rem;
  line-height: 1.5;
  max-width: 480px;
  margin: 0 auto 10px;
}

.footer-copyright {
  color: rgba(255, 255, 255, 0.28);
  font-size: 0.77rem;
}


/* ============================================================
   BOUTON RETOUR EN HAUT
   ============================================================ */
.back-to-top {
  position: fixed;
  bottom: calc(var(--mobile-nav-h) + 16px);
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ocean-deep);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
  z-index: 501;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top svg {
  width: 20px;
  height: 20px;
  stroke: #fff;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .back-to-top {
    bottom: 30px;
    right: 30px;
  }
}


/* ============================================================
   UTILITAIRES
   ============================================================ */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}


/* ============================================================
   BREADCRUMB — classes partagées (bc-sep, bc-current)
   Définies globalement ici car utilisées sans hub.css
   ============================================================ */
.bc-sep {
  display: flex;
  align-items: center;
  color: var(--text-light);
  opacity: 0.5;
}
.bc-sep svg {
  width: 12px;
  height: 12px;
}
.bc-current {
  color: var(--ocean);
  font-weight: 600;
}


/* ============================================================
   PAGE ACTUALITÉS (/actualites/)
   ============================================================ */

/* Hero */
.actu-hero {
  background: var(--ocean-deep);
  color: var(--white);
  text-align: center;
  padding: 48px 16px 40px;
}
.actu-hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  color: var(--white);
  margin-bottom: 10px;
}
.actu-hero p {
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto;
}

/* Breadcrumb */
.actu-breadcrumb {
  background: var(--white);
  border-bottom: 1px solid rgba(0,0,0,0.07);
  padding: 0 16px;
}
.actu-breadcrumb-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  font-size: 0.82rem;
  color: var(--text-light);
}
.actu-breadcrumb-inner a {
  color: var(--text-light);
  text-decoration: none;
}
.actu-breadcrumb-inner a:hover {
  color: var(--ocean);
  text-decoration: none;
}

/* Contenu principal */
.actu-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 16px 60px;
}
@media (min-width: 768px) {
  .actu-main { padding: 40px 24px 80px; }
}

/* État vide */
.actu-empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-light);
}
.actu-empty-icon {
  width: 48px;
  height: 48px;
  stroke: var(--text-light);
  fill: none;
  stroke-width: 1.5;
  margin: 0 auto 16px;
  display: block;
}
.actu-empty p { font-size: 0.95rem; }

/* Grille */
.actu-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Card */
.actu-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0,0,0,0.07);
  display: flex;
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.actu-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Thumbnail */
.actu-card-thumb {
  width: 150px;
  min-height: 110px;
  flex-shrink: 0;
  overflow: hidden;
  background: #e5e7eb;
}
.actu-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.actu-card-thumb-empty {
  width: 100%;
  height: 100%;
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
}

/* Body */
.actu-card-body {
  flex: 1;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.actu-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}
.actu-card-date {
  font-size: 0.75rem;
  color: var(--text-light);
}
.actu-card-titre {
  font-size: 0.97rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ocean-deep);
  margin: 0;
}
.actu-card-resume {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.5;
  flex: 1;
}
.actu-card-footer { margin-top: 4px; }
.actu-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ocean-light);
  text-decoration: none;
  transition: color var(--transition), gap var(--transition);
}
.actu-card-link:hover {
  color: var(--ocean);
  gap: 9px;
  text-decoration: none;
}
.actu-card-link svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .actu-card-thumb {
    width: 100px;
    min-height: 90px;
  }
}
