/* =======================================================
   STYLE.CSS - SOUVERAINETÉ NUMÉRIQUE (ARNAUD SOULIGNAC)
   Version COMPLÈTE - Août 2026
   ======================================================= */

:root {
    --primary: #8A9A85;
    --primary-dark: #6F7D6B;
    --dark: #1A2F1C;
    --gray: #546E7A;
    --brown: #3E2723;
    --brown-dark: #5D4037;
    --orange: #E65100;
    --bg-color: #f4f4f4;
}

/* --- 1. CONFIGURATION GLOBALE --- */
body {
    font-family: 'Liberation Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--dark);
    line-height: 1.6;
    font-size: 16px;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    background-color: var(--bg-color);
    overflow-x: hidden;
}

body.has-bg {
    background-image: url('fond.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
}

/* --- 2. GESTION DES LANGUES --- */
.lang-en { display: none !important; }
.lang-fr { display: inline; }

body.mode-en .lang-fr { display: none !important; }
body.mode-en .lang-en { display: inline !important; }
body.mode-en div.lang-en { display: block !important; }
body.mode-en div.lang-fr { display: none !important; }
body.mode-en p.lang-en { display: block !important; }
body.mode-en p.lang-fr { display: none !important; }
body.mode-en span.lang-en { display: inline !important; }
body.mode-en span.lang-fr { display: none !important; }
body.mode-en li .lang-en { display: inline; }
body.mode-en li .lang-fr { display: none; }
body.mode-en th .lang-en { display: inline; }
body.mode-en th .lang-fr { display: none; }
body.mode-en td .lang-en { display: inline; }
body.mode-en td .lang-fr { display: none; }

/* --- 3. BOUTON LANGUE --- */
.lang-switch-btn {
    background: white;
    border: 2px solid var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 100;
    flex-shrink: 0;
}
.lang-switch-btn:hover {
    background: var(--primary);
    transform: scale(1.05);
}
.lang-switch-btn span {
    opacity: 0.4;
    transition: opacity 0.2s;
}
.lang-switch-btn span.active {
    opacity: 1;
    filter: drop-shadow(0 0 2px rgba(0,0,0,0.3));
}

/* --- 4. LAYOUT : GUIDES & DOCUMENTATION --- */
.main-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    background: transparent !important;
    box-shadow: none !important;
    width: 100%;
    max-width: 900px;
    margin: 0 auto 40px auto;
    position: relative;
    display: flex;
    flex-direction: column;
}

.container:last-child { margin-bottom: 40px; }

.content-wrapper {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.96);
    padding: 40px 5%;
    margin: 40px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
    min-height: 600px;
}

.header-logo-container { 
    text-align: center; 
    margin-bottom: 20px; 
    width: 100%; 
    display: block; 
}
.header-logo { 
    max-width: 150px; 
    height: auto; 
    display: inline-block; 
}

.header-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--primary);
    width: 100%;
    text-align: center;
    gap: 15px;
}

.header-container h1 {
    font-size: 1.8rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--dark);
    line-height: 1.2;
    font-weight: 800;
    order: 2;
    width: 100%;
}

.header-container h1 span {
    font-size: 1.1rem;
    color: var(--brown);
    text-transform: none;
    display: block;
    margin-top: 8px;
    font-weight: 600;
}

.header-container .lang-switch-btn {
    order: 1;
    margin-bottom: 5px;
}

/* Typographie & Éléments des Guides */
h2 {
    font-size: 1.4rem;
    color: var(--brown);
    text-transform: uppercase;
    border-bottom: 2px solid var(--brown);
    padding-bottom: 8px;
    margin-top: 40px;
    margin-bottom: 20px;
    font-weight: 800;
}

