/* ==========================================================================
   Guide des Pierres — feuille de style unique, mobile-first
   Aucune dependance externe. Variables CSS pour la charte.
   ========================================================================== */

:root{
  --color-bg:#ffffff;
  --color-bg-soft:#f7f6f3;
  --color-bg-dark:#14261f;
  --color-text:#191b1d;
  --color-text-muted:#5c6167;
  --color-border:#e7e5e0;
  --color-primary:#4f46e5;
  --color-primary-dark:#3f37c9;
  --color-green:#1f6b52;
  --color-gold:#c98f1c;
  --color-orange:#c8672b;
  --color-teal:#2f8f6f;
  --radius-sm:8px;
  --radius-md:14px;
  --radius-lg:22px;
  --container:1180px;
  --space-1:.4rem;
  --space-2:.8rem;
  --space-3:1.4rem;
  --space-4:2.2rem;
  --space-5:3.6rem;
  --font-sans: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;
  font-family:var(--font-sans);
  color:var(--color-text);
  background:var(--color-bg);
  line-height:1.55;
  font-size:16px;
}
img,svg{max-width:100%;height:auto;display:block}
a{color:var(--color-primary);text-decoration:none}
a:hover{text-decoration:underline}
ul,ol{padding-left:1.2em}
h1,h2,h3,h4{line-height:1.2;margin:0 0 .5em;font-weight:700}
h1{font-size:clamp(1.7rem,5vw,2.4rem)}
h2{font-size:clamp(1.35rem,3.6vw,1.7rem)}
h3{font-size:1.15rem}
p{margin:0 0 1em}
.container{width:100%;max-width:var(--container);margin:0 auto;padding:0 1rem}

