/* =========================================================
   DRAPEAU ORIFLAMME — Thème moderne (surcouche Bootstrap 5)
   Toutes les classes custom préfixées "flag-"
   ========================================================= */

:root {
  /* Palette — bleu marine / cyan vent / sable */
  --flag-ink:        #0b1f3a;
  --flag-ink-soft:   #4a5b73;
  --flag-bg:         #ffffff;
  --flag-bg-soft:    #f4f7fb;
  --flag-bg-deep:    #061224;
  --flag-border:     #dde5ef;

  --flag-primary:    #0066cc;      /* bleu drapeau */
  --flag-primary-dk: #004a99;
  --flag-accent:     #e63946;      /* rouge oriflamme (CTA) */
  --flag-accent-dk:  #b81d2b;
  --flag-wind:       #00b4d8;      /* cyan vent */
  --flag-sand:       #ffd166;      /* jaune chaud */

  --flag-radius-sm:  10px;
  --flag-radius:     18px;
  --flag-radius-lg:  28px;

  --flag-shadow-sm:  0 1px 2px rgba(11,31,58,.05), 0 1px 3px rgba(11,31,58,.07);
  --flag-shadow:     0 4px 10px rgba(11,31,58,.05), 0 12px 28px rgba(11,31,58,.10);
  --flag-shadow-lg:  0 8px 20px rgba(11,31,58,.07), 0 24px 48px rgba(11,31,58,.16);
}

/* ---------- Reset typo ---------- */
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--flag-ink);
  background: var(--flag-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6, .flag-display {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  letter-spacing: -.02em;
  font-weight: 700;
  color: var(--flag-ink);
}
h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); line-height: 1.06; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.12; }

a { color: var(--flag-primary); text-decoration: none; }
a:hover { color: var(--flag-primary-dk); }

/* ---------- Navbar ---------- */
.flag-navbar {
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--flag-border);
  padding: .6rem 0;
}
.flag-navbar .nav-link {
  color: var(--flag-ink) !important;
  font-weight: 500;
  padding-inline: 1rem;
  border-radius: 8px;
}
.flag-navbar .nav-link:hover {
  color: var(--flag-primary) !important;
  background: var(--flag-bg-soft);
}
.flag-logo { height: 44px; width: auto; }
.flag-brand-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: -.02em;
  font-size: 1.25rem;
  color: var(--flag-ink);
}

/* ---------- Hero (bleu marin immersif) ---------- */
.flag-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(900px 500px at 110% -10%, rgba(0,180,216,.28), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, rgba(255,209,102,.18), transparent 55%),
    linear-gradient(135deg, #004a99 0%, #062b67 55%, #051c4a 100%);
  padding: 3rem 0 3.5rem;
}
@media (min-width: 992px) {
  .flag-hero { padding: 4rem 0 4.5rem; }
}

