/*
Theme Name: Riad Marrakech
Theme URI: https://riadmarrakech.com
Author: Riad Marrakech
Description: Theme editorial pour sites de voyage affilies. Fond creme, titres serif, cartes, encadres lateraux. Theme bloc leger, sans dependance externe.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: riadmarrakech
Tags: blog, one-column, custom-colors, custom-menu, featured-images, full-site-editing, block-patterns, translation-ready
*/

/* ============================================================
   Les couleurs, polices et espacements sont definis dans
   theme.json. Ce fichier ne contient que ce que theme.json
   ne peut pas exprimer.
   ============================================================ */


/* ---------- BASE ---------- */

body{
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

a{text-underline-offset:.18em}

:where(.wp-site-blocks) > * + *{margin-block-start:1.5rem}

/* Lien d'evitement pour l'accessibilite */
.skip-link:focus{
  background:var(--wp--preset--color--forest);
  color:#fff;padding:.75rem 1.25rem;border-radius:0 0 6px 0;
  position:fixed;top:0;left:0;z-index:999999;
}


/* ---------- EN-TETE ---------- */

.rm-header{
  background:#fff;
  border-bottom:1px solid var(--wp--preset--color--line);
}

.rm-header .wp-block-site-title a{
  font-family:var(--wp--preset--font-family--display);
  font-weight:700;
  text-decoration:none;
}

.rm-header .wp-block-navigation a{
  text-decoration:none;
  font-weight:500;
}
.rm-header .wp-block-navigation a:hover{
  color:var(--wp--preset--color--forest);
}


/* ---------- CARTES D'ARTICLES ---------- */

.rm-loop .wp-block-post{
  display:flex;flex-direction:column;
  background:var(--wp--preset--color--card);
  border:1px solid var(--wp--preset--color--line);
  border-radius:12px;overflow:hidden;
  transition:transform .2s ease,box-shadow .2s ease;
}
.rm-loop .wp-block-post:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 24px rgba(44,74,56,.1);
}

.rm-loop .wp-block-post-featured-image{margin:0}
.rm-loop .wp-block-post-featured-image img{
  display:block;width:100%;aspect-ratio:3/2;object-fit:cover;
}

.rm-loop .rm-card-body{padding:1.25rem 1.25rem 1.5rem}

.rm-loop .wp-block-post-title{
  font-family:var(--wp--preset--font-family--display);
  font-size:1.25rem;line-height:1.25;margin:0 0 .6rem;
}
.rm-loop .wp-block-post-title a{text-decoration:none;color:inherit}
.rm-loop .wp-block-post:hover .wp-block-post-title a{
  color:var(--wp--preset--color--forest);
}

.rm-loop .wp-block-post-excerpt{margin:0}
.rm-loop .wp-block-post-excerpt__excerpt{
  font-size:.94rem;line-height:1.6;
  color:var(--wp--preset--color--muted);
}

.rm-loop .wp-block-post-terms,
.rm-loop .wp-block-post-date{
  font-size:.82rem;color:var(--wp--preset--color--muted);
}
.rm-loop .wp-block-post-terms a{
  display:inline-block;padding:.22rem .7rem;border-radius:999px;
  background:var(--wp--preset--color--badge);
  color:var(--wp--preset--color--forest);
  font-weight:600;font-size:.78rem;text-decoration:none;
}


/* ---------- ARTICLE ---------- */

.rm-entry .wp-block-post-featured-image img{
  border-radius:12px;
}

.rm-entry .wp-block-post-content > *{
  margin-block-start:1.35rem;
}
.rm-entry .wp-block-post-content > h2{margin-block-start:2.75rem}
.rm-entry .wp-block-post-content > h3{margin-block-start:2rem}

.rm-entry blockquote{
  border-left:3px solid var(--wp--preset--color--forest);
  padding-left:1.25rem;margin-left:0;font-style:normal;
  color:var(--wp--preset--color--muted);
}

.rm-entry table{
  width:100%;border-collapse:collapse;font-size:.95rem;
}
.rm-entry table th{
  background:var(--wp--preset--color--forest);
  color:#fff;font-weight:700;font-size:.82rem;
  letter-spacing:.04em;text-transform:uppercase;
  padding:.85rem .75rem;text-align:left;
}
.rm-entry table td{
  padding:.85rem .75rem;
  border-bottom:1px solid var(--wp--preset--color--line);
}
.rm-entry table tbody tr:nth-child(even){
  background:rgba(44,74,56,.035);
}


/* ---------- ENCADRES REUTILISABLES ---------- */

.rm-box{
  background:var(--wp--preset--color--card);
  border:1px solid var(--wp--preset--color--line);
  border-radius:12px;padding:1.5rem;
}
.rm-box--green{
  background:rgba(44,74,56,.07);
  border-color:rgba(44,74,56,.18);
}


