/* Cap & Cime — feuille des pages de ressources.
   Complète styles.css : consomme ses tokens :root, n'y redéfinit rien.
   Chaînes de repli sur les deux conventions de tokens du parc. */
:root{
  --r-primary: var(--primary, var(--primary-color, #E8663C));
  --r-secondary: var(--secondary, var(--secondary-color, #1B3A4B));
  --r-bg: var(--bg, var(--light-color, #F4F1EA));
  --r-surface: var(--surface, #FFFFFF);
  --r-text: var(--text, var(--dark-color, #1B3A4B));
  --r-text-secondary: var(--text-secondary, var(--gray-800, #42606F));
  --r-text-muted: var(--text-muted, var(--gray-600, #7A8A93));
  --r-fill: var(--fill, var(--gray-100, #EAE5DA));
  --r-border: var(--border, var(--gray-200, #D9D2C4));
  --r-callout-bg: var(--callout-bg, #FCEBE2);
  --r-callout-text: var(--callout-text, #A33F16);
  --r-callout-border: var(--callout-border, #F0C0A8);
}

.res-body{padding:44px 0 90px;max-width:1180px}
.res-fil{font-size:12.5px;color:var(--r-text-muted);margin-bottom:34px}
.res-fil a{color:var(--r-text-secondary);text-decoration:underline}
.res-fil a:hover{color:var(--r-primary)}
.res-fil span{color:var(--r-border);margin:0 2px}

.res-section{padding:0 0 46px;max-width:860px}
.res-section h2{font-size:clamp(27px,3.4vw,40px);line-height:1.1;margin:0 0 16px}
.res-section h3{font-family:var(--serif,inherit);font-size:21px;margin:30px 0 12px}
.res-section p{font-size:16px;line-height:1.72;color:var(--r-text-secondary);margin:0 0 15px}
.res-section .eyebrow{margin-bottom:12px}
.res-aside{border-left:3px solid var(--r-primary);padding-left:16px;font-style:italic;color:var(--r-text)!important}

.res-liste{max-width:820px;padding-left:20px;margin:0 0 18px}
.res-liste li{font-size:15.5px;line-height:1.7;color:var(--r-text-secondary);margin-bottom:9px}
.res-texte p{font-size:16px;line-height:1.72;color:var(--r-text-secondary);margin:0 0 15px}

.res-carac{margin-bottom:26px}
.res-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}
.res-scroll table{min-width:620px}

/* Cartes du hub */
.res-cartes{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(2,1fr);gap:16px}
.res-cartes li a{display:block;height:100%;border:1px solid var(--r-border);background:var(--r-surface);padding:22px 24px;transition:.22s}
.res-cartes li a:hover{border-color:var(--r-primary);box-shadow:0 12px 30px rgba(27,58,75,.09);transform:translateY(-2px)}
.res-cartes .rc-titre{display:block;font:700 20px/1.2 var(--serif,inherit);color:var(--r-secondary);margin-bottom:6px}
.res-cartes .rc-compte{display:block;font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--r-primary);margin-bottom:11px}
.res-cartes .rc-resume{display:block;font-size:13.5px;line-height:1.6;color:var(--r-text-muted)}
.res-cartes li.is-chantier a{background:var(--r-fill);border-style:dashed}
.res-cartes li.is-chantier .rc-compte{color:var(--r-text-muted)}

/* Recherche et grille d'entrées */
.res-recherche{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:22px 0 14px}
.res-recherche label{font-size:12px;font-weight:600;color:var(--r-text-secondary);width:100%}
.res-recherche input{flex:1;min-width:200px;border:1px solid var(--r-border);background:var(--r-surface);color:var(--r-text);font:400 14px var(--sans,inherit);padding:11px 13px}
.res-recherche input:focus{outline:2px solid var(--r-primary);outline-offset:1px}
.res-recherche .button{padding:11px 18px}
.res-compte{font-size:12.5px;color:var(--r-text-muted);margin-bottom:16px!important}

.res-grille{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(3,1fr);gap:1px;background:var(--r-border);border:1px solid var(--r-border)}
.res-grille li a{display:block;height:100%;background:var(--r-surface);padding:14px 16px;transition:.18s}
.res-grille li a:hover{background:var(--r-fill)}
.res-grille .res-nom{display:block;font-size:14.5px;font-weight:600;line-height:1.35;color:var(--r-text)}
.res-grille li a:hover .res-nom{color:var(--r-primary)}
.res-grille .res-sous{display:block;font-size:11.5px;line-height:1.45;color:var(--r-text-muted);margin-top:3px}
.res-grille .res-tag{display:inline-block;margin-top:6px;font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--r-callout-text);background:var(--r-callout-bg);border:1px solid var(--r-callout-border);padding:2px 6px}

@media(max-width:1000px){.res-grille{grid-template-columns:repeat(2,1fr)}}
@media(max-width:800px){
  .res-cartes{grid-template-columns:1fr}
  .res-grille{grid-template-columns:1fr}
  .res-body{padding:30px 0 60px}
}
@media print{.res-recherche,.res-fil{display:none!important}}
