/* V13.1 — isolated client home styles. All colours remain tied to the chosen themes. */
.rouf-modern-home{min-height:100vh;background:var(--app-bg);color:var(--app-text);font-family:var(--app-font)}
.rouf-modern-home .rh-header{max-width:var(--app-width,1280px);margin:auto;min-height:88px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px clamp(18px,4vw,48px);border-bottom:1px solid var(--app-border)}
.rh-brand{display:flex;align-items:center;gap:13px;min-width:0}.rh-brand span{font-size:var(--app-brand-title-size,22px);font-weight:600;overflow-wrap:anywhere}.rh-brand-logo{display:var(--app-logo-display,block);width:var(--app-logo-size,52px);height:var(--app-logo-size,52px);object-fit:contain;flex:none}.rh-admin{font-size:12px;min-height:44px;padding:8px 12px;border:1px solid var(--app-border);border-radius:8px;cursor:pointer;flex:none}
.rh-main{max-width:var(--app-width,1280px);margin:auto;padding:clamp(24px,5vw,72px) clamp(18px,4vw,48px) 72px}.rh-intro{margin-bottom:clamp(26px,4vw,52px)}.rh-intro h1{font-family:var(--rh-heading-font);font-weight:400;letter-spacing:-.035em;line-height:1.08;font-size:clamp(28px,5vw,var(--app-page-title-size,44px));overflow-wrap:anywhere}.rh-intro p{color:var(--app-muted);max-width:60ch;margin-top:12px;font-size:15px;line-height:1.65;white-space:pre-line;overflow-wrap:anywhere}.rh-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;align-items:stretch}.rh-card{min-width:0;min-height:var(--rh-height);border:1px solid;border-radius:var(--app-radius,20px);padding:clamp(18px,3vw,30px);display:flex;flex-direction:column;justify-content:space-between;text-align:left;gap:18px;position:relative;cursor:pointer;overflow:hidden;transition:box-shadow .18s ease,transform .18s ease, border-color .18s ease}.rh-card-top,.rh-card-bottom{display:flex;justify-content:space-between;align-items:center;gap:10px;min-width:0}.rh-card-content{min-width:0}.rh-card h2{font-family:var(--rh-heading-font);font-size:clamp(22px,2.8vw,34px);font-weight:500;line-height:1.15;letter-spacing:-.025em;overflow-wrap:anywhere}.rh-card-content p{font-size:14px;line-height:1.55;margin-top:10px;opacity:.8;white-space:pre-line;overflow-wrap:anywhere}.rh-index,.rh-count{font-size:12px;font-variant-numeric:tabular-nums;letter-spacing:.045em;opacity:.8}.rh-hub-logo{max-width:42%;max-height:84px;object-fit:contain}.rh-arrow{flex:none;display:grid;place-items:center;border:1px solid currentColor;border-radius:50%;width:40px;height:40px;transition:transform .18s ease}.rh-card:focus-visible,.rh-admin:focus-visible{outline:3px solid var(--app-accent);outline-offset:3px}.rh-empty{color:var(--app-muted);padding:24px 0}
@media(hover:hover){.rh-card:hover{transform:translateY(-3px);box-shadow:0 12px 28px #0002;border-color:var(--rh-card-accent)!important}.rh-card:hover .rh-arrow{transform:translateX(3px)}}
/* The original grid, including custom size and position, is retained on wider screens. */
@media(min-width:900px){.rh-grid{grid-template-columns:repeat(12,minmax(0,1fr));gap:20px}.rh-card{grid-row:var(--rh-row);grid-column:var(--rh-start)/span var(--rh-span)}}
/* Elegant: subtle rule and centered composition. */
[data-home-style=elegant] .rh-intro{text-align:center;margin-inline:auto}[data-home-style=elegant] .rh-intro p{margin-inline:auto}[data-home-style=elegant] .rh-card{text-align:center;border-radius:min(12px,var(--app-radius,12px))}[data-home-style=elegant] .rh-card-content:before{content:'';display:block;margin:0 auto 18px;width:44px;height:1px;background:var(--rh-card-accent)}[data-home-style=elegant] .rh-card h2{font-weight:400;letter-spacing:0}[data-home-style=elegant] .rh-arrow{border:0}
/* Minimal: a compact, one-column index, with optional real subtitles. */
[data-home-style=minimal] .rh-main{max-width: min(var(--app-width,1280px), 1040px)}[data-home-style=minimal] .rh-grid{display:flex;flex-direction:column;gap:0;border-top:1px solid var(--app-border)}[data-home-style=minimal] .rh-card{margin:0!important;border:0;border-bottom:1px solid var(--app-border)!important;border-radius:0;min-height:112px;display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:12px;padding:26px 12px;background:transparent!important;color:var(--app-text)!important}[data-home-style=minimal] .rh-card h2{font-size:clamp(20px,3vw,28px)}[data-home-style=minimal] .rh-card-top{display:flex;flex-direction:column;align-items:flex-start}[data-home-style=minimal] .rh-hub-logo{max-width:36px;max-height:36px}[data-home-style=minimal] .rh-card-bottom{gap:16px}[data-home-style=minimal] .rh-count{white-space:nowrap}[data-home-style=minimal] .rh-arrow{border:0}[data-home-style=minimal] .rh-card:hover{background:var(--app-surface)!important;transform:none;box-shadow:none}
/* Contemporary: generous spacing, asymmetric detail, restrained colour accent. */
[data-home-style=contemporary] .rh-intro h1{font-weight:500}[data-home-style=contemporary] .rh-card:before{content:'';position:absolute;left:0;top:0;width:100%;height:3px;background:var(--rh-card-accent)}[data-home-style=contemporary] .rh-card h2{font-weight:600}[data-home-style=contemporary] .rh-card-bottom{border-top:1px solid color-mix(in srgb,currentColor 16%,transparent);padding-top:12px}
@media(max-width:899px){.rh-card{min-height:min(var(--rh-height),240px);margin-left:0!important;margin-right:0!important}.rh-header{min-height:68px}.rh-brand span{font-size:clamp(14px,4vw,22px)}.rh-brand-logo{max-width:48px;max-height:48px}}
@media(max-width:520px){[data-home-style=minimal] .rh-card{grid-template-columns:28px minmax(0,1fr) 35px;padding:20px 4px;gap:9px}[data-home-style=minimal] .rh-card-bottom{flex-direction:column-reverse;align-items:center}[data-home-style=minimal] .rh-count{white-space:normal;text-align:center;font-size:10px}[data-home-style=minimal] .rh-arrow{width:32px;height:32px}.rh-admin{font-size:11px}.rh-card{padding:20px}}
@media(prefers-reduced-motion:reduce){.rh-card,.rh-arrow{transition:none!important;transform:none!important}}

/* V13.2 — number-free tiles and balanced tablet layout. */
.rh-card-top-empty{display:none}.rh-card{justify-content:space-between;gap:14px}.rh-card h2{font-size:clamp(21px,2.6vw,32px)}.rh-card-bottom{margin-top:auto}.rh-card:has(.rh-card-top-empty) .rh-card-content{margin-block:auto}.rh-card-content p{overflow-wrap:break-word}.rh-card .rh-arrow{color:inherit}.rh-card .rh-count{opacity:.85}
[data-home-style=minimal] .rh-card{grid-template-columns:minmax(0,1fr) auto;gap:14px;min-height:88px}[data-home-style=minimal] .rh-card:has(.rh-hub-logo){grid-template-columns:auto minmax(0,1fr) auto}[data-home-style=minimal] .rh-card-top-empty{display:none}[data-home-style=minimal] .rh-card-content{margin:0!important}[data-home-style=minimal] .rh-card-bottom{margin:0;flex-direction:row;align-items:center}
@media(min-width:600px) and (max-width:899px){.rh-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.rh-card{grid-column:span var(--rh-tablet-span,1);min-height:min(var(--rh-height),230px)}}
@media(max-width:599px){.rh-card{min-height:clamp(125px,calc(var(--rh-height) * .65),220px)}[data-home-style=minimal] .rh-card{min-height:80px;padding:18px 4px}[data-home-style=minimal] .rh-card-bottom{gap:5px}[data-home-style=minimal] .rh-card .rh-count{max-width:65px}}

.rouf-modern-home .rh-header{position:sticky;top:0;z-index:70;background:var(--app-bg,#080808);box-shadow:0 4px 16px #0002;padding-block:12px;min-height:64px}.rouf-modern-home .rh-header .rh-admin.rouf-admin-icon{width:44px;min-width:44px;min-height:44px;padding:0;flex:none}.rh-brand{min-width:0}.rh-brand span{overflow-wrap:anywhere}

/* V13.10 — identité de l’accueil sur une ligne. */
.rh-brand{overflow:hidden;flex-wrap:nowrap}.rh-brand span{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal}
@media(max-width:700px){.rouf-modern-home .rh-header{padding:7px 12px;min-height:58px;gap:8px}.rh-brand{gap:7px}.rh-brand-logo{max-width:28px;max-height:28px}.rh-brand span{font-size:clamp(14px,4vw,18px)}}

/* V13.14 — le choix d'identité s'applique également aux accueils modernes. */
.rouf-modern-home .rh-header.brand-none{justify-content:flex-end}
.rouf-modern-home .rh-header.brand-logo .rh-brand-logo{max-width:90px;max-height:44px;object-fit:contain}
