/*
 * FEUILLE DE STYLE — PERSONNALISATION
 * ===================================
 * Cherchez les sélecteurs ci-dessous pour modifier la page :
 * .site-header / .brand          : bandeau supérieur et logo personnel
 * .notion-cover                  : grande bannière aurores
 * .hero / .hero-actions          : titre et boutons d'accueil
 * .project-card                  : petites cartes de présentation
 * .detail-header-logo            : logos des intégrations dans les en-têtes
 * .detail-card / .detail-body    : fiches détaillées
 * .lovelace-preview              : emplacements des captures Lovelace
 * .action-group                  : groupes de liens (installation, GitHub, etc.)
 * .contrib-item                  : contributions
 * .btn.kofi                      : bouton Ko-fi violet
 *
 * Conseil : pour personnaliser sans casser le thème, ajoutez vos règles
 * tout en bas de ce fichier : elles auront priorité à spécificité égale.
 * Pour la version mobile, utilisez @media(max-width:760px){...}.
 *
 * Le logo Quitoque est une image externe : sa disponibilité dépend
 * du site media.touteslesbox.fr. Pour l'héberger localement, placez
 * l'image dans assets/ et remplacez sa valeur 'logo' dans index.php.
 */ @import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');
:root {
    --bg:#0a101b;
    --bg2:#101a2a;
    --surface:#152134;
    --ink:#eef4ff;
    --muted:#a2afc3;
    --line:rgba(185,209,240,.13);
    --accent:#65e3c3;
    --font:'DM Sans',system-ui,sans-serif;
    --display:'Space Grotesk',system-ui,sans-serif
}

* {
    box-sizing:border-box
}

html {
    scroll-behavior:smooth;
    scroll-padding-top:90px
}

body {
    margin:0;
    background:var(--bg);
    color:var(--ink);
    font-family:var(--font);
    line-height:1.65
}

a {
    color:inherit;
    text-decoration:none
}

a:focus-visible,button:focus-visible {
    outline:3px solid var(--accent);
    outline-offset:4px
}

button {
    font:inherit
}

img {
    max-width:100%;
    display:block
}

.shell {
    width:min(1160px,calc(100% - 48px));
    margin:auto
}

.skip {
    position:absolute;
    left:12px;
    top:-80px;
    z-index:50;
    background:white;
    color:black;
    padding:10px
}

.skip:focus {
    top:12px
}

.site-header {
    position:sticky;
    top:0;
    z-index:30;
    background:rgba(10,16,27,.88);
    backdrop-filter:blur(18px);
    border-bottom:1px solid var(--line)
}

.nav-inner {
    display:flex;
    align-items:center;
    gap:34px;
    min-height:80px
}

.brand {
    display:flex;
    align-items:center;
    gap:12px;
    font-family:var(--display);
    font-size:21px;
    font-weight:700;
    line-height:1.1;
    white-space:nowrap
}

.brand-icon {
    width:41px;
    height:41px;
    border-radius:13px;
    background:var(--accent);
    color:#092019;
    display:grid;
    place-items:center;
    font-size:30px
}

.brand-accent {
    color:var(--accent)
}

.brand small {
    display:block;
    font:500 9px var(--font);
    letter-spacing:2.2px;
    color:var(--muted);
    margin-top:4px
}

.nav-links {
    display:flex;
    gap:25px;
    margin-left:auto
}

.nav-links a {
    font-size:13px;
    font-weight:700;
    color:#c5d0df;
    transition:color .2s
}

.nav-links a:hover,.footer a:hover {
    color:var(--accent)
}

.lang-switch {
    display:flex;
    gap:9px;
    align-items:center;
    font-size:12px;
    color:#718198;
    font-weight:700
}

.lang-switch a.active {
    color:var(--accent)
}

.mobile-menu {
    display:none
}

