/* md-composants.css — MonDiamant, refonte des catégories, sous-étape 3b-1 (19/11/2026).
   Coloris « Champagne » et composants unifiés, d'après la maquette figée par Élie
   (revue/refonte-35/maquette-validee.md, § 5 et § 6).
   - Jetons sur :root, préfixe --md- : aucun effet tant qu'une classe md- ne les emploie pas.
   - Composants : classes préfixées md-. Rien ici ne vise une classe existante de PrestaShop, de Hummingbird ou de
     Creative Elements. La feuille est donc sans effet sur les pages actuelles ; les sous-étapes suivantes poseront
     ces classes dans les gabarits de la refonte.
   Unifications (maquette § 6), choix de l'exécutant à valider par Élie au contrôle visuel :
   - arrondis : 12 px pour cartes et photos, 10 px pour boutons et étiquettes, rond pour pastilles. La maquette en
     employait 8 (6, 10, 12, 14, 18, 20, 22 px, rond) ;
   - texte : 12 · 14 · 16 · 20 · 28 · 40. Les 9,5 à 10,5 px de la maquette passent à 12, les 13 à 13,5 à 14, les 15 à 16 ;
   - trois boutons : principal (marine plein), secondaire (contour marine), lien souligné. Sur fond marine (bloc
     showroom), le principal prend le fond « doux », comme dans la maquette.
   Contrastes calculés : revue/refonte-35/composants/contrastes.txt (tout texte >= 4,5:1 sur son fond). */

:root {
  /* coloris Champagne (maquette § 5) */
  --md-texte: #1f296d;        /* textes, liens, boutons principaux (marque) */
  --md-texte-fonce: #121a4d;  /* survol des liens et boutons */
  --md-surface: #f5efe6;      /* bandeau de confiance, fonds de formes */
  --md-surface2: #f1e9dc;     /* bloc sur mesure */
  --md-carte: #f6f2ec;        /* fond des photos produit */
  --md-ligne: #e9dfd0;        /* filets, séparateurs */
  --md-ligne2: #d9cbb5;       /* bordures d'étiquettes et de filtres */
  --md-accent: #b89968;       /* bordure du badge, filets décoratifs (jamais un texte) */
  --md-accent-texte: #76592f; /* textes dorés */
  --md-doux: #ecdcc4;         /* bouton du showroom */
  --md-doux-fond: #f8f2e8;    /* carte cadeau (mobile) */
  --md-doux-bord: #d9c29e;
  --md-texte2: #625b4b;       /* prix « à partir de », mentions, compteurs */
  --md-blanc: #ffffff;
  /* métaux (pastilles, maquette) */
  --md-or-blanc: #e4e4e2;
  --md-or-jaune: #e3c77a;
  --md-or-rose: #e8b9a6;
  --md-platine: #c9cdd1;
  /* texte */
  --md-police: Lato, "Helvetica Neue", Arial, sans-serif;
  --md-police-manuscrite: "La Belle Aurore", cursive;
  --md-t12: 12px; --md-t14: 14px; --md-t16: 16px; --md-t20: 20px; --md-t28: 28px; --md-t40: 40px;
  /* arrondis (deux valeurs + rond) */
  --md-r-carte: 12px;
  --md-r-controle: 10px;
  /* contour clavier : double anneau, visible sur fond clair comme sur fond marine */
  --md-focus: 0 0 0 2px var(--md-blanc), 0 0 0 4px var(--md-texte);
}

/* ---------- échelle de texte ---------- */
.md-t12 { font-size: var(--md-t12); line-height: 1.4; }
.md-t14 { font-size: var(--md-t14); line-height: 1.45; }
.md-t16 { font-size: var(--md-t16); line-height: 1.5; }
.md-t20 { font-size: var(--md-t20); line-height: 1.35; }
.md-t28 { font-size: var(--md-t28); line-height: 1.25; font-weight: 300; }
.md-t40 { font-size: var(--md-t40); line-height: 1.15; font-weight: 300; }
.md-manuscrit { font-family: var(--md-police-manuscrite); font-weight: 400; }
.md-texte2 { color: var(--md-texte2); }
.md-dore { color: var(--md-accent-texte); letter-spacing: .12em; text-transform: uppercase; font-weight: 700; }

/* ---------- contour clavier (tous les composants md-) ---------- */
.md-bouton:focus-visible, .md-lien:focus-visible, .md-etiquette:focus-visible, .md-etiquette__retirer:focus-visible,
.md-pastille:focus-visible, .md-favori:focus-visible, .md-carte a:focus-visible {
  outline: none; box-shadow: var(--md-focus); border-radius: var(--md-r-controle);
}
.md-pastille:focus-visible, .md-favori:focus-visible { border-radius: 50%; }

