/*
Theme Name: Cavi FM – Onde Claire
Theme URI: https://cavifm.com
Author: ConforDev
Author URI: https://confordev.com
Description: Thème sur mesure de Cavi FM 89.5, « La radio du développement » : lecteur du direct permanent, grille des programmes, podcasts, animateurs, actualités, page Publicité et promotion de l'application mobile.
Version: 1.0.0
Requires at least: 6.2
Requires PHP: 7.4
License: Propriétaire – réalisé par ConforDev pour Cavi FM
Text Domain: cavifm
*/

:root{
  --c-blue:#2492CE; --c-blue-btn:#1A7BB5; --c-blue-text:#13649A; --c-navy:#0E2A47;
  --c-ink:#0E2A47; --c-muted:#3E5770; --c-line:#E3EDF5; --c-soft:#F2F8FC; --c-sky:#CFE6F5;
  --c-live:#B3261E; --c-live-bg:#FFE9E7; --c-footer-text:#D5E3EF; --c-footer-line:#1A3D63;
  --radius:20px; --wrap:1200px;
  --font:'Poppins',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:var(--font);color:var(--c-ink);background:#fff;line-height:1.6;-webkit-font-smoothing:antialiased}
img{max-width:100%;height:auto;display:block}
a{color:var(--c-blue-text);text-decoration:none}
a:hover{color:var(--c-navy)}
h1,h2,h3,h4{line-height:1.2;margin:0 0 .5em;font-weight:700}
.wrap{max-width:var(--wrap);margin:0 auto;padding:0 24px}
.screen-reader-text{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap}
.skip-link:focus{position:fixed;top:8px;left:8px;z-index:999;background:#fff;padding:8px 14px;border-radius:8px;clip:auto;width:auto;height:auto}
:focus-visible{outline:3px solid var(--c-blue);outline-offset:2px}

/* Boutons */
.btn{display:inline-flex;align-items:center;gap:10px;white-space:nowrap;border-radius:999px;padding:14px 26px;font-weight:600;font-size:16px;border:1.5px solid transparent;cursor:pointer;font-family:inherit;line-height:1.2}
.btn-primary{background:var(--c-blue-btn);color:#fff}.btn-primary:hover{background:var(--c-blue-text);color:#fff}
.btn-ghost{background:#fff;color:var(--c-navy);border-color:#C9DDEC}.btn-ghost:hover{border-color:var(--c-blue)}
.btn-white{background:#fff;color:var(--c-navy)}
.btn svg{width:16px;height:16px;fill:currentColor;flex-shrink:0}
.badge-live{display:inline-flex;align-items:center;gap:6px;background:var(--c-live-bg);color:var(--c-live);font-weight:700;font-size:13px;padding:6px 12px;border-radius:999px;letter-spacing:.02em}
.badge-live::before{content:"";width:8px;height:8px;border-radius:50%;background:#E53935}

/* Barre supérieure */
.topbar{background:var(--c-navy);color:#fff;font-size:13px}
.topbar .wrap{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;padding-top:8px;padding-bottom:8px}
.topbar a{color:#fff}
.topbar .onair{display:flex;align-items:center;gap:8px}
.topbar .onair::before{content:"";width:8px;height:8px;border-radius:50%;background:#FF5A4E}

/* Réseaux sociaux */
.social{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:0;padding:0;list-style:none}
.social a{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;background:var(--c-footer-line);color:#fff}
.social a:hover{background:var(--c-blue)}
.social svg{width:18px;height:18px;fill:currentColor}
.topbar .social a{width:28px;height:28px;background:transparent}
.topbar .social svg{width:15px;height:15px}
.social a.is-empty{opacity:.55}

/* En-tête */
.site-header{border-bottom:1px solid var(--c-line);background:#fff;position:relative;z-index:50}
.site-header .wrap{display:flex;align-items:center;justify-content:space-between;gap:24px;padding-top:16px;padding-bottom:16px}
.site-logo img{height:44px;width:auto}
.main-nav ul{list-style:none;margin:0;padding:0;display:flex;gap:22px;flex-wrap:nowrap}
.main-nav a{color:var(--c-navy);font-weight:500;font-size:15px}
.main-nav .current-menu-item>a,.main-nav a:hover{color:var(--c-blue-text)}
.header-actions{display:flex;align-items:center;gap:10px}
.header-actions .btn{padding:11px 20px;font-size:15px}
.menu-toggle{display:none;width:44px;height:44px;border:0;background:var(--c-soft);border-radius:12px;align-items:center;justify-content:center;cursor:pointer}
.menu-toggle svg{width:22px;height:22px}
@media (max-width:1180px){
  .menu-toggle{display:inline-flex}
  .main-nav{position:absolute;left:0;right:0;top:100%;background:#fff;border-bottom:1px solid var(--c-line);display:none;box-shadow:0 18px 30px rgba(14,42,71,.08)}
  .main-nav.is-open{display:block}
  .main-nav ul{flex-direction:column;gap:0;padding:8px 24px 18px}
  .main-nav li a{display:block;padding:12px 0;border-bottom:1px solid var(--c-line);font-size:16px}
  .header-actions .btn-app span.long{display:none}
  .site-logo img{height:34px}
}
@media (max-width:420px){.header-actions .btn-app{padding:9px 14px;font-size:13px}}

/* Héros */
.hero{background:var(--c-soft)}
.hero .wrap{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:48px;align-items:center;padding-top:64px;padding-bottom:64px}
.eyebrow{color:var(--c-blue-text);font-weight:600;font-size:14px;letter-spacing:.08em;text-transform:uppercase}
.hero h1{font-size:clamp(34px,5vw,54px);font-weight:800;margin:14px 0 18px;line-height:1.08}
.hero p.lead{font-size:18px;color:var(--c-muted);margin:0 0 26px}
.hero .actions{display:flex;gap:14px;flex-wrap:wrap}
.live-card{background:#fff;border-radius:28px;padding:28px;box-shadow:0 24px 60px rgba(14,42,71,.12);display:flex;flex-direction:column;gap:20px}
.live-card .top{display:flex;justify-content:space-between;align-items:center;color:var(--c-muted);font-size:14px}
.live-card .visual{height:200px;border-radius:20px;background:var(--c-blue);display:flex;align-items:center;justify-content:center;overflow:hidden}
.live-card .visual svg{width:80%;max-width:240px;height:auto}
.live-card .show{font-size:22px;font-weight:700}
.live-card .host{color:var(--c-muted);font-size:15px}
.live-card .controls{display:flex;align-items:center;gap:16px}
.play-btn{width:60px;height:60px;border-radius:50%;border:0;background:var(--c-blue-btn);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0}
.play-btn svg{width:22px;height:22px;fill:#fff}
.play-btn .i-pause{display:none}
.is-playing .play-btn .i-play{display:none}.is-playing .play-btn .i-pause{display:block}
.live-card .next{font-size:13px;color:var(--c-muted)}

/* Sections */
.section{padding-top:48px;padding-bottom:48px}
.section-head{display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap;margin-bottom:22px}
.section-head h2{font-size:30px;margin:0}
.section-head a{font-weight:600}
.grid{display:grid;gap:24px}
.grid-4{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.grid-3{grid-template-columns:repeat(auto-fit,minmax(290px,1fr))}

/* Programme */
.slot{border:1px solid var(--c-line);border-radius:18px;padding:20px}
.slot .time{color:var(--c-muted);font-weight:600;font-size:14px}
.slot .title{font-weight:600;font-size:18px;margin-top:6px}
.slot .host{font-size:14px;color:var(--c-muted)}
.slot.is-now{border:2px solid var(--c-blue);background:var(--c-soft)}
.slot.is-now .time{color:var(--c-blue-text);font-weight:700}

/* Cartes articles */
.card{border-radius:var(--radius);overflow:hidden;border:1px solid var(--c-line);background:#fff;display:flex;flex-direction:column}
.card .thumb{aspect-ratio:16/9;background:var(--c-sky);overflow:hidden}
.card .thumb img{width:100%;height:100%;object-fit:cover}
.card .body{padding:20px;display:flex;flex-direction:column;gap:8px}
.card .cat{color:var(--c-blue-text);font-weight:600;font-size:13px;text-transform:uppercase}
.card h3{font-size:19px;margin:0;line-height:1.35}
.card h3 a{color:var(--c-navy)}
.card .meta{color:var(--c-muted);font-size:14px}

/* Promotion de l'application */
.app-promo{background:var(--c-navy);color:#fff;border-radius:24px;padding:28px 36px;display:flex;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap}
.app-promo .left{display:flex;align-items:center;gap:22px}
.app-promo .icon{width:72px;height:72px;border-radius:18px;background:var(--c-blue);display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden}
.app-promo .icon img{width:72px;height:72px}
.app-promo h2{font-size:24px;margin:0}
.app-promo p{margin:4px 0 0;color:var(--c-footer-text);font-size:15px}
.store-badges{display:flex;gap:12px;flex-wrap:wrap}
.store-badges img{height:54px;width:auto}
@media (max-width:600px){.app-promo{padding:20px}.store-badges img{height:46px}}

/* Podcasts */
.pod{display:flex;gap:14px;align-items:center;padding:14px;border-radius:18px;background:var(--c-soft)}
.pod .cover{width:64px;height:64px;border-radius:14px;background:var(--c-blue);flex-shrink:0;overflow:hidden}
.pod .cover img{width:100%;height:100%;object-fit:cover}
.pod .t{font-weight:600;color:var(--c-navy)}
.pod .d{font-size:13px;color:var(--c-muted)}

/* Animateurs */
.host-card{text-align:center}
.host-card .ph{width:120px;height:120px;border-radius:50%;background:var(--c-sky);margin:0 auto;overflow:hidden}
.host-card .ph img{width:100%;height:100%;object-fit:cover}
.host-card .n{font-weight:600;margin-top:12px;color:var(--c-navy)}
.host-card .s{font-size:14px;color:var(--c-muted)}

/* Bloc annonceurs */
.cta-band{background:var(--c-blue-btn);color:#fff;border-radius:28px;padding:44px;display:flex;justify-content:space-between;align-items:center;gap:24px;flex-wrap:wrap}
.cta-band h2{margin:0;font-size:30px}.cta-band p{margin:8px 0 0;font-size:17px}

/* Emplacements publicitaires (vides tant qu'aucun code n'est ajouté) */
.ad-slot{margin:24px auto;text-align:center}
.ad-slot:empty{display:none}

/* Contenu */
.page-hero{background:var(--c-soft);padding:48px 0}
.page-hero h1{font-size:clamp(30px,4vw,44px);margin:0}
.page-hero p{color:var(--c-muted);margin:8px 0 0}
.content-area{display:flex;flex-wrap:wrap;gap:40px;padding-top:48px;padding-bottom:48px}
.content-main{flex:999 1 620px;min-width:0}
.content-side{flex:1 1 280px}
.entry-content{font-size:17px;line-height:1.75}
.entry-content p{margin:0 0 1.2em}
.entry-content h2{font-size:26px;margin-top:1.4em}
.entry-content a{text-decoration:underline}
.entry-content img{border-radius:16px}
.entry-meta{color:var(--c-muted);font-size:14px;display:flex;gap:12px;flex-wrap:wrap;margin:12px 0 0}
.featured{border-radius:24px;overflow:hidden;margin:0 0 28px}
.share{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:32px 0;padding:18px 0;border-top:1px solid var(--c-line);border-bottom:1px solid var(--c-line)}
.share strong{margin-right:6px}
.share a{display:inline-flex;align-items:center;gap:8px;padding:10px 16px;border-radius:999px;font-weight:600;font-size:14px;color:#fff}
.share svg{width:16px;height:16px;fill:currentColor}
.share .fb{background:#1877F2}.share .wa{background:#128C4B}.share .tt{background:#000}.share .cp{background:var(--c-soft);color:var(--c-navy);border:0;cursor:pointer;font-family:inherit}
.widget{background:var(--c-soft);border-radius:var(--radius);padding:22px;margin-bottom:24px}
.widget h2,.widget h3{font-size:18px}
.widget ul{margin:0;padding-left:18px}
.pagination{display:flex;gap:8px;justify-content:center;margin:32px 0;flex-wrap:wrap}
.pagination .page-numbers{padding:8px 14px;border-radius:10px;background:var(--c-soft);color:var(--c-navy)}
.pagination .current{background:var(--c-blue-btn);color:#fff}

/* Grille des programmes */
.days{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:24px}
.days button{border:0;background:var(--c-soft);color:var(--c-navy);padding:10px 18px;border-radius:999px;font-family:inherit;font-weight:600;cursor:pointer}
.days button[aria-selected="true"]{background:var(--c-blue-btn);color:#fff}
.day-panel{display:none}.day-panel.is-active{display:grid;gap:12px}
.prog-row{display:flex;gap:18px;align-items:center;border:1px solid var(--c-line);border-radius:18px;padding:16px 20px}
.prog-row .time{width:120px;font-weight:700;color:var(--c-blue-text);flex-shrink:0}
.prog-row .title{font-weight:600}
.prog-row .host{font-size:14px;color:var(--c-muted)}

/* Contact */
.contact-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px;margin-bottom:32px}
.contact-cards>a,.contact-cards>div{display:block;background:var(--c-soft);border-radius:18px;padding:20px;color:var(--c-navy)}
.contact-cards .social a,.widget .social a{background:var(--c-blue-btn)}
.contact-cards strong{display:block;margin-bottom:4px}

/* Pied de page */
.site-footer{background:var(--c-navy);color:var(--c-footer-text);margin-top:56px}
.site-footer a{color:var(--c-footer-text)}.site-footer a:hover{color:#fff}
.footer-cols{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:32px;padding-top:48px;padding-bottom:24px}
.footer-cols strong{color:#fff;display:block;margin-bottom:10px}
.footer-cols ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px;font-size:14px}
.footer-cols ul.social{flex-direction:row}
.footer-logo{display:inline-block}
.footer-logo img{height:auto;width:220px}
.footer-bottom{border-top:1px solid var(--c-footer-line);padding-top:18px;padding-bottom:110px;display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:13px}
.footer-bottom .credit a{color:#7DBCE3;font-weight:600}

/* Lecteur fixe */
.sticky-player{position:fixed;left:0;right:0;bottom:0;z-index:100;background:#fff;border-top:1px solid var(--c-line);box-shadow:0 -8px 24px rgba(14,42,71,.08)}
.sticky-player .wrap{display:flex;align-items:center;gap:16px;padding-top:12px;padding-bottom:12px}
.sticky-player .play-btn{width:48px;height:48px}.sticky-player .play-btn svg{width:18px;height:18px}
.sticky-player .info{flex:1;min-width:0}
.sticky-player .info .a{font-weight:600;font-size:15px}
.sticky-player .info .b{font-size:13px;color:var(--c-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sticky-player input[type=range]{width:110px;accent-color:var(--c-blue-btn)}
@media (max-width:600px){.sticky-player input[type=range]{display:none}.cta-band{padding:26px}.section-head h2{font-size:24px}}

@media (max-width:600px){
  .grid-4{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
  .host-card .ph{width:96px;height:96px}
  .topbar .wrap{flex-wrap:nowrap}
  .topbar .onair{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
  .hero .wrap{padding-top:36px;padding-bottom:40px;gap:28px}
  .hero .actions .btn{flex:1 1 auto;justify-content:center}
  .slot{padding:14px}.slot .title{font-size:16px}
  .prog-row{flex-direction:column;align-items:flex-start;gap:4px}.prog-row .time{width:auto}
}
