/* Initialisation globale */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* Très important pour le calcul des largeurs */
    text-decoration: none; /* Enlève le soulignement des liens partout */
    list-style: none; /* Enlève les puces des listes partout */
}

/*élements genaraux ---------------------*/
html,
body {
    width: 100%;
    height: 100%;
    /* Optionnel : évite les barres de défilement horizontales bizarres */
    overflow-x: hidden;
}

#content {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.8;
    color: #333;
}

h1 {
    color: #2c3e50;
    border-bottom: 3px solid #e74c3c;
    padding-bottom: 10px;
    text-align: center;
    font-size: 2em;
}

h2 {
    color: #2980b9;
    margin-top: 40px;
    border-right: 5px solid #2980b9; /* Bordure à droite en RTL */
    padding-right: 15px;
    background: #f4f7f9;
    padding-top: 5px;
    padding-bottom: 5px;
}

h3 {
    color: #444;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
    margin-top: 30px;
}

a {
    color: #2980b9;
    text-decoration: none;
}

.home-hero {
    text-align: center;
    padding: 50px 20px;
    background: #fdfdfd;
    border-bottom: 2px solid #eee;
}

/*vignette des pages principales*/
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 40px 20px;
}

.tool-card {
    background: #93a092;
    border: 2px solid #1f6a2f;
    padding: 20px;
    border-radius: 10px;
    transition: transform 0.3s;
    text-align: center;
   background: linear-gradient(to bottom, #ffffff, #93a092);
}

.tool-card:hover {
    transform: translateY(-5px);
    background: #f4f7f9;
    border-color: #e74c3c;
}

.btn-action {
    display: inline-block;
    background: #2c3e50;
    color: white;
    padding: 10px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 20px;
}

/* Configuration de la Grille */

/* 2. STRUCTURE (Ta grille CSS) */
.grid-container {
    display: grid;
    grid-template-areas:
        "header header"
        "main sidebar"
        "footer footer";
    grid-template-columns: 1fr 300px;
    gap: 0; /* Tu peux mettre 0 ici car tu gères les marges internes (padding) */
    min-height: 100vh; /* Toute la hauteur de l'écran */
}
header {
    grid-area: header;
    background: #2c3e50;
    color: white;
    padding: 0 20px;
}
main {
    grid-area: main;
    background: white;
    padding: 20px;
    min-height: 400px;
}
aside {
    grid-area: sidebar;
    background: #a3bdc3;
    padding: 10px;
}
footer {
    grid-area: footer;
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 10px;
}

/* --- Esthétique du Menu --- */

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}
.logo {
    font-size: 1.6rem;
    font-weight: bold;
}
nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0;
}

/* Liens et Sous-rubriques */
nav a {
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 10px;
}

.btn-menu-langue {
    background-color: #3498db; /* Couleur de fond */
    color: white; /* Couleur du texte */
    padding: 10px 20px; /* Espacement intérieur */
    text-decoration: none; /* Enlève le soulignement du lien */
    border-radius: 5px; /* Coins arrondis */
    display: inline-block; /* Permet de gérer padding/margin */
    font-size: 16px; /* Taille du texte */
    cursor: pointer; /* Curseur main au survol */
    transition: background-color 0.3s ease; /* Transition douce */
}

.btn-menu-langue:hover {
    background-color: #0056b3;
} /* Changement de couleur au survol */

.has-dropdown {
    position: relative;
    cursor: pointer;
    padding: 10px;
    border-radius: 5px;
}
.has-dropdown:hover {
    background-color: #bd7213;
}
.has-dropdown.active .arrow {
    transform: rotate(180deg);
}
.has-dropdown.active .dropdown {
    display: block;
}
.hamburger {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.arrow {
    display: inline-block;
    transition: transform 0.3s ease;
    font-size: 0.8rem;
    margin-left: 5px;
}

.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #babcda;
    color: #000000;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    min-width: 200px;
    z-index: 1000;
    padding: 5px 0;
}