.hero {
    position:relative;
    overflow:hidden;
    background:radial-gradient(ellipse at 72% 40%,#17324a 0,transparent 42%),linear-gradient(135deg,#0d1726,#0a101b 70%)
}

.hero:after {
    content:'';
    position:absolute;
    inset:0;
    pointer-events:none;
    background-image:linear-gradient(rgba(255,255,255,.018) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.018) 1px,transparent 1px);
    background-size:48px 48px;
    mask-image:linear-gradient(90deg,transparent,#000)
}

.hero-inner {
    min-height:590px;
    display:grid;
    grid-template-columns:1.06fr .94fr;
    align-items:center;
    gap:60px;
    position:relative;
    z-index:1
}

.eyebrow,.kicker {
    font:700 11px var(--font);
    letter-spacing:2.6px;
    color:var(--accent);
    text-transform:uppercase
}

.eyebrow {
    display:flex;
    gap:12px;
    align-items:center
}

.pulse {
    width:9px;
    height:9px;
    border-radius:50%;
    background:var(--accent);
    box-shadow:0 0 0 5px rgba(101,227,195,.12)
}

h1,h2,h3,h4,p {
    margin-top:0
}

h1,h2,h3 {
    font-family:var(--display);
    letter-spacing:-.045em
}

h1 {
    font-size:clamp(43px,5.6vw,75px);
    line-height:1.08;
    margin:22px 0 25px;
    max-width:650px
}

h2 {
    font-size:clamp(29px,3.6vw,44px);
    line-height:1.16;
    margin:12px 0
}

h3 {
    line-height:1.25
}

.hero-lead {
    font-size:17px;
    line-height:1.85;
    color:#b6c3d4;
    max-width:520px
}

.hero-actions {
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    margin-top:30px
}

.btn {
    display:inline-flex;
    justify-content:center;
    align-items:center;
    gap:18px;
    padding:13px 21px;
    border-radius:9px;
    font-weight:700;
    font-size:13px;
    transition:transform .2s,background .2s,border .2s;
    border:1px solid transparent
}

.btn:hover {
    transform:translateY(-2px)
}

.btn.primary {
    background:var(--accent);
    color:#08231e
}

.btn.ghost {
    border-color:#334357;
    background:#152236;
    color:#edf5ff
}

.btn.outline {
    border-color:#334357;
    background:transparent;
    color:#dbe7f8
}

.btn.small {
    padding:10px 14px;
    font-size:12px;
    gap:7px
}

.btn.light {
    background:#fff;
    color:#113128
}

.hero-stats {
    display:flex;
    gap:38px;
    margin-top:58px
}

.hero-stats div {
    display:flex;
    flex-direction:column
}

.hero-stats strong {
    font:700 33px var(--display);
    color:#fff
}

.hero-stats span {
    font-size:12px;
    color:#a2b0c2
}

.hero-visual {
    position:relative;
    min-height:420px;
    display:grid;
    place-items:center
}

.orbit {
    position:absolute;
    border:1px solid rgba(129,205,202,.22);
    border-radius:50%;
    aspect-ratio:1
}

.orbit-one {
    width:350px
}

.orbit-two {
    width:255px;
    border-style:dashed;
    border-color:rgba(129,205,202,.19)
}

.central-home {
    height:145px;
    width:145px;
    border-radius:33px;
    background:linear-gradient(145deg,#78eed2,#279b95);
    color:#082e2c;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    font:700 72px var(--display);
    box-shadow:0 20px 90px rgba(74,221,193,.22);
    line-height:.85;
    transform:rotate(-5deg)
}

.central-home span {
    font:700 10px var(--font);
    text-align:center;
    letter-spacing:2px;
    margin-top:7px;
    line-height:1.3
}

.satellite {
    position:absolute;
    width:68px;
    height:68px;
    border-radius:21px;
    display:grid;
    place-items:center;
    font-size:30px;
    background:#1d3047;
    border:1px solid #34475e;
    box-shadow:0 18px 30px #0004
}

.sat-1 {
    top:35px;
    left:15%
}

.sat-2 {
    top:70px;
    right:9%
}

.sat-3 {
    bottom:52px;
    left:12%
}

.sat-4 {
    bottom:25px;
    right:15%
}

.visual-caption {
    position:absolute;
    bottom:-9px;
    letter-spacing:3px;
    font-size:10px;
    color:#7d94aa
}

.section {
    padding:100px 0
}

.section-muted {
    background:#0e1827
}

.section-head {
    display:flex;
    justify-content:space-between;
    align-items:end;
    gap:32px;
    margin-bottom:37px
}

.section-head p {
    color:var(--muted);
    max-width:340px;
    font-size:14px;
    margin:0
}

.project-grid {
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:17px
}

.project-card {
    --tone:#e8b95d;
    position:relative;
    min-height:335px;
    display:flex;
    flex-direction:column;
    padding:26px;
    border-radius:16px;
    border:1px solid var(--line);
    background:linear-gradient(145deg,rgba(29,45,63,.95),#101b2b);
    transition:transform .2s,border-color .2s
}

.project-card:hover {
    transform:translateY(-5px);
    border-color:var(--tone)
}

.cyan {
    --tone:#45d6d0
}

.detail-card.cyan {
    --tone:#45d6d0
}

.green {
    --tone:#78d8a3
}

.blue {
    --tone:#76baff
}

.pink {
    --tone:#ee9bc6
}

.amber {
    --tone:#e8b95d
}

.card-top {
    display:flex;
    align-items:center;
    justify-content:space-between
}

.project-icon {
    height:48px;
    width:48px;
    border-radius:14px;
    background:color-mix(in srgb,var(--tone) 15%,transparent);
    display:grid;
    place-items:center;
    font-size:25px
}

.status {
    display:flex;
    align-items:center;
    gap:7px;
    font-size:10px;
    color:#a6c4b8
}

.status-dot {
    width:6px;
    height:6px;
    background:#65e3a6;
    border-radius:50%
}

.project-category {
    color:var(--tone);
    font-size:11px;
    letter-spacing:1.3px;
    text-transform:uppercase;
    font-weight:700;
    margin-top:29px
}

.project-card h3 {
    font-size:23px;
    margin:8px 0 12px
}

.project-card p {
    font-size:13px;
    line-height:1.75;
    color:#a8b6c9;
    flex:1
}

.card-tags {
    display:flex;
    gap:6px;
    flex-wrap:wrap;
    margin:15px 0 24px
}

.card-tags span {
    border:1px solid #324156;
    border-radius:5px;
    padding:3px 8px;
    font-size:10px;
    color:#bac7d8
}

.card-bottom {
    display:flex;
    justify-content:space-between;
    align-items:center;
    border-top:1px solid var(--line);
    padding-top:17px
}

.text-link {
    font-size:12px;
    font-weight:700;
    color:var(--tone)
}

.icon-link {
    color:#a4b6cb
}

.table-wrap {
    overflow-x:auto;
    border:1px solid var(--line);
    border-radius:14px
}

table {
    width:100%;
    border-collapse:collapse;
    min-width:740px
}

th {
    text-align:left;
    color:#a6b8cb;
    font-size:11px;
    text-transform:uppercase;
    letter-spacing:1px;
    background:#17263a
}

th,td {
    padding:20px;
    border-bottom:1px solid var(--line)
}

td {
    font-size:13px;
    color:#c1ccda
}

td:first-child {
    font-weight:700;
    color:white
}

tr:last-child td {
    border-bottom:0
}

tbody tr:hover {
    background:#17283a
}

.news-list {
    border-top:1px solid var(--line)
}

.news-item {
    display:grid;
    grid-template-columns:150px 1fr 20px;
    align-items:center;
    gap:22px;
    padding:23px 12px;
    border-bottom:1px solid var(--line);
    transition:background .2s
}

.news-item:hover {
    background:#142236
}

.news-item time {
    font-size:12px;
    color:var(--accent);
    font-weight:700
}

.news-item strong {
    font:700 16px var(--display)
}

.news-item p {
    font-size:13px;
    color:var(--muted);
    margin:5px 0 0
}

.news-arrow {
    color:var(--accent)
}

.detail-card {
    --tone:#e8b95d;
    background:#111f30;
    border:1px solid var(--line);
    border-radius:18px;
    overflow:hidden;
    margin-bottom:28px;
    scroll-margin-top:100px
}

.detail-card.green {
    --tone:#78d8a3
}

.detail-card.blue {
    --tone:#76baff
}

.detail-card.pink {
    --tone:#ee9bc6
}

.detail-header {
    display:flex;
    justify-content:space-between;
    padding:34px 36px 24px;
    border-bottom:1px solid var(--line)
}

.detail-kicker {
    color:var(--tone);
    font-size:12px;
    font-weight:700
}

.detail-kicker span {
    padding:0 8px;
    color:#74869a
}

.detail-header h3 {
    font-size:31px;
    margin:8px 0
}

.detail-header p {
    color:var(--muted);
    font-size:14px;
    margin:0;
    max-width:700px
}

.detail-number {
    font:700 52px var(--display);
    color:#273c50
}

.detail-body {
    display:grid;
    grid-template-columns:1fr 1.1fr;
    gap:34px;
    padding:31px 36px 36px;
    align-items:center
}

.detail-copy h4 {
    font:700 14px var(--display);
    margin:0 0 14px
}

.feature-list {
    list-style:none;
    margin:0;
    padding:0
}

.feature-list li {
    display:flex;
    gap:12px;
    align-items:start;
    font-size:13px;
    color:#c2cedc;
    padding:7px 0
}

.feature-list li span {
    color:var(--tone);
    font-weight:700
}

.compat {
    font-size:12px;
    color:#a5b6c8;
    margin:20px 0
}

.detail-actions {
    display:flex;
    gap:8px;
    flex-wrap:wrap
}

.detail-media {
    min-width:0
}

.image-triptych {
    display:grid;
    grid-template-columns:1.65fr 1fr 1fr;
    gap:10px;
    align-items:start
}

.image-triptych figure,.single-shot {
    margin:0
}

.image-triptych a {
    display:block;
    background:#0b1421;
    border:1px solid #304055;
    border-radius:9px;
    overflow:hidden
}

.image-triptych img {
    height:170px;
    width:100%;
    object-fit:contain
}

.image-triptych figcaption,.single-shot figcaption {
    font-size:10px;
    line-height:1.5;
    color:#96a9bc;
    margin-top:9px
}

.single-shot img {
    max-height:260px;
    margin:auto;
    object-fit:contain;
    border-radius:10px
}

.media-placeholder {
    min-height:240px;
    border-radius:12px;
    background:radial-gradient(circle at 50% 40%,color-mix(in srgb,var(--tone) 18%,transparent),transparent 62%),#0b1727;
    border:1px solid #27394e;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    gap:7px
}

.media-placeholder span {
    font-size:58px
}

.media-placeholder strong {
    font:700 21px var(--display)
}

.media-placeholder small {
    font-size:10px;
    letter-spacing:2px;
    color:#899bad
}

.contrib-grid {
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:14px
}

.contrib-item {
    display:flex;
    align-items:start;
    gap:17px;
    padding:23px;
    border:1px solid var(--line);
    border-radius:12px;
    background:#111e2e;
    transition:background .2s
}

.contrib-item:hover {
    background:#1a2a40
}

.contrib-emoji {
    font-size:25px
}

.contrib-item div {
    flex:1
}

.contrib-item h3 {
    font-size:16px;
    margin:0 0 7px
}

.contrib-item p {
    font-size:12px;
    color:var(--muted);
    margin:0
}

.contrib-arrow {
    color:var(--accent)
}

.about-grid {
    display:grid;
    grid-template-columns:1.1fr .9fr;
    gap:100px;
    align-items:center
}

.about-grid p {
    color:var(--muted);
    font-size:15px;
    line-height:1.9
}

.about-links {
    display:flex;
    gap:20px;
    flex-wrap:wrap;
    margin-top:26px
}

.about-links a {
    font-weight:700;
    font-size:13px;
    color:var(--accent)
}

.info-panel {
    background:#16263a;
    border:1px solid #314358;
    border-radius:15px;
    padding:30px
}

.info-panel h3 {
    font-size:23px
}

.info-panel p {
    font-size:13px
}

.cta {
    background:linear-gradient(110deg,#36c9ae,#83ebc7);
    color:#082b28;
    padding:53px 0
}

.cta-inner {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px
}

.cta .kicker {
    color:#1b6457
}

.cta h2 {
    margin:8px 0
}

.cta p {
    margin:0;
    font-size:14px
}

.footer {
    padding:34px 0;
    border-top:1px solid var(--line)
}

.footer-inner {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px
}

.footer strong {
    font-family:var(--display)
}

.footer p,.footer a {
    font-size:12px;
    color:#93a5ba;
    margin:6px 0 0
}

@media(max-width:1050px) {
    .project-grid {
        grid-template-columns:repeat(2,1fr)
    }

    .nav-inner {
        gap:16px
    }

    .nav-links {
        gap:14px
    }

    .hero-inner {
        gap:20px
    }

    .hero-visual {
        transform:scale(.85)
    }

}

@media(max-width:760px) {
    .shell {
        width:min(100% - 34px,1160px)
    }

    .nav-inner {
        min-height:70px
    }

    .mobile-menu {
        display:block;
        margin-left:auto;
        background:transparent;
        color:white;
        border:1px solid #32445b;
        border-radius:7px;
        padding:5px 10px
    }

    .nav-links {
        display:none;
        position:absolute;
        left:0;
        right:0;
        top:70px;
        background:#111d2d;
        padding:20px 25px;
        flex-direction:column;
        gap:18px;
        border-bottom:1px solid var(--line)
    }

    .nav-links.open {
        display:flex
    }

    .lang-switch {
        margin-left:0
    }

    .hero-inner {
        grid-template-columns:1fr;
        min-height:unset;
        padding:80px 0 65px
    }

    .hero-visual {
        display:none
    }

    .hero-stats {
        margin-top:45px;
        gap:26px
    }

    .hero-stats strong {
        font-size:27px
    }

    .hero-lead {
        font-size:15px
    }

    .section {
        padding:70px 0
    }

    .section-head {
        display:block
    }

    .section-head p {
        margin-top:14px
    }

    .detail-body {
        grid-template-columns:1fr;
        padding:25px
    }

    .detail-header {
        padding:25px
    }

    .detail-header h3 {
        font-size:26px
    }

    .detail-number {
        font-size:35px
    }

    .about-grid {
        grid-template-columns:1fr;
        gap:30px
    }

    .contrib-grid {
        grid-template-columns:1fr
    }

    .news-item {
        grid-template-columns:95px 1fr 14px;
        gap:10px
    }

    .news-item strong {
        font-size:14px
    }

    .cta-inner {
        align-items:start;
        flex-direction:column
    }

    .image-triptych img {
        height:130px
    }

}

@media(max-width:500px) {
    .project-grid {
        grid-template-columns:1fr
    }

    .hero-stats {
        gap:17px
    }

    .hero-stats span {
        font-size:10px
    }

    .hero-actions .btn {
        flex:1
    }

    .detail-header {
        gap:10px
    }

    .detail-number {
        display:none
    }

    .image-triptych {
        grid-template-columns:1fr 1fr
    }

    .image-triptych figure:first-child {
        grid-column:1/-1
    }

    .image-triptych figure:first-child img {
        height:220px
    }

    .image-triptych img {
        height:145px
    }

    .footer-inner {
        align-items:start;
        flex-direction:column
    }

    .brand {
        font-size:19px
    }

}

@media(prefers-reduced-motion:reduce) {
    html {
        scroll-behavior:auto
    }

    *,*:before,*:after {
        transition:none!important;
        animation:none!important
    }

}

/* Identité inspirée de la couverture Notion : neige, aurores, nuit bleutée. */ .notion-cover {
    height:clamp(215px,32vw,430px);
    background:#122c56 url('banniere-aurores.webp') center 48%/cover no-repeat;
    position:relative
}

.notion-cover:after {
    content:"";
    position:absolute;
    inset:auto 0 0;
    height:35%;
    background:linear-gradient(transparent,rgba(9,20,38,.36))
}

.hero {
    background:radial-gradient(circle at 80% 20%,rgba(76,202,180,.14),transparent 42%),linear-gradient(135deg,#0c1b33,#132746 70%,#0d1830)
}

.hero-inner {
    min-height:460px;
    padding-top:55px;
    padding-bottom:55px
}

.hero-visual {
    min-height:350px;
    display:grid;
    place-items:center;
    transform:none
}

.portrait-halo {
    width:min(320px,82%);
    aspect-ratio:1;
    border-radius:50%;
    padding:7px;
    background:linear-gradient(135deg,#72ebd5,#cba3ff,#ffcf90);
    box-shadow:0 25px 85px rgba(54,220,193,.18)
}

.portrait-halo img {
    width:100%;
    height:100%;
    border-radius:50%;
    object-fit:cover;
    border:5px solid #152b46
}

.visual-caption {
    bottom:0
}

.project-card,.detail-card,.contrib-item {
    box-shadow:0 7px 26px rgba(0,0,0,.12)
}

@media(max-width:760px) {
    .notion-cover {
        height:240px;
        background-position:54% center
    }

    .hero-inner {
        padding-top:48px
    }

    .hero-visual {
        display:grid;
        min-height:205px;
        order:-1
    }

    .portrait-halo {
        width:165px
    }

    .visual-caption {
        display:none
    }

    .hero-copy {
        text-align:center
    }

    .hero-actions,.hero-stats {
        justify-content:center
    }

    .hero-lead {
        margin-inline:auto
    }

}

/* Images fournies par l’utilisatrice, avatar circulaire */ .portrait-halo {
    width:min(370px,100%);
    aspect-ratio:1;
    border-radius:50%;
    overflow:hidden;
    border:5px solid rgba(255,255,255,.15);
    box-shadow:0 18px 75px rgba(0,0,0,.38)
}

.portrait-halo img {
    width:100%;
    height:100%;
    object-fit:cover;
    display:block
}

@media(max-width:760px) {
    .portrait-halo {
        width:170px
    }

    .hero-visual {
        min-height:210px
    }

}

/* Palette inspirée des aurores boréales et de l’avatar */ :root {
    --bg:#090f25;
    --bg2:#101b37;
    --surface:#152442;
    --ink:#f2f4ff;
    --muted:#b9c8e4;
    --line:rgba(161,202,255,.17);
    --accent:#48e3cf
}

.site-header {
    background:rgba(8,15,34,.96);
    border-bottom:1px solid rgba(116,214,238,.17)
}

.brand-avatar {
    width:43px;
    height:43px;
    flex:none;
    display:block;
    border-radius:50%;
    object-fit:cover;
    border:2px solid #6fe8de;
    box-shadow:0 0 0 2px rgba(126,107,236,.2)
}

.brand-accent {
    color:#51e6d1
}

.notion-cover {
    border-bottom:2px solid rgba(96,227,219,.45)
}

.hero {
    background:radial-gradient(ellipse at 83% 24%,rgba(23,205,201,.19),transparent 43%),radial-gradient(ellipse at 14% 70%,rgba(116,65,206,.16),transparent 53%),linear-gradient(120deg,#0a1530,#102b4c 75%,#111c43)
}

.hero h1 {
    letter-spacing:-.045em
}

.hero h1::first-line {
    color:#f1f5ff
}

.eyebrow,.kicker {
    color:#50e8d5
}

.btn.primary {
    background:linear-gradient(110deg,#50e3c5,#6dc9f9);
    color:#08182b;
    border-color:transparent
}

.btn.primary:hover {
    filter:brightness(1.08)
}

.portrait-halo {
    border:6px solid transparent;
    background:linear-gradient(#0c1733,#0c1733) padding-box,linear-gradient(135deg,#5ae4f4,#a29dff,#e5a5f2) border-box;
    box-shadow:0 0 48px rgba(65,223,230,.17),0 20px 70px rgba(0,0,0,.3);
    padding:4px
}

.portrait-halo img {
    border:0
}

.section-muted {
    background:#0c1730
}

.project-card,.detail-card,.contrib-item {
    background-color:#12213b
}

.cta {
    background:linear-gradient(105deg,#39d7c3,#75bfff,#c29aff)
}

@media(max-width:760px) {
    .brand-avatar {
        width:38px;
        height:38px
    }

}

/* === Aurora visual system: matched to approved prototype === */ :root {
    --bg:#08142d;
    --bg2:#0b1936;
    --surface:#102340;
    --ink:#f1f5ff;
    --muted:#b5c6e2;
    --line:rgba(117,213,238,.16);
    --accent:#45e6d1
}

.site-header {
    background:linear-gradient(105deg,rgba(7,15,34,.97),rgba(11,20,49,.95));
    border-bottom:1px solid rgba(86,230,218,.18)
}

.brand-avatar {
    width:46px;
    height:46px;
    aspect-ratio:1;
    object-fit:cover;
    border-radius:50%;
    background:transparent;
    border:2px solid #70e5f4;
    box-shadow:0 0 0 2px rgba(180,129,255,.20),0 0 16px rgba(54,229,218,.24);
    clip-path:circle(50%)
}

.brand-accent {
    color:#4ce8d0
}

.hero {
    isolation:isolate;
    background:radial-gradient(ellipse 48% 75% at 88% 14%,rgba(7,178,194,.31),transparent 72%),radial-gradient(ellipse 43% 72% at 7% 84%,rgba(73,39,160,.23),transparent 75%),radial-gradient(ellipse 46% 70% at 72% 87%,rgba(60,67,181,.18),transparent 72%),linear-gradient(115deg,#09152f 4%,#0b1b39 49%,#0b2544 100%)
}

.hero:after {
    opacity:.65;
    background-size:56px 56px
}

.hero h1 {
    color:#f1f5ff
}

.hero h1::first-line {
    color:inherit
}

.hero h1 .aurora-gradient {
    background:linear-gradient(100deg,#4be9d2 0%,#7ccaf8 48%,#d4a2fb 100%);
    -webkit-background-clip:text;
    background-clip:text;
    color:transparent
}

.eyebrow {
    color:#4be8d6
}

.btn.primary {
    background:linear-gradient(105deg,#4de4c5 0%,#61dbe7 54%,#82b9ff 100%);
    color:#071b2b;
    border:1px solid rgba(153,255,244,.28);
    box-shadow:0 9px 25px rgba(51,224,216,.15)
}

.btn.primary:hover {
    background:linear-gradient(105deg,#6bf5d6,#78e4f0,#a1cbff);
    box-shadow:0 12px 35px rgba(51,224,216,.26)
}

.btn.ghost {
    background:rgba(11,27,55,.65);
    border:1px solid rgba(104,190,232,.28)
}

.portrait-halo {
    padding:7px;
    border:0;
    background:linear-gradient(125deg,#53e6f4 0%,#9bc8ff 45%,#d08bfa 74%,#f5b6a7 100%);
    box-shadow:0 0 0 9px rgba(60,225,235,.045),0 0 65px rgba(69,197,234,.13),0 20px 80px rgba(0,0,0,.32)
}

.portrait-halo img {
    background:#0b1a37;
    clip-path:circle(50%);
    border:5px solid #091a37
}

.hero-stats strong {
    color:#f1f5ff
}

@media(max-width:760px) {
    .brand-avatar {
        width:40px;
        height:40px
    }

    .hero {
        background:radial-gradient(ellipse at 85% 20%,rgba(7,178,194,.24),transparent 68%),linear-gradient(135deg,#09152f,#0b2342)
    }

}

/* Hero Ko-fi action */ .hero-actions {
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    align-items:center
}

.hero-actions .btn.kofi {
    background:linear-gradient(120deg,#ff8c7e,#ffb88d);
    color:#1c1530;
    border:1px solid rgba(255,255,255,.22);
    box-shadow:0 8px 25px rgba(255,137,112,.14)
}

.hero-actions .btn.kofi:hover {
    filter:brightness(1.08);
    transform:translateY(-2px)
}

.integration-logo {
    min-height:260px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:16px;
    margin:0;
    padding:28px;
    border-radius:22px;
    background:radial-gradient(circle at 50% 40%,rgba(75,224,197,.14),transparent 68%),rgba(8,20,42,.55);
    border:1px solid rgba(150,210,255,.12)
}

.integration-logo img {
    max-width:min(310px,100%);
    max-height:210px;
    width:auto;
    height:auto;
    object-fit:contain;
    border-radius:12px
}

.integration-logo figcaption {
    color:#b9c9de;
    font-size:.85rem;
    text-align:center
}

.lovelace-gallery {
    display:flex;
    align-items:center;
    justify-content:space-between;
    flex-wrap:wrap;
    gap:18px;
    margin:0 28px 28px;
    padding:22px 26px;
    border:1px dashed rgba(145,205,255,.32);
    border-radius:18px;
    background:rgba(14,29,58,.44)
}

.lovelace-gallery h4 {
    margin:0 0 6px;
    font-size:1rem
}

.lovelace-gallery p {
    margin:0;
    color:#afc1d9;
    font-size:.9rem
}

@media(max-width:640px) {
    .lovelace-gallery {
        margin:0 16px 18px;
        padding:18px
    }

}

/* Ko-fi — palette violet aurores */ .hero-actions .btn.kofi {
    background:linear-gradient(120deg,#8b5cf6 0%,#b184f8 52%,#d5a7ef 100%);
    color:#10152e;
    border:1px solid rgba(222,187,255,.65);
    box-shadow:0 8px 26px rgba(137,87,231,.23)
}

.hero-actions .btn.kofi:hover {
    filter:brightness(1.1);
    box-shadow:0 10px 34px rgba(154,99,247,.4)
}

/* Compact integration logo treatment */ .integration-logo {
    min-height:140px;
    max-height:175px;
    padding:16px 20px;
    gap:7px
}

.integration-logo img {
    max-width:min(230px,100%);
    max-height:104px;
    object-fit:contain
}

.integration-logo figcaption {
    font-size:.74rem
}

.contrib-type {
    display:inline-block;
    margin-bottom:7px;
    padding:4px 9px;
    border:1px solid rgba(96,223,218,.28);
    border-radius:999px;
    background:rgba(74,198,213,.09);
    color:#8ceadd;
    font-size:.68rem;
    font-weight:700;
    letter-spacing:.035em
}

/* Project details: small logos in the title bar, Lovelace preview in the former logo position */ .detail-header {
    position:relative;
    display:flex;
    align-items:center;
    gap:22px;
    justify-content:space-between
}

.detail-heading {
    min-width:0;
    flex:1
}

.detail-header-logo {
    width:clamp(100px,17vw,205px);
    min-width:100px;
    max-height:92px;
    display:flex;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
    padding:10px 14px;
    border-radius:13px;
    background:rgba(4,16,36,.5);
    border:1px solid rgba(161,203,239,.17);
    position:relative;
    z-index:2
}

.detail-header-logo img {
    display:block;
    max-width:100%;
    max-height:65px;
    object-fit:contain
}

.detail-number {
    pointer-events:none
}

.lovelace-preview {
    min-height:265px;
    width:100%;
    border:1px dashed rgba(137,192,237,.35);
    border-radius:20px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:10px;
    padding:28px;
    text-align:center;
    background:radial-gradient(circle at 50% 20%,rgba(76,205,210,.10),transparent 70%),rgba(5,18,40,.45)
}

.lovelace-preview-icon {
    font-size:2.5rem;
    color:#81d9eb;
    opacity:.8
}

.lovelace-preview h4 {
    font-size:1.05rem;
    margin:0;
    color:#edf4ff
}

.lovelace-preview p {
    margin:0;
    color:#a9bad1;
    font-size:.92rem
}

.preview-link {
    color:#6ee4d3;
    text-decoration:none;
    font-weight:700;
    font-size:.88rem;
    margin-top:10px
}

.preview-link:hover {
    text-decoration:underline
}

.detail-actions {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
    margin-top:24px
}

.action-group {
    display:flex;
    align-content:start;
    align-items:flex-start;
    flex-wrap:wrap;
    gap:8px;
    padding:14px;
    border:1px solid rgba(137,181,224,.20);
    border-radius:14px;
    background:rgba(7,19,40,.32)
}

.action-group-label {
    width:100%;
    display:block;
    font-size:.69rem;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.11em;
    color:#afc1d9;
    margin-bottom:3px
}

.action-group .btn {
    font-size:.79rem;
    line-height:1.25;
    padding:10px 12px;
    white-space:normal;
    text-align:center
}

.action-group-install {
    border-color:rgba(81,218,196,.34);
    background:rgba(46,180,165,.08)
}

.action-group-docs {
    border-color:rgba(132,174,255,.32);
    background:rgba(74,117,207,.07)
}

.action-group-github {
    border-color:rgba(190,170,249,.3);
    background:rgba(118,90,196,.07)
}

.action-group-community {
    border-color:rgba(245,183,116,.3);
    background:rgba(169,114,57,.06)
}

.action-group-docs .action-group-label {
    color:#a8c7ff
}

.action-group-github .action-group-label {
    color:#d3b7ff
}

.action-group-community .action-group-label {
    color:#f1c38b
}

@media(max-width:760px) {
    .detail-header {
        align-items:flex-start;
        gap:12px
    }

    .detail-header-logo {
        width:110px;
        min-width:85px;
        padding:7px;
        max-height:70px
    }

    .detail-header-logo img {
        max-height:50px
    }

    .detail-actions {
        grid-template-columns:1fr
    }

    .lovelace-preview {
        min-height:210px
    }

}

@media(max-width:420px) {
    .detail-header-logo {
        width:85px;
        min-width:75px
    }

    .detail-number {
        display:none
    }

}

/* Distinct Lovelace group; one GitHub heading without repeating the brand in buttons */ .action-group-lovelace {
    border-color:rgba(99,193,249,.35);
    background:rgba(48,123,198,.08)
}

.action-group-lovelace .action-group-label {
    color:#8ed5ff
}

.action-group-github .btn {
    overflow-wrap:anywhere
}

/* IDENTITÉ VIOLETTE : modifiez #b99aff pour changer le « Vgn » de l'en-tête. */ .brand-accent {
    color:#b99aff
}

/* BOUTON DE THÈME : placé près du choix FR / EN. */ .theme-toggle {
    display:inline-flex;
    align-items:center;
    gap:7px;
    justify-content:center;
    border:1px solid rgba(185,154,255,.38);
    border-radius:999px;
    padding:8px 12px;
    color:#e7d9ff;
    background:rgba(146,104,220,.12);
    font:inherit;
    font-size:.78rem;
    font-weight:700;
    cursor:pointer;
    white-space:nowrap
}

.theme-toggle:hover,.theme-toggle:focus-visible {
    border-color:#b99aff;
    background:rgba(146,104,220,.24)
}

.theme-icon {
    font-size:1.05rem
}

.github-stars-stat strong {
    white-space:nowrap
}

/* MODE CLAIR : modifier ces couleurs pour personnaliser l'apparence claire.
 * Les éléments spécifiques (cartes, liens, fond) sont réadaptés ici ;
 * le mode sombre existant reste la référence.
 */ html[data-theme="light"] {
    color-scheme:light
}

html[data-theme="light"] body {
    background:#f2f5fd;
    color:#1b2a48
}

html[data-theme="light"] .site-header {
    background:rgba(248,250,255,.95);
    border-bottom-color:#d8e0f0
}

html[data-theme="light"] .nav-links a,html[data-theme="light"] .brand,html[data-theme="light"] .lang-switch a {
    color:#253657
}

html[data-theme="light"] .brand-accent {
    color:#7953c8
}

html[data-theme="light"] .hero {
    background:linear-gradient(130deg,#f2f5ff,#e5edfc 58%,#eee8ff)
}

html[data-theme="light"] .hero h1,html[data-theme="light"] h2,html[data-theme="light"] h3,html[data-theme="light"] h4 {
    color:#192b4c
}

html[data-theme="light"] .hero-lead,html[data-theme="light"] .section-head p,html[data-theme="light"] .project-card p,html[data-theme="light"] .detail-card p {
    color:#50617d
}

html[data-theme="light"] .section-muted {
    background:#eaf0fb
}

html[data-theme="light"] .project-card,html[data-theme="light"] .detail-card {
    background:#fff;
    border-color:#ccd8ed;
    box-shadow:0 10px 28px rgba(34,61,105,.08)
}

html[data-theme="light"] .detail-header {
    background:#f6f8fe;
    border-color:#d5dff0
}

html[data-theme="light"] .detail-header-logo,html[data-theme="light"] .lovelace-preview {
    background:#edf3fb;
    border-color:#cddbef
}

html[data-theme="light"] .action-group {
    background:#f7f9fe;
    border-color:#cdd8ed
}

html[data-theme="light"] .action-group .btn,html[data-theme="light"] .btn.ghost,html[data-theme="light"] .btn.outline {
    color:#243b62;
    border-color:#c5d3e9;
    background:#fff
}

html[data-theme="light"] .action-group-label {
    color:#536587
}

html[data-theme="light"] .action-group-docs .action-group-label {
    color:#3762aa
}

html[data-theme="light"] .action-group-github .action-group-label {
    color:#7953c8
}

html[data-theme="light"] .action-group-lovelace .action-group-label {
    color:#2168a5
}

html[data-theme="light"] .action-group-community .action-group-label {
    color:#946019
}

html[data-theme="light"] .feature-list li,html[data-theme="light"] .compat,html[data-theme="light"] .detail-kicker {
    color:#3f526f
}

html[data-theme="light"] .table-wrap,html[data-theme="light"] table,html[data-theme="light"] th,html[data-theme="light"] td {
    background:#fff;
    color:#293d5c;
    border-color:#d5e0f0
}

html[data-theme="light"] .status,html[data-theme="light"] .card-tags span {
    background:#eef3fc;
    color:#315b77;
    border-color:#d5e0f0
}

html[data-theme="light"] .theme-toggle {
    background:#eee6ff;
    color:#6745a6;
    border-color:#c4a8ef
}

html[data-theme="light"] .hero-stats strong {
    color:#273e65
}

html[data-theme="light"] .hero-stats span {
    color:#50617d
}

html[data-theme="light"] a:not(.btn) {
    text-underline-offset:3px
}

@media(max-width:760px) {
    .theme-toggle {
        padding:7px 9px
    }

    .theme-text {
        display:none
    }

}

/* CORRECTIF MODE CLAIR — contributions et À propos
 * Les cartes de cette section ont un fond sombre en mode nuit.
 * En mode clair, adapter à la fois fond, titres, badges et liens.
 */ html[data-theme="light"] .contrib-item {
    background:#ffffff;
    border-color:#cbd8ed;
    box-shadow:0 8px 24px rgba(30,55,99,.07)
}

html[data-theme="light"] .contrib-item:hover {
    background:#f1f5fe;
    border-color:#a7bce0
}

html[data-theme="light"] .contrib-item h3 {
    color:#213653
}

html[data-theme="light"] .contrib-item p {
    color:#465b78
}

html[data-theme="light"] .contrib-item .contrib-type {
    background:#e6f6f4;
    color:#146a69;
    border-color:#9cd8d4
}

html[data-theme="light"] .contrib-item .contrib-arrow {
    color:#087d80
}

html[data-theme="light"] .info-panel {
    background:#ffffff;
    border-color:#cbd8ed;
    box-shadow:0 8px 24px rgba(30,55,99,.07)
}

html[data-theme="light"] .info-panel h3 {
    color:#213653
}

html[data-theme="light"] .info-panel p {
    color:#465b78
}

html[data-theme="light"] .about-grid>div>p {
    color:#465b78
}

html[data-theme="light"] .about-links a {
    color:#087c83
}

html[data-theme="light"] .lovelace-preview h4 {
    color:#213653
}

html[data-theme="light"] .lovelace-preview p {
    color:#50617d
}

html[data-theme="light"] .preview-link {
    color:#146e81
}

html[data-theme="light"] .detail-number {
    color:#afc1d9
}

/* QUITOQUE : rogner un peu les bords verts de l'image carrée
 * Ajustez inset(8%) si vous souhaitez rogner plus ou moins.
 * Le recadrage n'affecte pas les autres logos.
 */ .detail-header-logo-quitoque img {
    clip-path:inset(8%);
    transform:scale(1.13);
    max-height:68px
}

/* STATISTIQUES : même taille pour les étoiles GitHub et les autres compteurs.
 * Modifier font-size pour ajuster ensemble les trois valeurs. */ .hero-stats strong, .hero-stats .github-stars-stat strong {
    font-size:clamp(34px,4.2vw,64px);
    line-height:1.12;
}

@media(max-width:760px) {
    .hero-stats strong,.hero-stats .github-stars-stat strong {
        font-size:clamp(28px,6vw,46px);
    }

}

/* CORRECTIF ÉTOILES : les spans imbriqués héritent de la taille du strong.
 * L'ancienne règle .hero-stats span les limitait à 12px. */ .hero-stats .github-stars-stat strong > span {
    font:inherit;
    font-size:inherit;
    line-height:inherit;
    color:inherit
}

/* MODE CLAIR — maintenir le dégradé sur le bouton d’installation HACS.
 * La règle générique .action-group .btn remplaçait le dégradé par du blanc. */ html[data-theme="light"] .action-group-install .btn.primary, html[data-theme="light"] .action-group .btn.primary {
    background:linear-gradient(105deg,#4de4c5 0%,#61dbe7 54%,#82b9ff 100%);
    color:#071b2b;
    border-color:rgba(24,123,142,.28);
    box-shadow:0 9px 25px rgba(51,224,216,.18);
}

html[data-theme="light"] .action-group-install .btn.primary:hover, html[data-theme="light"] .action-group .btn.primary:hover {
    background:linear-gradient(105deg,#6bf5d6,#78e4f0,#a1cbff);
}

/* RETOUR EN HAUT — un lien dans chaque fiche et un dans le pied de page.
 * Le point d'ancrage #page-top est placé avant l'en-tête sticky.
 * Le JS ci-dessous gère aussi le défilement sans dépendre du hash. */ #page-top {
    position:absolute;
    top:0;
    left:0;
    width:1px;
    height:1px;
    pointer-events:none
}

.detail-back-top {
    display:flex;
    justify-content:flex-end;
    padding:0 36px 24px
}

.back-to-top {
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:9px 14px;
    border:1px solid var(--line);
    border-radius:9px;
    color:var(--accent);
    font-size:12px;
    font-weight:700;
    transition:background .2s,border-color .2s
}

.back-to-top:hover {
    background:rgba(110,225,214,.1);
    border-color:var(--accent)
}

html[data-theme="light"] .back-to-top {
    color:#235e80;
    border-color:#b5c8e0
}

html[data-theme="light"] .back-to-top:hover {
    background:#e4edfc
}

@media(max-width:600px) {
    .detail-back-top {
        padding:0 20px 20px
    }

}

/* ================================================================
 * CORRECTIFS UX — BOUTONS, CARTES ET RETOUR EN HAUT (FR/EN)
 * ================================================================
 * Pourquoi : les styles génériques du thème clair avaient une priorité
 * supérieure à ceux des boutons primaires, et masquaient leurs couleurs.
 * Personnalisez ici les couleurs et effets de survol.
 */
/* Retour en haut : un véritable bouton compact, centré entre les fiches,
 * avec des marges pour ne plus coller aux bords arrondis. */ .detail-back-top {
    display:flex;
    justify-content:center;
    padding:2px 24px 26px;
}

.detail-back-top .back-to-top, .footer .back-to-top {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    padding:10px 17px;
    min-height:42px;
    border-radius:999px;
    border:1px solid rgba(108,223,223,.42);
    background:rgba(66,211,205,.10);
    color:#7ff1e1;
    font-size:13px;
    line-height:1.2;
    font-weight:700;
    text-decoration:none;
    white-space:nowrap;
    box-shadow:0 5px 18px rgba(0,0,0,.08);
    transition:transform .2s ease,background .2s ease,border-color .2s ease,box-shadow .2s ease;
}

.back-to-top-arrow {
    font-size:18px;
    line-height:1;
    display:inline-block;
    transition:transform .2s ease
}

.detail-back-top .back-to-top:hover, .footer .back-to-top:hover {
    transform:translateY(-3px);
    background:rgba(66,211,205,.21);
    border-color:#7ff1e1;
    box-shadow:0 9px 24px rgba(45,216,211,.15);
}

.back-to-top:hover .back-to-top-arrow {
    transform:translateY(-2px)
}

html[data-theme="light"] .detail-back-top .back-to-top, html[data-theme="light"] .footer .back-to-top {
    background:#e8f7f7;
    border-color:#a4d9d8;
    color:#116c74;
}

html[data-theme="light"] .detail-back-top .back-to-top:hover, html[data-theme="light"] .footer .back-to-top:hover {
    background:#c9f1ef;
    border-color:#4ebbb6;
    box-shadow:0 9px 24px rgba(35,128,137,.17);
}

@media(max-width:600px) {
    .detail-back-top {
        padding:0 16px 22px
    }

}

/* Mode clair : bouton HACS principal toujours en dégradé, même lorsque
 * les règles .action-group .btn et .btn.outline sont présentes. */ html[data-theme="light"] .detail-actions .action-group-install a.btn.primary, html[data-theme="light"] .info-panel a.btn.primary {
    background:linear-gradient(110deg,#35d5ba 0%,#55cce8 54%,#81b4fa 100%);
    color:#09263a;
    border:1px solid rgba(18,122,147,.35);
    box-shadow:0 7px 19px rgba(26,155,169,.22);
    filter:none;
}

html[data-theme="light"] .detail-actions .action-group-install a.btn.primary:hover, html[data-theme="light"] .info-panel a.btn.primary:hover {
    background:linear-gradient(110deg,#5cf0d2 0%,#75e1ef 54%,#9bc7ff 100%);
    border-color:#188eac;
    box-shadow:0 13px 28px rgba(26,155,169,.34);
    transform:translateY(-3px);
}

/* Mode clair : survol bien perceptible des cartes d'intégration.
 * La couleur d'accent reste liée au type de projet via --tone. */ html[data-theme="light"] .project-card {
    transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease,background .22s ease;
}

html[data-theme="light"] .project-card:hover, html[data-theme="light"] .project-card:focus-within {
    transform:translateY(-6px);
    background:color-mix(in srgb,var(--tone) 7%,white);
    border-color:var(--tone);
    box-shadow:0 18px 38px rgba(31,66,115,.18),0 0 0 2px color-mix(in srgb,var(--tone) 22%,transparent);
}

html[data-theme="light"] .project-card:hover .text-link, html[data-theme="light"] .project-card:focus-within .text-link {
    text-decoration:underline;
    text-underline-offset:4px;
}

/* Mode clair : tous les autres boutons réagissent aussi au survol. */ html[data-theme="light"] .detail-actions .action-group a.btn:not(.primary), html[data-theme="light"] .hero-actions a.btn:not(.primary), html[data-theme="light"] .lovelace-preview .preview-link {
    transition:transform .2s ease,background .2s ease,border-color .2s ease,box-shadow .2s ease,color .2s ease;
}

html[data-theme="light"] .detail-actions .action-group a.btn:not(.primary):hover, html[data-theme="light"] .hero-actions a.btn:not(.primary):hover {
    transform:translateY(-3px);
    background:#e6f0ff;
    color:#173d70;
    border-color:#6c9bd6;
    box-shadow:0 9px 22px rgba(46,96,159,.17);
}

html[data-theme="light"] .lovelace-preview .preview-link:hover {
    background:#d8edfb;
    color:#145789;
    border-color:#75aee1;
    transform:translateY(-2px);
}

html[data-theme="light"] .btn.kofi:hover {
    background:linear-gradient(105deg,#d4b1ff,#a67afa);
    color:#26113f;
    box-shadow:0 9px 24px rgba(132,79,195,.25);
}

@media(prefers-reduced-motion:reduce) {
    .detail-back-top .back-to-top:hover,.footer .back-to-top:hover,   html[data-theme="light"] .project-card:hover,   html[data-theme="light"] .detail-actions a.btn:hover {
        transform:none
    }

}

/* Signature de marque plus longue : conserve une taille lisible sur mobile. */ .brand small {
    white-space:normal;
    line-height:1.35;
}

@media(max-width:560px) {
    .brand small {
        font-size:.56rem;
        letter-spacing:.08em;
    }

}

/* Quitoque: screenshots from the official dashboard and Lovelace card repos */ .quitoque-gallery {
    display:grid;
    gap:14px;
    min-width:0
}

.quitoque-gallery-heading {
    display:flex;
    align-items:baseline;
    justify-content:space-between;
    gap:12px;
    flex-wrap:wrap
}

.quitoque-gallery-heading h4 {
    font:700 14px var(--display);
    margin:0
}

.quitoque-gallery-heading a {
    font-size:12px;
    font-weight:700;
    color:var(--accent)
}

.quitoque-gallery-heading a:hover {
    text-decoration:underline
}

.quitoque-shots {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:10px
}

.quitoque-shots a,.quitoque-dashboard-shot {
    min-width:0;
    display:block;
    padding:9px;
    border:1px solid var(--line);
    border-radius:12px;
    background:rgba(7,19,34,.25);
    transition:transform .2s,border-color .2s,box-shadow .2s
}

.quitoque-shots a:hover,.quitoque-dashboard-shot:hover {
    transform:translateY(-3px);
    border-color:var(--tone);
    box-shadow:0 10px 24px rgba(0,0,0,.12)
}

.quitoque-shots img {
    height:160px;
    width:100%;
    object-fit:contain;
    border-radius:6px
}

.quitoque-shots span,.quitoque-dashboard-shot span {
    display:block;
    font-size:11px;
    color:var(--muted);
    padding:6px 2px 0;
    text-align:center
}

.quitoque-dashboard-heading {
    margin-top:8px
}

.quitoque-dashboard-shot img {
    display:block;
    width:100%;
    max-height:320px;
    object-fit:contain;
    border-radius:6px
}

html[data-theme="light"] .quitoque-shots a,html[data-theme="light"] .quitoque-dashboard-shot {
    background:#f5f8ff;
    border-color:#cbd8ec
}

html[data-theme="light"] .quitoque-shots a:hover,html[data-theme="light"] .quitoque-dashboard-shot:hover {
    background:#eaf3ff;
    border-color:#38aaa5;
    box-shadow:0 12px 24px rgba(36,82,136,.13)
}

html[data-theme="light"] .quitoque-gallery-heading a {
    color:#16778a
}

@media(max-width:560px) {
    .quitoque-shots {
        grid-template-columns:repeat(2,minmax(0,1fr))
    }

    .quitoque-shots img {
        height:120px
    }

    .quitoque-shots a:last-child {
        grid-column:span 2
    }

    .quitoque-dashboard-shot img {
        max-height:230px
    }

}

/* ============================================================
   COULEURS DES PROJETS (tone)
   Dans index.php : 'tone' => 'cyan' pour WiFiTIC.
   Le sélecteur concerne les cartes compactes et les fiches détaillées.
   ============================================================ */
.project-card.cyan,
.detail-card.cyan {
    --tone: #45d6d0;
}


/* ============================================================
   STATUTS DES PROJETS
   - maintained : maintenu (par défaut)
   - new        : nouveau
   - dev        : en développement
   Modifier le champ 'status' de chaque projet dans index.php.
   ============================================================ */
.status-maintained {
    color: #a6c4b8;
}

.status-new {
    color: #e8b95d;
}

.status-new .status-dot {
    background: #e8b95d;
}

.status-dev {
    color: #76baff;
}

.status-dev .status-dot {
    background: #76baff;
}

/* ==============================================================
   GALERIES LOVELACE : PRESENTATION MOBILE (octobre 2026)
   - Une capture par ligne sur smartphone, y compris Somfy/JBL/EDF.
   - Les images gardent leur ratio, sans être étirées ou recadrées.
   - Les légendes restent sous les captures.
   - Sur tablette et ordinateur, la grille existante est conservée.
   ============================================================== */
@media (max-width: 600px) {
  .detail-media .quitoque-shots {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .detail-media .quitoque-shots > a,
  .detail-media .quitoque-shots > a:last-child {
    grid-column: auto;
    width: 100%;
    box-sizing: border-box;
    padding: 14px;
  }
  .detail-media .quitoque-shots img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 360px;
    object-fit: contain;
    margin-inline: auto;
  }
  .detail-media .quitoque-shots span {
    font-size: 13px;
    padding-top: 10px;
  }
  .detail-media .quitoque-dashboard-shot {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 14px;
  }
  .detail-media .quitoque-dashboard-shot img {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
  }
}

/* Navigation mobile : mêmes dimensions pour ouvrir et fermer. */
@media(max-width:760px) {
 .mobile-menu { width:44px; height:44px; padding:0; display:grid; place-items:center; font-size:0; line-height:1; flex-shrink:0; }
 .mobile-menu::before { content:"☰"; font-family:Arial,sans-serif; font-size:25px; font-weight:400; line-height:1; }
 .mobile-menu[aria-expanded="true"]::before { content:"×"; font-size:31px; line-height:1; }
 html[data-theme="light"] .mobile-menu { color:#253657; border-color:#8190ac; }
 html[data-theme="light"] .nav-links { background:#f8faff; border-bottom-color:#d8e0f0; }
 html[data-theme="light"] .nav-links a { color:#253657; }
}


/* ============================================================
   CORRECTIF MOBILE — thème clair et galeries (12/10/2026)
   Toutes les galeries partagent .quitoque-shots, y compris EDF,
   JBL et Somfy. Règles placées EN FIN de feuille pour priorité.
   ============================================================ */
@media screen and (max-width: 760px) {
  /* Galerie en une colonne, y compris sur les téléphones larges. */
  .detail-media .quitoque-shots {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .detail-media .quitoque-shots > a,
  .detail-media .quitoque-shots > a:last-child {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    padding: 14px;
    box-sizing: border-box;
  }
  .detail-media .quitoque-shots > a img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    margin: 0 auto;
  }
  .detail-media .quitoque-shots > a span {
    font-size: 14px;
    line-height: 1.4;
  }
  /* Empêche le bandeau de galerie de forcer un débordement. */
  .detail-media .quitoque-gallery-heading {
    flex-wrap: wrap;
    gap: 8px 14px;
  }
  .detail-media .quitoque-dashboard-shot img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
  }
  /* Thème clair : le menu déroulant et les boutons ont du contraste. */
  html[data-theme="light"] .site-header .nav-links.open {
    background: #f8faff;
    border-bottom: 1px solid #cbd5e7;
    box-shadow: 0 12px 24px rgba(30, 45, 75, .12);
  }
  html[data-theme="light"] .site-header .nav-links.open a {
    color: #1d304e;
    opacity: 1;
  }
  html[data-theme="light"] .site-header .nav-links.open a:hover,
  html[data-theme="light"] .site-header .nav-links.open a:focus-visible {
    color: #5843aa;
  }
  html[data-theme="light"] .site-header .mobile-menu {
    color: #1d304e;
    background: #edf1fa;
    border-color: #8292ae;
  }
}


/* ===========================================================
   En-tête clair et boutons d'accueil sur smartphone — 12/10/2026
   Les trois actions ont une largeur et une hauteur identiques.
   =========================================================== */
html[data-theme="light"] .site-header .brand small {
  color: #425473;
  opacity: 1;
  font-weight: 600;
}
@media screen and (max-width: 760px) {
  .hero .hero-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 420px;
    margin-inline: auto;
    align-items: stretch;
  }
  .hero .hero-actions > a.btn {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 56px;
    height: 56px;
    box-sizing: border-box;
    padding: 10px 18px;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 10px;
    flex: none;
    white-space: normal;
    line-height: 1.2;
    font-size: 15px;
  }
}


/* En-tête mobile : bouton clair/nuit de largeur fixe, quelle que soit l'icône.
   Évite que le changement de thème redimensionne le titre AuroreVgn. */
@media (max-width: 760px) {
  .site-header .theme-toggle {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    flex: 0 0 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    gap: 0;
  }
  .site-header .theme-toggle .theme-icon {
    display: inline-flex;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
  }
  .site-header .theme-toggle .theme-text { display: none; }
  .site-header .brand { min-width: 0; }
}


/* Bouton de thème : dimensions stables sur ordinateur ET mobile.
   L'icône soleil/lune ne modifie jamais la place prise dans l'en-tête. */
@media (min-width: 761px) {
  .site-header .theme-toggle {
    width: 48px;
    min-width: 48px;
    max-width: 48px;
    height: 48px;
    min-height: 48px;
    padding: 0;
    flex: 0 0 48px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
  }
  .site-header .theme-toggle .theme-icon {
    display: inline-flex;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
  }
  .site-header .theme-toggle .theme-text { display: none; }
}


/* Thème sur ordinateur : libellé visible, largeur fixe dans les deux états.
   Sur mobile (<=760px), la règle précédente garde l'icône seule. */
@media (min-width: 761px) {
  .site-header .theme-toggle {
    width: 158px;
    min-width: 158px;
    max-width: 158px;
    height: 48px;
    min-height: 48px;
    padding: 0 12px;
    flex: 0 0 158px;
    gap: 8px;
  }
  .site-header .theme-toggle .theme-text {
    display: inline;
    white-space: nowrap;
    font-size: 0.78rem;
  }
}
