/* ============================================================
   CGcreation — Feuille de style partagée
   Palette : crème / bleu ardoise / doré / vert menthe / brun
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --cream: #FAF8F5;
  --cream-deep: #F3EEE5;
  --slate: #5B7F99;
  --slate-dark: #456279;
  --slate-light: #EBF1F6;
  --gold: #C9A96E;
  --gold-dark: #B08F52;
  --mint: #8FBF9F;
  --brown: #8B6348;
  --dark: #2D2D2D;
  --beige: #E8E0D5;
  --grey: #E4E0D8;
  --grey-text: #8A8378;
  --error: #B5533C;
  --white: #FFFFFF;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: var(--cream);
  color: var(--dark);
}
h1, h2, h3, .display {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  color: var(--dark);
}
a { color: var(--slate); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--cream-deep); }
::-webkit-scrollbar-thumb { background: var(--grey); border-radius: 3px; }

/* ── Layout ─────────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.topbar {
  background: #fff; border-bottom: 1px solid var(--grey);
  padding: 14px 20px; display: flex; align-items: center; gap: 16px;
  position: sticky; top: 0; z-index: 50;
}
.topbar .logo { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 600; color: var(--slate); }
.topbar .logo span { color: var(--gold); }
.topbar .tagline { font-size: 9px; color: var(--grey-text); letter-spacing: 2px; text-transform: uppercase; display: block; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-link { padding: 8px 14px; font-size: 13px; color: var(--dark); text-decoration: none; border-radius: 8px; font-weight: 500; }
.nav-link:hover { background: var(--cream-deep); text-decoration: none; }

/* ── Boutons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 20px; border-radius: 10px; border: none; cursor: pointer;
  font-size: 13.5px; font-weight: 600; font-family: inherit; transition: all .15s ease;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--slate); color: #fff; }
.btn-primary:hover { background: var(--slate-dark); text-decoration: none; }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-dark); text-decoration: none; }
.btn-ghost { background: var(--cream-deep); color: var(--dark); }
.btn-ghost:hover { background: var(--beige); text-decoration: none; }
.btn-danger { background: #F5E6E2; color: var(--error); }
.btn-danger:hover { background: #f0d8d0; text-decoration: none; }
.btn-sm { padding: 7px 12px; font-size: 12px; border-radius: 8px; }
.btn:disabled { background: var(--grey); color: var(--grey-text); cursor: not-allowed; }
.btn-block { width: 100%; }
.chip {
  padding: 7px 16px; border-radius: 20px; background: #fff; color: var(--dark);
  border: 1px solid var(--grey); font-size: 12.5px; cursor: pointer; text-decoration: none;
  display: inline-block;
}
.chip.active { background: var(--slate); color: #fff; border-color: var(--slate); }

/* ── Cartes produit ─────────────────────────────────────── */
.grid-produits {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px;
  margin-top: 16px;
}
.carte-produit {
  background: #fff; border: 1px solid var(--grey); border-radius: 14px; overflow: hidden;
  transition: box-shadow .18s ease, transform .18s ease; text-decoration: none; color: inherit; display: block;
}
.carte-produit:hover { box-shadow: 0 8px 24px rgba(45,45,45,0.08); transform: translateY(-2px); text-decoration: none; }
.carte-produit .visuel {
  height: 130px; background: linear-gradient(135deg, var(--slate-light), var(--beige));
  display: flex; align-items: center; justify-content: center; position: relative;
}
.carte-produit .visuel .initiale { font-family: 'Cormorant Garamond', serif; font-size: 30px; color: var(--slate); opacity: .4; }
.carte-produit .contenu { padding: 12px 14px 14px; }
.carte-produit .nom { font-size: 13.5px; font-weight: 600; margin-bottom: 3px; }
.carte-produit .desc { font-size: 11px; color: var(--grey-text); margin-bottom: 8px; line-height: 1.4; min-height: 28px; }
.carte-produit .footer-carte { display: flex; justify-content: space-between; align-items: center; }
.carte-produit .prix { font-size: 14px; font-weight: 700; color: var(--gold); }
.badge {
  position: absolute; top: 8px; left: 8px; color: #fff; font-size: 9.5px; font-weight: 700;
  padding: 3px 9px; border-radius: 12px; letter-spacing: .3px;
}
.badge-error { background: var(--error); }
.badge-gold { background: var(--gold); }