/* Beachflag silhouette en SVG flotté en fond */
.flag-hero::after {
  content: "";
  position: absolute;
  inset: -30px;
  pointer-events: none;
  z-index: 0;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 400' preserveAspectRatio='none'><path d='M-100,290 C220,140 520,420 820,200 S1100,100 1320,160' stroke='white' stroke-opacity='0.18' stroke-width='100' fill='none' stroke-linecap='round'/></svg>") center/110% 110% no-repeat,
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 400' preserveAspectRatio='none'><path d='M-80,350 C260,220 540,380 880,280 S1100,220 1300,260' stroke='white' stroke-opacity='0.12' stroke-width='50' fill='none' stroke-linecap='round'/></svg>") center/110% 110% no-repeat;
  filter: blur(12px) saturate(110%);
  -webkit-mask-image: linear-gradient(to right, black 0%, black 70%, transparent 88%);
          mask-image: linear-gradient(to right, black 0%, black 70%, transparent 88%);
}
.flag-hero > .container { position: relative; z-index: 1; }
.flag-hero h1 { color: #fff; }
.flag-hero a:not(.btn) { color: #fff; text-decoration: underline; }

.flag-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: #fff;
  border: 1px solid var(--flag-border);
  color: var(--flag-ink-soft);
  font-size: .82rem;
  font-weight: 600;
  padding: .4rem .9rem;
  border-radius: 999px;
  box-shadow: var(--flag-shadow-sm);
}
.flag-eyebrow::before {
  content: ""; width: 8px; height: 8px;
  background: var(--flag-accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(230,57,70,.20);
}
.flag-hero .flag-eyebrow {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.25);
  color: #fff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: none;
}
.flag-hero-lead {
  color: rgba(255,255,255,.88);
  font-size: 1.15rem;
  max-width: 560px;
}
.flag-hero .text-muted { color: rgba(255,255,255,.7) !important; }

/* Visuel hero : drapeau qui ondule */
.flag-hero-visual {
  position: relative;
  max-width: 360px;
  margin: 0 auto;
  filter: drop-shadow(0 18px 30px rgba(0,0,0,.35));
  animation: flag-wave 6s ease-in-out infinite;
}
@keyframes flag-wave {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50%      { transform: translateY(-8px) rotate(1deg); }
}
@media (prefers-reduced-motion: reduce) {
  .flag-hero-visual { animation: none; }
}

/* ---------- Boutons ---------- */
.btn-flag,
.btn-flag-ghost,
.btn-flag-outline {
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: -.01em;
  padding: .75rem 1.4rem;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-flag {
  background: var(--flag-accent);
  border: 1px solid var(--flag-accent);
  color: #fff;
  box-shadow: 0 6px 16px rgba(230,57,70,.30);
}
.btn-flag:hover {
  background: var(--flag-accent-dk);
  border-color: var(--flag-accent-dk);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(230,57,70,.36);
}
.btn-flag-ghost {
  background: #fff;
  border: 1px solid var(--flag-border);
  color: var(--flag-ink);
}
.btn-flag-ghost:hover {
  border-color: var(--flag-ink);
  color: var(--flag-ink);
  transform: translateY(-1px);
}
.btn-flag-outline {
  background: transparent;
  border: 1px solid var(--flag-ink);
  color: var(--flag-ink);
}
.btn-flag-outline:hover {
  background: var(--flag-ink);
  color: #fff;
}
.flag-hero .btn-flag-ghost {
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.35);
  color: #fff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.flag-hero .btn-flag-ghost:hover {
  background: #fff;
  color: var(--flag-primary-dk);
  border-color: #fff;
}

/* ---------- Trust strip ---------- */
.flag-trust {
  border-top: 1px solid var(--flag-border);
  border-bottom: 1px solid var(--flag-border);
  background: #fff;
}
.flag-trust-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1.2rem 0;
  color: var(--flag-ink-soft);
  font-weight: 500;
  font-size: .95rem;
}
.flag-trust-item .icon {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--flag-bg-soft);
  border-radius: 10px;
  color: var(--flag-primary);
  font-size: 1.1rem;
}

/* ---------- Cartes produit ---------- */
.flag-section { padding: 5rem 0; }
.flag-section-title { margin-bottom: 3rem; }

.flag-product-card {
  position: relative;
  display: block;
  background: #fff;
  border: 1px solid var(--flag-border);
  border-radius: var(--flag-radius);
  padding: 1.5rem;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}
.flag-product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--flag-shadow-lg);
  border-color: transparent;
  color: inherit;
}
.flag-product-card .thumb {
  background: linear-gradient(180deg, #eef4fb 0%, #dde7f4 100%);
  border-radius: var(--flag-radius-sm);
  padding: 1.5rem;
  margin-bottom: 1rem;
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 4 / 5;
}
.flag-product-card .thumb img,
.flag-product-card .thumb svg { max-height: 100%; max-width: 100%; }
.flag-product-card .meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .25rem;
  color: var(--flag-ink-soft);
  font-size: .82rem;
  font-weight: 500;
}
.flag-product-card .meta::before {
  content: ""; width: 6px; height: 6px;
  background: var(--flag-primary);
  border-radius: 50%;
}
.flag-product-card .name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: .25rem;
}
.flag-product-card .price {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--flag-ink);
}
.flag-product-card .price small {
  font-weight: 500;
  font-size: .8rem;
  color: var(--flag-ink-soft);
}

/* Ruban */
.flag-ribbon {
  position: absolute;
  top: 14px;
  right: -34px;
  transform: rotate(35deg);
  background: var(--flag-accent);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .35rem 2.6rem;
  box-shadow: 0 4px 10px rgba(230,57,70,.35);
  z-index: 2;
  pointer-events: none;
}

