/* ==========================================================================
SOMMAIRE
==========================================================================
1. VARIABLES & RESET
2. TYPOGRAPHIE & ÉLÉMENTS DE BASE
3. COMPOSANTS COMMUNS (Boutons, Icônes, Encarts)
4. STRUCTURE GLOBALE (Header, Navigation, Footer)
5. PAGE D'ACCUEIL (Hero, Services, Téléchargement, Contact)
6. PAGES LÉGALES (Fil d'Ariane, Sommaire, Contenu)
7. RESPONSIVE DESIGN (Media Queries Mobile)
========================================================================== */


/* ==========================================================================
1. VARIABLES & RESET
========================================================================== */
:root {
--primary-color: #00ADEF;
--primary-dark: #008bbd;
--text-color: #333333;
--text-light: #666666;
--bg-color: #ffffff;
--bg-alt: #f8f9fa;
--border-color: #e0e0e0;
--shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
--transition: all 0.3s ease;
}

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

html {
scroll-behavior: smooth;
}


/* ==========================================================================
2. TYPOGRAPHIE & ÉLÉMENTS DE BASE
========================================================================== */
body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
color: var(--text-color);
background-color: var(--bg-color);
line-height: 1.6;
}

img {
max-width: 100%;
height: auto;
}

a {
text-decoration: none;
color: var(--primary-color);
transition: var(--transition);
}

a:hover {
color: var(--primary-dark);
}

ul {
list-style: none;
}

.container {
width: 100%;
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}

section {
padding: 80px 0;
}

.bg-alt {
background-color: var(--bg-alt);
}

.section-title {
text-align: center;
font-size: 2.5rem;
margin-bottom: 20px;
color: var(--text-color);
line-height: 1.2;
}

.section-subtitle {
text-align: center;
color: var(--text-light);
margin-bottom: 50px;
font-size: 1.1rem;
}


/* ==========================================================================
3. COMPOSANTS COMMUNS
========================================================================== */

/* Boutons */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 12px 24px;
background-color: var(--primary-color);
color: #ffffff;
border: none;
border-radius: 4px;
font-weight: 600;
cursor: pointer;
text-align: center;
transition: var(--transition);
}

.btn:hover {
background-color: var(--primary-dark);
color: #ffffff;
}

.btn-outline {
background-color: transparent;
border: 2px solid var(--primary-color);
color: var(--primary-color);
}

.btn-outline:hover {
background-color: var(--primary-color);
color: #ffffff;
}

.btn-sm {
padding: 10px 16px;
font-size: 0.9rem;
width: 100%;
}

.btn.loading {
opacity: 0.7;
cursor: not-allowed;
}

/* Icônes SVG */
.icon {
display: inline-block;
vertical-align: middle;
}

.btn svg {
width: 20px;
height: 20px;
margin-right: 8px;
}

/* Encart de vigilance (Alert-box) */
.alert-box {
background-color: #fff3cd;
color: #856404;
border: 1px solid #ffeeba;
padding: 15px 20px;
border-radius: 8px;
margin-bottom: 30px;
display: flex;
align-items: center;
gap: 15px;
}

.alert-box svg {
flex-shrink: 0;
width: 24px;
height: 24px;
stroke: #856404;
}

.alert-box p {
margin: 0;
font-weight: 500;
font-size: 0.95rem;
color: #856404;
}


/* ==========================================================================
4. STRUCTURE GLOBALE (Header, Navigation, Footer)
========================================================================== */

/* Header & Navigation */
header {
background-color: var(--bg-color);
box-shadow: var(--shadow);
position: sticky;
top: 0;
z-index: 1000;
}

.nav-container {
display: flex;
justify-content: space-between;
align-items: center;
height: 80px;
position: relative;
}

.logo img {
max-height: 50px;
}

.nav-links {
display: flex;
gap: 30px;
align-items: center;
}

.nav-links a {
color: var(--text-color);
font-weight: 500;
}

.nav-links a:hover {
color: var(--primary-color);
}

/* Menu Burger (Mobile) */
.burger-menu {
display: none;
background: none;
border: none;
cursor: pointer;
padding: 10px;
}

.burger-icon {
display: block;
width: 25px;
height: 3px;
background-color: var(--text-color);
position: relative;
transition: var(--transition);
}

.burger-icon::before,
.burger-icon::after {
content: '';
position: absolute;
width: 25px;
height: 3px;
background-color: var(--text-color);
left: 0;
transition: var(--transition);
}

.burger-icon::before { top: -8px; }
.burger-icon::after { top: 8px; }

/* Footer */
footer {
background-color: var(--text-color);
color: #ffffff;
padding: 40px 0 20px;
text-align: center;
}

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

.footer-links a {
color: #cccccc;
}

