/* ==========================================================================
   Réalisations : page liste (realisations.php) + études de cas (realisations/*.php)
   ========================================================================== */

:root {
    --rea-accent: var(--primary-color, #1aabb3);
    --rea-ink: #16181d;
    --rea-text: #4a4f5a;
    --rea-muted: #6b7280;
    --rea-line: #e6e8ec;
    --rea-soft: #f5f7f8;
    --rea-demo: #e8590c;
    --rea-radius: 14px;
    --rea-shot-h: 440px;
}

/* ---------- Hero ---------- */
.rea-hero { background: #000; padding: 140px 0 70px; position: relative; overflow: hidden; }
.rea-hero::after { content: ''; position: absolute; inset: auto -10% -60% auto; width: 620px; height: 620px; border-radius: 50%; background: radial-gradient(circle, rgba(26, 171, 179, .28) 0%, rgba(26, 171, 179, 0) 70%); pointer-events: none; }
.rea-hero .container { position: relative; z-index: 1; }
.rea-hero h1 { color: #fff; font-size: clamp(2rem, 4.6vw, 3.3rem); font-weight: 900; line-height: 1.15; margin: 0 0 1.2rem; max-width: 22ch; }
.rea-hero h1 em { font-style: normal; color: var(--rea-accent); }
.rea-hero .rea-lead { color: rgba(255, 255, 255, .82); font-size: 1.15rem; line-height: 1.7; max-width: 62ch; margin: 0; }
.rea-crumb { display: inline-flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; background: rgba(255, 255, 255, .08); padding: 8px 18px; border-radius: 50px; margin-bottom: 28px; font-size: .95rem; }
.rea-crumb a { color: #fff; text-decoration: none; opacity: .85; }
.rea-crumb a:hover { opacity: 1; text-decoration: none; }
.rea-crumb span { color: rgba(255, 255, 255, .5); }
.rea-crumb span[aria-current] { color: var(--warning-color, #ffc107); font-weight: 600; }
.rea-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; padding: 0; list-style: none; }
.rea-chips li { color: #fff; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); padding: 6px 14px; border-radius: 50px; font-size: .92rem; }
.rea-chips li strong { color: var(--rea-accent); font-weight: 700; margin-right: 6px; }

/* ---------- Sections ---------- */
.rea-section { background: #fff; padding: 70px 0; }
.rea-section.alt { background: var(--rea-soft); }
.rea-section-head { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.rea-section-head h2 { color: var(--rea-ink); font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; margin-bottom: 14px; }
.rea-section-head p { color: var(--rea-text); font-size: 1.08rem; line-height: 1.7; margin: 0; }
.rea-intro { max-width: 860px; margin: 0 auto; color: var(--rea-text); font-size: 1.1rem; line-height: 1.8; }
.rea-intro p { margin-bottom: 18px; }
.rea-intro a { color: var(--rea-accent); font-weight: 600; }

/* ---------- Capture d'écran (cadre à hauteur fixe) ---------- */
.rea-shot { display: block; position: relative; height: var(--rea-shot-h); overflow: hidden; background: #eef1f3; border-bottom: 1px solid var(--rea-line); }
.rea-shot img { display: block; width: 100%; height: auto; transform: translateY(0); transition: transform 6s ease-in-out; }
.rea-card:hover .rea-shot img,
.rea-card:focus-within .rea-shot img { transform: translateY(calc(-100% + var(--rea-shot-h))); }
.rea-shot::before { content: ''; position: absolute; z-index: 2; top: 0; left: 0; right: 0; height: 26px; background: #e9ecef url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='10'%3E%3Ccircle cx='5' cy='5' r='4' fill='%23ff6159'/%3E%3Ccircle cx='21' cy='5' r='4' fill='%23ffbd2e'/%3E%3Ccircle cx='37' cy='5' r='4' fill='%2328c941'/%3E%3C/svg%3E") 12px center no-repeat; border-bottom: 1px solid #dde1e5; }
.rea-shot img { padding-top: 26px; box-sizing: border-box; }

/* ---------- Grille de cartes ---------- */
.rea-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }
.rea-card { position: relative; display: flex; flex-direction: column; background: #fff; border-radius: var(--rea-radius); overflow: hidden; box-shadow: 0 6px 24px rgba(17, 24, 39, .08); transition: transform .3s ease, box-shadow .3s ease; height: 100%; }
.rea-card:hover { transform: translateY(-4px); box-shadow: 0 14px 38px rgba(26, 171, 179, .18); }
.rea-card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.rea-card-type { display: inline-block; align-self: flex-start; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--rea-accent); background: rgba(26, 171, 179, .1); padding: 4px 10px; border-radius: 50px; margin-bottom: 12px; }
.rea-card h3 { font-size: 1.3rem; font-weight: 800; color: var(--rea-ink); margin: 0 0 8px; }
.rea-card h3 a { color: var(--rea-ink) !important; font-weight: 800; text-decoration: none; }
.rea-card h3 a::after { content: ''; position: absolute; inset: 0; z-index: 3; } /* carte entièrement cliquable */
.rea-card-meta { list-style: none; padding: 0; margin: 0 0 14px; color: var(--rea-muted); font-size: .95rem; line-height: 1.6; }
.rea-card-meta li { display: flex; gap: 8px; }
.rea-card-meta i { color: var(--rea-accent); width: 16px; flex: 0 0 16px; margin-top: 4px; }
.rea-card-link { margin-top: auto; font-weight: 700; color: var(--rea-accent); }
.rea-card-link::after { content: ' \2192'; }

/* ---------- Démos ---------- */
.rea-demo-zone { background: repeating-linear-gradient(135deg, #fafafa, #fafafa 14px, #f3f4f5 14px, #f3f4f5 28px); padding: 70px 0; border-top: 1px solid var(--rea-line); }
.rea-demo-notice { display: flex; gap: 16px; align-items: flex-start; max-width: 860px; margin: 0 auto 40px; background: #fff; border: 2px dashed var(--rea-demo); border-radius: var(--rea-radius); padding: 20px 24px; color: var(--rea-text); line-height: 1.7; }
.rea-demo-notice strong { color: var(--rea-ink); }
.rea-badge-demo { position: absolute; z-index: 4; top: 38px; right: 14px; background: var(--rea-demo); color: #fff; font-weight: 800; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; padding: 6px 14px; border-radius: 50px; box-shadow: 0 4px 14px rgba(232, 89, 12, .35); }
.rea-badge-demo.inline { position: static; display: inline-block; flex: 0 0 auto; box-shadow: none; }
.rea-card.is-demo { opacity: .97; }
.rea-card.is-demo .rea-card-type { color: var(--rea-demo); background: rgba(232, 89, 12, .1); }
.rea-card.is-demo .rea-card-link { color: var(--rea-demo); }

/* ---------- Étude de cas ---------- */
.rea-case-top { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 40px; align-items: start; }
.rea-case-shot { border-radius: var(--rea-radius); overflow: hidden; box-shadow: 0 16px 48px rgba(17, 24, 39, .14); background: #fff; }
.rea-case-shot .rea-shot { --rea-shot-h: 500px; height: 500px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.rea-case-shot .rea-shot img { transition: none; padding-top: 0; }
.rea-case-shot .rea-shot::before { position: sticky; display: block; }
.rea-case-shot figcaption { padding: 12px 18px; font-size: .9rem; color: var(--rea-muted); }
.rea-factsheet { background: var(--rea-soft); border-radius: var(--rea-radius); padding: 28px; position: sticky; top: 110px; }
.rea-factsheet h2 { font-size: 1.25rem !important; margin: 0 0 18px !important; padding: 0 !important; border: 0 !important; }
.rea-factsheet dl { margin: 0 0 22px; }
.rea-factsheet dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--rea-muted); font-weight: 700; margin-top: 14px; }
.rea-factsheet dd { margin: 2px 0 0; color: var(--rea-ink); font-weight: 600; line-height: 1.5; }
.rea-btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px; border-radius: 50px; font-weight: 700; text-decoration: none; transition: transform .25s ease, box-shadow .25s ease, background .25s ease; }
.rea-btn:hover { transform: translateY(-2px); text-decoration: none; }
.rea-btn-primary, .rea-btn-primary:hover, .rea-btn-primary:focus { background: var(--rea-accent); color: #fff !important; }
.rea-btn-primary:hover { color: #fff; box-shadow: 0 10px 26px rgba(26, 171, 179, .35); }
.rea-btn-ghost, .rea-btn-ghost:hover, .rea-btn-ghost:focus { background: transparent; color: var(--rea-ink) !important; border: 2px solid var(--rea-ink); }
.rea-btn-ghost:hover { color: var(--rea-ink); }
.rea-factsheet .rea-btn { width: 100%; justify-content: center; margin-top: 10px; }

.rea-body { max-width: 860px; margin: 0 auto; color: var(--rea-text); font-size: 1.08rem; line-height: 1.8; }
.rea-body h2 { color: var(--rea-ink); font-size: clamp(1.6rem, 2.6vw, 2rem); font-weight: 800; margin: 50px 0 20px; padding-bottom: 12px; border-bottom: 3px solid var(--rea-accent); }
.rea-body h2:first-child { margin-top: 0; }
.rea-body h3 { color: var(--rea-ink); font-size: 1.2rem; font-weight: 700; margin: 0 0 8px; }
.rea-body p { margin-bottom: 18px; }
.rea-body ul { padding-left: 22px; margin-bottom: 20px; }
.rea-body li { margin-bottom: 8px; }
.rea-body a { color: var(--rea-accent); font-weight: 600; }
.rea-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin: 26px 0 10px; padding: 0; list-style: none; }
.rea-features li { background: #fff; border: 1px solid var(--rea-line); border-left: 4px solid var(--rea-accent); border-radius: 10px; padding: 18px 20px; margin: 0; }
.rea-features li p { margin: 0; font-size: .98rem; line-height: 1.65; }
.rea-tech { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0 !important; margin: 10px 0 20px; }
.rea-tech li { background: var(--rea-ink); color: #fff; font-size: .9rem; font-weight: 600; padding: 6px 14px; border-radius: 6px; margin: 0; }
.rea-note { background: var(--rea-soft); border-left: 4px solid var(--rea-accent); padding: 18px 22px; border-radius: 0 10px 10px 0; font-size: 1rem; }

.rea-cta { background: linear-gradient(135deg, var(--rea-accent) 0%, #0d8a91 100%); color: #fff; padding: 46px 40px; border-radius: var(--rea-radius); text-align: center; margin: 50px 0 10px; }
.rea-cta h2 { color: #fff !important; border: 0 !important; padding: 0 !important; margin: 0 0 12px !important; }
.rea-cta p { color: rgba(255, 255, 255, .92); max-width: 60ch; margin: 0 auto 24px; }
.rea-cta .rea-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: center; }
.rea-cta .rea-btn-light, .rea-cta .rea-btn-light:hover { background: #fff; color: #0d8a91 !important; }
.rea-cta .rea-btn-light:hover { color: #0d8a91; box-shadow: 0 10px 26px rgba(0, 0, 0, .2); }
.rea-cta .rea-btn-outline, .rea-cta .rea-btn-outline:hover { color: #fff !important; border: 2px solid rgba(255, 255, 255, .8); }
.rea-cta .rea-btn-outline:hover { color: #fff; background: rgba(255, 255, 255, .1); }

.rea-service-link { display: flex; gap: 18px; align-items: center; background: #fff; border: 1px solid var(--rea-line); border-radius: var(--rea-radius); padding: 22px 26px; text-decoration: none; margin-top: 18px; transition: box-shadow .25s ease; }
.rea-service-link:hover { text-decoration: none; box-shadow: 0 10px 28px rgba(26, 171, 179, .18); }
.rea-service-link strong { color: var(--rea-ink); display: block; font-size: 1.1rem; }
.rea-service-link span { color: var(--rea-text); font-size: .98rem; }
.rea-service-link i { color: var(--rea-accent); font-size: 1.6rem; }

@media (max-width: 991px) {
    .rea-case-top { grid-template-columns: 1fr; }
    .rea-factsheet { position: static; }
}
@media (max-width: 768px) {
    :root { --rea-shot-h: 380px; }
    .rea-hero { padding: 120px 0 50px; }
    .rea-section, .rea-demo-zone { padding: 50px 0; }
    .rea-case-shot .rea-shot { --rea-shot-h: 420px; height: 420px; }
    .rea-cta { padding: 34px 22px; }
    .rea-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .rea-shot img, .rea-card { transition: none !important; }
    .rea-card:hover .rea-shot img, .rea-card:focus-within .rea-shot img { transform: none; }
}