/* ---------- Features ---------- */
.flag-feature {
  background: #fff;
  border: 1px solid var(--flag-border);
  border-radius: var(--flag-radius);
  padding: 2rem;
  height: 100%;
  transition: transform .2s, box-shadow .2s;
}
.flag-feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--flag-shadow);
}
.flag-feature .num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--flag-primary);
  text-transform: uppercase;
}
.flag-feature h3 { font-size: 1.3rem; margin-top: .5rem; }
.flag-feature p { color: var(--flag-ink-soft); margin-bottom: 0; }
.flag-feature .icon-box {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--flag-primary) 0%, var(--flag-wind) 100%);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

/* ---------- Page band ---------- */
.flag-pageband {
  background:
    radial-gradient(900px 200px at 110% -50%, rgba(0,180,216,.25), transparent 60%),
    linear-gradient(135deg, #004a99 0%, #062b67 55%, #051c4a 100%);
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 1.5rem 0;
  color: #fff;
}
.flag-pageband h1,
.flag-pageband h2,
.flag-pageband h3 { color: #fff; margin-bottom: 0; }
.flag-pageband .breadcrumb { margin: 0; }
.flag-pageband .breadcrumb a { color: rgba(255,255,255,.7); text-decoration: none; }
.flag-pageband .breadcrumb a:hover { color: #fff; }
.flag-pageband .breadcrumb .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.35); }
.flag-pageband .breadcrumb .active { color: #fff; font-weight: 500; }

/* ---------- Configurator ---------- */
.flag-configurator {
  background: #fff;
  border: 1px solid var(--flag-border);
  border-radius: var(--flag-radius);
  padding: 1.75rem;
  box-shadow: var(--flag-shadow-sm);
}
.flag-configurator .form-label { color: var(--flag-ink); font-weight: 600; font-size: .92rem; margin-bottom: .35rem; text-transform: uppercase; letter-spacing: .04em; }
.flag-option-grid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.flag-option {
  position: relative;
  display: block;
  padding: .9rem 1rem;
  border: 1.5px solid var(--flag-border);
  border-radius: var(--flag-radius-sm);
  cursor: pointer;
  text-align: center;
  transition: all .15s ease;
  background: #fff;
}
.flag-option:hover { border-color: var(--flag-primary); transform: translateY(-1px); }
.flag-option input { position: absolute; opacity: 0; pointer-events: none; }
.flag-option .opt-title { font-weight: 700; font-size: 1rem; color: var(--flag-ink); display: block; }
.flag-option .opt-sub { font-size: .78rem; color: var(--flag-ink-soft); display: block; margin-top: .15rem; }
.flag-option .opt-price { font-size: .85rem; color: var(--flag-primary); font-weight: 600; display: block; margin-top: .35rem; }
.flag-option input:checked + .opt-body,
.flag-option:has(input:checked) {
  border-color: var(--flag-primary);
  background: rgba(0,102,204,.06);
  box-shadow: 0 0 0 3px rgba(0,102,204,.12);
}

/* Visuel produit côté gauche */
.flag-product-visual {
  background: linear-gradient(180deg, #eef4fb 0%, #dde7f4 100%);
  border-radius: var(--flag-radius);
  padding: 2rem;
  display: flex; align-items: center; justify-content: center;
  min-height: 420px;
  position: sticky;
  top: 90px;
}
.flag-product-visual img,
.flag-product-visual svg { max-width: 100%; max-height: 480px; }

/* ---------- Upload / Visual brief ---------- */
.flag-brief {
  background: var(--flag-bg-soft);
  border: 1px dashed var(--flag-border);
  border-radius: var(--flag-radius);
  padding: 1.5rem;
}
.flag-brief-option {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1rem;
  border-radius: var(--flag-radius-sm);
  background: #fff;
  border: 1px solid var(--flag-border);
}
.flag-brief-option + .flag-brief-option { margin-top: .75rem; }
.flag-brief-option .icon {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--flag-primary) 0%, var(--flag-wind) 100%);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}

/* ---------- Tableau panier ---------- */
.flag-cart-table th {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--flag-ink-soft);
  font-weight: 600;
  border-bottom: 1px solid var(--flag-border);
}
.flag-cart-table td { border-bottom: 1px solid var(--flag-border); vertical-align: middle; }