/* ---------- boutons : principal, secondaire, lien souligné ---------- */
.md-bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 12px 24px; border: 1px solid var(--md-texte); border-radius: var(--md-r-controle);
  background: var(--md-texte); color: var(--md-blanc); font-family: var(--md-police); font-size: var(--md-t16);
  font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer; -webkit-appearance: none; appearance: none;
  transition: background-color .15s, border-color .15s, color .15s;
}
.md-bouton:hover { background: var(--md-texte-fonce); border-color: var(--md-texte-fonce); color: var(--md-blanc); text-decoration: none; }
.md-bouton--secondaire { background: var(--md-blanc); color: var(--md-texte); }
.md-bouton--secondaire:hover { background: var(--md-surface); color: var(--md-texte-fonce); }
.md-bouton--large { width: 100%; }
.md-sur-fonce .md-bouton { background: var(--md-doux); border-color: var(--md-doux); color: var(--md-texte); }
.md-sur-fonce .md-bouton:hover { background: var(--md-blanc); border-color: var(--md-blanc); color: var(--md-texte); }
.md-sur-fonce .md-bouton--secondaire { background: transparent; border-color: rgba(255,255,255,.7); color: var(--md-blanc); }
/* chargement (« Voir 32 autres bagues ») : le bouton garde sa taille, aria-busy="true" pendant le chargement */
.md-bouton[aria-busy="true"] { cursor: progress; color: transparent; position: relative; }
.md-bouton[aria-busy="true"]::after {
  content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid var(--md-blanc);
  border-right-color: transparent; border-radius: 50%; animation: md-tourne .7s linear infinite;
}
@keyframes md-tourne { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .md-bouton[aria-busy="true"]::after { animation-duration: 2s; } }

.md-lien {
  color: var(--md-texte); font-weight: 700; text-decoration: underline; text-underline-offset: 3px;
  text-decoration-thickness: 1px; background: none; border: 0; padding: 0; font: inherit; font-weight: 700; cursor: pointer;
}
.md-lien:hover { color: var(--md-texte-fonce); text-decoration-thickness: 2px; }

/* ---------- étiquette : filtres, montures, filtre actif (une seule forme) ---------- */
.md-etiquette {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px;
  border: 1px solid var(--md-ligne2); border-radius: var(--md-r-controle); background: var(--md-blanc);
  color: var(--md-texte); font-family: var(--md-police); font-size: var(--md-t14); line-height: 1.2;
  text-decoration: none; white-space: nowrap; cursor: pointer;
}
.md-etiquette:hover { border-color: var(--md-texte); color: var(--md-texte); text-decoration: none; }
.md-etiquette--active, .md-etiquette[aria-pressed="true"], .md-etiquette[aria-current] {
  background: var(--md-surface); border-color: var(--md-texte); font-weight: 700;
}
.md-etiquette__retirer {
  display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-right: -8px;
  border: 0; border-radius: 50%; background: transparent; color: var(--md-texte); font-size: var(--md-t16); cursor: pointer;
}
.md-etiquette__retirer:hover { background: var(--md-ligne); }
@media (max-width: 767px) { .md-etiquette { min-height: 44px; } }

/* ---------- badge « Alliance offerte » ---------- */
.md-badge {
  display: inline-block; padding: 3px 10px; border: 1px solid var(--md-accent); border-radius: var(--md-r-controle);
  background: var(--md-blanc); color: var(--md-texte); font-size: var(--md-t12); font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; line-height: 1.4;
}

/* ---------- carte produit : photo 1:1 sur fond « carte », 2e photo au survol sans saut ---------- */
.md-carte { position: relative; display: block; color: var(--md-texte); }
.md-carte__photo {
  position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; border-radius: var(--md-r-carte);
  background: var(--md-carte);
}
.md-carte__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; } /* comme la maquette */
.md-carte__photo .md-carte__img2 { opacity: 0; transition: opacity .25s; }
@media (hover: hover) {
  .md-carte:hover .md-carte__img2, .md-carte:focus-within .md-carte__img2 { opacity: 1; }
}
.md-carte__badge { position: absolute; top: 10px; left: 10px; z-index: 1; }
.md-carte__favori { position: absolute; top: 6px; right: 6px; z-index: 1; }
.md-carte__nom { margin: 10px 0 2px; font-size: var(--md-t16); font-weight: 700; line-height: 1.3; }
.md-carte__nom a { color: inherit; text-decoration: none; }
.md-carte__prix { margin: 0; font-size: var(--md-t14); color: var(--md-texte2); }
.md-carte__prix strong { color: var(--md-texte); font-size: var(--md-t16); }
.md-carte__alma { margin: 2px 0 0; font-size: var(--md-t12); color: var(--md-texte2); }

/* ---------- pastilles de métal : vrais liens, zone tactile 28 px, métal affiché entouré de marine ---------- */
.md-pastilles { display: flex; gap: 2px; margin: 6px 0 0; padding: 0; list-style: none; }
.md-pastille {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%; text-decoration: none;
}
.md-pastille::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--md-pastille, var(--md-or-blanc));
  box-shadow: inset 0 0 0 1px rgba(31, 41, 109, .18);
}
.md-pastille[aria-current="true"]::after, .md-pastille[aria-current="page"]::after {
  content: ""; position: absolute; width: 22px; height: 22px; border: 1px solid var(--md-texte); border-radius: 50%;
}
.md-pastille--or-blanc { --md-pastille: var(--md-or-blanc); }
.md-pastille--or-jaune { --md-pastille: var(--md-or-jaune); }
.md-pastille--or-rose { --md-pastille: var(--md-or-rose); }
.md-pastille--platine { --md-pastille: var(--md-platine); }

/* ---------- favori : vrai bouton, aria-pressed ---------- */
.md-favori {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .88); color: var(--md-texte); cursor: pointer;
}
.md-favori svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.md-favori[aria-pressed="true"] svg { fill: currentColor; }
.md-favori:hover { background: var(--md-blanc); }

/* ---------- surfaces ---------- */
.md-bloc-surface { background: var(--md-surface); border-radius: var(--md-r-carte); }
.md-bloc-surface2 { background: var(--md-surface2); border-radius: var(--md-r-carte); }
.md-bloc-fonce { background: var(--md-texte); color: var(--md-blanc); border-radius: var(--md-r-carte); }
.md-filet { border: 0; border-top: 1px solid var(--md-ligne); margin: 0; }
