:root{
  --green:#073c2d;
  --green2:#0b5b43;
  --red:#f52a2f;
  --red2:#cb1f24;
  --ink:#14261f;
  --muted:#66756f;
  --line:#d9e4df;
  --bg:#f6f8f7;
  --shadow:0 18px 45px rgba(15,45,34,.08);
}

/* ========================================
   RESET
======================================== */

*{
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

body{
  margin:0;
  font-family:Arial,Helvetica,sans-serif;
  color:var(--ink);
  background:var(--bg);
}

a{
  color:inherit;
}

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


/* ========================================
   HEADER / TOPBAR
======================================== */

.topbar{
  min-height:92px;

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

  gap:30px;

  padding:18px clamp(18px,4vw,60px);

  background:var(--green);
  color:#fff;
}


/* ========================================
   LOGO + NOM RFA TOURNOIS
======================================== */

.brand{
  display:flex;
  align-items:center;

  gap:14px;

  color:#fff;
  text-decoration:none;

  flex-shrink:0;
}

.brand-logo{
  width:58px;
  height:58px;

  object-fit:contain;

  flex-shrink:0;
}

.brand-text{
  display:flex;
  flex-direction:column;

  line-height:1.15;
}

.brand-text b{
  display:block;

  color:#fff;

  font-size:22px;
  font-weight:800;
}

.brand-text small{
  display:block;

  margin-top:4px;

  color:rgba(255,255,255,.72);

  font-size:13px;
}


/* ANCIEN BALLON - SI ENCORE PRESENT */

.brand .ball{
  font-size:34px;
}


/* ========================================
   NAVIGATION
======================================== */

.topbar nav{
  display:flex;
  align-items:center;

  gap:24px;

  flex-wrap:wrap;
}

.topbar nav a{
  color:#fff;

  text-decoration:none;

  font-weight:800;

  transition:
    opacity .25s ease,
    transform .25s ease;
}

.topbar nav a:hover{
  opacity:.82;
  transform:translateY(-1px);
}

.topbar .pill{
  padding:14px 20px;

  border-radius:999px;

  background:var(--red);
  color:#fff;
}


/* ========================================
   CONTAINER
======================================== */

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


/* ========================================
   HERO
======================================== */

.hero{
  padding:95px 0 82px;

  background:
    radial-gradient(
      circle at 90% 20%,
      rgba(245,42,47,.09),
      transparent 35%
    ),
    linear-gradient(
      180deg,
      #fff,
      var(--bg)
    );
}

.hero h1,
.public-title h1,
.dash-head h1,
.form-card h1{
  margin:12px 0 20px;

  font-size:clamp(38px,6vw,72px);
  line-height:1.02;
}

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

.hero p{
  max-width:720px;

  font-size:19px;
  line-height:1.7;

  color:var(--muted);
}


/* ========================================
   SECTIONS / GRID
======================================== */

.section{
  padding:70px 0;
}

.grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);

  gap:24px;
}


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

.card,
.form-card,
.pool-block,
.tournament-item{
  background:#fff;

  border:1px solid var(--line);
  border-radius:28px;

  box-shadow:var(--shadow);
}

.card{
  padding:30px;
}

.muted{
  color:var(--muted);
  line-height:1.65;
}


/* ========================================
   ACTIONS
======================================== */

.actions{
  display:flex;
  align-items:center;

  gap:12px;

  flex-wrap:wrap;
}


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

.btn{
  min-height:48px;

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

  padding:0 22px;

  border:0;
  border-radius:999px;

  text-decoration:none;

  font-weight:900;

  cursor:pointer;

  transition:
    transform .2s ease,
    box-shadow .2s ease;
}

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

.btn-red{
  background:var(--red);
  color:#fff;
}

.btn-green{
  background:var(--green2);
  color:#fff;
}

.btn-light{
  background:#fff;

  border:1px solid var(--line);

  color:var(--ink);
}

.btn-small{
  min-height:38px;

  padding:0 14px;

  font-size:13px;
}


/* ========================================
   BADGE
======================================== */

.badge{
  display:inline-flex;

  padding:8px 12px;

  border-radius:999px;

  background:#e8f2ee;
  color:var(--green);

  font-size:12px;
  font-weight:900;
}


/* ========================================
   PRIX
======================================== */

.price{
  margin:12px 0;

  color:var(--green);

  font-size:44px;
  font-weight:950;
}


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

.form-card{
  width:min(880px,calc(100% - 36px));

  margin:55px auto;

  padding:44px;
}

.form-card h1{
  font-size:clamp(38px,5vw,58px);
}

label{
  display:block;

  margin:20px 0 8px;

  font-weight:900;
}

input,
select{
  width:100%;
  min-height:54px;

  padding:0 16px;

  border:1px solid #c8d7d0;
  border-radius:16px;

  background:#fff;

  font:inherit;
}

