/*
Theme Name: Les Aventuriers des Maths
Theme URI: https://example.org/aventuriers-des-maths
Author: Création sur mesure
Description: Thème léger de contes mathématiques pour enfants de 6 à 10 ans. Univers enfantin original, énigmes, compatible Polylang FR/EN/ES/AR et RTL.
Version: 1.1.0
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: aventuriers-des-maths
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: education, blog, custom-logo, rtl-language-support, translation-ready, featured-images
*/
:root{--navy:#253d6c;--blue:#4e9cd8;--pink:#f47f8a;--yellow:#ffca64;--mint:#85cda6;--cream:#fff8e9;--white:#fff;--text:#354256;--shadow:0 13px 38px rgba(51,73,115,.12)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--cream);color:var(--text);font-family:'Trebuchet MS','Noto Sans Arabic',Arial,sans-serif;line-height:1.65}img{max-width:100%;height:auto}a{color:var(--navy);text-decoration:none}a:hover{text-decoration:underline}button,input,select{font:inherit}button{cursor:pointer}h1,h2,h3,h4{font-family:'Trebuchet MS','Noto Sans Arabic',Arial,sans-serif;line-height:1.25;color:var(--navy)}h1{font-size:clamp(2.25rem,4.5vw,4.5rem);letter-spacing:-.035em}h2{font-size:clamp(1.65rem,3vw,2.6rem)}h3{font-size:1.28rem}.container{width:min(1160px,calc(100% - 38px));margin-inline:auto}.skip-link{position:absolute;top:-100px;left:10px;background:white;padding:8px;z-index:100}.skip-link:focus{top:10px}
.site-header{position:relative;z-index:5;background:#fff;box-shadow:0 5px 25px rgba(39,65,106,.07)}.header-inner{min-height:91px;display:flex;align-items:center;justify-content:space-between;gap:20px}.brand{display:flex;align-items:center;gap:12px;min-width:190px}.brand:hover{text-decoration:none}.brand-icon{background:#ffe69e;border:3px solid #fff0c8;box-shadow:0 4px 0 #e9b34e;border-radius:18px;padding:5px 9px;font-size:30px;transform:rotate(-6deg)}.brand strong{display:block;color:var(--navy);line-height:1.14;font-size:1.24rem}.brand small{display:block;color:#e07872;font-weight:700;font-size:.7rem;letter-spacing:.08em}.brand-logo{max-height:65px;width:auto}.primary-nav{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.primary-nav a{border-radius:100px;font-weight:800;padding:10px 17px}.primary-nav a:hover,.primary-nav a:focus{background:#eaf6ff;text-decoration:none}.lang-switch{display:flex;align-items:center;gap:5px;flex-wrap:wrap}.lang-link{font-size:.75rem;line-height:1.2;padding:6px 7px;border-radius:12px;font-weight:700;background:#f7f5f0}.lang-link.active{background:var(--yellow);color:#473c25}
.hero{position:relative;isolation:isolate;background:linear-gradient(140deg,#96daf8 0%,#d6f0ff 55%,#fce4bc 100%);overflow:hidden;min-height:590px}.hero::before{content:'';position:absolute;inset:0;background-image:radial-gradient(circle at 10% 12%,#fff8 0 3px,transparent 4px),radial-gradient(circle at 78% 25%,#fff8 0 4px,transparent 5px);background-size:145px 95px}.hero::after{content:'';position:absolute;z-index:-1;bottom:-40px;left:-7%;width:114%;height:103px;background:var(--cream);border-radius:50% 50% 0 0}.hero-grid{display:grid;grid-template-columns:1fr 1.05fr;gap:24px;align-items:center;padding-block:90px 100px}.hero-copy{position:relative;z-index:2}.hero h1{margin:16px 0;color:#24436f;text-shadow:1px 2px #fff7}.hero p{font-size:1.2rem;max-width:510px;color:#365579}.eyebrow,.kicker{display:inline-flex;align-items:center;gap:5px;letter-spacing:.065em;text-transform:uppercase;font-size:.81rem;font-weight:900;color:#d36b61}.eyebrow{background:#fff7d7;border-radius:100px;padding:7px 15px}.button{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:49px;padding:11px 23px;border-radius:100px;background:#f1787c;color:#fff;font-weight:900;border:0;box-shadow:0 5px 0 #c4535e;transition:transform .15s,box-shadow .15s;text-decoration:none}.button:hover{transform:translateY(2px);box-shadow:0 3px 0 #c4535e;text-decoration:none;color:#fff}.button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #1c5695;outline-offset:3px}.button:disabled{opacity:.45;cursor:not-allowed}.button-secondary{background:#fff;color:var(--navy);border:2px solid #a6caea;box-shadow:0 4px 0 #a6caea}.button-secondary:hover{color:var(--navy);box-shadow:0 2px 0 #a6caea}.age-pills{display:flex;gap:9px;margin-top:31px;flex-wrap:wrap}.age-pills span{background:#fff8;box-shadow:0 3px 0 #7dbfcd44;padding:7px 13px;border-radius:50px;font-weight:800;color:#365675}
.hero-art{min-height:420px;position:relative;background-image:url('assets/hero-land.svg');background-position:center;background-repeat:no-repeat;background-size:contain;filter:drop-shadow(0 15px 15px #477d9d22)}.hero-art>div{position:absolute;filter:drop-shadow(2px 4px 2px #0002)}.hero-moon{font-size:43px;top:4%;right:12%;color:#ffd669}.hero-island{font-size:70px;bottom:10%;right:3%}.hero-ship{font-size:78px;bottom:13%;left:8%}.hero-chest{font-size:61px;bottom:3%;left:48%}.hero-num{font-size:32px;font-weight:900;color:#ed7985;background:#fff;border:4px solid #fff;border-radius:17px;padding:0 14px;transform:rotate(-10deg)}.num-one{top:13%;left:8%}.num-two{top:27%;left:27%;transform:rotate(12deg)}.num-three{top:12%;left:45%;transform:rotate(-3deg)}.hero-star{font-size:58px;top:17%;right:3%;color:white}
.section{padding-block:72px}.section-top{display:flex;justify-content:space-between;align-items:end;gap:15px;margin-bottom:31px}.section-top h2{margin:5px 0}.text-link{font-weight:900;color:#e46f70}.card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:25px}.story-card{background:#fff;border:4px solid #fff;border-radius:25px;overflow:hidden;box-shadow:var(--shadow);transition:transform .2s}.story-card:hover{transform:translateY(-5px)}.story-image{display:flex;justify-content:center;align-items:center;min-height:195px;background:linear-gradient(135deg,#b6e7eb,#fde5b5);overflow:hidden}.story-card:nth-child(3n+2) .story-image{background:linear-gradient(135deg,#fad8dc,#ffe6aa)}.story-card:nth-child(3n+3) .story-image{background:linear-gradient(135deg,#e2d3ff,#bfe4cf)}.story-image span{font-size:3rem}.story-image img{width:100%;height:220px;object-fit:cover}.story-info{padding:17px 19px 23px}.story-info h3{margin:13px 0 8px}.story-info p{margin:5px 0 15px}.story-tags{display:flex;flex-wrap:wrap;gap:7px}.story-tags span{background:#fff2d8;color:#95612d;border-radius:100px;font-size:.76rem;font-weight:900;padding:4px 10px}.story-tags span:nth-child(2){background:#e7f7f0;color:#397b64}.readmore{display:inline-block;font-weight:900;color:#e16f71}.empty-stories{grid-column:1/-1;background:#fff;border-radius:25px;text-align:center;padding:35px}.empty-stories span{font-size:3rem}.empty-stories a{font-weight:800;text-decoration:underline}
.parents-section{background:#e8efff;position:relative;padding:67px 0;margin-top:35px}.parents-section::before{content:'';position:absolute;top:-37px;left:0;width:100%;height:50px;background:radial-gradient(circle at 25px 0,var(--cream) 25px,transparent 26px) 0 0/50px 52px repeat-x}.parents-inner{display:flex;gap:30px;align-items:center}.parents-symbol{font-size:5rem;line-height:1}.parents-inner h2{margin:5px 0}.parents-inner p{max-width:720px}.footer{padding:32px 0;background:#253d6c;color:white}.footer-inner{display:flex;flex-wrap:wrap;gap:15px;justify-content:space-between;align-items:center}.footer strong{color:#ffe090}
.archive-main,.story-main{min-height:50vh;padding-block:46px 80px}.archive-main h1{font-size:2.6rem}.pagination{margin-top:30px}.breadcrumb{margin-bottom:24px;font-weight:800}.reading-story{max-width:850px;margin:0 auto;background:white;padding:clamp(20px,5vw,56px);border-radius:28px;box-shadow:var(--shadow)}.story-heading h1{font-size:clamp(2rem,4vw,3.25rem);margin:12px 0 28px}.story-banner{margin:15px 0 32px}.story-banner img{width:100%;border-radius:20px}.story-content{font-size:1.15rem;line-height:1.95}.story-content p{margin-bottom:1.45em}.story-content img{border-radius:15px}.story-content blockquote{background:#fff2dc;border-inline-start:6px solid var(--yellow);padding:12px 20px;border-radius:10px}.puzzle{background:#fff6df;border:3px dashed #f1c26b;border-radius:23px;padding:clamp(18px,4vw,35px);margin-top:43px}.puzzle-header{display:flex;align-items:center;gap:12px}.puzzle-header>span{font-size:2.5rem}.puzzle-header h2{font-size:1.8rem;margin:0}.question{font-size:1.25rem;font-weight:800;color:#39456a}.puzzle fieldset{padding:0;margin:12px 0;border:0;display:grid;gap:10px}.option{display:flex;align-items:center;gap:12px;background:#fff;border:2px solid #e4d3aa;padding:13px 16px;border-radius:14px;font-weight:800;cursor:pointer}.option:hover,.option:has(input:checked){border-color:#6caeaf;background:#e9fff8}.option input{accent-color:#2b8e89;width:20px;height:20px}.puzzle-actions{display:flex;gap:12px;flex-wrap:wrap;margin:20px 0}.hint-message,.feedback{padding:12px 16px;border-radius:12px;background:#e5efff;color:#344f78}.feedback.right,.victory{background:#e9f8e9;color:#2a673b}.feedback.wrong{background:#ffe8e4;color:#963f3b}.victory{padding:22px;border-radius:18px;margin-top:20px}.victory h3{color:#2a673b}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}[hidden]{display:none!important}
.page-article{background:#fff;border-radius:24px;padding:35px;margin-block:45px}.entry-content{overflow-wrap:break-word}.alignwide{max-width:1100px}.alignfull{width:100%}
html[dir='rtl'] body,.adm-rtl{direction:rtl;text-align:right}html[dir='rtl'] .hero-num{direction:ltr}html[dir='rtl'] .brand-icon{transform:rotate(6deg)}html[dir='rtl'] .breadcrumb a{direction:rtl}html[dir='rtl'] .hero-art{transform:scaleX(-1)}html[dir='rtl'] .hero-art>div{transform:scaleX(-1)}
@media(max-width:990px){.header-inner{flex-wrap:wrap;padding-block:14px}.primary-nav{order:3;width:100%;justify-content:center}.hero-grid{grid-template-columns:1fr 1fr}.hero-art{min-height:340px}.card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:700px){.container{width:min(100% - 28px,1160px)}.site-header .brand{min-width:auto}.header-inner{gap:8px}.brand strong{font-size:1rem}.brand-icon{font-size:22px}.lang-switch{justify-content:flex-end}.lang-link{font-size:.69rem}.primary-nav{gap:0}.primary-nav a{font-size:.83rem;padding:7px 9px}.hero-grid{display:flex;flex-direction:column;text-align:center;padding:45px 0 80px}.hero-copy p{font-size:1.06rem}.hero-art{width:100%;min-height:270px;max-width:500px}.age-pills{justify-content:center}.hero-num{font-size:20px}.hero-ship{font-size:48px}.hero-island{font-size:49px}.card-grid{grid-template-columns:1fr}.section{padding-block:46px}.section-top{align-items:start}.parents-inner{flex-direction:column;text-align:center}.footer-inner{justify-content:center;text-align:center}.reading-story{padding:20px}.puzzle-actions{flex-direction:column}.puzzle-actions .button{width:100%}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important}}