/* ---------- BOUTONS AFFILIES ---------- */

.rm-cta{
  display:flex;flex-direction:column;align-items:center;gap:.15rem;
  width:100%;max-width:420px;margin:1.5rem auto;padding:.95rem 1.5rem;
  background:var(--wp--preset--color--forest);
  color:#F7F4EC!important;
  border:1px solid var(--wp--preset--color--forest);border-radius:6px;
  font-family:inherit;text-decoration:none!important;text-align:center;
  box-shadow:0 1px 2px rgba(0,0,0,.12);box-sizing:border-box;
  transition:background .18s ease,transform .18s ease,box-shadow .18s ease;
}
.rm-cta:hover,.rm-cta:focus-visible{
  background:var(--wp--preset--color--forest-dark);
  transform:translateY(-1px);
  box-shadow:0 6px 16px rgba(44,74,56,.25);
}
.rm-cta:focus-visible{outline:3px solid var(--wp--preset--color--gold);outline-offset:3px}

.rm-cta__main{font-size:1.02rem;font-weight:700;line-height:1.3}
.rm-cta__arrow{display:inline-block;margin-left:.4em;transition:transform .18s ease}
.rm-cta:hover .rm-cta__arrow{transform:translateX(4px)}
.rm-cta__sub{font-size:.8rem;font-weight:400;opacity:.86;line-height:1.4}
.rm-cta__sub b{color:#E6C96B;font-weight:700}

.rm-cta--book{
  background:var(--wp--preset--color--terracotta);
  border-color:var(--wp--preset--color--terracotta);
}
.rm-cta--book:hover,.rm-cta--book:focus-visible{
  background:var(--wp--preset--color--terracotta-dark);
  border-color:var(--wp--preset--color--terracotta-dark);
  box-shadow:0 6px 16px rgba(163,93,12,.28);
}
.rm-cta--book:focus-visible{outline-color:var(--wp--preset--color--forest)}
.rm-cta--book .rm-cta__sub b{color:#FFE3C4}

.rm-cta--alt{
  background:transparent;
  color:var(--wp--preset--color--forest)!important;
  border-color:rgba(44,74,56,.35);
  box-shadow:none;padding:.7rem 1.25rem;margin:-.5rem auto 1.5rem;
}
.rm-cta--alt:hover,.rm-cta--alt:focus-visible{
  background:rgba(44,74,56,.06);
  color:var(--wp--preset--color--forest)!important;
  box-shadow:none;transform:none;
}
.rm-cta--alt .rm-cta__main{font-size:.92rem;font-weight:600}

.rm-cta-row{
  display:flex;flex-wrap:wrap;align-items:stretch;gap:.75rem;
  justify-content:center;width:100%;margin:1.5rem 0;box-sizing:border-box;
}
.rm-cta-row .rm-cta{flex:1 1 250px;max-width:none;margin:0;justify-content:center}


/* ---------- CARTE STAY22 ---------- */

.rm-map{
  width:100%;margin:2.5rem 0;border-radius:10px;overflow:hidden;
  border:1px solid var(--wp--preset--color--line);box-sizing:border-box;
}
.rm-map iframe{display:block;width:100%!important;height:520px;border:0}


/* ---------- SOMMAIRE ---------- */

.rm-toc{
  background:var(--wp--preset--color--card);
  border:1px solid var(--wp--preset--color--line);
  border-radius:12px;padding:1.5rem;
}
.rm-toc ol{margin:0;padding-left:1.4rem}
.rm-toc li{margin:.45rem 0}
.rm-toc a{color:inherit;text-decoration:none}
.rm-toc a:hover{color:var(--wp--preset--color--forest);text-decoration:underline}


/* ---------- PIED DE PAGE ---------- */

.rm-footer{background:#141414;color:rgba(255,255,255,.72)}
.rm-footer a{color:rgba(255,255,255,.82);text-decoration:none}
.rm-footer a:hover{color:#fff;text-decoration:underline}
.rm-footer h2,.rm-footer h3,.rm-footer .wp-block-heading{
  color:rgba(255,255,255,.52);
  font-family:var(--wp--preset--font-family--body);
  font-size:.78rem;font-weight:700;letter-spacing:.11em;text-transform:uppercase;
}
.rm-footer .wp-block-site-title a{
  color:#fff;
  font-family:var(--wp--preset--font-family--display);
  font-weight:700;
}


/* ---------- MOBILE ---------- */

@media (max-width:781px){
  .rm-cta-row .rm-cta{flex:1 1 100%}
  .rm-map iframe{height:380px}
}

@media (prefers-reduced-motion:reduce){
  .rm-loop .wp-block-post,
  .rm-cta,.rm-cta__arrow{transition:none}
  .rm-loop .wp-block-post:hover,
  .rm-cta:hover,.rm-cta:hover .rm-cta__arrow{transform:none}
}