.dropdown a {
    text-decoration: none;
    color: #2c3e50;
    padding: 12px 20px;
    display: block;
    border-bottom: 1px solid #f0f0f0;
}
.dropdown a:last-child {
    border-bottom: none;
}
.dropdown a:hover {
    background: rgba(223, 132, 19, 0.84);
}

/* --- general--- */

.orange {
    color: #c56a16;
}
.blanc {
    color: white;
}

/*les widget s*/
.card {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;

    border: 1px solid #044751;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

/* En-tête de la carte */
.card-header {
    background-color: rgba(244, 181, 26, 0.95);
    font-size: 1rem;
    color: #3f3838;
    font-weight: 600;

    border-radius: 5px;
    text-align: center;
}

/* Corps de la carte */

.remarque {
    display: block;
    font-size: 0.85rem;
    color: #471b21;
    font-style: italic;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Style du bouton */
.bouton-voir {
    display: inline-block;
    width: 100%;
    text-align: center;
    background-color: #3498db;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition:
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.bouton-voir:hover {
    background-color: #2980b9;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

#pagesprincipales a {background-color: #2c3e50;}

/* Conteneur du widget */
.widget-share {
    transition: all 0.3s ease;
}

/* Style des liens de partage */
.widget-share a {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s ease;
}

/* Animation au survol (Hover) */
.widget-share a:hover {
    transform: translateY(-5px) scale(1.1); /* Le bouton monte et grossit légèrement */
    filter: brightness(1.2); /* Il devient plus lumineux */
}

/* Effet au clic (pour le mobile) */
.widget-share a:active {
    transform: scale(0.95);
}

.bank-table {
    width: 100%;
    border-collapse: collapse;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 10px 0px;
    background: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.bank-table th,
.bank-table td {
    padding: 3px 4px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.bank-table thead {
    background-color: #f8f9fa;
    color: #666;
    text-transform: uppercase;
    font-size: 0.85rem;
}

/* Alignement spécifique demandé pour la colonne Nom */
.bank-table .text-left {
    text-align: left !important;
}

/* Gestion du mode Arabe (RTL) pour l'alignement 
.bank-table[dir="rtl"] .text-left {
    text-align: right !important;
}*/

.bank-table .flag {
    font-size: 1.5rem;
    width: 40px;
}

.bank-table .rate-val {
    font-weight: bold;
    color: #2c3e50;
}

.rate-up {
    color: #28a745; /* Vert */
    font-weight: 500;
}

.rate-down {
    color: #dc3545; /* Rouge */
    font-weight: 500;
}

.trend-pct {
    font-size: 0.9rem;
    width: 70px;
}

.arrow {
    font-size: 0.7rem;
    width: 20px;
}

#conteneurWidgets {
    display: grid;
    row-gap: 10px;
}
/* Effet au survol */
.bank-table tbody tr:hover {
    background-color: #c7d6e4;
    
}

.widget-tmm {
   
    text-align: center;
    background: linear-gradient(to bottom, #ffffff, #f06e6e);
}

.grand{font-size: 3rem; /* Grande police */
    font-weight: 800;}
.centre {
  text-align: center;
    
}








.widget-clock {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border-left: 5px solid #3498db; /* Barre bleue distinctive à gauche */
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}



.clock-date {
    color: #7f8c8d;
    font-size: 0.95rem;
    text-transform: capitalize;
    margin-bottom: 5px;
}

.clock-time {
    font-size: 2.8rem;
    font-weight: 700;
    color: #2c3e50;
    letter-spacing: -1px;
    margin-bottom: 15px;
}

.clock-status {
    display: flex;
    align-items: center;
    padding-top: 15px;
    border-top: 1px dashed #ecf0f1;
    color: #95a5a6;
    font-size: 0.8rem;
}

.status-dot {
    height: 8px;
    width: 8px;
    background-color: #2ecc71; /* Point vert clignotant */
    border-radius: 50%;
    display: inline-block;
    margin: 0 10px;
    animation: pulse 2s infinite;
}

.status-text b {
    color: #34495e;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.2;
    }
    100% {
        opacity: 1;
    }
}

/* Style pour les page de change */

#lastupdate{ color: #e74c3c;font-weight: 600;}
.table-container {
    background: #cbc6c6;
    border-radius: 12px;
   
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow-x: auto;
    margin: 5px auto;
    max-width: 800px;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    border: solid 1px;
}

thead {
    background-color: #2c3e50;
    color: white;
}

th, td {
    padding: 5px 5px;
    border-bottom: 1px solid #eee;
}

/* Couleurs des variations */
.text-green { color: green; font-weight: bold; }
.text-red { color: red; font-weight: bold; }

/* Style des icônes SVG */
.col-img svg {
    vertical-align: middle;
    border-radius: 4px; /* Un petit arrondi sur les drapeaux */
}

/* Effet au survol des lignes */
tbody tr:hover {
    background-color: #f1f4f7;
    transition: 0.3s;
}

/* Alignement numérique */
.col-cours, .col-var {
    font-family: 'Courier New', Courier, monospace;
    font-weight: 600;
}

/*convertisseur*/
.converter-box {
    background: #e4b294;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    max-width: 450px;
    margin: 20px auto;
}

.converter-row label, .converter-row select {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--dark);
    border: none;
    background: none;
    font-size: 1rem;
}

.input-group {
    display: flex;
    align-items: center;
    background: #f4f7f6;
    border-radius: 8px;
    padding: 5px 15px;
}

.input-group input {
    border: none;
    background: none;
    font-size: 1.5rem;
    padding: 10px 0;
    width: 100%;
    outline: none;
}

.unit-code {
    font-weight: bold;
    color: #95a5a6;
    margin-left: 10px;
}

.converter-mid {
    text-align: center;
    margin: 15px 0;
}

#selectTarget,#selectCible,#select-type-achat{
  max-width: 100%;
  border: 2px solid #333;
  border-radius: 8px;
  padding: 5px;
  background-color: white;
 text-overflow: ellipsis;
  color: #333;
  font-weight: 500;
  font-size: large;
}

.margin-option {
    margin-top: 15px;
    font-size: 0.85rem;
    color: #800d33;
}


.period-toggle {
     border: groove black;
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 20px 0;
    flex-wrap: wrap; /* Pour que ça passe sur 2 lignes si l'écran est petit */
}
.btn-period {
    border: solid 1px;
    background: none;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 600;
    color: #666;
    transition: 0.3s;
}

.btn-period.active {
    background: #2c3e50; /* Couleur sombre pro */
    color: white;
    border-color: #2c3e50;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/*.pair-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: bold;
}*/
.pair-selector {
    display: flex;
    flex-direction: column; /* Aligne les éléments verticalement */
    gap: 10px;             /* Ajoute un espace entre les 3 lignes */
    align-items: flex-start; /* Aligne tout à gauche (ou 'center' si vous préférez) */
    width: 95%;           /* S'assure que le conteneur ne dépasse pas */
}

.pair-selector select, 
.pair-selector button, 
.pair-selector span {
    min-width: 30%;           /* Optionnel : pour qu'ils fassent tous la même largeur */
    box-sizing: border-box;
}



.btn-icon {
    background: #ca00ff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
}



.btn-p {
    background: #f8f9fa;
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    transition: all 0.2s ease;
    flex: 1; /* Les boutons prennent la même largeur */
    max-width: 80px;
    text-align: center;
}

.btn-p:hover {
    background: #e9ecef;
    border-color: #ccc;
}

.btn-p.active {
    background: #2c3e50; /* Couleur sombre pro */
    color: white;
    border-color: #2c3e50;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* --- Badge Récapitulatif --- */
.header-badge {
    background: #fff;
    border-left: 4px solid #d4af37; /* Couleur Or */
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    text-align: center;
    font-size: 16px;
}

/* --- Couleurs de variation --- */
.text-green { color: #27ae60; font-weight: bold; }
.text-red { color: #e74c3c; font-weight: bold; }
#messageBV{color: #0c6e35; font-weight: bold; font-size: small}

/* --- Calculateur --- */
.calculator-section {
    background: rgba(181, 135, 135, 0.71);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #eee;
    margin: 25px 0;
}

.calc-inputs {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
}

#input-weight,#input-weighta {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    outline: none;
}

#input-weight:focus,#input-weighta:focus {
    border-color: #966f37;
}

.switch-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.btn-swap {
    
    height: 45px;
    border-radius: 12px;
    border: 2px solid #0c0645;
    background: #e7c0c0;
    color: #060763;
    font-size: 20px;
    cursor: pointer;
    
    padding: 10px 10px;
    transition: 0.3s;
}

.btn-swap:hover {
    background: #ef6d6d;
}
.btn-swap:active {
    background: white;
}
/* { outline: 1px solid red !important; }*/
/* reglages des drapeau de choix svg et leur conteneur*/
.country-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  /* On force chaque ligne à ne jamais dépasser 60px (ajuste selon tes besoins) */
  grid-auto-rows: 80px; 
  gap: 10px;
  align-items: center; /* Centre les SVG verticalement dans ces 60px */
}
/*choix du pays en haut */
.country-selector svg {
    cursor: pointer;
    border: 1px solid transparent; /* Prépare la place pour la bordure */
    border-radius: 4px;
    transition: all 0.2s ease;
    padding: 2px;
}

.country-selector svg:hover {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.country-selector svg.active {
    border: #327d2e solid 3px; /* Ta fameuse bordure rouge */
}
.info-card {
  display: flex;
  align-items: center;
  background: #e9cfcf;
  color: #0f0a32;
  padding: 15px;
  border-radius: 12px;
  border-left: 5px solid #091f37;
  max-width: 500px;
  margin: 20px auto;
}

.info-flag {
  width: 100px;
  height: 100px;
  margin-right: 15px;
}

.info-flag svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.info-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.line-location {
  font-weight: bold;
  font-size: 1rem;
  color: #530b0b;
}

.line-time {
  font-size: 1.5rem;
  font-weight: 800;
  color: #231c1c;
}

.line-currency {
  font-size: 0.9rem;
  color: #04182f;
  text-transform: uppercase;
}

.maillage-interne{
 margin: 40px 0; padding: 25px; background: #e7db99; border-radius: 15px; border: 2px solid #e2e8f0; text-align: center;   
}
.maillage-interne a {display: inline-block; margin-top: 15px; font-weight: bold; color: #2c3e50; text-decoration: underline;}


/* Tablette */
@media (min-width: 600px) {
  .country-selector {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* PC */
@media (min-width: 1024px) {
  .country-selector {
    grid-template-columns: repeat(10, 1fr);
  }
}

.flags {
 
 width: 100%;
 max-height: 100%;
  }



/* Classe pour le drapeau sélectionné */


@media (max-width: 768px) {
    .grid-container {
        grid-template-areas:
            "header"
            "main"
            "sidebar"
            "footer";
        grid-template-columns: 1fr;
    }
    nav ul {
        flex-direction: column;
    }

    .hamburger {
        display: block;
    }

    nav {
        display: none; /* Caché sur mobile */
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: #34495e;
        padding: 20px;
    }
    nav.open {
        display: block;
    } /* Affiché quand on clique sur hamburger */

    nav ul {
        flex-direction: column;
        align-items: flex-start;
    }
    .dropdown {
        position: absolute;
        width: 100%;
        box-shadow: none;
        background: white;
        color: #270303;
    }
}
