/* static/css/home.css */
/* Reset main */
main{padding:0!important}

/* Corrections pour mobile/tablette avec header fixe */
@media (max-width:768px){
  main{margin-top:-60px!important;padding-top:0!important}
}
@media (min-width:769px) and (max-width:1024px){
  main{margin-top:-70px!important;padding-top:0!important}
}
/* Hero */
.hero{position:relative;width:100%!important;margin:0!important;padding:4rem 2rem 2rem!important;background:url('/mediasite/hero.webp') no-repeat center center;background-size:cover;text-align:center;color:#fff;box-sizing:border-box;border-bottom:3px solid #a76107;height:300px;overflow:hidden;background-position:center center}
.hero::before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background:linear-gradient(to bottom,rgba(0,0,0,.4) 0%,rgba(0,0,0,.2) 50%,rgba(0,0,0,.4) 100%);pointer-events:none;z-index:0}
.hero h1,.hero p,.hero .credit{position:relative;z-index:1}
.hero h1,.hero p{text-shadow:-1px -1px 0 #000,1px -1px 0 #000,-1px 1px 0 #000,1px 1px 0 #000}
.hero .credit{position:absolute;bottom:.5rem;right:1rem;font-size:.75rem;color:rgba(255,255,255,.8)}
/* Introduction */
.intro{padding:3rem 2rem;max-width:800px;margin:auto;text-align:center;line-height:1.6}
.intro h2{font-size:1.5rem;color:#333;margin-bottom:1rem}
.intro p{margin:0}
.intro ul{display:inline-block;text-align:left;padding-left:0;margin-top:1rem;margin-bottom:2rem;list-style-position:outside}
.intro ul li{margin-bottom:.6rem;line-height:1.4}
/* Rubriques */
.rubriques{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:2rem;padding:2rem;max-width:1000px;margin:auto;box-sizing:border-box}
.rubrique-card{position:relative;height:260px;background-size:cover;background-position:center;border-radius:.5rem;overflow:hidden;text-decoration:none;color:#fff;box-shadow:0 2px 8px rgba(0,0,0,.1);transition:transform .3s}
.rubrique-card:hover{transform:translateY(-5px)}
.rubrique-overlay{position:absolute;left:0;bottom:0;width:100%;background:rgba(0,0,0,.72);box-sizing:border-box;display:grid;place-items:center;text-align:center;padding:.75rem 1rem;max-height:3em;overflow:hidden;transition:max-height .3s ease,padding .3s ease}
.rubrique-card:hover .rubrique-overlay{max-height:40%;padding:.7rem 1rem 1.5rem 1rem}
.rubrique-overlay h3{margin:0;font-size:1.25rem;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rubrique-overlay p{opacity:0;transform:translateY(10px);transition:opacity .2s ease,transform .2s ease}
.rubrique-card:hover .rubrique-overlay p{opacity:1;transform:translateY(0)}
/* Chroniques */
.chroniques-home{padding:4rem 2rem;max-width:1000px;margin:auto;box-sizing:border-box}
.chroniques-home h2{font-size:2rem;text-align:center;color:var(--text-main);margin-bottom:2rem}
.chroniques-list-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:2rem}
.chroniques-card{background:var(--bg-main);padding:1.5rem;border-radius:.5rem;box-shadow:0 2px 6px rgba(0,0,0,.1);transition:transform .2s}
.chroniques-card:hover{transform:translateY(-4px);box-shadow:0 6px 12px rgba(0,0,0,.15)}
.chroniques-card h3{margin:0 0 .5rem;font-size:1.25rem;color:var(--text-main);text-decoration:none}
.chroniques-card time{display:block;font-size:.875rem;color:#ffffff;margin-bottom:.75rem}
.chroniques-card p{margin:0;line-height:1.5;color:var(--text-main)}
.all-chroniques-link{text-align:center;margin-top:2.5rem}
.all-chroniques-link a{display:inline-block;font-size:1rem;color:#a76107;text-decoration:none;font-weight:500}
.all-chroniques-link a:hover{text-decoration:underline}
/* Responsive */
@media (max-width:600px){
.rubrique-overlay{max-height:35%!important;padding:.5rem 1rem 1.5rem 1rem!important}
.rubrique-overlay p{opacity:1!important;transform:none!important}
.intro{padding:1.5rem 1rem!important;max-width:100%!important;margin:1rem auto!important;line-height:1.4!important}
.intro h2{font-size:1.5rem!important;margin-bottom:.75rem!important}
.intro p{white-space:normal!important;overflow-wrap:anywhere!important;word-break:break-word!important;text-indent:0!important}
.chroniques-home{padding:2rem 1rem}
.chroniques-home h2{font-size:1.75rem;margin-bottom:1.5rem}
.chroniques-list-grid{grid-template-columns:1fr;gap:1.5rem}
.all-chroniques-link{margin-top:1.5rem}
}
@media (min-width:769px) and (max-width:1024px){
/* Correction hero collé au header tablette */
.hero{padding-top:calc(70px + 4rem)!important}
.hero p{display:none!important}

/* Correction chevauchement tablette */
.intro{margin-bottom:2rem!important}
.rubriques{margin-top:0!important;padding-top:1rem!important}

/* Correction thème sombre tablette */
:root.theme-dark body{background-color:var(--bg-page)!important}
:root.theme-dark main{background-color:var(--bg-page)!important}
:root.theme-dark .intro{background-color:var(--bg-page)!important;color:var(--text-main)!important}
:root.theme-dark .chroniques-home{background-color:var(--bg-page)!important}
}
@media (max-width:768px){
.hero{padding:calc(60px + 1.5rem) 1rem 1rem!important;max-height:50vh!important;overflow:hidden!important}
.hero h1{font-size:1.4rem!important;margin-bottom:.5rem!important}
.hero p{display:none!important}
.hero .credit{font-size:.6rem!important;bottom:.25rem!important;right:.5rem!important}

/* Correction chevauchement mobile */
.intro{margin-bottom:2rem!important}
.rubriques{margin-top:0!important;padding-top:1rem!important}

/* Correction thème sombre mobile */
:root.theme-dark body{background-color:var(--bg-page)!important}
:root.theme-dark main{background-color:var(--bg-page)!important}
:root.theme-dark .intro{background-color:var(--bg-page)!important;color:var(--text-main)!important}
:root.theme-dark .chroniques-home{background-color:var(--bg-page)!important}
}