input[type="file"]{
    padding: 14px;
}

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

  gap:18px;
}


/* ========================================
   NOTICES
======================================== */

.notice{
  margin:18px 0;

  padding:17px 20px;

  border:1px solid #cfdcd6;
  border-radius:16px;

  background:#f4f8f6;
}

.notice.error{
  border-color:#ffb0b2;

  background:#fff0f0;

  color:#8c1d20;
}

.notice.success{
  border-color:#b7dccd;

  background:#eff9f4;

  color:#14533e;
}

.forgot-link{
  text-align:right;
}

.forgot-link a{
  color:var(--red);
  font-weight:800;
}

.local-test-box{
  margin:20px 0;

  padding:22px;

  border:2px dashed #e0b100;
  border-radius:18px;

  background:#fffbea;
}


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

.dash-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;

  gap:30px;

  margin-bottom:30px;
}

.tournament-list{
  display:grid;

  gap:15px;
}

.tournament-item{
  display:flex;
  justify-content:space-between;
  align-items:center;

  gap:20px;

  padding:22px 25px;
}


/* ========================================
   ADMIN TOURNOI
======================================== */

.admin-grid{
  display:grid;
  grid-template-columns:1fr 1fr;

  gap:24px;

  margin-bottom:30px;
}

.pool-block{
  padding:28px;

  margin:28px 0;
}

.pool-title{
  display:flex;
  justify-content:space-between;

  margin-bottom:20px;

  border-bottom:1px solid var(--line);
}


/* ========================================
   EQUIPES
======================================== */

.teams-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);

  gap:12px;

  margin-bottom:28px;
}

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

  gap:12px;

  padding:14px;

  border:1px solid var(--line);
  border-radius:16px;
}

.team-ident{
  display:flex;
  align-items:center;

  gap:10px;
}

.team-logo{
  width:28px;
  height:28px;

  object-fit:contain;

  vertical-align:middle;

  margin-right:8px;
}

.team-logo.big{
  width:44px;
  height:44px;
}

.team-logo-placeholder{
  width:44px;
  height:44px;

  display:grid;
  place-items:center;

  border-radius:12px;

  background:#eef4f1;
}


/* ========================================
   TABLEAUX
======================================== */

.table-wrap{
  width:100%;

  overflow-x:auto;

  margin:16px 0 30px;

  border:1px solid var(--line);
  border-radius:18px;

  background:#fff;
}

table{
  width:100%;

  min-width:760px;

  border-collapse:collapse;
}

th,
td{
  padding:14px 12px;

  border-bottom:1px solid #edf2ef;

  text-align:center;
}

th{
  background:#f2f7f4;

  font-size:13px;
}

th:nth-child(2),
td:nth-child(2){
  text-align:left;
}


/* ========================================
   MATCHS
======================================== */

.matches-list{
  display:grid;

  gap:10px;
}

.match-row{
  display:grid;

  grid-template-columns:
    minmax(130px,1fr)
    72px
    20px
    72px
    minmax(130px,1fr)
    auto;

  gap:10px;

  align-items:center;

  padding:12px;

  border:1px solid var(--line);
  border-radius:16px;

  background:#fff;
}

.match-team.home{
  text-align:right;
}

.score-input{
  min-height:42px;

  padding:0 8px;

  text-align:center;
}

.versus{
  text-align:center;

  font-weight:900;
}


/* ========================================
   PAGE PUBLIQUE
======================================== */

.public-title{
  margin-bottom:35px;
}

.public-pool{
  margin:30px 0 45px;
}


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

footer{
  padding:30px 20px;

  text-align:center;

  color:rgba(255,255,255,.72);

  background:var(--green);
}


/* ========================================
   TABLETTE
======================================== */

@media(max-width:900px){

  .grid,
  .admin-grid,
  .teams-grid{
    grid-template-columns:1fr;
  }

  .topbar,
  .dash-head,
  .tournament-item{
    flex-direction:column;
    align-items:flex-start;
  }

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

  .topbar nav{
    width:100%;
  }

}


/* ========================================
   MOBILE
======================================== */

@media(max-width:650px){

  .form-card{
    margin:30px auto;

    padding:26px 20px;
  }

  .topbar{
    padding:16px 18px;

    gap:18px;
  }

  .brand-logo{
    width:48px;
    height:48px;
  }

  .brand-text b{
    font-size:18px;
  }

  .brand-text small{
    font-size:10px;
  }

  .topbar nav{
    gap:14px;
  }

  .topbar nav a{
    font-size:14px;
  }

  .match-row{
    grid-template-columns:
      1fr
      62px
      18px
      62px
      1fr;
  }

  .match-row .btn{
    grid-column:1/-1;

    width:100%;
  }

  .match-team{
    font-size:13px;
  }

}