/* ── Formulaires ────────────────────────────────────────── */
.champ { display: block; margin-bottom: 14px; }
.champ label { font-size: 11.5px; color: var(--grey-text); display: block; margin-bottom: 5px; }
.champ input, .champ select, .champ textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--grey); border-radius: 8px;
  font-size: 13px; color: var(--dark); font-family: inherit; background: #fff;
}
.champ input:focus, .champ select:focus, .champ textarea:focus { outline: 2px solid var(--slate-light); border-color: var(--slate); }
.champ .erreur-txt { font-size: 10.5px; color: var(--error); }
.champ.erreur input, .champ.erreur textarea { border-color: var(--error); }

/* ── Alertes ────────────────────────────────────────────── */
.alerte { border-radius: 12px; padding: 12px 16px; font-size: 12.5px; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.alerte-gold { background: #FBF1E8; border: 1px solid var(--gold); color: var(--brown); }
.alerte-erreur { background: #FBEAE5; color: var(--error); }
.alerte-succes { background: var(--slate-light); color: var(--slate-dark); }

/* ── Tableaux admin ─────────────────────────────────────── */
.table-admin { width: 100%; background: #fff; border: 1px solid var(--grey); border-radius: 12px; overflow: hidden; border-collapse: collapse; }
.table-admin th {
  background: var(--cream-deep); font-size: 11px; font-weight: 600; color: var(--grey-text);
  text-transform: uppercase; letter-spacing: .5px; text-align: left; padding: 10px 16px;
}
.table-admin td { padding: 10px 16px; border-top: 1px solid var(--grey); font-size: 12.5px; }
.table-admin tr.stock-bas td { background: #FBF1E8; }
.table-admin input[type=number] { width: 70px; padding: 5px 8px; border: 1px solid var(--grey); border-radius: 6px; font-size: 12.5px; }

/* ── Tabs admin ─────────────────────────────────────────── */
.admin-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--grey); margin-bottom: 22px; flex-wrap: wrap; }
.admin-tabs a {
  display: flex; align-items: center; gap: 6px; padding: 9px 16px; font-size: 12.5px;
  color: var(--grey-text); border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none;
}
.admin-tabs a.active { color: var(--slate); border-bottom-color: var(--slate); font-weight: 600; }

/* ── Panier drawer ──────────────────────────────────────── */
.overlay { position: fixed; inset: 0; background: rgba(45,45,45,.45); z-index: 200; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: 100%; max-width: 420px;
  background: #fff; z-index: 201; display: flex; flex-direction: column;
  box-shadow: -8px 0 30px rgba(0,0,0,.15);
}
.drawer-header { padding: 18px 20px; border-bottom: 1px solid var(--grey); display: flex; justify-content: space-between; align-items: center; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px; }
.drawer-footer { padding: 20px; border-top: 1px solid var(--grey); }
.bouton-fermer {
  background: var(--cream-deep); border: none; border-radius: 50%; width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 14px; color: var(--dark);
}
.cart-float {
  position: fixed; bottom: 22px; right: 22px; background: var(--slate); color: #fff;
  border-radius: 30px; padding: 13px 22px; display: flex; align-items: center; gap: 8px;
  box-shadow: 0 8px 24px rgba(91,127,153,.35); font-size: 14px; z-index: 60; text-decoration: none; font-weight: 600;
}

/* ── Modal fiche produit ────────────────────────────────── */
.modal-produit {
  position: fixed; inset: 0; background: rgba(45,45,45,.45); z-index: 300;
  display: flex; align-items: flex-end; justify-content: center;
}
.modal-produit .contenu-modal {
  background: #fff; border-radius: 20px 20px 0 0; width: 100%; max-width: 480px;
  max-height: 88vh; overflow-y: auto; padding: 22px;
}
@media (min-width: 560px) {
  .modal-produit { align-items: center; }
  .modal-produit .contenu-modal { border-radius: 20px; }
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .grid-produits { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

.section-title { text-align: center; padding: 36px 20px 8px; }
.section-title h1 { font-size: 34px; margin: 0 0 6px; }
.section-title p { font-size: 13px; color: var(--grey-text); margin: 0; }

.hidden { display: none !important; }

/* ── Contenu riche (texte des blocs CMS générés par l'éditeur) ── */
.contenu-riche p { margin: 0 0 14px; }
.contenu-riche p:last-child { margin-bottom: 0; }
.contenu-riche ul, .contenu-riche ol { margin: 0 0 14px; padding-left: 20px; }
.contenu-riche li { margin-bottom: 6px; }
.contenu-riche strong { color: var(--dark); }
.contenu-riche a { color: var(--slate); text-decoration: underline; }
.contenu-riche img { max-width: 45%; height: auto; border-radius: 8px; }
.contenu-riche img.img-align-gauche { float: left; margin: 4px 16px 8px 0; }
.contenu-riche img.img-align-droite { float: right; margin: 4px 0 8px 16px; }
.contenu-riche img.img-align-centre { display: block; float: none; margin: 12px auto; max-width: 80%; }
.contenu-riche::after { content: ""; display: table; clear: both; }
.hero-titre-public { font-size: 40px; line-height: 1.15; color: var(--dark); margin-bottom: 16px; }
.hero-titre-public p { margin: 0 0 8px; }
.hero-titre-public p:last-child { margin-bottom: 0; }

/* ── Compte client ──────────────────────────────────────── */
.compte-nav { display: flex; gap: 6px; border-bottom: 1px solid var(--grey); margin-bottom: 20px; flex-wrap: wrap; }
.compte-nav a { padding: 9px 16px; font-size: 12.5px; color: var(--grey-text); border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; }
.compte-nav a.active { color: var(--slate); border-bottom-color: var(--slate); font-weight: 600; }
.carte-liste-envie { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--grey); border-radius: 12px; padding: 12px 16px; }
.bouton-coeur { background: none; border: none; cursor: pointer; font-size: 18px; line-height: 1; padding: 4px; }

/* ── Liste de naissance ─────────────────────────────────── */
.liste-naissance-hero { text-align: center; padding: 40px 20px 24px; background: linear-gradient(135deg, var(--slate-light), var(--beige)); border-radius: 0 0 24px 24px; }
.liste-naissance-hero h1 { font-size: 30px; margin: 0 0 8px; }
.liste-naissance-hero p { font-size: 13px; color: var(--slate-dark); max-width: 480px; margin: 0 auto; }
.carte-article-naissance {
  background: #fff; border: 1px solid var(--grey); border-radius: 14px; padding: 18px;
  display: flex; flex-direction: column; gap: 10px;
}
.carte-article-naissance.offert { opacity: .6; }
.barre-cagnotte { height: 8px; background: var(--cream-deep); border-radius: 4px; overflow: hidden; }
.barre-cagnotte-fill { height: 100%; background: var(--mint); border-radius: 4px; transition: width .3s ease; }
.tag-offert { display: inline-block; background: var(--mint); color: #fff; font-size: 10.5px; font-weight: 700; padding: 3px 10px; border-radius: 12px; }
.tag-mode { display: inline-block; font-size: 9.5px; font-weight: 700; padding: 2px 9px; border-radius: 10px; text-transform: uppercase; letter-spacing: .3px; }
.tag-mode.achat { background: var(--slate-light); color: var(--slate); }
.tag-mode.cagnotte { background: #FBF1E8; color: var(--brown); }

