:root{
    --brand-primary: #f4a12e;
    --brand-primary-2: #e88c2f;
    --brand-brown: #5B3721;
    --brand-ink: #121212;
    --brand-muted: #6b5e55;

    --bg-soft: #fff6ee;
    --border: rgba(91, 55, 33, 0.14);
    --shadow: 0 10px 24px rgba(18, 18, 18, 0.08);
    --shadow-hover: 0 16px 40px rgba(18, 18, 18, 0.12);

    --success-bg: #edf8f1;
    --success-text: #1f6b3b;
    --error-bg: #fff1f1;
    --error-text: #9a1f1f;

    --r-lg: 16px;
    --r-md: 12px;
}

*{
    box-sizing: border-box;
}

html{
    scroll-behavior: smooth;
}

body{
    margin: 0;
    padding: 0 2rem;
    background: radial-gradient(1200px 600px at 50% -100px, var(--bg-soft) 0%, #fff 55%, #fff 100%);
    color: var(--brand-ink);
    font-family: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
}

a{
    color: var(--brand-primary-2);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover{
    color: var(--brand-ink);
}

/* =========================
   STRUCTURE GLOBALE
   ========================= */

.shell,
.site-shell{
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main{
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 0 4rem;
    flex: 1 0 auto;
}

.header{
    background: linear-gradient(180deg, #fff 0%, #fff 50%, rgba(255, 246, 238, 0.8) 100%);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 6px 18px rgba(18, 18, 18, 0.06);
    margin-left: -2rem;
    margin-right: -2rem;
    padding: 0 2rem;
}

.header-shell,
.footer-inner{
    max-width: 1360px;
    margin: 0 auto;
}

.header-bar{
    min-height: 108px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.header-brand{
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    flex: 0 0 auto;
}

.brand-text{
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.header p,
.brand-subtitle{
    color: var(--brand-muted);
}

.logo{
    width: 72px;
    height: 72px;
    flex: 0 0 72px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: transparent;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
}

.logo img{
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

.brand-title{
    margin: 0;
    font-size: 2rem;
    line-height: 1.1;
    color: #1f2940;
    font-weight: 800;
}

.brand-subtitle{
    margin: 0.2rem 0 0;
    font-size: 1rem;
    line-height: 1.3;
}

.header-nav{
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2rem;
    flex-wrap: wrap;
    margin-left: auto;
    text-align: right;
}

.logout-link{
    font-weight: 700;
    color: var(--brand-brown);
    text-decoration: none;
}

.logout-link:hover{
    color: var(--brand-ink);
}

/* =========================
   BLOCS / CARTES
   ========================= */

.card,
.auth-card,
.section-presentation,
.section-contact,
.download-card{
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow);
}

.card,
.auth-card{
    padding: 2.2rem;
}

.card{
    margin-bottom: 1.5rem;
}

.auth-card{
    max-width: 720px;
    margin: 0 auto;
}

.section-presentation,
.section-contact{
    padding: 2rem;
}

.download-card{
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.download-card:hover{
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(244, 161, 46, 0.35);
}

/* =========================
   TITRES / TEXTES
   ========================= */

.page-title,
.title{
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--brand-brown);
    margin: 0 0 0.75rem;
}

.intro,
.page-intro{
    text-align: center;
    margin: 0 0 1.8rem;
    color: #2a2a2a;
}

.section-presentation h2,
.section-contact h2,
.download-card h3,
.page-card h3{
    color: var(--brand-brown);
}

.page-card h3{
    margin: 0 0 0.75rem;
    font-size: 1.2rem;
}

.prose p{
    color: #2a2a2a;
}

.prose p.text-sm{
    color: var(--brand-muted) !important;
}

/* =========================
   ALERTES
   ========================= */

.flash{
    border-radius: 12px;
    padding: 0.95rem 1rem;
    margin-bottom: 1.2rem;
    font-weight: 600;
}

.flash-success{
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid rgba(31, 107, 59, 0.12);
}

.flash-error{
    background: var(--error-bg);
    color: var(--error-text);
    border: 1px solid rgba(154, 31, 31, 0.12);
}

.wax-alert{
    color: #7a1f12;
    font-weight: 700;
}

/* =========================
   FORMULAIRES
   ========================= */

.form-group{
    margin-bottom: 1.2rem;
}

.form-label,
.label{
    display: block;
    margin-bottom: 0.45rem;
    font-weight: 700;
    color: #121212;
}

.form-input,
.input{
    width: 100%;
    border: 1px solid rgba(91, 55, 33, 0.18);
    border-radius: 12px;
    padding: 0.95rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    color: #121212;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input{
    font-size: 1.2rem;
    letter-spacing: 0.2rem;
    text-align: center;
}

.form-input:focus,
.input:focus{
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px rgba(244, 161, 46, 0.16);
}

.helper-text,
.helper{
    font-size: 0.95rem;
    color: var(--brand-muted);
    margin-top: 0.45rem;
}

.submit-row{
    text-align: center;
    margin-top: 1.5rem;
}

/* =========================
   BOUTONS
   ========================= */

.btn,
.submit-btn,
.download-btn{
    display: inline-block;
    font-size: 1rem;
    background: var(--brand-primary);
    color: #000;
    font-weight: 700;
    padding: 0.95rem 1.6rem;
    border: none;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease;
    box-shadow: 0 10px 18px rgba(244, 161, 46, 0.22);
    cursor: pointer;
    white-space: nowrap;
}

.btn,
.submit-btn,
.download-btn {
    display: inline-flex; /* 🔥 au lieu de inline-block */
    align-items: center;
    justify-content: center;

    font-family: inherit; /* 🔥 important pour la police */
    line-height: 1; /* 🔥 évite les différences de hauteur */
}

/* 🔥 reset spécifique aux <button> */
button.btn,
button.submit-btn,
button.download-btn {
    appearance: none;
    -webkit-appearance: none;
}

.btn:hover,
.submit-btn:hover,
.download-btn:hover{
    background: #000;
    color: var(--brand-primary);
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.18);
    transform: translateY(-1px);
}

.btn:active,
.submit-btn:active,
.download-btn:active{
    transform: translateY(0);
}

.btn:focus-visible,
.submit-btn:focus-visible,
.download-btn:focus-visible,
.nav-link:focus-visible{
    outline: 3px solid rgba(244, 161, 46, 0.45);
    outline-offset: 3px;
    border-radius: 12px;
}

.loading{
    opacity: 0.75;
    pointer-events: none;
}

.success{
    background: #000 !important;
    color: var(--brand-primary) !important;
}

/* =========================
   PASSWORD
   ========================= */

.password-input-wrap{
    position: relative;
}

.password-input-wrap .form-input{
    padding-right: 3.2rem;
}

.password-toggle{
    position: absolute;
    top: 50%;
    right: 0.85rem;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--brand-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.35rem;
}

.password-toggle:hover{
    color: var(--brand-brown);
}

/* =========================
   DASHBOARD
   ========================= */

.tag-list{
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    justify-content: center;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.tag{
    background: #fff6ee;
    color: var(--brand-brown);
    border-left: 6px solid var(--brand-primary);
    border-radius: 12px;
    padding: 0.7rem 1rem;
    font-weight: 700;
}

.pages-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.page-card{
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 1.2rem;
    box-shadow: 0 8px 20px rgba(18, 18, 18, 0.05);
    background: #fff;
}

.page-card--dashboard{
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    grid-template-rows: 1fr auto;
    grid-template-areas:
        "text image"
        "actions image";
    column-gap: 1rem;
    row-gap: 1rem;
    min-height: 230px;
    align-items: stretch;
}

.page-card-text{
    grid-area: text;
    min-width: 0;
    align-self: start;
}

.page-card h3{
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.35;
}

.page-card-actions{
    grid-area: actions;
    align-self: end;
    justify-self: start;
}

.page-card-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 124px;
    margin-top: 0;
}

.page-card-media{
    grid-area: image;
    width: 130px;
    height: 100%;
    align-self: start;
    justify-self: end;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    overflow: hidden;
}

.page-card-image{
    display: block;
    max-width: 100%;
    max-height: 150px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.pages-grid--fixed{
    grid-template-columns: repeat(auto-fill, minmax(260px, 374px));
    justify-content: start;
}

@media (max-width: 700px){
    .page-card--dashboard{
        grid-template-columns: minmax(0, 1fr) 120px;
    }

    .page-card-media{
        width: 120px;
    }
}

@media (max-width: 520px){
    .page-card--dashboard{
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        grid-template-areas:
            "text"
            "image"
            "actions";
    }

    .page-card-actions{
        align-self: start;
        justify-self: start;
    }

    .page-card-media{
        width: 100%;
        height: auto;
        justify-self: start;
        justify-content: flex-start;
    }

    .page-card-image{
        max-height: 160px;
    }
}

/* =========================
   DASHBOARD HERO PREMIUM
   ========================= */

.dashboard-hero{
    max-width: 780px;
    margin: 0 auto 1.6rem;
    padding: 1.8rem;
    display: flex;
    align-items: center;
    gap: 1.4rem;
    border-radius: 22px;
    background:
        radial-gradient(circle at top left, rgba(244, 161, 46, 0.18), transparent 34%),
        linear-gradient(135deg, #fff8f0 0%, #ffffff 58%, #fff3e5 100%);
    border: 1px solid rgba(244, 161, 46, 0.24);
    box-shadow: 0 16px 40px rgba(91, 55, 33, 0.09);
}

.dashboard-hero-icon{
    width: 66px;
    height: 66px;
    flex: 0 0 66px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: #ffffff;
    color: var(--brand-primary-2);
    font-size: 1.6rem;
    box-shadow: 0 12px 26px rgba(244, 161, 46, 0.24);
}

.dashboard-hero-content{
    flex: 1;
    min-width: 0;
    text-align: left;
}

.dashboard-hero-title{
    text-align: left;
    margin: 0 0 0.35rem;
    font-size: 2rem;
    line-height: 1.15;
}

.dashboard-welcome{
    margin: 0 0 0.4rem;
    font-size: 1.22rem;
    line-height: 1.45;
    color: #1f2937;
}

.dashboard-welcome strong{
    color: var(--brand-brown);
    font-weight: 800;
}

.dashboard-subtext{
    margin: 0 0 0.85rem;
    color: var(--brand-muted);
    font-size: 0.98rem;
}

.dashboard-connected{
    margin: 0;
    font-size: 0.94rem;
    color: #3f3f46;
}

.dashboard-connected strong{
    font-weight: 800;
    color: #121212;
}

.dashboard-switch{
    margin: 0.3rem 0 0;
    font-size: 0.9rem;
    color: var(--brand-muted);
}

.dashboard-switch a{
    font-weight: 800;
    color: var(--brand-primary-2);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.dashboard-switch a:hover{
    color: var(--brand-ink);
}

@media (max-width: 620px){
    .dashboard-hero{
        padding: 1.4rem;
        flex-direction: column;
        text-align: center;
    }

    .dashboard-hero-content,
    .dashboard-hero-title{
        text-align: center;
    }

    .dashboard-hero-title{
        font-size: 1.7rem;
    }
}

/* =========================
   MESSAGES
   ========================= */

.nav-link--messages{
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.nav-message-badge{
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.38rem;
    border-radius: 999px;

    background: #9a1f1f;
    color: #fff;

    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.35rem;
    text-align: center;

    box-shadow: 0 6px 14px rgba(154, 31, 31, 0.28);
}

/* =========================
   NAVIGATION TYPE LANDING PAGE
   ========================= */

.nav-link{
    color: var(--brand-brown) !important;
    font-weight: 700;
    opacity: 0.92;
    position: relative;
}

.nav-link:hover{
    color: var(--brand-ink) !important;
}

.nav-link::after{
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 3px;
    border-radius: 999px;
    background: var(--brand-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
}

.nav-link:hover::after{
    transform: scaleX(1);
}

/* =========================
   PRESENTATION PATRON
   ========================= */

.presentation-layout{
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 2rem;
    align-items: start;
}

.presentation-text{
    min-width: 0;
}

.presentation-media{
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.presentation-image{
    width: 100%;
    max-width: 300px;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

@media (max-width: 900px){
    .presentation-layout{
        grid-template-columns: 1fr;
    }

    .presentation-media{
        justify-content: flex-start;
    }
}

/* =========================
   BLOCS LIENS FICHIERS
   ========================= */

.wax-links{
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 10px;
    margin-bottom: 8px;
}

.wax-file-link{
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #eaf4ff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: #1f2937;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.wax-file-link:hover{
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(18, 18, 18, 0.08);
    border-color: rgba(244, 161, 46, 0.35);
    color: #111827;
}

.wax-file-ico{
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #d7ecff;
    color: #2f7fd6;
    flex: 0 0 auto;
}

.wax-file-title{
    font-weight: 800;
    line-height: 1.25;
    color: #1f2937;
}

.download-version-badge{
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 0.35rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #F4A12E;
    color: #1f1f1f;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* =========================
   TITRES TYPE BADGE (LEGAL)
   ========================= */

.section-badge{
    display: inline-block;
    background: #fff6ee;
    color: var(--brand-brown);
    border-left: 6px solid var(--brand-primary);
    border-radius: 12px;
    padding: 0.6rem 1rem;
    font-weight: 700;
    margin: 1.5rem 0 0.6rem;
    font-size: 1.05rem;
}

/* =========================
   CONTACT FORM DYNAMIQUE
   ========================= */

.contact-form-card{
    overflow: hidden;
}

.contact-form-intro{
    text-align: center;
}

.contact-form-panel{
    max-width: 720px;
    margin: 1.8rem auto 0;
    padding: 1.6rem;
    border-radius: 18px;
    background:
        radial-gradient(circle at top left, rgba(244, 161, 46, 0.14), transparent 32%),
        #fffaf5;
    border: 1px solid rgba(244, 161, 46, 0.22);
    box-shadow: 0 12px 28px rgba(91, 55, 33, 0.08);
}

.contact-textarea{
    min-height: 150px;
    resize: vertical;
    letter-spacing: normal;
    text-align: left;
}

.contact-hp{
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.contact-form-toggle{
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* =========================
   VERIFY CODE - CONTACT BLOCK
   ========================= */

.auth-card + .contact-form-card{
    max-width: 720px;
    margin: 1.8rem auto 0;
}

.auth-card + .contact-form-card .intro{
    margin-bottom: 1.4rem;
}

/* =========================
   FOOTER
   ========================= */

.footer,
.footer-news{
    margin-left: -2rem;
    margin-right: -2rem;
    background: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding: 2.5rem 2rem;
}

.footer-inner{
    max-width: 960px;
    text-align: center;
}

.footer-social{
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
}

.social-btn{
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    font-size: 1.2rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.social-btn:hover{
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.social-btn.fb{
    color: #1877F2;
}

.social-btn.ig{
    color: #E1306C;
}

.social-btn.yt{
    color: #FF0000;
}

.footer-site{
    margin: 0 0 14px;
    font-weight: 700;
}

.footer-site a{
    color: #1f2937;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.footer-site a:hover{
    color: #000;
}

.footer-legal{
    font-size: 0.9rem;
    line-height: 1.6;
    color: #374151;
    margin-top: 10px;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    text-align: center;
}

.footer-company{
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 0.5px;
    color: #121212;
}

.footer-line{
    display: block;
}

.footer-meta{
    font-size: 0.85rem;
    color: #6b7280;
}

.footer-legal::before{
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: var(--brand-primary);
    border-radius: 999px;
    margin-bottom: 10px;
    opacity: 0.8;
}

/* =========================
   FOOTER BAS (LÉGAL)
   ========================= */

.footer-bottom{
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* liens */
.footer-links{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 18px;
    font-size: 0.9rem;
}

.footer-links a{
    color: #6b7280;
    text-decoration: none;
    position: relative;
    transition: color 0.2s ease;
    font-weight: 500;
}

.footer-links a:hover{
    color: #000;
}

/* séparateurs élégants */
.footer-links a::after{
    content: "•";
    margin-left: 12px;
    color: #d1d5db;
}

.footer-links a:last-child::after{
    content: "";
}

/* copyright */
.footer-copy{
    font-size: 0.8rem;
    color: #9ca3af;
    text-align: center;
}

/* =========================
   LIENS SECONDAIRES
   ========================= */

.back-link{
    display: block;
    text-align: center;
    margin-top: 1rem;
    color: var(--brand-brown);
    text-decoration: none;
    font-weight: 700;
}

.back-link:hover{
    color: var(--brand-ink);
}

/* =========================
   ADMINISTRATION
   ========================= */

.admin-table{
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.admin-table th,
.admin-table td{
    border-bottom: 1px solid rgba(0,0,0,0.08);
    padding: 0.6rem 0.5rem;
    text-align: left;
    font-size: 0.95rem;
}

.admin-table th{
    font-weight: 700;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 700px){
    body{
        padding: 0 1rem;
    }

    .header,
    .footer,
    .footer-news{
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .header-bar{
        min-height: auto;
        padding: 1.2rem 0;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1rem;
    }

    .header-brand{
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .brand-text{
        align-items: center;
    }

    .header-nav{
        width: 100%;
        justify-content: center;
        text-align: center;
        gap: 1rem 1.25rem;
    }

    .auth-card,
    .card,
    .section-presentation,
    .section-contact{
        padding: 1.4rem;
    }

    .brand-title,
    .page-title,
    .title{
        font-size: 1.7rem;
    }
}

@media (max-width: 640px){
    .wax-file-link{
        padding: 12px 14px;
    }

    .wax-file-ico{
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 768px){
    .header.is-sticky-mobile{
        position: sticky;
        top: 0;
        z-index: 50;
        backdrop-filter: blur(8px);
    }
}

.admin-preview-banner {
    margin: 0 auto 1.5rem;
    padding: 0.9rem 1.25rem;
    background: #fff3cd;
    border-bottom: 1px solid #f4d27a;
    color: #5b3721;
    text-align: center;
    font-weight: 600;
}

.admin-preview-banner-link {
    display: inline-block;
    margin-left: 0.75rem;
    color: #5b3721;
    font-weight: 800;
    text-decoration: underline;
}