.footer-links a:hover {
color: var(--primary-color);
}

.copyright {
color: #999999;
font-size: 0.9rem;
}


/* ==========================================================================
5. PAGE D'ACCUEIL
========================================================================== */

/* Hero Section */
.hero {
text-align: center;
padding: 100px 20px;
}

.hero h1 {
font-size: 3rem;
color: var(--text-color);
margin-bottom: 20px;
line-height: 1.2;
}

.hero h1 span {
color: var(--primary-color);
}

.hero p {
font-size: 1.2rem;
color: var(--text-light);
max-width: 600px;
margin: 0 auto 40px auto;
}

.hero-buttons {
display: flex;
gap: 20px;
justify-content: center;
flex-wrap: wrap;
}

/* Grilles & Cartes (Services, Publics) */
.grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 30px;
}

.card {
background: var(--bg-color);
padding: 30px;
border-radius: 8px;
box-shadow: var(--shadow);
text-align: center;
transition: var(--transition);
border-bottom: 4px solid transparent;
}

.card:hover {
transform: translateY(-5px);
border-bottom: 4px solid var(--primary-color);
}

.card h3 {
margin-bottom: 15px;
font-size: 1.5rem;
}

.card p {
color: var(--text-light);
}

.card-icon {
display: flex;
justify-content: center;
margin-bottom: 20px;
}

.card-icon svg {
width: 48px;
height: 48px;
stroke: var(--primary-color);
stroke-width: 1.5;
transition: var(--transition);
}

.card:hover .card-icon svg {
stroke: var(--primary-dark);
}

.card[style*="background-color: var(--primary-color)"] .card-icon svg {
stroke: #ffffff;
}

/* Sections avec image à côté (Formations, Cyber) */
.flex-split {
display: flex;
align-items: center;
gap: 50px;
flex-wrap: wrap;
}

.flex-split > div {
flex: 1;
min-width: 300px;
}

/* Cartes de Téléchargement (RustDesk) */
.download-card {
display: flex;
flex-direction: column;
height: 100%;
}

.download-card h3 {
margin-bottom: 20px;
}

.download-links {
display: flex;
flex-direction: column;
gap: 10px;
margin-top: auto;
}

/* Couleur et animation des vrais logos de téléchargement */
.brand-icon {
fill: var(--primary-color);
color: var(--primary-color);
transition: var(--transition);
}

.card:hover .brand-icon {
fill: var(--primary-dark);
color: var(--primary-dark);
}

/* Section Contact Améliorée */
.contact-wrapper {
display: grid;
grid-template-columns: 1fr 2fr;
gap: 40px;
background: var(--bg-color);
border-radius: 12px;
box-shadow: var(--shadow);
overflow: hidden;
}

.contact-info {
background-color: var(--primary-color);
color: #ffffff;
padding: 40px;
}

.contact-info h3 {
font-size: 1.8rem;
margin-bottom: 15px;
}

.contact-info p {
margin-bottom: 30px;
color: #e0f6ff;
}

.info-item {
display: flex;
align-items: flex-start;
margin-bottom: 25px;
gap: 15px;
}

.info-icon svg {
width: 24px;
height: 24px;
stroke: #ffffff;
}

.info-item h4 {
font-size: 1.1rem;
margin-bottom: 5px;
}

.info-item a, .info-item p {
color: #e0f6ff;
font-size: 0.95rem;
margin-bottom: 0;
}

.info-item a:hover {
color: #ffffff;
text-decoration: underline;
}

.contact-form-container {
padding: 40px;
}

.contact-form {
width: 100%;
}

.form-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
}

.form-group {
margin-bottom: 20px;
}

.form-group label {
display: block;
margin-bottom: 8px;
font-weight: 600;
font-size: 0.9rem;
color: var(--text-color);
}

.form-group input,
.form-group textarea,
.form-group select {
width: 100%;
padding: 12px 15px;
border: 1px solid var(--border-color);
border-radius: 6px;
font-family: inherit;
font-size: 1rem;
background-color: var(--bg-alt);
transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
outline: none;
border-color: var(--primary-color);
background-color: var(--bg-color);
box-shadow: 0 0 0 3px rgba(0, 173, 239, 0.1);
}

/* Select personnalisé */
.custom-select select {
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
background-image:
url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2300ADEF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
background-repeat: no-repeat;
background-position: right 15px top 50%;
background-size: 12px auto;
}

/* Messages de notification formulaire */
.form-message {
margin-top: 20px;
padding: 15px;
border-radius: 6px;
text-align: center;
font-weight: 500;
}

.form-message.hidden {
display: none;
}

.form-message.success {
background-color: #d4edda;
color: #155724;
border: 1px solid #c3e6cb;
}