h3 {
    font-size: 1.1rem;
    color: var(--brown-dark);
    margin-top: 25px;
    margin-bottom: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

p { margin-bottom: 15px; text-align: justify; }
ul { margin: 10px 0 20px 20px; padding: 0; }
li { margin-bottom: 8px; }
strong { color: var(--brown); }
a {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px dotted var(--primary-dark);
    word-break: break-word;
}
a:hover { background: var(--primary); color: white; }

/* Boxes (Intro, Note, Alert, Step) */
.intro-box, .note, .alert, .step, .price-box {
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    font-size: 0.95rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    width: 100%;
    box-sizing: border-box;
}
.intro-box { background: #f4f6f4; border-left: 5px solid var(--primary); }
.note { background: #fff8e1; border-left: 5px solid #fbc02d; color: #555; }
.note strong { color: #d35400; }
.alert { background: #ffebee; border-left: 5px solid #c62828; color: #555; }
.step { background: #fafafa; border: 1px solid #e0e0e0; border-left: 5px solid var(--primary); }
.price-box { background: #e8f5e9; border: 2px solid var(--primary); text-align: center; }

.step-number {
    font-weight: 800;
    color: var(--brown);
    font-size: 0.85rem;
    text-transform: uppercase;
    display: block;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

/* Tables & Screenshots */
.table-container {
    width: 100%;
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 600px;
}
th, td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
    vertical-align: top;
}
th {
    background-color: var(--primary);
    color: white;
    font-weight: 700;
    white-space: nowrap;
}
tr:nth-child(even) { background-color: #f9f9f9; }

.screenshot {
    text-align: center;
    margin: 15px 0;
    padding: 8px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    width: 100%;
    box-sizing: border-box;
}
.screenshot img {
    max-width: 100%;
    height: auto;
    max-height: 300px;
    display: block;
    margin: 0 auto;
    border-radius: 2px;
    border: 1px solid #eee;
}
.screenshot-caption {
    font-style: italic;
    color: var(--gray);
    font-size: 0.85rem;
    margin-top: 6px;
    border-top: 1px dashed #eee;
    padding-top: 4px;
}

.footer {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 0.85rem;
    color: var(--gray);
    text-align: center;
    font-style: italic;
    padding-bottom: 40px;
}

/* --- 5. LAYOUT : CRÉATIONS (Header Gradient + Tuiles) --- */
header.creative-header {
    height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, #e8f5e9 0%, #ffffff 100%);
    position: relative;
}

header.creative-header h1 {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

header.creative-header .lang-switch-btn {
    position: absolute;
    top: 20px;
    right: 20px;
}

.scroll-indicator {
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--gray);
    animation: bounce 2s infinite;
    cursor: pointer;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

.showcase-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 50px 20px;
    background: white;
    gap: 40px;
}

.showcase-container.central-layout {
    justify-content: center;
    position: relative;
    padding: 50px 20px;
}

.desktop-grid {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 40px;
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin-bottom: 60px;
    min-height: 300px;
}

/* Tuiles (Style Commun) */
.tile-1, .tile-2, .tile-3 {
    position: absolute;
    width: 220px;
    min-height: 280px;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: var(--dark);
    border: 1px solid #eee;
    transition: all 0.3s ease;
    box-sizing: border-box;
    opacity: 1;
}

.tile-1:hover, .tile-2:hover, .tile-3:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    border-color: var(--primary);
    z-index: 20;
}

  .tile {
            width: 100%;
            max-width: 600px;
            min-height: 200px;
            background: white;
            border-radius: 12px;
            padding: 30px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            align-items: center;
            text-align: center;
            text-decoration: none;
            color: var(--dark);
            border: 1px solid #eee;
            transition: all 0.3s ease;
            opacity: 1;
            transform: translateY(30px);
            box-sizing: border-box;
        }
        
.tile-next {
            width: 100%;
            max-width: 600px;
            min-height: 200px;
            background: white;
            border-radius: 12px;
            padding: 30px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            align-items: center;
            text-align: center;
            text-decoration: none;
            color: var(--dark);
            border: 1px solid #eee;
            transition: all 0.3s ease;
            opacity: 0.45;
            transform: translateY(30px);
            box-sizing: border-box;
            border-style: dashed;
        }

.tile-icon { font-size: 3rem; margin-bottom: 15px; text-align: center; }
.tile-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--brown);
    text-align: center; 
    margin-bottom: 8px;
    text-transform: uppercase;
}
.tile-desc {
    font-size: 0.85rem;
    color: var(--gray);
    text-align: justify; 
    margin-left: 5px; 
    margin-right: 5px;
    line-height: 1.4;
    margin-bottom: 15px;
}

.tile-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: auto;
}

.tile-btn {
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    width: 100%;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
    display: block;
    box-sizing: border-box;
    cursor: pointer;
    border: none;
}
.btn-main { background: var(--primary); color: white; }
.btn-main:hover { background: var(--primary-dark); }
.btn-secondary { background: transparent; border: 1px solid var(--gray); color: var(--gray); }
.btn-secondary:hover { border-color: var(--brown); color: var(--brown); background: #f9f9f9; }
.btn-update { background: var(--brown); color: white; font-size: 0.8rem; }
.btn-update:hover { background: var(--brown-dark); }
.btn-pdf { background: var(--primary); color: white; }
.btn-pdf:hover { background: var(--primary-dark); }
.btn-web { background: var(--brown); color: white; }
.btn-web:hover { background: var(--brown-dark); }

/* Noyau Central */
.central-core {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: var(--dark);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 10;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border: 4px solid var(--primary);
    flex-shrink: 0;
}
.central-core h2 {
    font-size: 1.2rem;
    margin: 0;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.central-core p {
    font-size: 0.8rem;
    margin-top: 5px;
    color: #ccc;
    max-width: 80%;
}

/* Positionnement Desktop */
.tile-1 { top: 50%; left: 0px; transform: translateY(0%); }
.tile-2 { top: 50%; right: 0px; transform: translateY(0%); }

.tile-3-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 20px;
    position: relative;
    z-index: 5;
}

.tile-3 {
    position: relative; 
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    margin: 0;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 20px;
    background: var(--dark);
    color: white;
    font-size: 0.9rem;
}
footer a { color: var(--primary); text-decoration: none; font-weight: 600; }
footer a:hover { color: white; text-decoration: underline; }

/* --- 6. LAYOUT : PAGE "COMMANDE" --- */
.page-commande {
    background: white;
    max-width: 800px;
    margin: 40px auto;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    border-top: 5px solid var(--primary);
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    min-height: 80vh;
}
.header-commande {
    padding: 50px 30px;
    text-align: center;
    position: relative;
    z-index: 1;
    background: rgba(255,255,255,0.95);
}
.status-badge {
    display: inline-block;
    background: var(--orange);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
}
.content-commande {
    padding: 40px 30px;
    position: relative;
    z-index: 1;
    background: rgba(255,255,255,0.95);
    text-align: center;
}
.construction-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
}
.back-link {
    display: inline-block;
    margin-top: 40px;
    color: var(--gray);
    text-decoration: none;
    font-size: 9pt;
    border-bottom: 1px dashed var(--gray);
    padding: 5px 10px;
    transition: all 0.2s;
}
.back-link:hover {
    color: var(--primary-dark);
    border-bottom-style: solid;
    background: #f0f4f0;
    border-radius: 4px;
}

/* --- 7. COMPOSANTS SPÉCIFIQUES (Réinjectés) --- */

/* Bouton de commande dans les notes */
.btn-commande {
    background: var(--brown);
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: background 0.2s;
}
.btn-commande:hover {
    background: var(--brown-dark);
    color: white;
}

/* Badge Vert Non-Cliquable (Style Bouton) - RÉINJECTÉ */
.btn-badge-green {
    background: var(--primary);
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-block;
    margin-top: 10px;
    cursor: default;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Prix en gros */
.price-tag {
    font-size: 2rem;
    font-weight: 800;
    color: var(--brown);
    display: block;
    margin: 15px 0;
    text-align: center;
    letter-spacing: 1px;
}

/* Modal */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0; top: 0; 
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6); 
    backdrop-filter: blur(3px);
}
.modal-content {
    background-color: #fefefe; 
    margin: 10% auto; 
    padding: 30px; 
    border: 1px solid #888;
    width: 90%; 
    max-width: 600px; 
    border-radius: 12px; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    position: relative;
}
.close { 
    color: #aaa; 
    float: right; 
    font-size: 28px; 
    font-weight: bold; 
    cursor: pointer; 
}
.close:hover { color: black; }
.modal-body { 
    text-align: left; 
    line-height: 1.6; 
    color: var(--dark); 
    white-space: pre-wrap; 
}
.modal-title { 
    font-size: 1.5rem; 
    color: var(--brown); 
    margin-bottom: 20px; 
    border-bottom: 2px solid var(--primary); 
    padding-bottom: 10px; 
}

.header-logo-img {
    max-width: 350px;
    height: auto;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(138, 154, 133, 0.4);
    margin-bottom: 20px;
}

/* --- 8. RESPONSIVE MOBILE --- */
@media (max-width: 600px) {
    body.has-bg { background-attachment: scroll; }
    .content-wrapper { padding: 25px 20px; margin: 20px 10px; min-height: auto; }
    .header-container h1 { font-size: 1.4rem; }
    .header-container h1 span { font-size: 1rem; }
            .header-logo {max-width: 100px; }
            .header-logo-container 
            {margin-bottom: 15px;margin-top: 10px;}
    header.creative-header { height: 50vh; }
    header.creative-header h1 { font-size: 1.8rem; }
    header.creative-header .lang-switch-btn {
        position: static;
        margin: 10px auto;
    }
    
    .desktop-grid {
        flex-direction: column;
        gap: 40px;
        min-height: auto;
    }

    .central-core {
        width: 250px;
        height: 250px;
        margin: 0 auto;
    }

    .tile-1, .tile-2 {
        position: relative;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        width: 100%;
        max-width: 340px;
        margin: 0 auto;
    }

    .tile-3-container { margin-top: 0; }
    .tile-3 {
        width: 100%;
        max-width: 340px;
        margin: 0 auto;
    }
    
    .page-commande { margin: 20px 10px; min-height: auto; }
    .header-logo-img { max-width: 250px; }
}

/* --- 9. IMPRESSION --- */
@media print {
    body {
        background: white !important;
        background-image: none !important;
        color: black;
        font-size: 10pt;
    }
    .lang-switch-btn, .scroll-indicator, footer, .back-link, .btn-download, .no-print, .modal {
        display: none !important;
    }
    .content-wrapper, .container {
        box-shadow: none !important;
        margin: 0 !important;
        padding: 10px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .page-commande {
        box-shadow: none;
        border: none;
        margin: 0;
        width: 100%;
    }
    a { text-decoration: underline; color: black; }
    h2 { border-bottom: 1px solid #000; }
}
/* --- STYLE DU LOGO EN ARRIÈRE-PLAN DU CERCLE --- */
.core-bg-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Centre parfaitement l'image */
    width: 80%; /* Taille relative au cercle (ajustable : 50% à 80%) */
    height: auto;
    opacity: 0.7; /* Transparence : 0.1 = très discret, 0.3 = plus visible */
    z-index: 1; /* Derrière le texte */
    pointer-events: none; /* Le clic traverse l'image pour ne pas gêner */
}

/* Mise à jour du .central-core pour gérer le contexte d'empilement */
.central-core {
    /* ... tes propriétés existantes ... */
    position: relative; /* Nécessaire pour que le absolute de l'image se repère ici */
    overflow: hidden; /* Empêche le logo de dépasser du cercle si besoin */
}

/* Ajustement du texte pour qu'il reste au premier plan */
.central-core h2,
.central-core p {
    position: relative;
    z-index: 2; /* Au-dessus du logo */
}