/*
Theme Name: SEASIDE
Theme URI: https://www.seaside-imports.com
Author: SEASIDE
Description: Thème WordPress sur-mesure pour SEASIDE, site vitrine bilingue (FR/EN) de présentation de produits alimentaires (poissons, viandes, autres denrées). Arrière-plan animé (vagues + bulles), adaptation automatique au mode clair/sombre, back-office simplifié pour la gestion des pages, photos et vidéos.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: seaside
*/

/* ==========================================================================
   1. Variables de charte graphique (voir Cahier des charges, section 3.2)
   ========================================================================== */
:root {
  --c-navy: #0E3B4D;       /* Bleu abysse - couleur principale */
  --c-navy-dark: #07181F;  /* Bleu abysse, variante mode sombre */
  --c-coral: #E2733A;      /* Corail - accent / boutons */
  --c-coral-dark: #C75D2C; /* Corail, variante foncée (texte sur clair) */
  --c-coral-light: #F2A36B;/* Corail, variante claire (texte sur sombre) */
  --c-seafoam: #8FC9B8;    /* Vert d'eau - couleur secondaire */
  --c-ivory: #FBF6EC;      /* Ivoire sable - fond clair */
  --c-charcoal: #20282B;   /* Anthracite - texte principal */

  --bg-page: var(--c-ivory);
  --bg-card: #FFFFFF;
  --bg-hero: var(--c-navy);
  --text-main: var(--c-charcoal);
  --text-muted: #5b5b5b;
  --text-on-hero: var(--c-ivory);
  --text-on-hero-muted: #BFD8CE;
  --accent: var(--c-coral);
  --accent-text: var(--c-coral-dark);
  --border-soft: rgba(14, 59, 77, 0.12);

  --font-heading: 'Poppins', 'Montserrat', Arial, sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --radius-card: 10px;
  --container-width: 1180px;
}

/* Mode sombre : déclenché automatiquement selon les préférences système,
   ou manuellement via la classe .theme-dark posée sur <html> (bouton bascule). */
@media (prefers-color-scheme: dark) {
  :root:not(.theme-light) {
    --bg-page: #15262B;
    --bg-card: #1E3338;
    --bg-hero: var(--c-navy-dark);
    --text-main: var(--c-ivory);
    --text-muted: #B9C4C2;
    --accent-text: var(--c-coral-light);
    --border-soft: rgba(251, 246, 236, 0.12);
  }
}
html.theme-dark {
  --bg-page: #15262B;
  --bg-card: #1E3338;
  --bg-hero: var(--c-navy-dark);
  --text-main: var(--c-ivory);
  --text-muted: #B9C4C2;
  --accent-text: var(--c-coral-light);
  --border-soft: rgba(251, 246, 236, 0.12);
}

/* ==========================================================================
   2. Réinitialisation et base
   ========================================================================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  transition: background .35s ease, color .35s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  margin: 0 0 .6em;
  color: var(--text-main);
}
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}
:focus-visible {
  outline: 3px solid var(--c-coral);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ==========================================================================
   3. En-tête
   ========================================================================== */
.site-header {
  background: var(--bg-hero);
  padding: 18px 0;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.site-branding { display: flex; align-items: center; gap: 10px; }
.site-branding img { height: 30px; width: auto; }
.site-branding .site-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 1.4px;
  color: var(--text-on-hero);
  margin: 0;
}
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 22px;
  margin: 0;
  padding: 0;
}
.main-nav a {
  font-size: 13px;
  color: var(--text-on-hero-muted);
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
  color: var(--text-on-hero);
  border-bottom: 1.5px solid var(--c-coral);
  padding-bottom: 3px;
}
.header-actions { display: flex; align-items: center; gap: 14px; }
.lang-switcher a {
  font-size: 12px;
  color: var(--text-on-hero-muted);
  margin-left: 6px;
}
.lang-switcher a.active-lang { color: var(--text-on-hero); font-weight: 600; }
.theme-toggle {
  width: 32px; height: 32px; border-radius: 50%;
  border: .5px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.06);
  color: var(--text-on-hero);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.menu-toggle {
  display: none;
  background: none; border: none; color: var(--text-on-hero);
  font-size: 22px; cursor: pointer;
}
@media (max-width: 760px) {
  .main-nav { display: none; }
  .main-nav.is-open { display: block; width: 100%; order: 3; }
  .main-nav.is-open ul { flex-direction: column; gap: 14px; padding-top: 16px; }
  .menu-toggle { display: block; }
  .site-header .container { flex-wrap: wrap; }
}

/* ==========================================================================
   4. Hero animé (page d'accueil) — vagues + bulles
   ========================================================================== */