.form-message.error {
background-color: #f8d7da;
color: #721c24;
border: 1px solid #f5c6cb;
}


/* ==========================================================================
6. PAGES LÉGALES
========================================================================== */

/* En-tête des pages légales */
.legal-hero {
padding: 60px 20px;
background-color: var(--bg-alt);
text-align: center;
border-bottom: 1px solid var(--border-color);
}

.legal-hero__title {
font-size: 2.5rem;
color: var(--primary-color);
margin-bottom: 10px;
}

/* Fil d'Ariane (Breadcrumb) */
.breadcrumb {
margin-bottom: 20px;
font-size: 1rem;
color: var(--text-light);
}

.breadcrumb__list {
display: flex;
justify-content: center;
align-items: center;
gap: 8px;
list-style: none;
padding: 0;
margin: 0;
}

.breadcrumb__item {
display: flex;
align-items: center;
}

.breadcrumb__item + .breadcrumb__item::before {
content: '/';
margin: 0 8px;
color: var(--border-color);
}

/* Structure Corps de page (Sommaire + Contenu) */
.legal-container {
display: flex;
gap: 40px;
padding: 60px 20px;
align-items: flex-start;
}

.legal-toc {
flex: 1;
min-width: 250px;
position: sticky;
top: 100px;
background: var(--bg-alt);
padding: 30px;
border-radius: 8px;
box-shadow: var(--shadow);
}

.legal-toc__title {
font-weight: 600;
font-size: 1.2rem;
margin-bottom: 15px;
color: var(--text-color);
}

.legal-toc__list li {
margin-bottom: 12px;
}

.legal-toc__link {
color: var(--text-light);
font-size: 0.95rem;
}

.legal-toc__link:hover {
color: var(--primary-color);
}

.legal-content {
flex: 3;
}

/* Sections de texte légales */
.legal-section {
padding: 0;
margin-bottom: 50px;
}

.legal-section__title {
margin-top: 0;
font-size: 1.8rem;
color: var(--primary-color);
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: 2px solid var(--bg-alt);
}

/* Tableaux / Listes de définitions légales */
.legal-block {
background: var(--bg-alt);
padding: 20px;
border-radius: 8px;
margin: 20px 0;
}

.legal-dl {
display: flex;
flex-direction: column;
gap: 12px;
}

.legal-dl__row {
display: flex;
flex-wrap: wrap;
border-bottom: 1px solid var(--border-color);
padding-bottom: 12px;
}

.legal-dl__row:last-child {
border-bottom: none;
padding-bottom: 0;
}

.legal-dl__row dt {
font-weight: 600;
width: 250px;
color: var(--text-color);
}

.legal-dl__row dd {
flex: 1;
margin: 0;
color: var(--text-light);
}

.legal-list {
padding-left: 20px;
margin: 15px 0 30px;
list-style-type: disc;
}

.legal-list li {
margin-bottom: 8px;
}


/* ==========================================================================
7. RESPONSIVE DESIGN
========================================================================== */

/* Tablette (Contact & Grilles) */
@media (max-width: 900px) {
.contact-wrapper {
grid-template-columns: 1fr;
}

.form-row {
grid-template-columns: 1fr;
}
}

/* Mobile (Menu, Hero, Légales, Formations, Publics) */
@media (max-width: 768px) {
/* Menu Navigation */
.burger-menu {
display: block;
}

.nav-links {
display: none;
flex-direction: column;
position: absolute;
top: 80px;
left: 0;
width: 100%;
background-color: var(--bg-color);
box-shadow: var(--shadow);
padding: 20px;
text-align: center;
}

.nav-links.active {
display: flex;
}

/* Typographie et espacements réduits */
.hero {
padding: 60px 20px;
}

.hero h1 {
font-size: 2rem;
}

section {
padding: 50px 0;
}

.section-title {
font-size: 1.8rem;
}

/* Boutons en pleine largeur */
.hero-buttons {
flex-direction: column;
gap: 15px;
}

.hero-buttons .btn,
.flex-split .btn {
width: 100%;
}

/* Correction du scroll horizontal : on force 1 colonne */
.grid {
grid-template-columns: 1fr !important;
}

/* Flex-split : on empile les éléments */
.flex-split {
flex-direction: column;
gap: 30px;
}

.flex-split > div {
width: 100%;
min-width: 100%;
}

/* Correction de l'affichage des listes à puce sur mobile */
ul[style*="list-style-position"] {
list-style-position: outside !important;
margin-left: 20px;
}

/* Pages légales */
.legal-container {
flex-direction: column;
}

.legal-toc {
position: static;
width: 100%;
margin-bottom: 30px;
}

/* Encart de vigilance plus compact */
.alert-box {
flex-direction: column;
text-align: center;
gap: 10px;
}
}