.flag-summary {
  background: var(--flag-bg-soft);
  border: 1px solid var(--flag-border);
  border-radius: var(--flag-radius);
  padding: 1.5rem;
}

/* ---------- Cart badge dans nav ---------- */
.flag-cart-badge {
  background: var(--flag-accent);
  color: #fff;
  border-radius: 999px;
  font-size: .7rem;
  padding: .12rem .42rem;
  font-weight: 700;
  position: relative;
  top: -8px;
  left: -2px;
}

/* ---------- Footer ---------- */
.flag-footer {
  background: var(--flag-bg-deep);
  color: #c3cdda;
  padding: 4rem 0 2rem;
}
.flag-footer h5 { color: #fff; font-size: 1rem; margin-bottom: 1rem; font-family: 'Space Grotesk', sans-serif; }
.flag-footer a  { color: #c3cdda; }
.flag-footer a:hover { color: #fff; }
.flag-footer hr { border-color: rgba(255,255,255,.08); }

/* ---------- Comparatif tableau ---------- */
.flag-compare {
  border: 1px solid var(--flag-border);
  border-radius: var(--flag-radius);
  overflow: hidden;
  background: #fff;
}
.flag-compare table { margin: 0; }
.flag-compare th,
.flag-compare td { padding: .9rem 1rem; }
.flag-compare thead th {
  background: var(--flag-bg-soft);
  font-family: 'Space Grotesk', sans-serif;
  color: var(--flag-ink);
  border-bottom: 1px solid var(--flag-border);
}

/* ---------- Tag ---------- */
.flag-tag {
  background: var(--flag-sand);
  color: var(--flag-ink);
  padding: .25rem .65rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .78rem;
  display: inline-block;
}
.flag-tag-primary { background: rgba(0,102,204,.12); color: var(--flag-primary-dk); }
.flag-tag-accent  { background: rgba(230,57,70,.12); color: var(--flag-accent-dk); }

/* ---------- Accordion FAQ override ---------- */
.flag-faq .accordion-button {
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--flag-ink);
}
.flag-faq .accordion-button:not(.collapsed) {
  background: var(--flag-bg-soft);
  color: var(--flag-primary-dk);
  box-shadow: none;
}
.flag-faq .accordion-button:focus { box-shadow: none; }

/* ---------- Use case cards ---------- */
.flag-usecase {
  position: relative;
  border-radius: var(--flag-radius);
  overflow: hidden;
  min-height: 220px;
  color: #fff;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--flag-primary) 0%, var(--flag-primary-dk) 100%);
  transition: transform .2s, box-shadow .2s;
}
.flag-usecase:hover { transform: translateY(-4px); box-shadow: var(--flag-shadow-lg); color: #fff; text-decoration: none; }
.flag-usecase h3 { color: #fff; font-size: 1.35rem; margin-bottom: .35rem; }
.flag-usecase p  { color: rgba(255,255,255,.85); margin: 0; font-size: .92rem; }
.flag-usecase.alt-1 { background: linear-gradient(135deg, var(--flag-accent) 0%, var(--flag-accent-dk) 100%); }
.flag-usecase.alt-2 { background: linear-gradient(135deg, var(--flag-wind) 0%, var(--flag-primary) 100%); }
.flag-usecase.alt-3 { background: linear-gradient(135deg, #6a3093 0%, #a044ff 100%); }

/* ---------- Schéma silhouette beachflag ---------- */
.flag-silhouette {
  display: inline-block;
  width: 100%;
  max-width: 280px;
}
.flag-silhouette path,
.flag-silhouette rect,
.flag-silhouette circle { transition: all .3s; }

/* ---------- Animations légères ---------- */
@keyframes flag-pop {
  0%   { transform: scale(.96); opacity: 0; }
  100% { transform: scale(1);    opacity: 1; }
}
.flag-pop { animation: flag-pop .25s ease-out; }

/* ---------- Drapeaux SVG inline ---------- */
.flag-icon {
  display: inline-block;
  width: 1.1em;
  height: .8em;
  vertical-align: -.05em;
  margin: 0 .15em;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.18);
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
.flag-icon-fr {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 3 2'><rect width='1' height='2' fill='%23002395'/><rect x='1' width='1' height='2' fill='%23FFFFFF'/><rect x='2' width='1' height='2' fill='%23ED2939'/></svg>");
}
