:root{
    --bg: #0d0f14;
    --card: rgba(255,255,255,0.08);
    --card-strong: rgba(255,255,255,0.12);
    --border: rgba(255,255,255,0.15);
    --text: #e9eef7;
    --muted: #a6b0c2;
    --accent: #4da3ff;
    --accent-2: #7a5cff;
    --ok: #3ad29f;
    --danger: #ff6b6b;
    --radius: 18px;
    --shadow: 0 10px 30px rgba(0,0,0,.25);
    --blur: blur(16px);
    --maxw: 980px;
}

* { box-sizing: border-box; }
html,body { height: 100%; }
body{
    margin:0;
    font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
    color: var(--text);
    background:
            radial-gradient(1000px 800px at -10% -10%, #1b2333 0%, transparent 60%),
            radial-gradient(1100px 900px at 110% -20%, #181c2a 0%, transparent 60%),
            radial-gradient(800px 800px at 50% 120%, #121626 0%, transparent 60%),
            var(--bg);
    letter-spacing: .2px;
}

a{ color: var(--accent); text-decoration: none; }
a:hover{ text-decoration: underline; }

.topbar{
    position: sticky; top:0; z-index: 30;
    backdrop-filter: var(--blur);
    background: rgba(10,12,18,.5);
    border-bottom: 1px solid var(--border);
}
.topbar-inner{
    margin: 0 auto; max-width: var(--maxw);
    padding: 8px 18px; display:flex; align-items:center; gap:14px;
}
.topbar-inner>a{
    text-decoration: none;
}
.brand{
    display:flex; align-items:center; gap:10px; font-weight:700; font-size:18px; color: var(--text);
}
.brand-badge{
    width:28px; height:28px; border-radius:12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 6px 20px rgba(77,163,255,.35);
}
.brand-logo{
    height: 60px;
    width: auto;

}
.nav{ margin-left:auto; display:flex; gap:16px; }
.nav a{ color: var(--text); opacity:.85; }
.nav a:hover{ opacity:1; }

.container{
    margin: 24px auto; max-width: var(--maxw); padding: 0 18px;
}

.card{
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: var(--blur);
    max-width: 100vw;
}

.hero{
    padding: 28px; display:grid; gap:16px;
}
.hero h1{
    margin:0; font-size: 28px; letter-spacing:.2px;max-width: 100vw;
}
.hero p{ margin:0; color: var(--muted); line-height:1.5;max-width: 100vw }

.grid{
    display:grid; gap:18px;
}

.section{
    padding: 22px;
}

.btn{
    display:inline-flex; align-items:center; justify-content:center;
    gap:10px; padding: 12px 16px; border-radius: 14px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
    color: var(--text); cursor:pointer;
    transition: transform .06s ease, filter .2s ease, opacity .2s ease;
}
.btn:hover{ filter: brightness(1.05); }
.btn:active{ transform: translateY(1px) scale(.99); }
.btn.primary{
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-color: transparent;
    color: white; box-shadow: 0 10px 25px rgba(77,163,255,.35), 0 4px 12px rgba(122,92,255,.25);
}
.btn.danger{
    background: linear-gradient(135deg, #ff6b6b, #ff3b6e);
    border-color: transparent; color:white;
}

.input, .textarea{
    width:100%; border:1px solid var(--border); background: rgba(255,255,255,0.06);
    color: var(--text); border-radius: 12px; padding: 12px 14px; outline:none;
}
.textarea{ min-height: 120px; resize: vertical; }

.kv{ display:grid; gap:8px; }
.kv label{ color: var(--muted); font-size:13px; }

.list{
    list-style:none; padding:0; margin:0; display:grid; gap:10px;
}
.list li{
    padding:12px 14px; border:1px solid var(--border); border-radius:12px;
    display:flex; align-items:center; gap:10px; background: rgba(255,255,255,.05);
}
.list .sp{ margin-left: auto; display:flex; gap:10px; }

.notice{
    padding: 12px 14px;
    /*border:1px solid var(--border);*/
    border-radius:12px;
    color:#a4ffa1;
    background: rgba(200,255,120,.1);
}
.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.dz-title { font-weight: 700; margin-bottom: 8px; }
.dz-sub { opacity: .8; margin: 6px 0 14px; font-size: 13px; }
/* Upload dropzone */
.dropzone {
    border: 1px dashed rgba(255,255,255,0.3);
    border-radius: 16px; padding: 28px; text-align: center;
    transition: transform .2s ease, border-color .2s ease;
    cursor: pointer;
}
.dropzone.dragover{
    border-color: var(--ok);
    background: rgba(58,210,159,.08);
    transform: scale(1.01);
}
.progress{
    margin-top:12px; height: 10px; background: rgba(255,255,255,.08);
    border:1px solid var(--border); border-radius:999px; overflow:hidden;
    display:none;
}
.progress .bar{
    height:100%; width:0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transition: width .15s ease;
}
.spinner{
    display:none; width:22px; height:22px; border-radius:999px;
    border:2px solid rgba(255,255,255,.25); border-top-color: var(--text);
    animation: spin .8s linear infinite; margin-left:8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Footer */
.footer{
    margin: 24px auto 80px; max-width: var(--maxw); padding: 18px;
    display:flex; flex-wrap: wrap; gap:10px; justify-content:space-between; color: var(--muted);
}
.footer a{ color: var(--muted); }
.small{ font-size: 12px; opacity:.85; }


/* Petites icônes inline */
.icon {
    width: 18px; height: 18px; flex: 0 0 18px;
}

/* Barre au-dessus de la card (bouton Retour) */
.toolbar {
    display: flex; align-items: center; gap: 10px;
}

/* Permet de placer un bouton dans le coin de la section */
.section { position: relative; }
.corner-action {
    position: absolute; top: 16px; right: 16px; z-index: 2;
}

/* Évite que le titre passe sous le bouton de coin */
.section.has-corner-action h2 { padding-right: 140px; }

/* Variante plus “iOS” pour un bouton discret */
.btn.ghost{
    background: rgba(255,255,255,0.04);
    border-color: var(--border);
    box-shadow: none;
}
.btn.ghost:hover{ filter: brightness(1.05); }

/* Bloc QR à droite des liens */
.links-with-qr{
    grid-template-columns: 1fr auto; /* liens à gauche, QR à droite */
    align-items: start; gap: 18px;
}
.qr-panel{
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    min-width: 210px;
}
.qr-title{
    font-size: 13px; color: var(--muted); text-align: center;
}
.qr-panel img{
    width: 180px; height: 180px; border-radius: 12px;
    background: white; padding: 10px; /* style “iOS” propre autour du QR */
}

/* Petite aide visuelle pour le QR et autres cartes */
.qr-panel img{ background:#fff; }


#ad-left, #ad-right {
    position: fixed; top: 150px; z-index: 40; width: var(--rail-w, 300px); display: none;
}
#ad-left{ left: 16px; } #ad-right{ right: 16px; }
.ad-rail-inner{ display: grid; gap: 12px; max-height: var(--rail-maxh, 70vh); overflow: visible; }
#ad-left img, #ad-right img{
    cursor: pointer;
}
.square-ad, .rectangle-ad{
    width: 100%; height: auto; display:block;
    border-radius:16px; border:1px solid var(--border); box-shadow: var(--shadow);
    background: var(--card-strong); object-fit: cover;
}
.square-ad{ aspect-ratio: 1/1; }
.rectangle-ad{ aspect-ratio: 1/2; }
.ad-link{ display:block; }
.ad-link img{ display:block; width:100%; height:auto; }

#wget-cmd { max-width: 100%; flex: 1 1 auto; }
/* Sous-titre rotatif */
/* H2 rotatif — style hero */
.sub-rotator{
    margin: 4px 0 6px 0;
    font-size: clamp(18px, 2.1vw, 26px); /* responsive */
    font-weight: 800;
    letter-spacing: .2px;
    line-height: 1.25;

    /* Dégradé façon bouton .primary */
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;

    /* Glow très doux pour le look “iOS” sur fond sombre */
    text-shadow: 0 0 18px rgba(77,163,255,.25), 0 0 10px rgba(122,92,255,.18);
}

/* Le morceau qui change (on peut le rendre encore plus lisible) */
.rotator-text{
    display: inline-block;
    min-width: 20ch;                 /* évite le saut de layout */
    padding-inline: 6px;
    border-radius: 10px;
    color: var(--accent);
    /* léger voile pour bien détacher le texte rotatif */
    background: linear-gradient(135deg, rgba(77,163,255,.10), rgba(122,92,255,.10));
    -webkit-background-clip: padding-box;
    background-clip: padding-box;

    opacity: 1;
    transition: opacity .35s ease;
    will-change: opacity;
}
.rotator-text.is-out{ opacity: 0; }
/* états d'animation */
.rotator-text.is-out { opacity: 0; }

/* --- Lang selector (iOS26-like) --- */
/* --- Lang selector (iOS26-like) --- */
.lang-select {
    appearance: none;              /* supprime le style natif */
    -webkit-appearance: none;
    -moz-appearance: none;
    margin-top: -3px;
    background: var(--card);       /* fond semi-transparent */
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);  /* arrondi global */
    padding: 6px 28px 6px 12px;    /* espace pour la flèche */
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: border .2s, background .2s;
    min-width: 120px;

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a6b0c2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E<polyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
}
code{
    max-width: 100vw;
    word-break: break-all;
}
.lang-select:hover {
    border-color: var(--accent);
}

.lang-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(77,163,255,0.25); /* glow bleu iOS */
}

/* Options */
.lang-select option {
    background: var(--bg);   /* fond sombre au menu déroulant */
    color: var(--text);
}
/* survol d'une option */
.lang-select option:hover {
    background: var(--accent);
    color: #fff;
}

/* option sélectionnée (dans la liste) */
.lang-select option:checked {
    background: var(--accent);
    color: #fff;
}

/* certains navigateurs utilisent select:focus */
.lang-select:focus option:checked {
    background: var(--accent);
    color: #fff;
}

.wget-block{
    display:flex; gap:10px; align-items:center;
}
/* Responsive */

/* Respecte l’accessibilité : pas d’animation si l’utilisateur préfère réduire les mouvements */
@media (prefers-reduced-motion: reduce){
    .rotator-text{ transition: none !important; }
}

@media (max-width: 640px){
    .hero h1{ font-size: 24px; }
}
/* Responsive: repasse en 1 colonne sur mobile */
@media (max-width: 720px){
    .links-with-qr{ grid-template-columns: 1fr !important; }
}
@media (max-width: 1300px){
    #wget-cmd{
        max-width: 450px;
    }
    .grid{
        max-width: 60vw
    }
}

@media (max-width: 1000px){
    #ad-left, #ad-right { display:none !important; }
}
@media (max-width: 900px){
    .grid{
        max-width: unset;
    }
}
@media (max-width: 740px){
    .section.has-corner-action h2{
        padding-right: 0px !important;
    }
    #grid-link{
        max-width: 60vw;
    }
}
/* Petites tailles : un poil plus compact */
@media (max-width: 640px){
    .sub-rotator{ font-size: 18px; }
    .rotator-text{ min-width: 17ch; }
    #wget-cmd{
        max-width: 370px;
    }
}
@media (max-width: 520px){
    #wget-cmd{
        max-width: 250px;
    }
}
@media (max-width: 480px){
    .ac-link{
        display: none;
    }
}
@media (max-width: 400px){
    .ac-link2{
        display: none;
    }
    .wget-block{
        display: block;
    }
    #wget-cmd{
        max-width: 290px;
    }
}
@media (max-width: 350px){
    .ac-link3{
        display: none;
    }
}
@media (max-width: 370px){
    .section{
      padding: 10px;
    }

    .container{
        padding: 0px 3px;
    }
}
@media (max-width: 340px){

    .hero{
        padding: 10px;
    }

    .list li{
        max-width:90vw;
        display: grid;
    }
}