.hero {
  position: relative;
  background: var(--bg-hero);
  overflow: hidden;
  padding: 56px 0 90px;
}
.hero-content { position: relative; z-index: 2; max-width: 480px; }
.hero h1 {
  color: var(--text-on-hero);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.3;
}
.hero p.lead {
  color: var(--text-on-hero-muted);
  font-size: 16px;
  max-width: 420px;
  margin-bottom: 28px;
}
.btn {
  display: inline-block;
  background: var(--c-coral);
  color: var(--c-ivory);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 26px;
  border-radius: 24px;
  border: none;
  cursor: pointer;
}
.btn:hover { background: var(--c-coral-dark); }
.btn-outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,.5);
  color: var(--text-on-hero);
}

.hero-bubbles {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden;
}
.bubble {
  position: absolute;
  bottom: -20px;
  border-radius: 50%;
  background: rgba(251,246,236,0.5);
  animation: bubble-rise linear infinite;
}
@keyframes bubble-rise {
  0%   { transform: translateY(0); opacity: 0; }
  10%  { opacity: .7; }
  90%  { opacity: .35; }
  100% { transform: translateY(-340px); opacity: 0; }
}
.hero-wave {
  position: absolute; left: 0; bottom: -2px; width: 200%; z-index: 1;
  animation: wave-drift linear infinite;
}
@keyframes wave-drift {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.hero-accent-line {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--c-coral); z-index: 2;
}

/* ==========================================================================
   5. Cartes produits / catégories
   ========================================================================== */
.section { padding: 48px 0; }
.section-title { font-size: 24px; margin-bottom: 6px; }
.section-lead { color: var(--text-muted); font-size: 14px; max-width: 560px; margin-bottom: 24px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.product-card {
  background: var(--bg-card);
  border: .5px solid var(--border-soft);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: background .35s, border-color .35s, transform .2s;
}
.product-card:hover { transform: translateY(-3px); }
.product-card img { width: 100%; height: 160px; object-fit: cover; }
.product-card .card-body { padding: 12px 14px; }
.product-card .card-title { font-size: 15px; font-weight: 600; margin: 0; }
.product-card .card-tag { font-size: 12px; font-weight: 600; color: var(--accent-text); margin: 4px 0 0; }

.product-card.is-placeholder {
  background: transparent;
  border: 1.5px dashed var(--border-soft);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; min-height: 180px; color: var(--text-muted);
}

.filter-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.filter-pill {
  font-size: 12px; padding: 7px 16px; border-radius: 16px;
  border: .5px solid var(--border-soft); background: var(--bg-card); color: var(--text-main);
  cursor: pointer;
}
.filter-pill.active { background: var(--c-navy); color: var(--c-ivory); border-color: var(--c-navy); }
.filter-pill.is-disabled { color: var(--text-muted); border-style: dashed; cursor: default; }

/* ==========================================================================
   6. Valeurs / À propos
   ========================================================================== */
.value-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px;
}
.value-card {
  background: var(--bg-card); border: .5px solid var(--border-soft); border-radius: var(--radius-card);
  padding: 18px 14px; text-align: center;
}
.value-card .icon { font-size: 26px; color: var(--c-navy); }
html.theme-dark .value-card .icon, .theme-toggle .icon { color: inherit; }

/* ==========================================================================
   7. Formulaire de contact
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-form-wrap, .contact-info-card {
  background: var(--bg-card); border: .5px solid var(--border-soft); border-radius: var(--radius-card); padding: 22px;
}
.contact-info-card.is-pending { background: transparent; border-style: dashed; color: var(--text-muted); }
.wpcf7-form p { margin-bottom: 14px; }
.wpcf7-form label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.wpcf7-form input[type=text], .wpcf7-form input[type=email], .wpcf7-form input[type=tel], .wpcf7-form textarea {
  width: 100%; padding: 9px 12px; border-radius: 6px; border: .5px solid var(--border-soft);
  background: var(--bg-page); color: var(--text-main); font-size: 14px;
}
.wpcf7-form input[type=submit] {
  background: var(--c-coral); color: var(--c-ivory); border: none; border-radius: 20px;
  padding: 10px 24px; font-weight: 600; cursor: pointer;
}

/* ==========================================================================
   8. Pied de page
   ========================================================================== */
.site-footer {
  background: var(--bg-hero);
  color: var(--text-on-hero-muted);
  padding: 36px 0 24px;
  font-size: 13px;
  margin-top: 40px;
}
.site-footer a { color: var(--text-on-hero); }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.social-links { display: flex; gap: 12px; margin-top: 8px; }