/* ---- Skip link ---- */
.skip-link{position:absolute;left:-999px;top:0;background:var(--color-primary);color:#fff;padding:.6em 1em;z-index:200;border-radius:0 0 8px 0}
.skip-link:focus{left:0}

/* ---- Header ---- */
.site-header{border-bottom:1px solid var(--color-border);background:#fff;position:sticky;top:0;z-index:50}
.header-inner{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.7rem 1rem;max-width:var(--container);margin:0 auto}
.brand{display:flex;align-items:center;gap:.55rem;font-weight:800;font-size:1.02rem;color:var(--color-text)}
.brand img{width:34px;height:34px}
.main-nav{display:none}
.main-nav ul{display:flex;gap:1.3rem;list-style:none;margin:0;padding:0}
.main-nav a{color:var(--color-text);font-weight:600;font-size:.95rem}
.nav-toggle{display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;border:1px solid var(--color-border);border-radius:var(--radius-sm);background:#fff}
.nav-check{display:none}
.mobile-menu{display:none;border-top:1px solid var(--color-border);background:#fff}
.nav-check:checked ~ .mobile-menu{display:block}
.mobile-menu ul{list-style:none;margin:0;padding:.6rem 1rem 1rem}
.mobile-menu li{border-bottom:1px solid var(--color-border)}
.mobile-menu a{display:block;padding:.75rem .1rem;font-weight:600;color:var(--color-text)}
.search-form{display:flex;align-items:center;border:1px solid var(--color-border);border-radius:999px;padding:.3rem .3rem .3rem .9rem;flex:1;max-width:420px;margin:0 .6rem}
.search-form input{border:0;outline:0;flex:1;font-size:.92rem;font-family:inherit;background:transparent}
.search-form button{border:0;background:var(--color-primary);color:#fff;width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer}
@media(min-width:900px){
  .main-nav{display:block}
  .nav-toggle,.mobile-menu{display:none !important}
  .search-form{display:flex}
}
@media(max-width:899px){
  .search-form{display:none}
}

/* ---- Breadcrumbs ---- */
.breadcrumbs{font-size:.82rem;color:var(--color-text-muted);padding:.8rem 0}
.breadcrumbs ol{list-style:none;display:flex;flex-wrap:wrap;gap:.3rem;margin:0;padding:0}
.breadcrumbs li:not(:last-child)::after{content:"/";margin-left:.3rem;color:var(--color-border)}
.breadcrumbs a{color:var(--color-text-muted)}

/* ---- Hero ---- */
.hero{background:linear-gradient(135deg,var(--color-bg-dark) 0%,#1f3b30 60%,#2f5445 100%);color:#fff;padding:var(--space-5) 0 var(--space-4)}
.hero-inner{max-width:var(--container);margin:0 auto;padding:0 1rem;display:grid;gap:1.6rem;align-items:center}
.hero h1{color:#fff;margin-bottom:.6rem}
.hero p{color:#d9ded9;max-width:56ch}
.hero-art{justify-self:center}
.btn{display:inline-block;background:var(--color-primary);color:#fff;font-weight:700;padding:.85em 1.5em;border-radius:999px;border:0;cursor:pointer;font-size:.95rem}
.btn:hover{background:var(--color-primary-dark);text-decoration:none}
.btn-outline{background:transparent;border:1.5px solid #fff;color:#fff}
@media(min-width:820px){
  .hero-inner{grid-template-columns:1.2fr .8fr}
}

/* ---- Cards / grids ---- */
.grid{display:grid;gap:1.1rem;grid-template-columns:1fr}
@media(min-width:620px){.grid-2{grid-template-columns:repeat(2,1fr)}}
@media(min-width:900px){.grid-3{grid-template-columns:repeat(3,1fr)} .grid-4{grid-template-columns:repeat(4,1fr)}}

.card{border:1px solid var(--color-border);border-radius:var(--radius-md);overflow:hidden;background:#fff;display:flex;flex-direction:column}
.card-art{aspect-ratio:16/10;width:100%}
.card-body{padding:1rem 1.1rem 1.2rem;display:flex;flex-direction:column;gap:.5rem;flex:1}
.tag{display:inline-block;font-size:.72rem;font-weight:700;background:var(--color-bg-soft);color:var(--color-text-muted);padding:.28em .7em;border-radius:999px;width:fit-content}
.card h3{font-size:1.05rem;margin:.1rem 0 0}
.card p{color:var(--color-text-muted);font-size:.92rem;margin-bottom:0}
.card-meta{margin-top:auto;padding-top:.5rem;font-size:.78rem;color:var(--color-text-muted);display:flex;justify-content:space-between}

/* ---- Section ---- */
.section{padding:var(--space-5) 0}
.section-alt{background:var(--color-bg-soft)}
.section-head{display:flex;justify-content:space-between;align-items:end;gap:1rem;margin-bottom:1.3rem}
.section-head p{color:var(--color-text-muted);margin:0}

/* ---- Stone facts table ---- */
.fact-table{width:100%;border-collapse:collapse;margin:1.2rem 0}
.fact-table th,.fact-table td{text-align:left;padding:.6em .8em;border-bottom:1px solid var(--color-border);font-size:.92rem;vertical-align:top}
.fact-table th{width:38%;color:var(--color-text-muted);font-weight:600}

/* ---- Pills / related links ---- */
.pill-list{display:flex;flex-wrap:wrap;gap:.5rem;list-style:none;padding:0;margin:1rem 0}
.pill-list a{display:inline-block;border:1px solid var(--color-border);border-radius:999px;padding:.45em 1em;font-size:.85rem;font-weight:600;color:var(--color-text)}
.pill-list a:hover{border-color:var(--color-primary);color:var(--color-primary);text-decoration:none}

/* ---- Article ---- */
.article-head{padding:var(--space-4) 0 var(--space-3);border-bottom:1px solid var(--color-border)}
.article-meta{display:flex;gap:.9rem;flex-wrap:wrap;color:var(--color-text-muted);font-size:.85rem;margin-top:.6rem}
.article-body{max-width:74ch;padding:var(--space-4) 0}
.article-body h2{margin-top:1.6em}
.article-body h3{margin-top:1.3em}
.callout{background:var(--color-bg-soft);border-left:4px solid var(--color-green);padding:1rem 1.2rem;border-radius:0 var(--radius-sm) var(--radius-sm) 0;margin:1.4em 0}
.faq-item{border-bottom:1px solid var(--color-border);padding:1em 0}
.faq-item h3{margin-bottom:.4em}

/* ---- Stone swatch (SVG illustration, zero image weight) ---- */
.swatch{border-radius:var(--radius-md);display:flex;align-items:center;justify-content:center;aspect-ratio:16/10}
.swatch svg{width:64%;height:64%}

/* ---- Tool cards (home + hub outils) ---- */
.tool-card{transition:border-color .15s, transform .15s}
.tool-card:hover{border-color:var(--color-primary);transform:translateY(-2px)}
.tool-card-icon{width:100%;aspect-ratio:16/7;display:flex;align-items:center;justify-content:center}
.tool-card--big .tool-card-icon{aspect-ratio:16/9}
.tool-card h3{margin-top:0}
.tool-cta{font-weight:700;font-size:.88rem;margin-top:.2rem;display:inline-block}
.tools-banner{background:linear-gradient(135deg,var(--color-bg-dark) 0%,#1f3b30 55%,#2f5445 100%);color:#fff;border-radius:var(--radius-lg);padding:2.2rem 1.4rem}
.tools-banner h2{color:#fff}
.tools-banner p{color:#d9ded9}
.tools-banner .tool-card{background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.18)}
.tools-banner .tool-card h3 a{color:#fff}
.tools-banner .tool-card p{color:#cdd6d0}
.tools-banner .tool-card:hover{border-color:#fff}
.tools-banner .tool-card-icon{background:rgba(255,255,255,.08) !important}

/* ---- Tool box ---- */
.tool-box{border:1px solid var(--color-border);border-radius:var(--radius-lg);padding:1.4rem;background:var(--color-bg-soft)}
.tool-box .btn{margin-top:.6rem}
.tool-result{margin-top:1rem;padding:1rem;border-radius:var(--radius-sm);background:#fff;border:1px solid var(--color-border);min-height:64px}
fieldset{border:1px solid var(--color-border);border-radius:var(--radius-sm);margin:0 0 1rem;padding:.8rem 1rem}
legend{font-weight:700;padding:0 .4em}
label.opt{display:flex;align-items:center;gap:.5em;padding:.35em 0;font-size:.92rem}

/* ---- Ad slots: dimensions reserved to guarantee CLS = 0 ---- */
.ad-slot{width:100%;background:var(--color-bg-soft);border:1px dashed var(--color-border);border-radius:var(--radius-sm);display:flex;align-items:center;justify-content:center;color:var(--color-text-muted);font-size:.78rem;margin:1.6rem 0;overflow:hidden}
.ad-slot--in-article{min-height:250px}
.ad-slot--leaderboard{min-height:100px}
@media(min-width:768px){
  .ad-slot--leaderboard{min-height:90px}
}

/* ---- Footer ---- */
.site-footer{background:var(--color-bg-dark);color:#d9ded9;padding:var(--space-5) 0 var(--space-3);margin-top:var(--space-5)}
.footer-grid{display:grid;gap:1.6rem;grid-template-columns:1fr}
.footer-grid h4{color:#fff;font-size:.9rem;text-transform:uppercase;letter-spacing:.04em}
.footer-grid ul{list-style:none;padding:0;margin:0;display:grid;gap:.5em}
.footer-grid a{color:#c7cfc9}
.footer-bottom{border-top:1px solid #2c453b;margin-top:2rem;padding-top:1.2rem;font-size:.8rem;color:#93a29a;display:flex;flex-wrap:wrap;gap:.8rem;justify-content:space-between}
@media(min-width:720px){.footer-grid{grid-template-columns:repeat(4,1fr)}}

/* ---- Utilities ---- */
.text-muted{color:var(--color-text-muted)}
.mt-0{margin-top:0}
.center{text-align:center}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
